dtmilano / AndroidViewClient

Android ViewServer and ADB client
Apache License 2.0
1.63k stars 347 forks source link

startActivity() doesn't work #297

Closed SadLandscape closed 3 years ago

SadLandscape commented 3 years ago
device.startActivity("com.narvii.amino.master/com.narvii.account.LoginActivity")

doesn't work just doesn't do anything

dtmilano commented 3 years ago

This works as expected for me

#! /usr/bin/env python3
# -*- coding: utf-8 -*-

import re
import sys
import os

from com.dtmilano.android.viewclient import ViewClient

device, serialno = ViewClient.connectToDeviceOrExit()

cmp = 'com.android.chrome/com.google.android.apps.chrome.Main'
device.startActivity(cmp)

Try it a see what happens, and provide more details, logs, etc. if your error persists.

SadLandscape commented 3 years ago

This works as expected for me

#! /usr/bin/env python3
# -*- coding: utf-8 -*-

import re
import sys
import os

from com.dtmilano.android.viewclient import ViewClient

device, serialno = ViewClient.connectToDeviceOrExit()

cmp = 'com.android.chrome/com.google.android.apps.chrome.Main'
device.startActivity(cmp)

Try it a see what happens, and provide more details, logs, etc. if your error persists.

Yeah I tried that too, it works but the activoty I got from adb shell doesn't work

SadLandscape commented 3 years ago

Maybe an app issue :/