Status Update
Comments
vi...@google.com <vi...@google.com> #2
Thank you for reporting this issue. For us to further investigate this issue, please provide the following additional information:
- Android bug report (to be captured after reproducing the issue)
Android Wear devices connected to Android devices
-
On you Android phone, following the instructions below, under the section ‘Instructions on your companion phone or tablets (Android)’
-
Launch the ‘Android Wear’ app on your phone or tablet.
-
Tap on the three vertical ellipsis on the top right hand corner of the screen and click on “Report Wearable Bug” to capture a bug report from the watch
-
On the watch, you will observe a notification card with the text “Bug report #X is being generated”. It can take up to 20 minutes for the bug report to be generated and transferred to your phone.
-
Once the bug report is done, the notification card on the watch changes to “Bug report #X captured” and you will receive a notification on the phone that reads “Wearable bug report finished.
-
Tap to send." Tap on this notification and email the bug report to a pre populated email address
Instructions on your companion phone or tablets (Android)
- On your Android device, go to Settings > About phone or About tablet.
- At the bottom of the screen, touch 'Build number' seven times in quick succession. You’ll see a message saying you’re now in developer mode.
- Press Back to go back to the main Settings screen.
- Touch Developer options.
- At the top of the screen, make sure 'Developer options' is set to ON.
- Check the box next to USB debugging.
- Check the box next to Bug report shortcut.
- Reproduce the issue or error message on your phone or tablet. It’s important that your device logs at least one occurrence of the problem.
- Immediately after seeing the issue, press and hold the power button until the power menu appears.
- Select Take bug report, then select Report in the dialog that follows.
- After a significant delay -- up to two minutes -- your phone or tablet will vibrate and display a notification saying ‘Bug report captured’. Touch the notification to open Gmail with the report attached. +After replying to this message, you can disable developer mode and bug reports by going to Settings > Developer Options and sliding the top toggle to OFF.
ve...@lasergame.de <ve...@lasergame.de> #3
I have followed the following steps:
1. Run an app with the following permission:
<uses-permission-sdk-23 android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS"/>
2. Run either one of the two pieces of code:
// Will fail silently with ActivityTaskManager system_server I START u0 {act=android.settings.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS dat=package:cmp=com.google.android.apps.wearable.settings/com.google.android.clockwork.settings.FakeSettingsActivity}
val intent = Intent(Settings.ACTION_REQUEST_IGNORE_BATTERY_OPTIMIZATIONS)
intent.setData(Uri.parse("package:" + context.packageName));
context.startActivity(intent);
// Will crash the app with android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.settings.IGNORE_BATTERY_OPTIMIZATION_SETTINGS dat=package: }
val intent = Intent(Settings.ACTION_IGNORE_BATTERY_OPTIMIZATION_SETTINGS)
intent.setData(Uri.parse("package:" + context.packageName));
context.startActivity(intent);
I executed the first piece of code and then the second, and captured a dump state. See here (shared with android-bugreport@google.com):
Description
In WearOS 4, the SYSTEM_ALERT_WINDOW permission is no longer supported, complicating the process of opening activities from the background. Given this restriction, what is the recommended approach for launching an activity when the app is not in the foreground? Should I use a BroadcastReceiver or a Service, considering the limitations imposed by WearOS 4 on background execution? Are there alternative methods or best practices for achieving this functionality? For instance, could Notification channels or other UI elements be used effectively to prompt the user to open the activity manually? Additionally, how do background execution limits in WearOS 4 affect the use of these components, and are there specific APIs or patterns recommended for compatibility and adherence to best practices?