Click here to Skip to main content
15,918,471 members
Home / Discussions / Android
   

Android

 
GeneralRe: Android Day of Week Calculator Pin
Richard MacCutchan9-Feb-17 22:20
mveRichard MacCutchan9-Feb-17 22:20 
GeneralRe: Android Day of Week Calculator Pin
David Crow10-Feb-17 2:08
David Crow10-Feb-17 2:08 
GeneralRe: Android Day of Week Calculator Pin
Richard MacCutchan10-Feb-17 2:46
mveRichard MacCutchan10-Feb-17 2:46 
GeneralMobile and o/s application development Pin
JimmiJames337-Feb-17 5:42
professionalJimmiJames337-Feb-17 5:42 
QuestionRe: Mobile and o/s application development Pin
David Crow7-Feb-17 6:15
David Crow7-Feb-17 6:15 
QuestionAndroid Popup Window Pin
Pavlex42-Feb-17 8:09
Pavlex42-Feb-17 8:09 
QuestionPermissions Not Persistent During Across App Startups Pin
Django_Untaken1-Feb-17 20:51
Django_Untaken1-Feb-17 20:51 
AnswerRe: Permissions Not Persistent During Across App Startups Pin
Afzaal Ahmad Zeeshan1-Feb-17 22:33
professionalAfzaal Ahmad Zeeshan1-Feb-17 22:33 
Did you ask for these permissions in the manifest file? Permissions granted there, are typically available for the device and you can "rely" on the fact that they are granted. Since you are requesting the permission on runtime, during the session it is likely that your application will require to request it again.

Also, note that moving upwards from Android 6.0 users can accept or deny permissions granted during install time as well, so there is very less that you can do other than PermissionManager object to always check if you have permissions, otherwise it will always end up with a runtime error. Control your app permissions on Android 6.0 and up - Google Play Help

There are even facts more to the story, read, Everything every Android Developer must know about new Android's Runtime Permission :: The Cheese Factory.
Post above:
In Android 6.0 Marshmallow, application will not be granted any permission at installation time. Instead, application has to ask user for a permission one-by-one at runtime.

In other words, it is the only way to go as it guarantees that the code will execute in the case when you have the permission.

Also, this allows users to enable permissions by default in the settings, so in case your users are loving your application and they want to grant it some permissions they can (through this permissions model) go to the settings and allow permissions for the features they want your application to always work; read the Google Play Help link I provided.

Not recommended approach: You can create a singleton pattern in Android application and then request the permissions on the startup, then during the entire Android's awake period, it will have the permission but upon a restart it will request them again. But nonetheless, this is the least or not at all recommended approach from me.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~

GeneralRe: Permissions Not Persistent During Across App Startups Pin
Django_Untaken2-Feb-17 1:06
Django_Untaken2-Feb-17 1:06 
GeneralRe: Permissions Not Persistent During Across App Startups Pin
Afzaal Ahmad Zeeshan2-Feb-17 2:21
professionalAfzaal Ahmad Zeeshan2-Feb-17 2:21 
GeneralRe: Permissions Not Persistent During Across App Startups Pin
Django_Untaken2-Feb-17 2:58
Django_Untaken2-Feb-17 2:58 
GeneralRe: Permissions Not Persistent During Across App Startups Pin
Richard Deeming2-Feb-17 3:46
mveRichard Deeming2-Feb-17 3:46 
QuestionAlarm Manager Pin
Pavlex429-Jan-17 0:40
Pavlex429-Jan-17 0:40 
AnswerRe: Alarm Manager Pin
Richard MacCutchan29-Jan-17 2:01
mveRichard MacCutchan29-Jan-17 2:01 
GeneralRe: Alarm Manager Pin
Pavlex429-Jan-17 2:13
Pavlex429-Jan-17 2:13 
GeneralRe: Alarm Manager Pin
Richard MacCutchan29-Jan-17 2:18
mveRichard MacCutchan29-Jan-17 2:18 
GeneralRe: Alarm Manager Pin
Afzaal Ahmad Zeeshan29-Jan-17 2:22
professionalAfzaal Ahmad Zeeshan29-Jan-17 2:22 
GeneralRe: Alarm Manager Pin
Richard MacCutchan29-Jan-17 2:47
mveRichard MacCutchan29-Jan-17 2:47 
GeneralRe: Alarm Manager Pin
Afzaal Ahmad Zeeshan29-Jan-17 3:07
professionalAfzaal Ahmad Zeeshan29-Jan-17 3:07 
AnswerRe: Alarm Manager Pin
Afzaal Ahmad Zeeshan29-Jan-17 2:20
professionalAfzaal Ahmad Zeeshan29-Jan-17 2:20 
GeneralRe: Alarm Manager Pin
Pavlex429-Jan-17 3:40
Pavlex429-Jan-17 3:40 
AnswerRe: Alarm Manager Pin
Afzaal Ahmad Zeeshan29-Jan-17 3:56
professionalAfzaal Ahmad Zeeshan29-Jan-17 3:56 
GeneralRe: Alarm Manager Pin
Pavlex429-Jan-17 4:00
Pavlex429-Jan-17 4:00 
GeneralRe: Alarm Manager Pin
Pavlex429-Jan-17 4:54
Pavlex429-Jan-17 4:54 
AnswerRe: Alarm Manager Pin
David Crow30-Jan-17 10:25
David Crow30-Jan-17 10:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.