Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio - Run application without launcher activity

Tags:

So like everyone else, I moved to Android Studio and encountered issues.

My current issue - Android Studio won't let me run an application without a launch-able activity in the Manifest, for example, my application Pro key which isn't suppose to be launch-able and runs great with Eclipse.

Obviously it's not suppose to run but is there any way to install it directly from Studio?

like image 747
Lior Iluz Avatar asked May 16 '13 16:05

Lior Iluz


People also ask

Can we have application without activity?

It's not possible to have a Service on its own as a stand-alone "app". It needs to be started manually by a user through an Activity .

What is launcher activity in Android Studio?

Launcher Activities are the activities that can be launched for a given intent. For example, when you press an app icon on the home screen, the StartActivity intent starts the activity you have specified as the launcher activity.

Is it possible to create an activity in Android without a user interface?

Yes, an activity can be created without any user interface. These activities are treated as abstract activities.


2 Answers

In Run/Debug Configurations (just next to the launch button in the toolbar) you can manage your application configurations. There you should be able to specify whether you want to launch an Activity or not.

like image 76
nhaarman Avatar answered Oct 08 '22 07:10

nhaarman


In Run/Debug Configurations in General -> Launch Options -> Launch select Nothing like this
enter image description here

like image 40
Ahmad Aghazadeh Avatar answered Oct 08 '22 08:10

Ahmad Aghazadeh