5

I was going through the sample program of Android things and i have found 2 there.

One was having <category android:name="android.intent.category.LAUNCHER" /> and another was having <category android:name="android.intent.category.IOT_LAUNCHER"/> , So what is the basic diffence between both of them?

reference link

Ravi
  • 34,851
  • 21
  • 122
  • 183

2 Answers2

5

The documentation states:

An application intending to run on an embedded device must declare an activity in its manifest as the main entry point after the device boots

The Activity declared as IOT_LAUNCHER will automatically start, when the device boots.

The definition in AndroidManifest.xml must contain the intent filter with 3 elements:

  • Action: ACTION_MAIN
  • Category: CATEGORY_DEFAULT
  • Category: IOT_LAUNCHER

Look here for more info.

There is nothing that prevents you from declaring the same activity as a default start Activity to be run from Android Studio. The same Activity would be run a boot and by a programmer.

R. Zagórski
  • 20,020
  • 5
  • 65
  • 90
  • Does it mean whenever i restart my Raspberry-pi or any other board, this activity will run by default? – Ravi Dec 15 '16 at 12:08
  • 2
    Yes it should. Google developers expect that "embedded devices typically present a single app experience to users.(...) The Android Things platform is also streamlined for single application use. System apps are not present, and your app is launched automatically on startup to immerse your users in the app experience." So on system boot one application would be shown to the user. – R. Zagórski Dec 15 '16 at 12:10
  • _"The Activity declared as IOT_LAUNCHER will automatically start, when the device boots"_, unless, as of `Android Things Developer Preview`, there are more applications with `IOT_LAUNCHER` in manifest, in this case [the system displays an app chooser](https://developer.android.com/things/preview/releases.html) (see Known issues) – Onik Jan 26 '17 at 21:49
2

Please find below difference between IOT_LAUNCHER and LAUNCHER:

IOT_LAUNCHER:

This intent is for Android Things which is an extended Android Framework for Internet Of Things(IOT) which is used for embedded programming using Android. Please check this link for more information.

LAUNCHER:

This intent is for normal Android application which is for mobile and Tablet Device.

There is also one more intent action which is, LEANBACK_LAUNCHER used for Android TV applications. Google Play store filters applications using this intent actions only.

Thanks.

AndiGeeky
  • 11,266
  • 6
  • 50
  • 66