Why icon don't appear on Android Galaxy S6 and S7? - android

I have a problem without logic, my application run smoothly on almost all devices but when I try the Samsung Galaxy S6 and S7 models, simply icon does not appear anywhere.
I've tried to send the official store (still the same)
If I run via simulator the application opens, but without the icon (shortcut).
My AndroidManifest.xml
[...]
<application
android:name="MyApp"
android:label="MyApp"
android:icon="#mipmap/ic_launcher_phone"
android:hardwareAccelerated="true"
android:supportsRtl="true">
<activity android:name=".MyAppTalk"
android:label="MyApp"
android:theme="#style/MyAppTheme"
android:launchMode="singleTask"
android:clearTaskOnLaunch="true"
android:icon="#mipmap/ic_launcher_phone"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateAlwaysHidden|adjustNothing">
<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.DIAL" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:mimeType="vnd.android.cursor.item/phone" />
<data android:mimeType="vnd.android.cursor.item/person" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.DIAL" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.LAUNCHER" />
<data android:scheme="voicemail" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.DIAL" />
<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" />
<action android:name="android.intent.action.DIAL" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<category android:name="android.intent.category.LAUNCHER" />
<data android:scheme="tel" />
</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" />
<category android:name="android.intent.category.LAUNCHER" />
<data android:mimeType="vnd.android.cursor.dir/calls" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.CALL_BUTTON" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
<!-- This was never intended to be public, but is here for backward
compatibility. Use Intent.ACTION_DIAL instead. -->
<intent-filter>
<action android:name="com.android.phone.action.TOUCH_DIALER" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.TAB" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter android:label="#string/recentCallsIconLabel">
<action android:name="com.android.phone.action.RECENT_CALLS" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.TAB" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<meta-data
android:name="com.android.keyguard.layout"
android:resource="#layout/keyguard_preview" />
</activity>
[...]
I added several "android.intent.category.LAUNCHER" as despair,
Thanks

Related

Register Activity for specific kind of Data android

So, whenever any number is clicked in any application, default Dialer is opened with that number pre-filled.
How can i register my activity for similar thing?.
Where any click on number, will also list out my app and on selecting I get data of it?
Thanks.
add this intent filter to your activity
<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.DIAL" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.CALL_BUTTON" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</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:mimeType="vnd.android.cursor.dir/calls" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.DIAL" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="tel" />
</intent-filter>
and add this permissions
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.CALL_PRIVILEGED" />
Credit

My Android App is not showing on the App Drawer

I have an application with a single activity:
<activity android:name=".MainActivity"
android:label="#string/app_name"
android:screenOrientation="landscape"
android:launchMode="singleTask"
android:configChanges="mcc|mnc|locale|touchscreen|keyboard|keyboardHidden|navigation|orientation|screenLayout|uiMode|screenSize|smallestScreenSize|fontScale">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="com.google.intent.category.CARDBOARD" />
<data android:scheme="myscheme" android:host="action1"/>
<data android:scheme="myscheme" android:host="action2"/>
<data android:scheme="myscheme" android:host="action3"/>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
<meta-data android:name="unityplayer.UnityActivity" android:value="true" />
</activity>
I need it to respond to myscheme:// urls, and it is working in that regard. Unfortunately, it does not show in my App Drawer. If I remove the android:scheme lines, then it shows on the App Drawer, but then it no longer responds to myscheme:// urls, obviously.
How can I fix this activity to make it both show on the app drawer and respond to the custom urls?
Try splitting the intent-filter into two:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<category android:name="com.google.intent.category.CARDBOARD" />
<data android:scheme="myscheme" android:host="action1"/>
<data android:scheme="myscheme" android:host="action2"/>
<data android:scheme="myscheme" android:host="action3"/>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>

Intent ACTION_CALL is not being intercepted by my application

There's an application with a button that when pressed is using the startActivity method with the ACTION_CALL intent.
This is how its called:
public void call(String number)
{
Intent myIntent = new Intent(Intent.ACTION_CALL);
myIntent.setData(Uri.parse("tel:" + number);
startActivity(myIntent);
}
I have made a dialer app with the permission:
<uses-permission android:name="android.permission.CALL_PHONE" />
And my manifest looks like this:
<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" />
<action android:name="android.intent.action.DIAL" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="tel" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.CALL_BUTTON" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
Every other question I've seen is suggesting this exact declarations to be made in the manifest.
I've checked and there are no defaults set on the Google dialer app which comes with the phone.
So why won't a pop up dialog show with an option to choose my application as the dialer to catch that intent?
I have finally got it to work.
After adding a bunch of intent filters it started working:
<intent-filter>
<action android:name="android.intent.action.NEW_OUTGOING_CALL" />
<action android:name="android.intent.action.CALL" />
<action android:name="android.intent.action.CALL_BUTTON" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="tel" />
</intent-filter>
<intent-filter android:priority="100" >
<action android:name="android.intent.action.DIAL" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="tel" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.CALL_BUTTON" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.CALL_PRIVILEGED" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="tel" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.DIAL" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="tel" />
</intent-filter>
I think the first one did the magic.

Application not visible in menu

I am working on an android Dialer My MainActivity's intent-filter is given bellow
<intent-filter>
<action android:name="android.intent.action.DIAL" />
<action android:name="android.intent.action.CALL_PRIVILEGED" />
<data android:scheme="tel" />
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
after adding these filters my application is not seeing in phone menu.
<action android:name="android.intent.action.DIAL" />
<action android:name="android.intent.action.CALL_PRIVILEGED" />
<data android:scheme="tel" />
please tell me why??
Try to separate your intent-filters in two:
<intent-filter>
<action android:name="android.intent.action.DIAL" />
<action android:name="android.intent.action.CALL_PRIVILEGED" />
<data android:scheme="tel" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
It seems Android considers your filters as one.

need a customised dialer layout in android

I need to develop a dialer for my android application. i need to develop an activity which uses the customised dialer.Can anybody help me out??
put this as intent filter of your activity
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.CALL_BUTTON" />
<action android:name="android.intent.action.DIAL" />
<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" />
<action android:name="android.intent.action.DIAL" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="tel" />
</intent-filter>

Categories

Resources