trungdh / apndroid

Automatically exported from code.google.com/p/apndroid
0 stars 0 forks source link

Add alias-activity to Android Manifest for plug-in backwards compatibility #93

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Change 47696dedcb68 renamed the Locale plug-in Activity class name.  As per the 
Locale documentation, changing the Activity class name will orphan all plug-in 
data.  To maintain backwards compatibility while also renaming the Activity, 
use an activity-alias in APNDroid's AndroidManifest.  The alias is recognized 
by Locale as the old Activity, and it redirects to the new Activity.  The 
proposed change would look something like this:

<activity-alias android:name=".LocaleActivity"
                      android:label="@string/app_name"
                      android:icon="@drawable/icon_plugin_color_32"
                      android:exported="true"
                          android:targetActivity=".locale.LocaleActivity">
                <intent-filter>
                    <action android:name="com.twofortyfouram.locale.intent.action.EDIT_SETTING"/>
                </intent-filter>
            </activity-alias>

<activity android:name=".locale.LocaleActivity" />

Original issue reported on code.google.com by supp...@twofortyfouram.com on 8 Apr 2011 at 4:24

GoogleCodeExporter commented 9 years ago
If we make that fix, the old settings will be active now and the'll start to 
work along with the new one, that user set up again (the last six months, since 
that changeset)?

If it really as described, I think it can be even more unexpected behavior

Original comment by zeldigas on 8 Apr 2011 at 5:49

GoogleCodeExporter commented 9 years ago
I have APNDroid installed from the Android Market, then I upgraded to the 3.0 
series from the website, and the plug-in breaks and needs to be reconfigured.

So implementing this fix would ensure a smooth upgrade path for those who 
installed APNDroid from the Android Market.  But this fix would require users 
already running 3.0 to set up the plug-in again.  I guess its really a numbers 
game.

Original comment by supp...@twofortyfouram.com on 8 Apr 2011 at 6:04

GoogleCodeExporter commented 9 years ago
ok, thank's for testing and finding this issue.

P.S. What about issue 91? if it ok, put a comment there and i'll resolve that 
ticket

Original comment by zeldigas on 8 Apr 2011 at 6:10

GoogleCodeExporter commented 9 years ago

Original comment by zeldigas on 8 Apr 2011 at 6:11

GoogleCodeExporter commented 9 years ago
Fixed in revision 7be9435d801a: 
http://code.google.com/p/apndroid/source/detail?r=7be9435d801a403666e7af939f1f23
2c62a3a2ff

Check new updated version in downloads section: 
http://code.google.com/p/apndroid/downloads/detail?name=apndroid-locale-api-upda
te.ver3.0.1.3.apk

Original comment by zeldigas on 8 Apr 2011 at 6:35

GoogleCodeExporter commented 9 years ago
Did you try installing this version?  It fails to even install for me:

1652 KB/s (219556 bytes in 0.129s)
    pkg: /data/local/tmp/apndroid-locale-api-update.ver3.0.1.3.apk
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]

Original comment by supp...@twofortyfouram.com on 8 Apr 2011 at 11:40

GoogleCodeExporter commented 9 years ago
reopen issue

Original comment by zeldigas on 9 Apr 2011 at 6:59

GoogleCodeExporter commented 9 years ago
Real activity should be before alias. It was late and i forgot to check actual 
syntax, just copy-pasted your patch.

Fixed in revision bccb53f1aab8: 
http://code.google.com/p/apndroid/source/detail?r=bccb53f1aab80969c8ff9704fa708d
8a2baa9b5f

Released new build with fix: 
http://code.google.com/p/apndroid/downloads/detail?name=apndroid-locale-api-upda
te.ver3.0.1.4.apk

Original comment by zeldigas on 9 Apr 2011 at 7:01

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
After testing the 3.0.1.4 build, this issue appears to be fixed.

Original comment by supp...@twofortyfouram.com on 10 Apr 2011 at 12:30

GoogleCodeExporter commented 9 years ago

Original comment by zeldigas on 10 Apr 2011 at 12:43