if app gets upgraded, restart the service after the upgrade

This commit is contained in:
geeksville 2020-07-07 13:29:16 -07:00
parent 39a5275b1e
commit 55d6c9448b
2 changed files with 10 additions and 1 deletions

View file

@ -37,7 +37,6 @@ the channel is encrypted, you can share the the channel key with others by qr co
* keep past messages in db, one db per channel (currently we just keep an array in saved preferences)
* show user avatars in chat (use the google user info api)
* let users save old channels (i.e. have a menu of channels the user can use)
* also add a receiver that fires after a new update was installed from the play store
* if the rxpacket queue on the device overflows (because android hasn't connected in a while) send a special packet to android which means 'X packets have been dropped because you were offline' -drop oldest packets first
* make sw update work over BLE

View file

@ -149,6 +149,7 @@
</activity>
<receiver android:name="com.geeksville.mesh.service.BootCompleteReceiver">
<!-- handle boot events -->
<intent-filter>
<category android:name="android.intent.category.DEFAULT" />
@ -160,6 +161,15 @@
<!-- for testing -->
<action android:name="com.geeksville.mesh.SIM_BOOT" />
</intent-filter>
<!-- Also restart our service if the app gets upgraded -->
<intent-filter>
<action android:name="android.intent.action.MY_PACKAGE_REPLACED" />
<!-- I was using PACKAGE_REPLACED, but MY_PACKAGE_REPLACED is newer and seems cleaner
<data
android:scheme="package"
android:path="com.geeksville.mesh" /> -->
</intent-filter>
</receiver>
</application>