Fixed
Status Update
Comments
[Deleted User] <[Deleted User]> #2
Which device is issue being reported on? Can you get any logs from the device for us after you turn on verbose logging ?
[Deleted User] <[Deleted User]> #3
A few things in addition to the questions in #2:
1. Can you verify that this problem still occurs in beta03? This is available now.
2. Can you check your merged manifest has a network permission (ACCESS_NETWORK_STATE)? It should get merged in automatically.
1. Can you verify that this problem still occurs in beta03? This is available now.
2. Can you check your merged manifest has a network permission (ACCESS_NETWORK_STATE)? It should get merged in automatically.
jg...@google.com <jg...@google.com>
[Deleted User] <[Deleted User]> #4
#3: have now tried beta03 and it's the same behaviour... periodic work schedule breaks down when network constraint is applied (after a period of time with no network). And yes, ACCESS_NETWORK_STATE is in the merged manifest... it's actually in the main manifest anyway.
#2: I'll try...
#2: I'll try...
jg...@google.com <jg...@google.com> #5
Re #2 getting logs... I have tried previously to get logs from the user, and on each occasion the logs started *after* the point of interest, as if the logs had been cleared just before (e.g. just after a problem), so they've not been of any use.
The way I'm getting logs is via a button in the widget configuration activity which runs the following:
Runtime.getRuntime().exec("logcat -f " + logFile + " *:V");
Is there a better way of getting logs from a user (where the user is not an advanced user and can only just about handle pressing a button and sending a text file)?
The way I'm getting logs is via a button in the widget configuration activity which runs the following:
Runtime.getRuntime().exec("logcat -f " + logFile + " *:V");
Is there a better way of getting logs from a user (where the user is not an advanced user and can only just about handle pressing a button and sending a text file)?
jg...@google.com <jg...@google.com> #6
Looks like this issue isn't specific to Unique**Periodic**Work ... with a network constraint applied to UniqueWork, if it is scheduled for a time when there is no network, it doesn't go off, even when network is restored. Again, on this user's Android 4.3 device... on the devices I've tested, it works fine.
Do I need to do anything special to make this work on Android 4.3?
Do I need to do anything special to make this work on Android 4.3?
jg...@google.com <jg...@google.com> #7
And periodic work is running just fine on the problem device without the network constraint applied... runs like clockwork.
jg...@google.com <jg...@google.com> #8
Can you send us a sample app?
[Deleted User] <[Deleted User]> #9
Does your app have verbose logging turned on for WorkManager. You will need to initialize WorkManager with a custom configuration for that.
* Remove the default WorkManager initializer using:
<provider
android:name="androidx.work.impl.WorkManagerInitializer"
android:authorities="${applicationId}.workmanager-init"
tools:node="remove"/>
* Initialize WorkManager in your own content provider or Application#onCreate() with a custom configuration
WorkManager.initialize(
applicationContext,
new Configuration.Builder().setMinimumLoggingLevel(Log.VERBOSE).build());
You will see a lot more WorkManager logs now.
* Remove the default WorkManager initializer using:
<provider
android:name="androidx.work.impl.WorkManagerInitializer"
android:authorities="${applicationId}.workmanager-init"
tools:node="remove"/>
* Initialize WorkManager in your own content provider or Application#onCreate() with a custom configuration
WorkManager.initialize(
applicationContext,
new Configuration.Builder().setMinimumLoggingLevel(Log.VERBOSE).build());
You will see a lot more WorkManager logs now.
[Deleted User] <[Deleted User]> #10
Typically when there are changes in constraints on API <=22 and you are using the AlarmManager implementation you should see logs with a log tag "WM-ConstraintsCmdHandler".
jg...@google.com <jg...@google.com> #11
Do you have any comment or suggestion regarding mine at #5? Is that an OK way to get logs from a user, particularly one that has a non-rooted device and where I don't particularly want to ask them to go to the trouble of install logcat apps etc... just a simple button in the app which will dump logs would be ideal.
[Deleted User] <[Deleted User]> #12
We don't really have any good advice for you there; it touches on potentially sensitive data so getting data directly from the user is between what you and the user deem acceptable.
What is the user's 4.3 device name/model?
What is the user's 4.3 device name/model?
jg...@google.com <jg...@google.com>
jg...@google.com <jg...@google.com> #13
When I use:
WorkManager.initialize(
applicationContext,
new Configuration.Builder().setMinimumLoggingLevel(Log.VERBOSE).build());
The 'Builder' is highlighted in red with Cannot resolve symbol 'Builder'
WorkManager.initialize(
applicationContext,
new Configuration.Builder().setMinimumLoggingLevel(Log.VERBOSE).build());
The 'Builder' is highlighted in red with Cannot resolve symbol 'Builder'
[Deleted User] <[Deleted User]> #14
Sorry, hard to tell without a sample app. It sounds like you may have a missing import or something, but I can't diagnose that.
[Deleted User] <[Deleted User]> #15
OK I used androidx.work.Configuration.Builder() instead
ap...@google.com <ap...@google.com> #16
User's device is a Samsung Galaxy S3
ap...@google.com <ap...@google.com> #17
Where can I send a logcat from the user? There isn't anything of any sensitive nature so far as I can tell, but best not to post it here.
jg...@google.com <jg...@google.com> #18
You can send the logs here; I just mean I can't advise you about collection.
Description
Creating Sample app to verify, but in case this is already a known issue