I've encountered a strange permission denial in my Android app, here is my manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest package="test.mymax"
android:versionCode="1"
android:versionName="1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="10" />
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:icon="#drawable/splash"
android:label="#string/app_name" android:debuggable="true">
<activity
android:name=".Test_mymaxActivity"
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="A_Info"></activity>
<activity android:name="A_Info_Refresh"></activity>
<activity android:name="_TagConnector"></activity>
<activity android:name="_SQLconnect"></activity>
<activity android:name="_TagReader"></activity>
<activity android:name="_TagReader_Refresh"></activity>
<activity android:name="Test_mymaxActivity"></activity>
</application>
</manifest>
the error i get is:
ActivityManager: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=test.mymax/.Test_mymaxActivity } from null (pid=17572, uid=2000) requires null
Please help I have no idea on what's wrong
You declared your Test_mymaxActivity twice. Once here
<activity
android:name=".Test_mymaxActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
and below a second time
<activity android:name="Test_mymaxActivity"></activity>
Can you post the Intent/Code you are using that is requesting the permission? Or is this immediately on launching your activity?
Are you sure you declared all the permission needed for your code (using internet, detect phone state, etc)
Here's the documentation : Manifest permission - Android dev
Related
So I have 2 ways an activity can be opened. One is from the activity flow of:
Main > Tracks > Day > Topic > TrackSelect > TrackInfo
and the other is:
Main > MySchedule > TrackInfo
If I try to get TrackInfo to open up via the second path, it crashes the app.
However, If I go from the first path, then all the way back to the main, then through the second path, it works perfectly. Is there something weird going on?
AndroidManifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="fayko.conference_app">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="Conference-App"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity
android:name=".mainSelection"
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=".topicScreen"/>
<activity
android:name=".myScheduleScreen" />
<activity android:name=".trackSelection" />
<activity android:name=".mainScreen" />
<activity android:name=".daySelection" />
<activity android:name=".trackInfoScreen" />
<activity android:name=".mapChoose" />
<activity android:name=".sponsorScreen" />
<activity android:name=".committeeScreen" />
<activity android:name=".welcomeScreen"></activity>
</application>
</manifest>
Code from TrackSelect > Track Info:
Intent intent = new Intent(trackSelection.this,trackInfoScreen.class);
startActivity(intent);
Code from MySchedule > TrackInfo:
Intent intent = new Intent(myScheduleScreen.this,trackInfoScreen.class);
startActivity(intent);
I appreciate any help you guys can give me.
It turns out that the issue I was having was due to some internal code. Even thought he stacktrace was saying things about socket lost for the debugger.
The Play Store says that my app is incompatible with all the devices that I have, but that also includes the phone that I tested it on. Below is my Manifest file. I tested it on my Nexus 5X running Nougat, but the Play Store says that the app is incompatible with that phone of mine. Thanks a lot !
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.health4everyone.thejdeep.healthpal">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#####" />
<activity android:name="com.heath4everyone.thejdeep.healthpal.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.heath4everyone.thejdeep.healthpal.Home"></activity>
<activity android:name="com.heath4everyone.thejdeep.healthpal.Hospitals"></activity>
<activity
android:name="com.heath4everyone.thejdeep.healthpal.Restaurants"
android:label="Map">
</activity>
<activity android:name="com.heath4everyone.thejdeep.healthpal.ActivityTracker"></activity>
<activity android:name=".Settings" android:label="#string/app_name">
<intent-filter>
<action android:name="com.health4everyone.thejdeep.healthpal.Settings" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name="com.heath4everyone.thejdeep.healthpal.SearchFoodByRestaurant"
android:label="Search Restaurant">
</activity>
</application>
</manifest>
Edit : Removed the API key :)
Recently begun to experience this error when I try to run my android application using the Eclipse IDE, already looked at other solutions but found nothing to solve my problem. Below is the error log and my manifest file.
[2015-02-11 10:18:28 - PapiroSmart] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.prologica.papirosmart/.SplashScreenActivity }
[2015-02-11 10:18:28 - PapiroSmart] ActivityManager: Error type 3
[2015-02-11 10:18:28 - PapiroSmart] ActivityManager: Error: Activity class {com.prologica.papirosmart/com.prologica.papirosmart.SplashScreenActivity} does not exist.
Manifest file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.prologica.papirosmart"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="18" />
<uses-permission android:name="android.permission.INTERNET" />
<!-- Accessing camera hardware -->
<uses-feature android:name="android.hardware.camera" />
<!-- Access permission to Android Folders -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- Access permission to manage network conections -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" >
</uses-permission>
<!-- Wi-Fi Permissions -->
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" >
</uses-permission>
<uses-permission android:name="android.permission.UPDATE_DEVICE_STATS" >
</uses-permission>
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" >
</uses-permission>
<application
android:name=".app.AppController"
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/Theme.Papirosmart" >
<activity
android:name=".cliente.LoginActivity"
android:label="#string/app_name"
android:screenOrientation="portrait" >
</activity>
<activity
android:name=".cliente.MainActivity"
android:label="#string/app_name"
android:parentActivityName="cliente.LoginActivity"
android:screenOrientation="portrait" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="cliente.LoginActivity" />
</activity>
<activity
android:name=".cliente.ConfigActivity"
android:label="#string/app_name"
android:parentActivityName="cliente.MainActivity"
android:screenOrientation="portrait" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="cliente.MainActivity" />
</activity>
<activity
android:name=".SplashScreenActivity"
android:label="#string/app_name"
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=".cliente.FileChooserActivity"
android:label="#string/app_name"
android:parentActivityName="cliente.MainActivity" >
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="cliente.MainActivity" />
</activity>
<activity android:name="eu.janmuller.android.simplecropimage.CropImage" />
<provider
android:name="InternalStorageContentProvider"
android:authorities="eu.janmuller.android.simplecropimage.CropImage"
android:exported="true" />
<receiver android:name=".app.ConnectionReceiver" >
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
<action android:name="android.net.wifi.WIFI_STATE_CHANGED" />
</intent-filter>
</receiver>
<service android:name=".app.FileUploaderService" >
</service>
<receiver android:name=".app.FileUploaderReceiver" >
</receiver>
<service android:name=".app.SynchronizeService" >
</service>
</application>
</manifest>
it says com.prologica.papirosmart.SplashScreenActivity does not exists
so please use the specific packagename where SplashScreenActivity exists. supose if SplashScreenActivity is in package a.b.c. than use the package specific details with SplashScreenActivity .
Im developing android apps to play video on fragment.
the code like below :
videoView.setVideoURI(Uri.parse(videoPath));
videoView.setMediaController(new MediaController(rootView.getContext()));
videoView.requestFocus();
videoView.start();
But when run in devide, the error :
ERROR/MediaPlayerService(128): Request requires android.permission.INTERNET
i already add internet permission in my manifest
<uses-permission android:name="android.permission.INTERNET" />
how to solve this?
manifest file:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.APPS"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="14"/>
<application android:label="#string/app_name" android:icon="#drawable/icon_APPS">
<uses-permission android:name="android.permission.INTERNET" />
<activity android:name= ".splash_APPS"
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="APPS" android:label="#string/app_name"/>
</application>
</manifest>
Your have used uses-permission tag is inside the application tag. It is a direct sub tag of manifest tab. Refer here
Try this...
<application android:label="#string/app_name" android:icon="#drawable/icon_APPS">
<activity android:name= ".splash_APPS"
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="APPS" android:label="#string/app_name"/>
</application> </manifest>
Hope this helps...
why??
[2011-08-26 14:57:48 - Front] ActivityManager: java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=mpos.gui.ask/.Front } from null (pid=5918, uid=2000) requires null
my manifest
?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="mpos.gui.ask" android:versionCode="1" android:versionName="1.0">
<application android:debuggable="true" android:icon="#drawable/icon"
android:label="#string/app_name">
<activity android:name=".Front" 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="Login"></activity>
<activity android:name="FtpList"></activity>
<activity android:name="LoginMpos"></activity>
<activity android:name="MenuMpos"></activity>
<activity android:name="PilihCabang"></activity>
<activity android:name="FormTransaksi"></activity>
<activity android:name="SdhTrans"></activity>
<activity android:name="BuatTransaksi"></activity>
<activity android:name="LihatTrans"></activity>
<activity android:name="CekStok"></activity>
</application>
<uses-sdk android:minSdkVersion="7" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.BLUETOOTH" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" />
</manifest
i'm pasive english :D
anyone can help
thanks be4
Are you accessing network status in your application too? If so I think you need to include permission for this too in your manifest.
In my case with flutter, I had a similar error that was solved by adding android:exported="true" to the main activity, so in your case it seems to be here
<activity android:name=".Front" android:label="#string/app_name" android:exported="true">