My app is fully usable and navigatable on AndroidTV using the DPad. Well, it certainly is on MY AndroidTV, as well as AVD.
However, Google keeps on rejecting my appeal to have it marked as AndroidTV capable.
There is no feedback, other than
Missing DPad functionality Your app requires user interaction for
menus or app navigation. Please make sure that all menus and app
navigation are fully functional using a DPad. Please refer to our DPAD
Control and Hardware Declaration documentation.
Do you know if they actually test these apps, or do they just look for certain code patterns? The message from them looks automated, and I've not spoken to a person yet.
Would it help if I recorded my app in use and sent them a link to the demonstration?
In my case there were 3 problems.
I had a "Refresh" button that when pressed it was downloading a new image and replaced the current, to the automatic google testing machines - it looks like nothing happens, it was the same image. the fact that I used different drawable to show pressed/released/focused state had nothing to do with it. For those testing machines, if nothing happens then this button has no functionality and the DPAD probably is not working. I have added a simple Toast message that launches every time a user presses the button.
I have contacted support from the link in the rejection email - they are very supportive. they have sent me explanation that includes an old screenshot. apparently - they were using an old version - I don't know why. After explanation - they checked the correct one.
also, they test mostly the production version while most of my development was on the beta version. advance your version to production. in my case partial release of 5 percent was good enough for them to test the new production version.
after all of those measures - 12 hours later - I was approved. Now, I have removed the toast and my app was still accepted.
AndroidTV applications support and expects leanback activities. Also, D-pad needs to minimum remote controller support like up, down, left, right, select, Back, and Home buttons.
D-pad minimum controls
The default controller for a TV device is a D-pad. In general, your app should be operable from a remote controller that only has up, down, left, right, select, Back, and Home buttons. If your app is a game that typically requires a game controller with additional controls, your app should attempt to allow gameplay with these D-pad controls. In this case, your app should also warn the user that a controller is required and allow them to exit your game gracefully using the D-pad controller. For more information about handling navigation with D-pad controller for TV devices, see Create TV navigation.
Adding the below lines to your main activity in AndroidManifest.xml may help Dpad support.
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
If its not working and these lines already in manifest please share your manifest file.
Related
developer.chrome.com/apps/getstarted_arc#bestpractices
The ARC allows you to execute native android apps through the chrome browser by wrapping a chrome app around it.(As far as I can tell)
I am re-factoring an Android app to work well on Chrome. The first thing I need to do is to make the back arrow enabled at all times on the top left as shown below.
This is the program that allows Native android apps to run through chrome. I think the answer to my question lies somewhere in "Additional Metadata", or in the source code?
Add {"disableAutoBackButton": "true"} to the metadata. That will enable the back button within an activity. I've found that with my app that has multiple activities, though, it doesn't work to return to my main activity from my settings activity. It could be that I'm doing something wrong with the way I'm handling activities, I guess, but it works on all physical devices.
{"sleepOnBlur":false,"disableAutoBackButton":true}
please supply the above metadata before you download the zip or launch app from the arc welder
the first param prevents excessive pause/resume and also supposed to fix short black screen flash occurring occassionally in some of the apps.
the second params adds persistance back button on top left hence helping to avoid extra code required because of absence of back button in some screens(mostly the first screen)
I'm going to write an application for a special device. The device's OS is android and it connects to a TV with HDMI cable and has a remote control as input hardware.(Like a video player) I need these to be done:
When the user works with it, it should not be clear that the OS is android.
User could not access to the OS system options like "Action bar" or "Setting menu" or etc.
My app be the default app of the system and it runs at start up before any other app even the launcher.
so,
How can I change the android boot logo ?
How can I set my app to be the default application? May I need to set it as launcher?
how can I disable all other android UI tools like launcher and action bar permanently? (even my application close they should not be shown)
May I need a rooted android ? and witch version has these possibilities ?
I've found my answers and share it to others.
How can I change the android boot logo ?
In some devices there is a file in system/media/bootanimation.zip
can be edited and replaced.(When creating zip file should choose
Store in compresstion type.)
In some devices there is a file in system/etc/bootvideo thats in
MP4 file format simply can be replaced.
How can I set my app to be the default application? May I need to set
it as launcher?
Yes, simply add android.intent.category.LAUNCHER to first activity category in the manifest like this:
<activity android:screenOrientation="landscape" android:name=".ActivityStarter">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
How can I disable all other android UI tools like launcher and action bar permanently? (even my application close they should not be shown)
Uninstall all other launcher on the device. also for notification bar you can remove Android UI in system apps. Note that be sure your app is running correctly and does not crash, if not you will lose access to the device.(I installed ES Explore on the device and run it with a hidden button in my app to access my android system tools.)
May I need a rooted android ? and witch version has these possibilities ?
Yes. In this case I used Android 4.4.2 but think other versions would be so.
Android 5.0 supports pinning an app. There's also an app called AppLock that may be relevant.
In my Android app I enable my specific app-search to be triggered via the search key in a number of my activities using this mechanism from the manifest
<meta-data
android:name="android.app.default_searchable"
android:value=".Search.SearchActivity" />
with the appropriate search activity. This all worked fine until recently.
With the Jelly Bean update the Search Key now always starts Google NOW search functionality.
On this site: http://www.android.com/about/jelly-bean/ I found in the "Google Search" section this statement:
"For devices with a hardware search key, you can tap it to launch Google Search."
Has Google taken over all use of this key completely, or is there a way to recover it?
If I can't recover it, then it's UI design changes in almost all activities to add a Search menu option or action button....
This has been done specifically to circumvent patent issue. This has been mostly done only in USA, where apple recently got an injunction on galaxy nexus. So all Android phones in USA will show this behavior from now on. So most of the apps in jelly bean have a on screen search button.
If you have a cyanogenmod based phone (e.g. jellytime for HTC DHD like me), the old behaviour is only a setting away:
Menu/Systemsettings/System/Hardware keys/Search/In-App-Search
But this change wasted quite some of my time for debugging my app and researching to find this solution. Needless to say I hate patents, especially ridiculous ones: obvious behaviour like an OS sending a hardware key event to an application can be patented???
We have an industrial app running on stock Samsung Android devices. Because it's an industrial app we are trying to have it "take over" the device. We've got this pretty well working by setting in the manifest
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
and by intercepting the Android "back" key via onBackPressed and doing nothing.
Our one remaining conundrum is that Samsung's UI layer, 'Touch Wiz', has a pull-down menu that the user can pull down over the top of our app and access other features from. We're trying to disable that.
Is there anything we can intercept that the way we did the the back button to block that? Any other way to block it?
(if someone suggests "rooting" the device, what could I do as root that would help here?)
Thanks in advance!!
Which stock samsung device are you working with?
and by pull down menu are you speaking of the Notification Bar?
If so this is not a UI feature that is specific to TouchWiz, they may have modified what all can be accessed from the expanded notification bar. But this element exists in stock android as well.
If this is what you are referring to you can set a full_screen flag on your activity or application elements in your manifest. This will hide the notification bar while inside your application.
android:theme="#android:style/Theme.NoTitleBar.Fullscreen"
If it does not work with fullscreen mode home app:
A stock Android has no way to do real kiosk mode and I guess it's not a goal of Android to allow this since you could do evil things with that like build apps that force you to pay money before you can leave them again.
Root will not help here too since that's about the underlying Linux which allows you to access internal files etc. That does not unlock some magically hidden APIs.
What you would need to do is build your own firmware for the device (there might exist something for the device - look in http://forum.xda-developers.com/). In that firmware you are free to change those internals that allow users to escape your app.
I am trying to develop unlock screen app for Android. I have downloaded some unlock screen app and tested. I finally found one app. That is Fingerprint Screensaver . It is what I exactly want. I mean I wish to replace the pattern unlock screen app. I am wandering how to replace the Android pattern unlock screen app.
I have googled a lot, but I could not find how to do it. Somebody wrote it is a hack. Even the Android does not support, I strongly wish to know how to do that.
If someone knows about it, please give me a clue. Thanks in advance a lot.
Thanks.
You can create a custom unlock screen by adding the following intent filter to the AndroidManifest.xml file for your Activity:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.HOME" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
This is a hack because a dialog box will pop up asking the user which one he wants to use (yours or the default). Worse, if the user accidentally selects your lock screen as the default home screen in the chooser, they could seriously mess up their device. They might end up having to do a factory reset.
The only safe way to create a custom lockscreen is to modify the Android platform itself. This is how OEM skins like HTC Sense or Motoblur create custom lock screens.