android


Shortcuts for <activity-alias> disappear on Jelly Bean


I've adopted a legacy app for a complete rewrite, and as a result, the starting activity has been renamed. To cope with users having placed a shortcut to my app from their home screen, I've added an activity-alias that points from the old name to the new.
Previously:
<activity
android:name=".SplashScreenActivity"
android:theme="#style/Theme.Styled.NoAnimation" />
Now:
<activity
android:name=".activities.StartActivity_"
android:theme="#style/Theme.Styled.NoAnimation">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity-alias
android:name=".SplashScreenActivity"
android:exported="true"
android:targetActivity=".activities.StartActivity_"/>
This works great for various devices I tested between 2.1 and 4.0. On Jelly Bean (4.1 & 4.2), however, I see that the default launcher is now removing the launch icon.
What's worse is that in some tests, the upgrade doesn't show the app whatsoever, only revealing it from the application list on the second install. There seems to be no rhyme or reason; sometimes the app just goes missing.
I've toyed with swapping the IntentFilter:
<activity
android:name=".activities.StartActivity_"
android:theme="#style/Theme.Styled.NoAnimation" />
<activity-alias
android:name=".SplashScreenActivity"
android:exported="true"
android:targetActivity=".activities.StartActivity_" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>
ADB doesn't seem to like that very much:
No Launcher activity found!
The launch will only sync the application package on the device!
For completeness: adding the IntentFilter to both activity names keeps the home screen shortcut, but shows two apps in the applications list.
How can I migrate and keep all my users satisfied?
On Android 4.2.2, moving the launcher intent filter to another activity or alias causes all shortcuts, widgets, and the system app list icon to disappear. This bug occurs on devices and emulators. This issue does not happen in Android 4.1.2. I have filed this bug here:
App launcher shortcuts and widgets disappear after changing launcher activity
https://code.google.com/p/android/issues/detail?id=54720
It appears to be a bug specific to the 4.2 emulator with the stock launcher.
The app in question is a very popular app in the Dutch market. As more devices will be migrating to Jelly Bean, I'll keep a close eye on any issues that might be related.
Of course if anybody encounters this in the wild, I'd be eager to hear about it.

Related Links

MediaRecorder, getMaxAmplitude always returns 0
Android VideoView Http Live Streaming Memory Leak
MediaRecorder OnInfoListener giving an 895
.BAR app is not working properly in some blackberry models
After comparing bitmap object, how to get next bitmap object continuously using button's click?
Any chances that we can override the action of pulling down the status bar?
How add custom view top of the android action bar
Selected image from Gallery but it doesnt show in my image button
Programmatically Created ImageButton Inside HorizontalScrollView Not Receiving Touch
Android does not execute everything on night
How to open a context menu by long pressing on a disabled button?
How to retrieve url of an image on website
Clear app data programatically android
Accelerometer not working on Android-wear emulator
How to generate DTMF Tones in android?
How to set an Image on Android Tabs to Occupy all spaces?

Categories

HOME
django
nvd3.js
rsa
serialization
package
pclxl
google-cloud-functions
scripting
cq5
vert.x
odoo-8
character
mql5
jquery-ui-sortable
vimdiff
mod-security
why3
android-intent
html5-appcache
delphi-xe5
topology
user-experience
pagespeed
android-sharedpreferences
angular-translate
exchangewebservices
uitapgesturerecognizer
sqlpackage
google-earth
cart
jmockit
r-grid
dsx-desktop
processwire
video-capture
openproject
graphhopper
release
projects-and-solutions
datacachefactory
movilizer
oim
snapchat
optimizely
servermanager
linter
sonarlint-eclipse
payara-micro
video-conferencing
lsyncd
donations
flex-monkey
dotnetnuke-7
file-uri
neon
drawstring
createprocess
yajsw
grass
np-spring
sapi
qt5.2
phonertc
cgi-bin
branch-and-bound
nutiteq
telepat
uvc
j-security-check
procedural-programming
appserver
paw
multitasking
spring-3
ora-06550
kogrid
time.h
idn
os.system
virtualpathprovider
expression-blend-4
workflow-services
matlab-load
fsevents
automationelement
multiplatform
timthumb
django-paypal
presentation-layer
commerceserver2007
resharper-6.0
easyb
interprocess
filesystemobject
glui
todos

Resources

Encrypt Message