start activity via intent (shared device)

Solved

Hi all,

We have a question about making use of intents.

We want to create a button that calls an intent that starts the Log In screen from Soti.

we have scanners in a lock screen and now they need to press and hold the back button and press login:

what we want is that we create a login button so they will directly go to this page. (so instead of press and hold the back button and press login)

when we check the activity (via identify_activity) we see the following:

net.soti.mobicontrol.androidwork/net.soti.mobicontrol.shareddevice.SharedDeviceActivity

now the question :)

how can we open this screen via an intent? We checked the intent manual but we can't get it work.

hopefully someone over here can help us.

thank you in advance!!

a year ago
SOTI MobiControl
ANSWERS
RD

B.T.W. I found another solution (javascript)

script:///sdcard/loginScreen.js

loginScreen.js:

#!/usr/bin/env js
mobicontrol.app.start('net.soti.mobicontrol.androidwork', 'net.soti.mobicontrol.shareddevice.SharedDeviceActivity')

Solution
ZC
Zafer Cigdem
a year ago

Hi Robert,

You can try using SendKeys via legacy script. Here is an example from my Samsung device. Starting point for my test device is when the device status is on locked and there is black screen appears. 

first 2 lines (SendKey 0x1a + sleep 1) power on the device, and then next 2 lines (SendKeyCtrledAlted 0x21 0x0 + Sleep 1) for unlock the device by page-up scrolling. and then others for long click + clicking on login button. 

SendKey 0x1a

sleep 1

 

SendKeyCtrledAlted 0x21 0x0

Sleep 1

 

MouseEvent 0x0 0xb899 0xfaaa

SleepEx 0x640

MouseEvent 0x4 0xb866 0xfaaa

SleepEx 0xc8

MouseEvent 0x4 0xb832 0xfaaa

SleepEx 0x190

MouseEvent 0x1 0xb832 0xfaaa

SleepEx 0x640

MouseEvent 0x0 0x4b33 0x87ff

SleepEx 0xc8

MouseEvent 0x1 0x4b33 0x87ff

 

you may skip 1st and/or 2nd one depending on your use-case.

 

 

RC
Raymond Chan Diamond Contributor
a year ago

Hi Robert,

Have you tried using script command similar to the following to directly initiate the activity you found on your device :

  start activity   net.soti.mobicontrol.androidwork/net.soti.mobicontrol.shareddevice.SharedDeviceActivity

RD

Hi Raymond,

thank you for your answer. Yes, this is working. Do i need to put a script file on the device and call this? Or is there a faster / cleaner way to call this script command via a button?

thank you in advance!