How can I make my camera app available for "quick launch" on the Android lock screen?
The documentation for camera intents seems to all be focused on how to implement in a camera app which will take a single photo and return it to the calling application. The lock screen quick launch seems like a totally different use case, and the "return an image" workflow obviously would not apply. (For now, I specifically don't want to implement the "return one photo" functionality.)
Thanks for any help. Either this seems poorly documented, or I can't figure out the proper terms to search for the proper documentation.
Thank you CommonsWare. Your comment eventually led me to...
<intent-filter>
<action android:name="android.media.action.STILL_IMAGE_CAMERA" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
Related
I Have a flutter app that is supposed to be a display app for some contents besides ads for some restaurants...The app is supposed to work 24/7 and will be on andriod tablets only.
I have searched a lot and the latest thing I found was to set the app to be a system app using the following tags
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.HOME"/>
and the premission
<uses-permission android:name="android.permission.WAKE_LOCK" />
and I am using the "screen" plugin as well to keep the screen always on.
The problem now is the screen is always on and the app running without any problems for 24 and some times for 48 hours then the lock screen shows up and after unlocking the screen the app is on the foreground playing without any problems.
Is there any way to keep the app displaying always on the foreground?
or a way to disable the lock screen from appearing if it causing the issue?
You can use Screen Pinning which requires no code.
Or you can implement Lock task mode.
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.
I'm developing and Android application using the Flex 4.6 SDK version and AIR 4.0 SDK.
The application has the following manifest parameters (among others):
<aspectRatio>landscape</aspectRatio>
<autoOrients>true</autoOrients>
<fullScreen>true</fullScreen>
and:
<application android:enabled="true">
<activity android:excludeFromRecents="true">
<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.HOME" />
</intent-filter>
</activity>
</application>
So as you may see, the configuration is intended to launch the application as the HOME app, in landscape mode as soon as the device starts.
The application does in fact do everything it's supposed to but when the device boots up, the app does not starts in full screen because you can see the notification/status bar. Next you may see the problem.
What I need to do is to make the app start at full screen when the device boots. Now, the only way to make it start at full screen mode is to restart the application after the device finished booting up.
I hope you can help me solve this anoying problem.
EDIT 1
I also compiled the application using AIR 14 SDK and the behaiviour was exactly the same.
I must add that sometimes, the status bar appears and sometimes it doesn't. I thought it had something to do with the WIFI network connection but it doesn't, since on both cases, as soon as the application, if it has inmediate network connection or if it doesn't, the status bar will sometimes appear and sometimes not appear.
EDIT 2
Further testing make me realize that when the status bar was showing, it was exactly the same scenario as when the fullscreen parameter of the manifest was set to false. Could it be something related to a bug in that parameter or something like that?
just go into the manifest and use a full screen theme.
<activity
android:name=".MainActivity"
android:label="#string/app_name"
android:theme="#android:style/Theme.NoTitleBar.Fullscreen" >
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.
Whenever I turn the device sideways, everything in my app also turns and becomes distorted. How do I lock it into vertical?
In your AndroidManifest.xml set the orientation on your Activity to portrait like this.
<activity android:name=".YourActivity"
android:label="#string/app_name"
android:screenOrientation="portrait">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
Whenever I turn the device sideways, everything in my app also turns and becomes distorted. How do I lock it into vertical?
Generally, you do not want to do that.
First, some users have devices with physical keyboards that only operate in landscape mode. Perhaps, for your app, that does not matter. However, any app that uses text input should support landscape mode for these users.
Second, few TVs will operate in portrait mode. It is reasonably likely that your app will look bad on Google TV when it starts supporting Android applications.
Third, even for users whose devices are not forcing them to use landscape, simply prefer to use landscape, for whatever reason.
All of these user bases will think less of applications that force portrait mode, and their opinions may be reflected in ratings on the Android Market.
Most applications should support portrait and landscape, through careful design of the existing layouts and by using res/layout-land/ to provide replacement layouts where a significant change is required.
For the activity you have defined in the manifest, you need to set the android:screenOrientation.
Set it to portrait or landscape. Make sure it is not sensor.
Take a look at these SOqs:
Disable screen rotating on Android
Prevent screen rotation on Android