Requesting Permissions from Xamarin Android ServiceIs there a way to run Python on Android?How do save an Android Activity state using save instance state?How to check if a service is running on Android?Close/hide the Android Soft KeyboardWhy is the Android emulator so slow? How can we speed up the Android emulator?Stop EditText from gaining focus at Activity startup“Debug certificate expired” error in Eclipse Android pluginsIs there a unique Android device ID?What is 'Context' on Android?Proper use cases for Android UserManager.isUserAGoat()?
What are the balance implications behind making invisible things auto-hide?
What if a revenant (monster) gains fire resistance?
Biological Blimps: Propulsion
What are the advantages of simplicial model categories over non-simplicial ones?
Does malloc reserve more space while allocating memory?
Why does a simple loop result in ASYNC_NETWORK_IO waits?
Why is the "ls" command showing permissions of files in a FAT32 partition?
The IT department bottlenecks progress, how should I handle this?
Quoting Keynes in a lecture
Why does the Sun have different day lengths, but not the gas giants?
Can a college of swords bard use blade flourish on an OA from dissonant whispers?
Does the Catholic Church consider Constantine's vision of "by this symbol conquer" to be from God?
What if you are holding an Iron Flask with a demon inside and walk into Antimagic Field?
Mixing PEX brands
Isn't the "if" redundant here?
Does the UK parliament need to pass secondary legislation to accept the Article 50 extension
Quasinilpotent , non-compact operators
Calculating total slots
Is there a way to get `mathscr' with lower case letters in pdfLaTeX?
Multiplicative persistence
Make a Bowl of Alphabet Soup
Has any country ever had 2 former presidents in jail simultaneously?
Electoral considerations aside, what are potential benefits, for the US, of policy changes proposed by the tweet recognizing Golan annexation?
It grows, but water kills it
Requesting Permissions from Xamarin Android Service
Is there a way to run Python on Android?How do save an Android Activity state using save instance state?How to check if a service is running on Android?Close/hide the Android Soft KeyboardWhy is the Android emulator so slow? How can we speed up the Android emulator?Stop EditText from gaining focus at Activity startup“Debug certificate expired” error in Eclipse Android pluginsIs there a unique Android device ID?What is 'Context' on Android?Proper use cases for Android UserManager.isUserAGoat()?
Using Xamarin Android, I need to be able to access location updates from within a service.
I have tried the native Android.LocationManager, Plugin.Geolocator, and Xamarin.Essentials.Geolocation, but none of them seem to provide location updates.
If I do it inside an activity, it works fine, but I have a requirement to post location updates from a service which launches at boot time.
Yeah, I know it's a "privacy violation" or whatever, but the app is only used on company devices for a specific internal use.
I saw somewhere that requesting permissions from a service "is tricky," so I know it's possible, but the guy didn't elaborate on how to do it.
add a comment |
Using Xamarin Android, I need to be able to access location updates from within a service.
I have tried the native Android.LocationManager, Plugin.Geolocator, and Xamarin.Essentials.Geolocation, but none of them seem to provide location updates.
If I do it inside an activity, it works fine, but I have a requirement to post location updates from a service which launches at boot time.
Yeah, I know it's a "privacy violation" or whatever, but the app is only used on company devices for a specific internal use.
I saw somewhere that requesting permissions from a service "is tricky," so I know it's possible, but the guy didn't elaborate on how to do it.
If this is a single use device, just whitelist the app permissions in system settings, otherwise request the permission upon first use (via an Activity context) and then your app is fine when it receives a boot broadcast.
– SushiHangover
yesterday
Unfortunately, the app is something that is installed by our clients via Google's Play Store. Permissions are established on the initial launch, so that's not the issue. I can't figure out how to get location information without having an activity running.
– jsureke
8 hours ago
That is a different issue|question. Are you not getting the boot receiver broadcast? Service not being started? ....? And if the app is in the Store, it is not an internal app as other people can install it and it falls under the Store guidelines.
– SushiHangover
3 hours ago
add a comment |
Using Xamarin Android, I need to be able to access location updates from within a service.
I have tried the native Android.LocationManager, Plugin.Geolocator, and Xamarin.Essentials.Geolocation, but none of them seem to provide location updates.
If I do it inside an activity, it works fine, but I have a requirement to post location updates from a service which launches at boot time.
Yeah, I know it's a "privacy violation" or whatever, but the app is only used on company devices for a specific internal use.
I saw somewhere that requesting permissions from a service "is tricky," so I know it's possible, but the guy didn't elaborate on how to do it.
Using Xamarin Android, I need to be able to access location updates from within a service.
I have tried the native Android.LocationManager, Plugin.Geolocator, and Xamarin.Essentials.Geolocation, but none of them seem to provide location updates.
If I do it inside an activity, it works fine, but I have a requirement to post location updates from a service which launches at boot time.
Yeah, I know it's a "privacy violation" or whatever, but the app is only used on company devices for a specific internal use.
I saw somewhere that requesting permissions from a service "is tricky," so I know it's possible, but the guy didn't elaborate on how to do it.
asked yesterday
jsurekejsureke
81
81
If this is a single use device, just whitelist the app permissions in system settings, otherwise request the permission upon first use (via an Activity context) and then your app is fine when it receives a boot broadcast.
– SushiHangover
yesterday
Unfortunately, the app is something that is installed by our clients via Google's Play Store. Permissions are established on the initial launch, so that's not the issue. I can't figure out how to get location information without having an activity running.
– jsureke
8 hours ago
That is a different issue|question. Are you not getting the boot receiver broadcast? Service not being started? ....? And if the app is in the Store, it is not an internal app as other people can install it and it falls under the Store guidelines.
– SushiHangover
3 hours ago
add a comment |
If this is a single use device, just whitelist the app permissions in system settings, otherwise request the permission upon first use (via an Activity context) and then your app is fine when it receives a boot broadcast.
– SushiHangover
yesterday
Unfortunately, the app is something that is installed by our clients via Google's Play Store. Permissions are established on the initial launch, so that's not the issue. I can't figure out how to get location information without having an activity running.
– jsureke
8 hours ago
That is a different issue|question. Are you not getting the boot receiver broadcast? Service not being started? ....? And if the app is in the Store, it is not an internal app as other people can install it and it falls under the Store guidelines.
– SushiHangover
3 hours ago
If this is a single use device, just whitelist the app permissions in system settings, otherwise request the permission upon first use (via an Activity context) and then your app is fine when it receives a boot broadcast.
– SushiHangover
yesterday
If this is a single use device, just whitelist the app permissions in system settings, otherwise request the permission upon first use (via an Activity context) and then your app is fine when it receives a boot broadcast.
– SushiHangover
yesterday
Unfortunately, the app is something that is installed by our clients via Google's Play Store. Permissions are established on the initial launch, so that's not the issue. I can't figure out how to get location information without having an activity running.
– jsureke
8 hours ago
Unfortunately, the app is something that is installed by our clients via Google's Play Store. Permissions are established on the initial launch, so that's not the issue. I can't figure out how to get location information without having an activity running.
– jsureke
8 hours ago
That is a different issue|question. Are you not getting the boot receiver broadcast? Service not being started? ....? And if the app is in the Store, it is not an internal app as other people can install it and it falls under the Store guidelines.
– SushiHangover
3 hours ago
That is a different issue|question. Are you not getting the boot receiver broadcast? Service not being started? ....? And if the app is in the Store, it is not an internal app as other people can install it and it falls under the Store guidelines.
– SushiHangover
3 hours ago
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55280513%2frequesting-permissions-from-xamarin-android-service%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55280513%2frequesting-permissions-from-xamarin-android-service%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
If this is a single use device, just whitelist the app permissions in system settings, otherwise request the permission upon first use (via an Activity context) and then your app is fine when it receives a boot broadcast.
– SushiHangover
yesterday
Unfortunately, the app is something that is installed by our clients via Google's Play Store. Permissions are established on the initial launch, so that's not the issue. I can't figure out how to get location information without having an activity running.
– jsureke
8 hours ago
That is a different issue|question. Are you not getting the boot receiver broadcast? Service not being started? ....? And if the app is in the Store, it is not an internal app as other people can install it and it falls under the Store guidelines.
– SushiHangover
3 hours ago