How to close the new Android 7.1 App Shortcut - android

When clicking on the app-shortcut, I am opening an Activity with a Dialog theme. It seems that the app-shortcuts are not closed if I use that theme on the Activity. If I delete the Dialog theme, the app-shortcuts are closed after clicking on one of them.
Any idea? Thanks!

I was able to reproduce your problem, at least with the Pixel Launcher.
The rendering and behavior of app shortcuts is up to the app that is showing the shortcuts. Perhaps the Pixel Launcher is only collapsing the app shortcuts panel in onStop(). When a shortcut launches a full-screen activity, the launcher activity is called with onStop(), and so the app shortcuts panel goes away. But, when a shortcut launches a dialog-themed activity, the launcher activity is not called with onStop() (since it is still visible), and so the app shortcuts panel remains.
Regardless, this behavior will vary by home screen (or other user of app shortcuts), and there is nothing much that you can really do about it.

Related

launcher animation when phone is unlocked

I'm new to Android and I'm trying to make a launcher as my first Android project. I've done the basic work of displaying installed apps. Now I want to add animations to improve user experience. But I'm not able to figure out the following two things :
How to add animation when the phone is just unlocked and apps are displayed on the homescreen like in iPhone or MIUI stock launcher?
How to know the app that is minimized or closed on pressing the home button so that I can show an animation like the app is minimized to it's icon on homescreen just like in MIUI?
OnResume() of your application activity will be called once user presses home button or unlocks phone. So you can implement you logic of showing animation there.

Samsung Galaxy: Running Android app disappears from background stack list

On my Samsung galaxy tablet, when the app goes to background (by pressing the home screen), it completely disappears from the back stack (where you can see all the open apps). Yet when I open the app with the icon manually again the state is clearly restored.
Is this a manifest settings or similar? I cant figure it out
This happens when you have android:excludeFromRecents="true" in your manifest launcher activity. Try set it to false:android:excludeFromRecents="false"

How do you prevent an Android Wear activity from having multiple instances?

Sometimes, most of the time when my LG G watch closes the app automatically by going to sleep/dim mode, if I open the app again by going to the start menu there are two instances of the activity opened (when I slide one off the previous one is underneath).
This never happens in a phone, is this how activities work in Android Wear? Should I "finish()" them in onPause()?
Thanks.
Have you looked at the android:launchMode attribute in the AndroidManifest.xml for the activity?
perhaps android:launchMode="singleInstance" will help you out.
http://developer.android.com/guide/topics/manifest/activity-element.html#lmode

Disable (not hide) system UI bar programmatically on non-rooted 4.0+ android tablet?

In my app, there is a activity where it is important that the system UI buttons (home, back, etc.) are not pressed, though it is ok if they are still visible. I have heard that there might be a way to achieve this, at least in 4.0 (I'm using 4.2).
A way to quickly and automatically return to the app if the buttons are pressed is also a correct answer, but seems less plausible. Thanks.
This is possible to override the home button by making your activity as home activity i.e
-- category android:name="android.intent.category.HOME"
but in this case android give user option to choose the app on launcher dialog where if user choose your application and click always, he will not be able to go to homescreen until you specifically provide a exit button oinside your app and reset it which you should definately do.

How to Achieve HOME SCREEN LAUNCHER in my Android Application?

i have develop my application in android.
Now i want to make Home Screen Launcher. and i want to call that Home-Screen launcher from my activity.
So,,how to achieve this,please give me suggestions to make Home-Screen launcher and how to call it from my application??
Thanks in Advance
By Home Screen Launcher, I think you mean Home Screen Activity and a demo Home Screen Activity is in the samples directory of the SDK. Remember that a replacement for the default Home Screen can only be setup/activated by the user as a security measure. Otherwise you can start it through an Intent, but it won't last unless the user sets it as the default.
See Home Screen Activity

Categories

Resources