app launcher icon is not showing in home screen of android tv - android

When I install my app in my tv, I can run it and do everything but I do not know why app icon not showing on the home screen of the tv. Mainly its not displaying in 1080p Tv's
Here is my AndroidManifest:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.app.demo.tv">
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<uses-feature
android:name="android.software.leanback"
android:required="true" />
<permission
android:name="com.app.demo.tv.ACCESS_VIDEO_DATA"
android:protectionLevel="signature" />
<uses-permission android:name="android.permission.INTERNET" />
<application
android:name=".Application"
android:allowBackup="true"
android:banner="#drawable/app_icon"
android:icon="#drawable/app_icon"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<activity
android:name=".HomeActivity"
android:label="#string/app_name"
android:theme="#style/HomeTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:theme="#style/LandingAndOtherTheme" />
</application>
</manifest>

Just declare icons inside leanback launcher activity
<activity
...
android:banner="#drawable/main_logo"
android:icon="#mipmap/ic_launcher"
android:logo="#mipmap/ic_launcher"
...
>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
</activity>

Related

Creating a default launcher app for Android Not Working

I created a default launcher app for an Android TV box that used to work until I ran into some unexpected issues and had to reset the TV Box to factory default. Now it doesn't work anymore. I used to get a "Select Default Launcher" popup when pressing back from my app, but not anymore.
My Manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="gensys.firefly.fireflyhikviewer">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<!--<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />-->
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher_round"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/Theme.FireflyHikViewer">
<receiver
android:name=".Service"
android:enabled="true"
android:exported="true"
android:permission="android.permission.RECEIVE_BOOT_COMPLETED">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</receiver>
<activity
android:name=".MainActivity"
android:banner="#drawable/banner"
android:icon="#drawable/icon2"
android:label="#string/app_name"
android:logo="#drawable/icon2"
android:screenOrientation="landscape"
android:windowSoftInputMode="stateHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
<!--<category android:name="android.intent.category.LEANBACK_LAUNCHER" />-->
</intent-filter>
</activity>
</application>
<!--<uses-feature
android:name="android.software.leanback"
android:required="true" />-->
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
</manifest>
I also updated my Android Studio to 4.2.1, so I don't know if that might have changed something.
Please help.

Android TV App not displaying in Google Play Store

Below is my manifest file, I have included all the necessary code as per the document but still the app is not displaying in the play store search. I searched using the appId for my Alpha build using my test account which i have included in the tester list.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.test.package">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<uses-feature
android:name="android.software.leanback"
android:required="true" />
<application
android:name=".TestApp"
android:allowBackup="true"
android:banner="#drawable/logo"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<receiver android:name=".BootReceiver"
android:enabled="true"
android:exported="true">
<intent-filter android:directBootAware="true">
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" />
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
<action android:name="android.intent.action.REBOOT"/>
</intent-filter>
</receiver>
<activity
android:name=".activity.MediaActivity"
android:theme="#style/Theme.AppCompat"
android:launchMode="singleInstance"/>
<activity
android:name=".activity.CodeActivity"
android:theme="#style/Theme.Leanback">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".activity.CodeAndroidStickActivity"
android:theme="#style/Theme.AppCompat">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
I tried setting the android.software.leanback field to both true and false, but still not getting displayed
In your app manifest, you must declare that a touch screen is not required, as shown this example code; otherwise, your app won't appear in Google Play on TV devices.
<manifest>
<uses-feature android:name="android.hardware.touchscreen"
android:required="false" />
...
</manifest>

'The following app is part of another app' alert when uninstalling an app

I installed my signed apk on android emulator and when I tried to uninstall it, android made a dialog and said
MyApp is part of the following app: MyApp
do you want to uninstall this app?
I wanna know what makes android to make this dialog because my app(MyApp) is not part of another app
and this is my Manifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.app.driver.android">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="com.sec.android.provider.badge.permission.WRITE" />
<application
android:name=".global.Application"
android:allowBackup="false"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="false"
android:theme="#style/AppTheme">
<activity android:name=".activity.SplashActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".activity.HomeActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="stateHidden">
<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="home_activity"
android:scheme="app_driver" />
</intent-filter>
</activity>
<activity
android:name=".activity.ActivationActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".activity.LoginActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme" />
<activity
android:name=".activity.NoInternetConnectionActivity"
android:screenOrientation="portrait" />
<activity
android:name=".activity.ProfileActivity"
android:screenOrientation="portrait"
android:theme="#style/AppTheme2"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".activity.MapActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan" />
<activity
android:name=".activity.RequestActivity"
android:screenOrientation="portrait"
android:windowSoftInputMode="adjustPan" />
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="#string/google_maps_key" />
</application>
</manifest>
Same problem. But I resolved it after I located that there was 2 activities that has different labels.

AppIcon will showed twice on device with Android App

When i install my android application on the device, the AppIcon will appear twice.
This means: there are two separate app-icons. Both icons launch the same app version. If I remove one app-icon, the other disappears also. If i reinstall them, it appears twice again.
How can i avoid this?
This is my AndroidManifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.******"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="22" />
<application
android:name=".MainApplication"
android:allowBackup="true"
android:label="#string/app_name"
android:icon="#mipmap/ic_launcher"
android:theme="#style/AppTheme">
<meta-data android:name="com.bugsnag.android.API_KEY"
android:value="524b0194108e90ae383189e509746766"/>
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
<activity
android:name=".SplashActivity"
android:theme="#style/SplashTheme">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
It's because of the intent-filter. Only one activity should have
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Any activity having this intent filter will be shown in the launcher.

Android app not showing in the device apps dashboard

My app doesn't appear in the apps dashboard and if I open it from the Applications list in the settings, the "start" button is disabled, I suspect is a misconfiguration in my AndroidManifest.xml but have no idea what exactly is wrong in it.
This is the code of my manifest file.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.designhunter"
android:versionCode="1"
android:versionName="1.0">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-sdk
android:minSdkVersion="16"
android:targetSdkVersion="22" />
<application
android:name=".MainApplication"
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme">
<activity
android:name=".MainActivity"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
android:label="#string/app_name"
android:launchMode="singleTask">
<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" />
<category android:name="android.intent.category.LAUNCHER" />
<data android:host="auth-callback" android:scheme="designhunter" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>
According to this Action main does not expect to receive it data, but you have data tag. If you remove it (and the view action because it is required) it should work

Categories

Resources