-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatically resume shares on device start #178
base: master
Are you sure you want to change the base?
Conversation
This commit adds an option to automatically resume active shares on device reboot.
Due to access restrictions introduced under android 11(https://developer.android.com/guide/components/foreground-services#access-restrictions) you need an additional permissions to start recieveing location from a service that wasn't started by a foreground activity
@bilde2910 any blockers here? |
@@ -4,8 +4,11 @@ | |||
package="info.varden.hauk"> | |||
|
|||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | |||
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace this by rebasing see f5fb57c#diff-63272c98a6330850888e633b43ba4c9decee6431a115e0d2731564838eaa1d1dR7
android:exported="true" | ||
tools:ignore="ExportedReceiver"> | ||
<intent-filter> | ||
<action android:name="info.varden.hauk.START_ALONE_THEN_SHARE_VIA" /> | ||
<action android:name="info.varden.hauk.START_ALONE_THEN_MAKE_TOAST" /> | ||
</intent-filter> | ||
</receiver> | ||
|
||
<receiver |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nvm this one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My local patch was missing the receiver on built hence it was erroring out on reboot, my bad
I'm using this snippet
<receiver
android:name=".global.RebootReceiver"
android:enabled="true"
android:exported="false">
<intent-filter android:directBootAware="true">
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" />
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
<action android:name="android.intent.action.REBOOT"/>
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
and works fine in my testing on Android 13
between this and #210 and the missing (which?) pieces for targetsdk @bilde2910 maybe you can tag a new release? |
This commit adds an option to automatically resume active shares on device reboot.
I'm not very experienced with java or android so I hope I didn't screw anything up too badly.
Closes #160