Warning: Activity not started, intent has been delivered to currently running top-most instance
Asked Answered
O

2

5

I get that warning on the cmd when i try to execute this activity.

I'm new here using adb so I don't really know what I'm doing wrong. Any advice?

adb shell am start -n com.android.settings/.Settings$MobileNetworkListActivity

Warning: Activity not started, intent has been delivered to currently running top-most instance
Overhang answered 14/3, 2023 at 8:55 Comment(0)
R
6

The command am start -n com.android.settings/.Settings$MobileNetworkListActivity is interpreted by Android like this:

  1. Start the app com.android.settings
  2. Open the activity com.android.settings.Settings$MobileNetworkListActivity

Now you got the message

Warning: Activity not started, intent has been delivered to currently running top-most instance

This effectively means that an instance of the app com.android.settings was already running in foreground (top-most) when you executed the am start command. And Android was just telling you that instead of starting a new instance of the Android settings app it had reused the already open instance and had sent the intent that contains the information to open the activity com.android.settings.Settings$MobileNetworkListActivity to that instance.

So everything is fine, the command was successfully executed, you can simply ignore this warning.

Rebate answered 14/3, 2023 at 9:46 Comment(3)
if intent is delivered again, why don't reach my breakpoints so?Benisch
if com.android.settings.Settings$MobileNetworkListActivity is not the top activity when run the command, it seems not deliver the intent to the top activity at that time (maybe activityA or activityB in my case). How I force app to open MobileNetworkListActivity again (in my case, its name is different ?Sumptuous
I posted question if you can help please help me #77837235Sumptuous
W
0

Add action in the command and it will fresh start the activity

 adb shell am start -n com.android.settings/.Settings$MobileNetworkListActivity  -a android.intent.action.MAIN
Wanda answered 28/10 at 16:9 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.