mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-04-20 22:23:37 +00:00
if app gets upgraded, restart the service after the upgrade
This commit is contained in:
parent
39a5275b1e
commit
55d6c9448b
2 changed files with 10 additions and 1 deletions
|
|
@ -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>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue