user1593640
user1593640

Reputation: 1

How to automatically launch an app without a button

Is it possible to launch my app's code without using a button?

I would like my app to 'just do it' when someone clicks the app icon.

Upvotes: 0

Views: 81

Answers (2)

RvdK
RvdK

Reputation: 19790

Your activity is automatically being launched if clicked on your app icon.

In the onCreate of your Activity you can send Intent to start another Activity.

If you mean an Icon in your app, see xjaphx answer.

Upvotes: 1

Pete Houston
Pete Houston

Reputation: 15089

You can set an OnClickListener to your icon, which would be an ImageView.

Upvotes: 0

Related Questions