App icon does not display in applications (on home screen) - android

My app used to work just fine, its icon displayed when installed in applications and it was uploaded to the Play Store. Now when I install it, it is like invisible, and in the Play Store it just says Uninstall, not open. What would be the reason for this?
Thanks.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="redacted" >
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_GPS" />
<uses-permission android:name="android.permission.ACCESS_ASSISTED_GPS" />
<uses-permission android:name="android.permission.ACCESS_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<application
android:screenOrientation="portrait"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme"
android:hardwareAccelerated="true"
>
<activity
android:name=".aboutclass"
android:configChanges="orientation|screenSize"
android:label="#string/app_name" >
<intent-filter>
<action android:name="redacted.aboutclass" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:configChanges="orientation|screenSize"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="redacted.MainActivity" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http"/>
<data android:scheme="https"/>
<action android:name="android.intent.action.VIEW" />
</intent-filter>
</activity>
</application>
</manifest>

This problem occurs when you include the <data> element in the same intent-filter as your action.MAIN, which does not expect any data.
You could try splitting the intent-filter like this:
<activity
android:name=".MainActivity"
android:configChanges="orientation|screenSize"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="redacted.MainActivity" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http"/>
<data android:scheme="https"/>
<action android:name="android.intent.action.VIEW" />
</intent-filter>
</activity>
See this previous answer.

Related

App missing (disappear) from my device

When I add the following code in the AndroidManifest the app is missing (disappears) from my device.
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https"
android:host="www.example.com"
android:pathPrefix="/gizmos"/>
</intent-filter>
If I don't add this code the app is installed and appears as it should be BUT I get warning:
App is not indexable by Google Search; consider adding at least one Activity with an ACTION-VIEW intent filter.
I already did research from official documentation and also this question but still my problem is different.
EDIT:
Here is all my manifest:
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-feature android:name="android.hardware.camera" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<application
android:allowBackup="true"
android:fullBackupContent="true"
android:icon="#mipmap/icon"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme"
android:screenOrientation="portrait">
<activity android:name=".MainActivity"
android:theme="#style/FullScreenTheme"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https"
android:host="www.example.com"
android:pathPrefix="/gizmos"/>
</intent-filter>
<activity android:name=".AnimationScreenActivity"
android:theme="#style/FullScreenTheme"
android:screenOrientation="portrait"/>
</activity>
</application>
You are not closing your intent filter right
<activity android:name=".MainActivity"
android:theme="#style/FullScreenTheme"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
After #Harisali help, the solution is to separate it in two <intent-filter> like this:
<activity android:name=".MainActivity"
android:theme="#style/FullScreenTheme"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https"
android:host="www.example.com"
android:pathPrefix="/gizmos"/>
</intent-filter>
</activity>
Uninstall the app and run the code, sometimes the old package might be overwritten.

Does <data android:host="www.calender.com" android:scheme="http"></data> make application invisible?

I have used implicit intents in order to open my application when some one clicks on a URL in other application,I am unable to see the deployed application's icon.After deploying my aplication if i go back and try to find my application i am un able to find it.But it's in the recent app's.This is the code in the android manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.mindtree.calender">
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="www.calender.com" android:scheme="http"></data>
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
You have to add a separate intent filter inside your activity tag:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mindtree.calender">
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:host="www.calender.com" android:scheme="http" />
</intent-filter>
</activity>
</application>

Launch to app not work with intent-filter

