android - App icon not visible when code is run -
i have created android app using android studio. when run code on ide, runs expected on connected phone. problem is, not leave behind icon on phone use next time. again have run android studio use app. fine initially, don't realize made icon vanish. app present in settings. when go
settings->apps
i can find app on there. not disabled. tried uninstalling app , trying again. still doesn't give me icon. cleared defaults, forced closed , tried possible. nothing helping me.
please help.
my androidmanifest.xml
<?xml version="1.0" encoding="utf-8"?>
<uses-permission android:name="android.permission.internet" /> <application android:allowbackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:theme="@style/apptheme" > <activity android:name=".twitterlogin" android:label="@string/title_activity_twitter_login" > <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.chillumapp.com" android:pathprefix="/chillum" android:scheme="http" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> <activity android:name=".mainactivity" android:label="@string/app_name" > </activity> <activity android:name=".nextactivity" android:label="@string/title_activity_next" > </activity> <meta-data android:name="io.fabric.apikey" android:value="b1fe9f0c7d80c3c24879d634b199f2d0e474b4ba" /> <activity android:name=".webviewactivity" android:label="@string/title_activity_web_view" > </activity> </application> </manifest>
you should specify different every intent can launch app. 1 browser category url data, , 1 launcher category.
from app manifest guide.
components advertise capabilities — kinds of intents can respond — through intent filters. since android system must learn intents component can handle before launches component, intent filters specified in manifest elements. a component may have number of filters, each 1 describing different capability.
your code become like:
<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" /> <category android:name="android.intent.category.browsable" /> <data android:host="www.chillumapp.com" android:pathprefix="/chillum" android:scheme="http" /> </intent-filter>
Comments
Post a Comment