How to set the Fire TV "icon" on home screen? - android

I have a Fire TV app that will also be released on normal Android TV and one some TVs that have Android that isn't Android TV and possibly on tablets. So I've set my banner for Android TV and that is working fine, the icon works fine on other devices but the Fire TV shows the icon where I expect the banner to be shown. This is my application xml:
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:supportsRtl="true"
android:banner="#drawable/banner"
android:theme="#style/AppTheme">
<activity
android:name=".start.MainActivity"
android:banner="#drawable/banner"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:logo="#drawable/banner"
android:roundIcon="#mipmap/ic_launcher_round"
android:screenOrientation="landscape">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
</activity>
</application>
What am I missing? I make the custom xml as well with what's below but didn't help:
<resources>
<drawable name="splash_logo">#drawable/banner</drawable>
<drawable name="app_logo">#drawable/banner</drawable>
<drawable name="company_logo">#drawable/banner</drawable>
</resources>

To answer my own question, that appears to come from the Amazon App Store. Once I released my app, the banner magically changed on its own.

If it is accepted, yes—but if not then you must have something like:
<application
android:icon="#drawable/ic_launcher"
...
Please note that this ic_launcher must be 192x192.

Related

Android TV App - Google complaining banner does not fill the entire space

We are trying to submit a TV only android app to Google play store, but the opt-in for tv is rejected because:
No full-size app banner
Your app does not contain a full-size app banner or is it not visible in the launcher. We are targeting 1080P, which we consider xhdpi. Apps should include the banner in the xhdpi (320 dpi) drawables folder with a size of (320px × 180px). Please refer to our Home Screen Banner and UI Patterns documentation.
The title should help users identify apps in the launcher. Please refer to our Visual Design and User Interaction documentation for more information.
For example, your banner does not fill the entire banner space. You can refer to the attached screenshot for additional information
They provided a screenshot, although it doesn't display like this according to our tests:
The banner provided is exactly the correct dimensions, in the drawable-xhdpi directory, saved as 320dpi. Google are unable to help us past this point and we are unsure how to proceed.
Here is the AndroidManifest.xml:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mypackage">
<uses-permission android:name="android.permission.INTERNET" />
<uses-feature
android:name="android.software.leanback"
android:required="true"/>
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false"/>
<application
android:name=".MainApplication"
android:label="#string/app_name"
android:icon="#mipmap/ic_launcher"
android:usesCleartextTraffic="true"
android:allowBackup="false"
android:theme="#style/AppTheme"
android:banner="#drawable/banner"
>
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category
android:name="android.intent.category.LEANBACK_LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name=".TvActivity"
android:label="#string/app_name"
>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category
android:name="android.intent.category.LEANBACK_LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
What could be causing this? Any help appreciated!

How do I change the app icon in the 'Recents' Screen?

I know how to change the icon of my app, but when I look at the Recents Screen, the icon is the default one.
App icon (all good so far):
Icon in my Recents Screen:
This is the 'application' tag of my 'AndroidManifest.xml'
<application
android:name=".App"
android:allowBackup="true"
android:icon="#mipmap/iconout"
android:roundIcon="#mipmap/iconout"
android:logo="#mipmap/iconout"
android:label="#string/app_name"
android:supportsRtl="true"
android:theme="#style/AppTheme">
I've tried many solutions that I found on this platorm (that didn't work), like:
file->new->image asset->choose image..
install & unistall the app
build & clean project
delete all the default icons on my project
drag & drop my icon to drawable from mipmap folder
Any other possible solutions? Thank you in advance!
Ok I found the solution and decided to answer for anyone that will encounter the same problem in the future.
I fixed it by adding android:icon="#mipmap/iconout" in the main activity tag declaration in the AndroidManifest.xml, like so:
<activity
android:icon="#mipmap/iconout"
android:name=".MainActivity"
android:label="#string/app_name"
android:theme="#style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
And here's the final result:
Try to change the format of the icon to PNG. That works for me.
Or you could try the application on different devices to see if it's not a problem of the emulator/phone.

How to show the title bar in the design review?

