Fixed
Status Update
Comments
ru...@gmail.com <ru...@gmail.com> #2
su...@google.com <su...@google.com> #3
> We accept pull requests! :)
Is there a public repo somewhere? I don't see any obvious repo for it inhttps://android.googlesource.com , and it doesn't seem to be inside https://android.googlesource.com/platform/frameworks/support .
Room supports final fields (yay!), which probably will suffice for many people with respect to this feature request.
Is there a public repo somewhere? I don't see any obvious repo for it in
Room supports final fields (yay!), which probably will suffice for many people with respect to this feature request.
ru...@gmail.com <ru...@gmail.com> #4
Room supports immutability (it can use arg constructors) but does not directly support AutoValue. It is in the schedule but not high priority :/. Idk much about its internals at this stage so I'm not sure how we would implement it but should be totally doable.
Sorry we don't have the source release yet :/.
Sorry we don't have the source release yet :/.
ra...@google.com <ra...@google.com> #5
"It is in the schedule but not high priority" -- completely understandable.
"Sorry we don't have the source release yet :/." -- ah, OK, I thought perhaps with the pull request comment, that meant that there was a repo somewhere that I had overlooked.
Thanks!
"Sorry we don't have the source release yet :/." -- ah, OK, I thought perhaps with the pull request comment, that meant that there was a repo somewhere that I had overlooked.
Thanks!
ra...@google.com <ra...@google.com> #6
Add autovalue support also means you can easily achieve parcelable by https://github.com/rharter/auto-value-parcel . Please consider support this.
to...@gmail.com <to...@gmail.com> #7
AutoValue is really a handy way to ensure data integrity.
ru...@gmail.com <ru...@gmail.com> #8
Please add AutoValue support. AutoValue is a Google library with really good benefits such as toString() , hashCode() , AutoValue.Builder , checks at creation time if @NonNull values are null, etc.
ru...@gmail.com <ru...@gmail.com> #9
FWIW, issue 64206877 is not publicly accessible.
ed...@gmail.com <ed...@gmail.com> #10
@Yigit: That appears to be a private ticket. Any way we can have access to keep up with it?
da...@gmail.com <da...@gmail.com> #11
Have any updates?
Description
Version used: implementation 'android.arch.work:work-runtime:1.0.0-alpha12'
Devices/Android versions reproduced on: Moto e3 Power / Andorid 6.0 Marshmallow
Sometimes Periodic workManager gets called two times.
This is my built.gradle file:-
compileSdkVersion 28
minSdkVersion 22
targetSdkVersion 28
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
Here is this code:-
//---------------------------------------------------------Class Login---------------------------------------------------------------------------------------//
SaveData("Frist");
PeriodicWorkRequest periodicWorkRequest = new PeriodicWorkRequest.Builder(DailyLogoutTask.class,
1, TimeUnit.DAYS)
.build();
WorkManager.getInstance().enqueueUniquePeriodicWork("DailyTaskRestaurantLite"
, ExistingPeriodicWorkPolicy.KEEP
, periodicWorkRequest);
private void SaveData(String str) {
SharedPreferences.Editor preferencesEditor = mPreferences.edit();
preferencesEditor.putString("Status1", str);
preferencesEditor.apply();
}
//------------------------------------------------------Class DailyLogoutTask-----------------------------------------------------------------------//
import android.content.Context;
import android.content.SharedPreferences;
import androidx.annotation.NonNull;
import android.util.Log;
import com.domo.ClsGlobal;
import com.demo.classes.ClsUserInfo;
import androidx.work.Result;
import androidx.work.WorkManager;
import androidx.work.Worker;
import androidx.work.WorkerParameters;
import static android.content.Context.MODE_PRIVATE;
public class DailyLogoutTask extends Worker {
private SharedPreferences mPreferences;
private static final String mPreferncesName = "MyPerfernces";
Context context;
public DailyLogoutTask(@NonNull Context context, @NonNull WorkerParameters workerParams) {
super(context, workerParams);
this.context = context;
mPreferences = context.getSharedPreferences(mPreferncesName, MODE_PRIVATE);
Log.e("DailyLogoutTask", "DailyLogoutTask call");
}
@NonNull
@Override
public Result doWork() {
String getstatus = mPreferences.getString("Status1", "No Task Perform");
Log.d("---getstatus---", "----getstatus---" + getstatus);
Log.e("doWork", "doWork call");
if (!getstatus.equalsIgnoreCase("Frist")) {
ClsUserInfo userInfo = new ClsUserInfo();
ClsUserInfo userLoginStatus = ClsGlobal.getUserInfo(context);
if (!userLoginStatus.getLoginStatus().equalsIgnoreCase("DEACTIVE")){
Log.e("chack", "Logout");
userInfo.setLoginStatus("DEACTIVE");
ClsGlobal.setUserInfo(userInfo, context);
// ClsGlobal.sendNotification("IF", "IF background Logout".concat(ClsGlobal.getEntryDate()),context);
WorkManager.getInstance().cancelUniqueWork("DailyTaskRestaurantLite");
Log.d("getFirstDateOfMonth", "----UserInfo---" + userLoginStatus.getLoginStatus());
}
} else {
Log.e("chack", "Not Frist");
// ClsGlobal.sendNotification("ELSE", "ELSE background Logout".concat(ClsGlobal.getEntryDate()),context);
SaveData("Second");
}
return Result.success();
}
private void SaveData(String str) {
Log.e("SaveData", str);
SharedPreferences.Editor preferencesEditor = mPreferences.edit();
preferencesEditor.putString("Status1", str);
preferencesEditor.apply();
}
If this is a bug in the library, we would appreciate if you could attach:
- Sample project to trigger the issue.
- A screenrecord or screenshots showing the issue (if UI related).