send message and open App after ckick 'OK'

send message and open App after ckick 'OK'

HI SOTI Support

 

I want to provide open Application after user click OK on Device message (use Mobicontrol send message function)  Step as Below

1. I send Message to information

2. Device Have been shown message

3. user click 'OK' in message

4. Open Application after click 'OK'

 

I'm not sure send message can do it or may be use another function

  • 02 June 2020
  • SOTI MobiControl
  • 9 Answers
  • 0 Upvote
  • 2 Followers
  • 824 Views
    • 9 Answers
    • 0 Upvote
    • 2 Followers

9 Answers

Order By:   Standard | Newest | Votes
christopheBERNARD | posted this 02 June 2020

Hello,

We d like more info about your configuration -> mobicontrol version / device mark / ...

 

But on the doc for version 14 on mobicontrol I read that it's possible but never try 

 

here is it the doc -> search after showmessagebox

soti.net/mc/help/v14.0/en/scriptcmds/reference/androidplus.html

 

Thanks

  • 0
  • 0
rathasatekun | posted this 02 June 2020

Thx I found but i not found start app 

 

  • 0
  • 0
christopheBERNARD | posted this 02 June 2020

just send an intent … I think

 

see doc about mobicontrol script and command sendintent

  • 0
  • 0
DDMOD@SOTI | posted this 02 June 2020

Hi Rathasatekun,

 

As suggested by Christophe, please follow the below help file for The sendintent Command to start an activity(open an application) when the device user clicks on 'OK' on the device:

https://www.soti.net/mc/help/v15.1/en/scriptcmds/reference/sendintent.html

An sendintent script command requires two parameters: the type of intent and the intent URL.

The type of intent can be an activity (-a), a service (-s), or a broadcast (-b).

The intent URL is composed using one of two different kinds of syntax. Either the intent URI, which uses conventional URI format, or using the following format:

"intent:[dataURI]#Intent;[schemeOfTheDataURI];[action=];[component=];[category=];[launchFlags=];[extraKeyValuePair=];end"

 

For example,

 

Regards,

Technical Support | SOTI Inc. |1.905.624.9828 | support@soti.net | www.soti.net |

  • 1
  • 0
rathasatekun | posted this 12 June 2020

Hi I try script but script not work as Details Below

My server

My Client Mobicontrol 14.2.1 Build 1083

mobicontrol version Version: 15.0.2.1049 

My Tested Device Samsung Model SM-A750GN 

 

 

1. I tested Script messagebox it's OK

showmessagebox "tested messagebox?" NO_TIMER 4 YES
if %ShowMessageBoxReturn% == IDYES goto EXIT
 
2. I tested Open Web on Chrome it's OK
sendintent -a "https://www.google.com#Intent;action=android.intent.action.VIEW;end" 
 
3. I testd Messagebox and the press YES then Open Website --> it's not work
showmessagebox "OPEN GOGOLE?" NO_TIMER 2 YES
if %ShowMessageBoxReturn% == IDYES goto sendintent -a "https://www.google.com#Intent;action=android.intent.action.VIEW;end" EXIT
 
Remark I use 2 because of in mobicontrol version Version: 15.0.2.1049 
2 is Yes Cancel
4 is OK Cancel
 
 
4. I want to open some app but i dont understand syntax sendintent 
"intent:[dataURI]#Intent;[schemeOfTheDataURI];[action=];[component=];[category=];[launchFlags=];end"
what is dataURI, action and component?

   

  • 0
  • 0
rathasatekun | posted this 12 June 2020

i have more problem

I can open app with sendintent but i have problem that

I use 

sendintent -a "intent:#Intent;action=android.intent.action.MAIN;component=android.intent.category.APP_CALENDAR;end"

and

Why  my device open Gallery How to clear cache or something and exe it to correct?

 

 

  • 0
  • 0
rathasatekun | posted this 12 June 2020

i have more problem

I can open app with sendintent but i have problem that

I use 

sendintent -a "intent:#Intent;action=android.intent.action.MAIN;component=android.intent.category.APP_CALENDAR;end"

I change to other component but it open Gallery App only

 

and Sendmessagebox still cannot exe sendintent after press OK/YES 

 

 

  • 0
  • 0
rathasatekun | posted this 17 June 2020

Hi Support 

I have been tested script and i found problem as below

Details

 

Android enterprise

My Client Mobicontrol 14.2.1 Build 1083

mobicontrol version Version: 15.0.2.1049 

 

Problem Details

Script1

showmessagebox "OPEN APP?" NO_TIMER 2 YES
if %ShowMessageBoxReturn% == IDYES goto sendintent -a "intent:#Intent;action=android.intent.action.MAIN;component=android.intent.category.APP_MESSAGING;end"

Message show but click YES not open APP

 

Script2

sendintent -a "intent:#Intent;action=android.intent.action.MAIN;component=android.intent.category.APP_MESSAGING;end"

sendintent -a "intent:#Intent;action=android.intent.action.MAIN;component=android.intent.category.APP_CALENDAR;end"

 

It open only Gallery APP

  • 0
  • 0
Raymond Chan | posted this 19 June 2020

Hi   Rathasatekun, 

 

Is your app to be run very special or did I misss anything from your post?  Do you know the bundle ID of the app you want to start?  If so, just use the "start" script command.  I just can't think of any reason why an intent should be used in such case.  

 

Regarding the conditional showmessagebox script command involving OK button,  my tests since its introduction many months ago have never given any positive result in changing script program flow.    However, as DDMOD told you in a post to use intent after clicking the OK button, I believe you can ask him/her to give an actual script example and test conditions that can have conditiional program flow done successfully.  I myself love very much to learn how to use this new feature too.

 

 

  • 0
  • 0

Give us your feedback
Give us your feedback
Feedback