When built my application, the built apk is not working any other devices. It is only working in my mobile. The error message i founded is user permission is not available and security exception. It is only working in my phone.
Here is my manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.dineshkumar.panicbutton">
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="com.android.launcher.permission.INSTALL_SHORTCUT" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.WRITE_SMS" />
<uses-permission android:name="android.permission.RECEIVE_SMS"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<application
android:allowBackup="true"
android:icon="#drawable/welcome"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:exported="true"
android:theme="#style/AppTheme">
<activity
android:name=".Welcome"
android:label="Panic Button"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:theme="#style/AppTheme.NoActionBar">
</activity>
<activity android:name=".Emergency" />
<activity android:name=".Contacts" />
<activity android:name=".ManualCadd" />
<activity android:name=".Message" />
<activity android:name=".Guide" />
<activity android:name=".Updatecontacts" />
<activity android:name=".ShowContacts" />
</application>
Your device should have Android 6.0 version or above to handle Runtime Permissions. Also you need to set the Target SDK version to 23 or above for listing dangerous permissions.
Related
This is the error i get when i try to submit app to play store.
"You uploaded an APK or Android App Bundle which has an activity, activity alias, service or broadcast receiver with intent filter, but without 'android:exported' property set. This file can't be installed on Android 12 or higher. See: developer.android.com/about/versions/12/behavior-changes-12#exported"
This is my androidmanifest.xml file, i had set android:exported to true each time, but still its throwing this error, could someone please check and see what can be done to eliminate this error, here is my manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.xxx.xxx">
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.WRITE_SYNC_SETTINGS" />
<uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" />
<uses-permission
android:name="android.permission.WRITE_SETTINGS"
tools:ignore="ProtectedPermissions" />
<uses-permission android:name="com.android.alarm.permission.SET_ALARM" />
<application
android:name="com.xxx.xxx.AppController"
android:allowBackup="true"
android:hardwareAccelerated="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:largeHeap="true"
android:supportsRtl="true"
android:theme="#style/AppTheme"
tools:ignore="GoogleAppIndexingWarning">
<activity
android:name="com.xxx.xxx.activity.SplashActivity"
android:noHistory="true"
android:theme="#style/Splash" />
<activity
android:name="com.xxx.xxx.activity.MainActivity"
android:label="">
</activity>
<activity android:name="com.xxx.xxx.activity.VPNListActivity" />
<activity
android:name="com.xxx.xxx.activity.VPNInfoActivity"
android:launchMode="singleTop" />
<activity
android:name="com.xxx.xxx.activity.SettingsActivity"
android:label="#string/action_settings"
android:noHistory="true" />
<service
android:name="de.blinkt.openvpn.core.OpenVPNService"
android:permission="android.permission.BIND_VPN_SERVICE"
android:exported="true">
<intent-filter>
<action android:name="android.net.VpnService" />
</intent-filter>
</service>
<activity
android:name="com.xxx.xxx.activity.SpeedTestActivity"
android:label="Speed Test" />
<activity
android:name="com.xxx.xxx.activity.TOSActivity"
android:theme="#style/AppTheme2" />
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
android:theme="#android:style/Theme.Translucent" />
<activity
android:name="com.xxx.xxx.activity.StepActivity"
android:theme="#style/Splash">
</activity>
<activity android:name="com.xxx.xxx.activity.FragmentWrapperActivity" />
<activity android:name="com.xxx.xxx.activity.WelcomeActivity"
android:theme="#style/AppThemes"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="#string/admob_app_id" />
<receiver android:name="com.xxx.xxx.service.BoostAlarm" />
</application>
</manifest>
Please Note: I had set the package name to xxx.xxx. When i had submitted it to play store i submitted it with correct name.
i am working with sqlight data base my application work fine on below 6.0 version but i when in installed APK file on samsung s6 SM-G920F model 6.01
i am unable to delete sqlight data when in i uninstalled application .
all the data remains when i again installed the same apk file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="srecorder">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.VIBRATE" />
<application
android:name=".GPSApplication"
android:allowBackup="true"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<activity
android:name=".SplashScreen"
android:label="#string/app_name"
android:windowSoftInputMode="adjustPan|stateUnchanged"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".TermsAndConditions"
android:label="#string/title_activity_termsandconditions"
android:screenOrientation="portrait" />
<activity
android:name=".Register"
android:label="#string/title_activity_register"
android:screenOrientation="portrait" />
<!--<activity-->
<!--android:name=".ChooseApplication"-->
<!--android:label="#string/title_activity_choose_application"-->
<!--android:screenOrientation="portrait"-->
<!--android:theme="#style/AppTheme" />-->
<!--<activity-->
<!--android:name=".Outlet"-->
<!--android:label="#string/title_activity_outlet"-->
<!--android:screenOrientation="portrait" />-->
<activity
android:name=".MainActivity"
android:label="#string/title_activity_outlet"
android:screenOrientation="portrait" />
<activity
android:name=".Header"
android:screenOrientation="portrait" />
<activity
android:name=".LogoHeader"
android:screenOrientation="portrait" />
<activity
android:name=".PendingApproval"
android:screenOrientation="portrait" />
</application>
</manifest>
Change to:
<application
android:name=".GPSApplication"
android:allowBackup="false"
Read more here: https://developer.android.com/guide/topics/manifest/application-element.html#allowbackup
In case of android:allowBackup="true" in your manifest
you can Do it by increasing database version in your database handler
By using that you can handle both things
when you don't want to loose data don't need to increase database version with android:allowBackup="true"
when you want to have backup then need to increase database version and android:allowBackup="true"
I made an android app and I want to deploy it on a device i.e my phone which is a Sony xperia S. The miniSdkVersion of the app is 15. The app is installed on the device but I can't see the icon on the apps menu of my phone.
Here is the manifest file.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.toshiba.ticketing"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="15"
android:targetSdkVersion="22" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.READ_CALL_LOG" />
<application
android:debuggable="true"
android:allowBackup="true"
android:icon="#drawable/logo"
android:label="#string/app_name"
android:theme="#style/Theme.AppCompat" >
<uses-library android:name="com.google.android.maps" />
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission
android:name="android.permission.READ_EXTERNAL_STORAGE"
android:maxSdkVersion="18" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<activity
android:name=".Choose"
android:exported="true"
android:label="#string/title_activity_main_activity2" >
</activity>
<activity
android:name=".TaskChoose"
android:label="#string/title_activity_task_choose" >
</activity>
<activity
android:name=".TicketChoose"
android:exported="true"
android:label="#string/title_activity_ticket_choose" >
</activity>
<activity
android:name=".login"
android:configChanges="keyboard|orientation|screenSize"
android:exported="true"
android:label="#string/title_activity_login" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<data
android:host="redirecturi"
android:scheme="your" />
</intent-filter>
</activity>
<activity
android:name=".ListAll"
android:exported="true"
android:label="#string/title_activity_list_all" >
</activity>
<activity
android:name=".ListInProgress"
android:label="#string/title_activity_list_in_progress" >
</activity>
<activity
android:name=".ListPending"
android:label="#string/title_activity_list_pending" >
</activity>
<activity
android:name=".TicketOverview"
android:exported="true"
android:label="#string/title_activity_ticket_overview" >
</activity>
<activity
android:name=".Map"
android:exported="true"
android:label="#string/title_activity_map" >
</activity>
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="#string/google_maps_key" />
<activity
android:name=".TicketList2"
android:label="#string/title_activity_ticket_list2" >
</activity>
</application>
</manifest>
Does anyone know how to fix this?
Thanks
Check your device API level. If you have updated to KitKat (19) or higher, then the problem is the android:maxSdkVersion="18" entry in your manifest, and you should remove it.
From Android Developer:
If the application's maxSdkVersion attribute is lower than the API Level
used by the system itself, then the system will not allow the application
to be installed.
Also it says:
Warning: Declaring this attribute is not recommended.
Your Device is not compatible with this version error in "Moto e" Devices on play store
Its Permission in all library AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECORD_AUDIO"></uses-permission>
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
My AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.firebug.cocoapay.android" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.RECORD_AUDIO"></uses-permission>
<application
android:name=".main.CocoaPayApplication"
android:allowBackup="true"
android:label="#string/app_name"
android:icon="#drawable/icon_icon"
android:theme="#style/AppTheme" >
<activity
android:name=".Splash_Activity"
android:theme="#android:style/Theme.Black.NoTitleBar.Fullscreen"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity> </application>
</manifest>
I am making an application, when I run that application I am getting following error during running.
[2015-06-19 17:11:06 - Ecommerce] Installation error:
[2015-06-19 17:11:06 - Ecommerce] Please check logcat output for more details.
[2015-06-19 17:11:06 - Ecommerce] Launch canceled!
I don't know where I am doing wrong, I saw so many solutions but that does not match to my problem. Here is my Manifest file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ecommerce.app"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
/>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission
android:name="com.ecommerce.app.permission.C2D_MESSAGE"
android:protectionLevel="signature" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<uses-permission
android:name="com.ecommerce.app.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<receiver
android:name="com.ecommerce.app.utils.GcmBroadcastReceiver"
android:permission="com.google.android.c2dm.permission.SEND" >
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.ecommerce.app" />
</intent-filter>
</receiver>
<service android:name="com.ecommerce.app.utils.GCMIntentService" />
<activity
android:name="com.ecommerce.app.SplashscreenActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.ecommerce.app.MainActivity" />
<activity android:name="com.ecommerce.app.ShoppingCartActivity" />
<activity android:name="com.ecommerce.app.AuthenticateActivity" />
<activity android:name="com.ecommerce.app.BranchLocationActivity" />
<activity android:name="com.ecommerce.app.ProfileActivity" />
<activity android:name="com.ecommerce.app.VoucherActivity" />
<activity android:name="com.ecommerce.app.EShopFragmentActivity" />
<activity android:name="com.ecommerce.app.EShopDetailActivity" />
<activity android:name="com.ecommerce.app.PaypalActivity" />
<activity android:name="com.ecommerce.app.FeedbackActivity" />
<activity android:name="com.ecommerce.app.LoyaltyActivity" />
<activity android:name="com.ecommerce.app.VoucherDisplayActivity" />
<activity
android:name="com.google.android.gms.ads.AdActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize" />
<receiver
android:name="com.ecommerce.app.utils.GcmBroadcastReceiver"
android:process=":remote" >
</receiver>
<meta-data android:name="com.google.android.gms.version" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="#string/map_key" />
</application>
</manifest>
Try specifying google play services version in meta-data
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
From google maps doc-https://developers.google.com/maps/documentation/android/start
Edit your application's AndroidManifest.xml file, and add the
following declaration within the element. This embeds
the version of Google Play services that the app was compiled with.