Reputation: 3824
When starting an activity from an activity embedded in a wear side notification (using WearableExtender.setDisplayIntent
), activity is not drawn/rendered properly when 2nd activity finishes, just a black screen. Activities/pages to left/right render properly.
Problem Description:
- Activity DisplayActivity
(embedded as display intent):
<activity
android:name=".DisplayActivity"
android:allowEmbedded="true"
android:exported="true"
android:taskAffinity=""/>
- Activity StartedActivity
:
<activity
android:name=".StartedActivity"
android:allowEmbedded="true"
android:exported="true"
/>
- Embed DisplayActivity in a wear-side notification
- From DisplayActivity, start StartedActivity using Activity.startActivityForResult with new task flags (intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK)
)
- Finish DisplayActivity
by swiping to right or by clicking some button that calls Activity.finish()
;
- Returning to notification, but DisplayActivity
is black and doesn't recognize touch input. Swipe to left/right pages works.
Expected: DisplayActivity to render correctly.
Device: Samsung Gear Live
Software version: 4.4W
Build number: KMV78Y
Upvotes: 1
Views: 436
Reputation: 3824
Opened https://code.google.com/p/android/issues/detail?id=74882 for this problem, changing from Activity.startActivityForResult()
to Activity.startActivity()
seems to be a workaround.
Upvotes: 1