Can android application have only broadcast recevier and service without activity

后端 未结 2 1536
旧时难觅i
旧时难觅i 2021-01-07 02:34

Can android application have only broadcast recevier and service without activity ? If this is possible how can i invoke broadcast receiver ? Android system automatically in

2条回答
  •  [愿得一人]
    2021-01-07 02:43

    Starting with Honeycomb, BroadcastReceivers are installed in a stopped state and will not trigger until an application has actually run, i.e. you will need an activity to have run at least once. This is explained in depth in this Commonsware blog post:

    Broadcast Regression Confirmed

    Android 3.1

提交回复
热议问题