I read all topic about intent-filter and test all method for app from browser but not work . this is my manifest :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ir.nooraei.afsaneirani.android.graphic"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="22" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar" >
<activity
android:name="com.main.da"
android:configChanges="orientation|keyboardHidden"
android:label="#string/app_name"
android:screenOrientation="portrait" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http"/>
<data android:host="anysite.com"/>
<data android:host="google.com"/>
<data android:host="www.google.com"/>
<data
android:host="bestnews.com"
android:scheme="http" />
</intent-filter>
</activity>
<activity
android:name="com.main.da"
android:label="#string/title_activity_splash_screen" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
i test this code for all site with www or without www . but not work :( . anyone can help me?
Add below line to your intent-filter
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
You haven't define your launcher point that could be a reason try it if it works

App not listed in launcher due to <data android:scheme="http" /> in AndroidManifest.xml

When I add <data android:scheme="http" /> in AndroidManifest.xml, it causes my app not to be listed in the launcher anymore. Why?
AndroidManifest.xml without <data android:scheme="http" />:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ebookfrenzy.mywebview" >
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MyWebViewActivity"
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>
AndroidManifest.xml with <data android:scheme="http" />:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ebookfrenzy.mywebview" >
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MyWebViewActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<data android:scheme="http" />
</intent-filter>
</activity>
</application>
</manifest>
Due to the intent-filter matching/resolution process, when Android "shows the applications" in the launcher, it shows the list using matching mechanism, and when you add you app doesn't match, because the system doesn't bring any data when it displays the launcher.
The solution is create another intent-filter, for example:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.ebookfrenzy.mywebview" >
<uses-permission android:name="android.permission.INTERNET" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name=".MyWebViewActivity"
android:label="#string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="http" />
</intent-filter>
</activity>
</application>
</manifest>
//Add this to your Activity
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="#string/app_name" />
</intent-filter>

Implicit intent is not called in android

Here is my android manifest file:
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity
android:name=".view.MainActivity"
android:label="#string/app_name"
android:screenOrientation="reverseLandscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<data
android:host="mocha"
android:path="/RTT/reset"
android:scheme="content" />
</intent-filter>
</activity>
<activity
android:name="ihpc.mocha.fakertt.view.SessionTimeOutActivity"
android:label="#string/app_name"
android:screenOrientation="reverseLandscape">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data
android:host="mocha"
android:path="/RTT/sessionTimeOut"
android:scheme="content" />
</intent-filter>
</activity>
</application>
It shows that I have registered implicit intent here
<data android:host="mocha"
android:path="/RTT/reset"
android:scheme="content" />
Now when I call it from another app
Intent gameInfoIntent = new Intent(Intent.ACTION_VIEW);
gameInfoIntent.setData(Uri.parse("content://mocha/RTT"
+ "/reset"));
gameInfoIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
PackageManager packageManager = getPackageManager();
List<ResolveInfo> activities = packageManager
.queryIntentActivities(gameInfoIntent, 0);
boolean isIntentSafe = activities.size() > 0;
if (isIntentSafe) {
startActivity(gameInfoIntent);
finish();
} else {
}
It is showing no activity found for
"content://mocha/RTT/reset"
I tried calling this code form same activity as well for testing purpose but result is same.
Please suggest me where and what I am doing wrong?
UPDATE:
I am able to call session time out activity by putting suggested code in the comments.
I have updated my manifest like this:
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="mocha"
android:path="/RTT/reset"
android:scheme="content" />
</intent-filter>
</activity>
<activity
android:name="ihpc.mocha.fakertt.view.SessionTimeOutActivity"
android:label="#string/app_name"
android:screenOrientation="reverseLandscape">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="mocha"
android:path="/RTT/sessionTimeOut"
android:scheme="content" />
</intent-filter>
</activity>
</application>
But I am still unable to call main activity.
I have resolved my problem by adding below lines to my manifest file
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
Here is my new look manifest file
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="ihpc.mocha.rtt"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="12" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:largeHeap="true"
android:theme="#android:style/Theme.NoTitleBar" >
<activity
android:name="ihpc.mocha.rtt.MainScene"
android:label="#string/app_name"
android:screenOrientation="reverseLandscape" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data
android:host="mocha"
android:path="/RTT/reset"
android:scheme="content" />
</intent-filter>
</activity>
<activity
android:name="ihpc.mocha.rtt.SessionTimeOutActivity"
android:label="#string/app_name"
android:screenOrientation="reverseLandscape" >
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data
android:host="mocha"
android:path="/RTT/sessionTimeOut"
android:scheme="content" />
</intent-filter>
</activity>
</application>
</manifest>
Hope this will help other developers as well !!!

Categories

Resources