Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Aug 8, 2021

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

Mae added 2 commits August 8, 2021 19:53
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
@licaon-kter
Copy link
Contributor

@bilde2910 any blockers here?

package="info.varden.hauk">

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

</intent-filter>
</receiver>

<receiver
Copy link
Contributor

@licaon-kter licaon-kter Jun 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nvm this one

Copy link
Contributor

@licaon-kter licaon-kter Jun 26, 2024

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

@licaon-kter
Copy link
Contributor

between this and #210 and the missing (which?) pieces for targetsdk @bilde2910 maybe you can tag a new release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automatically resume location sharing on boot

1 participant