Video Cannot Be Play, ERROR/MediaPlayerService(128) - java

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...

Related

I have warning "App is not indexable by Google Search; consider adding at least one Activity with an ACTION-VIEW intent filter. "

After the update, the following warning appeared in the studio:
“App is not indexable by Google Search; consider adding ACTION-VIEW intent filter. See issue explanation for more details. more ... (Ctrl + F1) »
How to fix it?
My Api is 28.
Here is my manifests:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.omen.serverforcofe" >
<uses-permission android:name="android.permission.NFC"/>
<uses-feature android:name="android.hardware.nfc" android:required="true" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme"
>
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:launchMode="singleTop">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain"
/>
</intent-filter>
</activity>
</application>
</manifest>
<activity
android:name=".MyActivity"
android:screenOrientation="portrait"
android:label="#string/app_name">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
</intent-filter>
</activity>
Adding this intent filter to one of the activities declared in app manifest fixed this for me.

Binded jar leaves launcher icon

I have an App that uses a some Services from a binded Jar.
But this Jar leaves it own launcher Icon when I deploy this App on a Device. (So I have two launcher Icons)
Here is the Manifest File from this Jar project. What do I have to remove/do to make my Application leaves only the one desired launch Icon. (Only from MainApp)
Manifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.company.scandemo"
android:versionCode="1"
android:versionName="2.2" >
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<activity
android:name=".ScanDemoActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<service android:name="com.company.scandemo.FloatingService" />
<receiver android:name="com.company.scandemo.BootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"/>
<category android:name="android.intent.category.HOME"/>
</intent-filter>
</receiver>
</application>
</manifest>
What do I have to remove/do to make my Application leaves only the one desired launch Icon
Please delete the MainLauncher flag from the manifest file in your binded Jar:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
//Delete these flag

Play Store says app is incompatible with phone tested on

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 :)

Activity permission Denial

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

the application on android cant run

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">

Categories