Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Migrate to Jetpack Proto Data Store from Shared Preferences when you have more than 300 Preferences in your android app?

Đang mở
#26 0 bình luận 1 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
20/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Đình trệ
Công nghệ
android, kotlin
Lĩnh vực
mobile-dev

Hướng nghiên cứu

Bắt đầu bằng việc xem xét cách sử dụng Shared Preferences hiện có và hướng dẫn di chuyển Jetpack Proto Data Store. Issue đề cập đến một định nghĩa .proto, một Serializer và một đối tượng Flow, nhưng không nêu tên tệp, bài kiểm thử hoặc điểm vào nào. Để hoàn thành, cần thống nhất cách tiếp cận di chuyển cho hơn 300 preference.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Shared Preferences are used heavily into my application, they are more than 300s of every possible data types such as int, boolean, String etc etc.

Now I want to migrate into Jetpack Proto Data store, the all the tutorials which I have tried define all the preferences into .proto file and then retrieve the data from Data Store and provides a FLOW object of the class in which all possible preferences are defined.

The class structure which I define into proto, is used to create Serializer as well into Flow object of the retrieved value, so my QUESTION is,

Do I need to define all the 300+ preferences into a single file first and then use them (It would require me to lots of code to write into each places wherever shared prefs is used) OR is there any better way of migration ?

Ngôn ngữ chính
Kotlin
Star
242
Fork
115
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của android/codelab-android-datastore

Tất cả issue của android/codelab-android-datastore

Issue tương tự

Thêm issue về Kotlin

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.