Android application running from android studio but app not installed -
i have android app working when deployed via android studio when copy generated apk output folder (app\build\outputs\apk) , install on same phone app crashes on loading.
even upon installation os says app not require special permissions though have these in manifest file:
<uses-permission android:name="android.permission.get_accounts" /> <uses-permission android:name="android.permission.read_profile" /> <uses-permission android:name="android.permission.read_contacts" /> <uses-permission android:name="android.permission.access_fine_location" /> <uses-permission android:name="android.permission.internet" /> <uses-permission android:name="android.permission.wake_lock" /> <uses-permission android:name="android.permission.vibrate" />
you need explicitly ask user provide permission access location , contacts. update added lollipop/marshmallow.
you might have this.
@override public void onrequestpermissionsresult(int requestcode, @nonnull string[] permissions, @nonnull int[] grantresults) { if (requestcode == permissions_request_code_access_coarse_location && grantresults[0] == packagemanager.permission_granted) { // user has granted permission access location } else { // user has not granted permission(notify user features not work app if permission not granted) } }
Comments
Post a Comment