Geo Locator Location permission - xamarin

I am using GeoLocator for location. I have given permission in the manifest for:
1.Access_Coarse_Location
2.Access_Fine_Location
3.Internet
Still, it is not asking for permission. I have to give permission from Device App Setting. otherwise, the app will be crash.
Please give me the solution.
Thanks in advance.

From android 6 and onward you have to request the permission at the run-time.
You have added permissions in manifest, hence you can allow them in settings.
But as you haven't requested for them when the app starts or your activity launches, your app doesn't have the required permission and hence it's crashing.
You can follow this article to know how to request permission at run-time.
https://blog.xamarin.com/requesting-runtime-permissions-in-android-marshmallow/

Related

How to manage FINE and COARSE location permission in Android 12?

I need to manage ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION in Android 12 simultaneously. My app will first check for ACCESS_FINE_LOCATION, if denied it will show permission rationale. If further denied will request for ACCESS_COARSE_LOCATION.
I can't figure out how to handle this as both fine and coarse location permission fall in same group.
Please help.

How to get runtime time permissions using android management API?

I am using the Android Management API to get runtime permission android.permission.SYSTEM_ALERT_WINDOW. The app is going to be installed on fully managed devices. The policy has the below permissions defined:-
defaultPermissionPolicy: "GRANT"
I have added this to the application section of the policy as well. However, the app does not obtain these permissions and the user has to manually go to the settings and enable this permission. I understand that this permission is rated as advanced level permission, but this is a fully managed device.
Android Management API defaultPermissionPolicy can only grant/deny runtime permission requests. For example, READ_CONTACTS, WRITE_CONTACTS, ACCESS_FINE_LOCATION, ACCESS_COARSE_LOCATION and etc.
SYSTEM_ALERT_WINDOW is a special permission. This permission doesn't behave like a dangerous or normal permission. This is a sensitive permission that needs user authorization.
For more information you may refer to this link.
I had the same problem with AE. The solution was set targetSdkVersion to 19 in your app.
To fully benefit from android.permission.SYSTEM_ALERT_WINDOW, it's usually necessary to request also Draw over other apps which is special permission that the user must grant manually per app. It's nicely described here.

Does an app need to be public for Marketing API use only

I am a developer and to use the marketing API I must have an app. I have this app and it is currently in development mode. Is it necessary to make this app public?
My initial thinking was 'no' and I have been successfully using the API via this app for a while now and have not experienced any limitations until recently. When trying to change the status of an Ad to active I got an error message that suggests the problem could be due to the app being in development mode.
FWIW I am able to successfully change Ad status to paused most of the time, however, more often when I try to activate an Ad, it fails, although it does succeed sometimes. As such, I believe I am using the API correctly. It seems to be more of an Ad state issue, or, perhaps an app state issue. Most of the time the error messages I receive from the API are not helpful. I did get one today that suggests the possibility that my app needs to be public.
Here is the error just in case it helps:
[{"code":400,"body":"{\"error\":{\"message\":\"Invalid parameter\",\"type\":\"OAuthException\",\"code\":100,\"error_data\":{\"blame_field\":\"targeting invalid fbid 141898914497\"},\"error_subcode\":1487133,\"is_transient\":false,\"error_user_title\":\"Can't Set Exclusion Targeting\",\"error_user_msg\":\"You may not be able to select a connection to exclude in your targeting because you're not an admin of this Page or app, or because the app is in developer mode, or the event is in the past. If you want to run your ad with exclusion targeting, please request admin access from the owner of the Page or app or move your app out of developer mode to link it to the ad. If you want to select an event for exclusion targeting, please make sure the event end time is in the future.\",\"fbtrace_id\":\"Dqzily7dOQa\"}}"}]
Thank you for any help or insight into this issue.
Just to resolve this, the answer is no, the app does not have to be public in order to use the API. The problem turned out to be an access permission issue on the account in question.

Where exactly Android Wear app Permission request to be placed

I want to request the permissions that I need for my android wear app upfront as per this. So Programmatically where exactly I should put my permission request code. Also is the protocol to ask for Permission the same as the mobile app like this.
All of the permissions are controlled in the Androidmanifest. Here is an example of some permissions being declared in the Androidmanifest:
These permissions are used to get the weather from the device and relay the information to an Android Wear device. Google offers documentation for developers to use to determine what permissions should be used. Declaring permissions should happen in the Androidmanifest in the format provided in the image. In the sample code posted, it is not necessary to include watch permissions, they are only required if the app works with Android Wear.
Way back in the day Google added a feature in Android 4.3 that let the user control what permissions apps could access on a per app basis known as App Ops. This was a great feature that cut down on privacy issues and gave users the piece of mind knowing that random apps installed could not access the device’s location. When Google introduced Android 6.0 Marshmallow, This time when an app needs to use a permission a dialog box pops up on the screen and asks the user if it is OK that the app uses a certain permission. This may get a little annoying, but at least every permission used by an app has to go through the user first.
If your app doesn't already have the permission it needs, the app must call one of the [requestPermissions()](https://developer.android.com/reference/android/support/v4/app/ActivityCompat.html#requestPermissions(android.app.Activity, java.lang.String[], int)) methods to request the appropriate permissions. Your app passes the permissions it wants, and also an integer request code that you specify to identify this permission request. This method functions asynchronously: it returns
right away, and after the user responds to the dialog box, the system calls the app's callback method with the results, passing the same request code that the app passed to requestPermissions().
You should dynamically request the permissions from user on wearable devices just the same way you do on the phone side.

Regarding Sharing and Updating Shared Folders on Skydrive (Programmatically)

I have a query regarding accessing Skydrive folders programmatically through the Live SDK on Windows Phone.
So the scenario I have at hand is that a Windows phone app that I have built creates folders (and files) on your Skydrive. Now I want the following functionality which I haven’t been able to do so till now.
Is it possible that I can programmatically share my folder and files with View (and/or edit) permissions to my friends (as I know their user ID)?
If I am able to share such a folder can I access the content after logging in (with my live ID) from my phone. By accessing I mean download or stream content.
If in step 1, a person to whom the file is shared is provided edit permissions how can I programmatically edit such a file? The current problem I am facing in this step is that to update a shared folder the live sdk requests a wl.contacts_skydrive_update scope, but while logging in I am notified that no such scope exists.
This is the Error message I get when I try to get a shared_edit_link:
request_token_unauthorized: Microsoft.Live.LiveConnectException: The
provided access token does not have access to this resource. An access
token with one of the following scopes is required:
'wl.contacts_skydrive_update'.
Although the user does have edit permissions. Note: Such a scope doesn't exist.
There is a thread on this where it was listed as a bug in the beta. They said that now it should be fixed and you should only need this scope: 'wl.contacts_skydrive'.
here is the thread

Resources