2

I have made a button in the app that creates a shortcut button of the app, now what i want to do is, when the user presses this button some function of the activity should execute. The shortcut button should not open the application but should execute a function of the application.

Is that possible? If yes, how can I accomplish such a thing?

Vipul Behl
  • 644
  • 1
  • 7
  • 20
  • While creating the shortcut, you need to specify the Activity which needs to be started in an Intent. See for an example [this question](http://stackoverflow.com/questions/10343414/add-shortcut-for-android-application-to-home-screen-on-button-click?rq=1). – Glorfindel Jul 19 '15 at 11:11
  • I did what you suggested and it worked, but there is one other issue, the shortcut only appears on default phone launcher not with 3rd party launchers such as Nova launcher. Is there a way to make the shortcut available on other launchers too? – Vipul Behl Jul 19 '15 at 19:05

0 Answers0