I've added shortcuts options for my Android app, but I found out other apps can create shortcut within their apps (in their apps, press menu button, choose create shortcuts, then their shortcuts appear in the launcher), when my only tutorial from Android developer is only for creating shortcuts from launcher (long press in launcher home screen, choose Shortcuts, then choose your app).
Can anyone show me the way to create a shortcuts within app?
Inside question is working solution, take a look. If you have any question add it in a comment.
How to add app's shortcut to the home screen
Related
Im attempting to develop an AllApps drawer like Aviate, but as a separate Activity (that way I can launch it from Nova Launcher through a gesture).
I've seen answers on how to add a shortcut to the homescreen. i.e.:
Android create shortcuts on the home screen
How to add shortcut to Home screen in android programatically
Is it possible to specify the which homescreen page and location? I'm guessing not since google playstore does not seem to put it in the best place on a new app install, but wanted to confirm.
On the default launchers, there is no documented way to do this.
is there a way to programmatically create (after installation) a new shortcut in the All apps screen (menu, list of all installed applications).
I know that I can define shortcuts in AndroidManifest.xml, but that is not what I want. I want that users of my app were able to create them in my app settings.
I've found out that this is possible for Home screen (launcher shortcut), how to do it for All apps screen? Is it even possible?
The code you just defined includes both of these.
Programatically
If you had read the Intent documentation you'd find this:
Intent.ACTION_CREATE_SHORTCUT
Just send an intent with this information and you're good to go.
Manifest
Also ifyou want your application to show up in the ALl Apps screen, then in your manifest you'd define one of your activities to be set into the launcher category.
However; after installation it is NOT possible to add a shortcut to the All Apps Screen. As there is no API to allow this at all. You CAN create a shortcut on the Launcher desktop, but that is as far as the SDK can take you.
Does anyone have example code for creating URL shortcut on the android device home screen ?
I want my app to create some shortcuts to URL.
What do you want to do if the home screen is already full?
I think there are several good reasons why the user should be involved.
This link shows how a user can do it manually:
http://androidforums.com/htc-desire/197568-internet-shortcuts.html
And it contains another link to an app that lets you make custom icons etc.
http://www.folderorganizer.net/how-to/change-label-icon/
If you make a widget for your app, you can programmatically change URL shortcuts that appear in your widget ;-)
I want to delete all home screen shortcuts in Android programmatically. I have already written an app to create my own shortcuts for opening up a browser instance & directing to specific URI & delete only those programmatically. When deleting shortcuts this way, I have to provide the exact name & URI for each shortcut.
How can I achieve the same thing for existing shortcuts which were not created by me (like browser, calendar or any other app default created a shortcut on home screen)?
This seems like something that shouldn't be and probably isn't possible for security reasons.
here i want to launch Android Home Screen
Can anybody tell me where to find information about how to write a custom home-screen application? and i want to remove android default home screen. and add my custom home screen code to source of android.
So very first i have to make application which launch as a home screen so any body can give me some tips or guidelines?
Thanks
create a home application , which is nothing but an application with home intent . Samples (../android-sdk-linux/samples/android-8) have a good example named "Home" .
once app install when user will click on homeScreen he will be prompted for select home among existing home apps (including your app too) , once user set it as default this will not be asked again .