Hi Erel,
I read the thread you suggested, but I'm not sure I fully understand it.
So far I modified the library manifest tis way:
AddManifestText(
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="14"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)
AddReceiverText(newinst,
<intent-filter>
<action android:name="android.intent.action.PACKAGE_REPLACED" />
<data android:scheme="package" />
</intent-filter>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
Where
newinst is the name of the service module added to the lib.
Then in Service_Start I have
If StartingIntent.Action = "PACKAGE_REPLACED" Then
cbk = StartingIntent.GetExtra("Mykey")
pkg = StartingIntent.GetExtra("Mypkg")
MyAppReload
End If
where MyAppReload, local to the service, should operate to effectively reload the newly installed app.
Now, if I don't start the service from main activity in the app using the lib, newinst is never activated.
The problem here is that main app never knows whether the user effectively installed the newer version so there's no point where it can start the service.
I exepected the operating system to propagate a PACKAGE_REPLACED message and the newinst service, listening in the background, to intercept that message and command app reload (only if the app to which the message refers is the current one).
Can you help some more? TIA
Umberto