When I am designing a layout, the design review does not show the title bar, but the simulator can show the title bar, as you can see below:
My style.xml is showing as follows:
Also, my Manifest is writen as follows:
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:roundIcon="#mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="#style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Is there any ways that I can keep the title bar all the time when I design my layout? even though I create many layout file, I still hope that every layout can keep the title bar.
You need to change theme in Editor
like below image it will work
Check the current Theme in the Android Studio Design Preview :
It must not end with ".NoActionBar", you can set your theme "AppTheme".
If you are using 28 API. please change API VERSION to 26 and use this
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">

How to change launcher icon and it's label from the application

How can I change the launcher icon and its label from my application runtime in Android? (if it is possible)
I mean the properties defined in AndroidManifest.xml: android:icon and android:label. I want to replace it by the image I take from the camera.
This entire answer is from this post and it was taken from P-A and CommonsWare.
You cannot change the manifest or the resource in the signed-and-sealed APK, except through a software upgrade. or
Try this, it`s work fine for me but not sure for all devices:
Modify your MainActivity section in AndroidManifest.xml, delete from it, line with MAIN category in intent-filter section.
<activity android:name="ru.quickmessage.pa.MainActivity"
android:configChanges="keyboardHidden|orientation"
android:screenOrientation="portrait"
android:label="#string/app_name"
android:theme="#style/CustomTheme"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />//DELETE THIS LINE
</intent-filter>
</activity>
Create <activity-alias> for your app, for each of your icons. Like this
<activity-alias android:label="#string/app_name"
android:icon="#drawable/icon"
android:name=".MainActivity-Red"
android:enabled="false"
android:targetActivity=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity-alias>
Set programmatically ENABLE attribute for necessary
getPackageManager().setComponentEnabledSetting(
new ComponentName("ru.quickmessage.pa", "ru.quickmessage.pa.MainActivity-Red"),
PackageManager.COMPONENT_ENABLED_STATE_ENABLED, PackageManager.DONT_KILL_APP);
Note, At least one must be enabled and above code perfect working up to 4.0 not tested into >4.0.
Edit: your original answer didn't specify you wanted to do it at runtime. Below the line is how to do it before it compiles. As for doing it programmatically at runtime:
From this answer:
You cannot change the manifest or the resource in the signed-and-sealed APK, except through a software upgrade.
But also, the accepted answer figured out a "hack" or some cheating way to do it (I presume). I haven't tested it, but there is a source for you to check out.
Or, this link apparently describes how to do this using the "widget" approach.
So lets say your manifest was like this:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="yourPackage"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
...
You would change the launcher icon by putting images into your drawable folders:
Project folder --> res --> all the drawables
Then you would change the android:icon="#drawable/ic_launcher" to be android:icon="#drawable/whateverTheNameOfTheImageIsYouPutInTheDrawablesFolders"
To change the label:
Open up your strings.xml file which is located:
Project folder --> res --> values --> strings.xml
And look for the string that looks like this:
<string name="app_name">Your App Name</string>
And just change Your App Name to be whatever you want the label to be.
Summary:
android:icon="#drawable/ic_launcher" determines your launcher icon, so just add images to the drawable folders and change ic_launcher to whatever the name of image is that you want to be the icon.
android:label="#string/app_name" determines your "label" so just look for app_name (because the label is referenced to #string/app_name) in your strings.xml file and change the contents of app_name.

Separate Launcher and Activity icon with Android

I've got a simple application with one single activity. Actually, the launcher icon is the same as the activity's one (the one in the top-left corner). I would like to put another icon in my activity without changing the launchers'one.
Here is my manifest :
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
<activity
android:name="com.natinusala.pebkac.MainActivity"
android:label="#string/app_name">
<intent-filter android:logo="#drawable/pebkac">
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
Actually, I can edit the launcher and activity icon by editing the android:icon="#drawable/ic_launcher" line. I can do it also in adding an android:icon into the <activity> but it modify too the launcher's icon.
How can I do to edit my activity's icon without touching the launcher's one ?
Thanks !
In your manifest, add android:logo="#drawable/ic_yourIcon" to either your Activity or Application tag.

Categories

Resources