How to save value when i dial for check telephone number

R
rathasatekun
Gosoft (Thailand) Co.,Ltd.

I have use case

I use Lockdown kiosk for tablet

ans i have scenarion want to know telephone number of SIM

and use sentintent script and it return telephone number i can see telephone number if without lockdown 

but if lockdown active i can not see telephone number

So, I want to save telephone number data into ini file and show in to custom data

Can I,

3 months ago
SOTI MobiControl
ANSWERS
RS
Rafael Schäfer
3 months ago (edited 3 months ago)

I tried to post an answer but it doesn't let me :(
So i did it now using a screenshot, sorry for that:

R
rathasatekun
3 months ago

My SIM is Blank telephone it same special SIM from my operator,

 

but i can dial with *933#  and i get USSD number so, it can not see when use kiosk (and i dont kiosk off in this case)

 

it why i want to save value into ini file and export from custom data report 

R
rathasatekun
3 months ago

I use this 

var iniFile = new mobicontrol.io.File('/sdcard/YourIni.ini');
if (!iniFile.exists) {
iniFile.createFile();
}
var phonenumber = ini.parse(iniFile.readText());
phonenumber.YourSection = {
YourKey: '*933#'
};
iniFile.writeText(ini.stringify(phonenumber));
mobicontrol.agent.checkIn();
 
 
but it error 
RS
Rafael Schäfer
3 months ago

Maybe your agent on the device is too old to support the relevant JS.
Which agent version do you use?

And to add, phonenumber maybe was a bad naming for this variable, so you can't use the USSD there.I just made it bold to show that you may want to change it'S name, not replacing it by the USSD.

I think you might look into JS (how it works and so on) or reach out to someone who can help you with that.

Not sure if saving the USSD as a contact may be possible and get your result in a prompt then as i don't really understand your last comment entirely.

TW
Taylor W
3 months ago (edited 3 months ago)

Thanks @Rafael Schäfer! Your MobiControl insight is amazing.

Here is his answer but typed out.

You can try to use javascript:

To send the intent and grab the return (never used that on my own so i don't have an example): https://www.soti.net/mc/help/javascriptapi/en/mobicontrol.android.Intent.html

To write ini (example): var ini = require('ini');
var iniFile = new mobicontrol.io.File('/sdcard/YourIni.ini');
if (!iniFile.exists) { 
    iniFile.createFile();
}
var phonenumber = ini.parse(iniFile.readText());
phonenumber.YourSection = { 
    YourKey: 'YourValue' 
}; 
iniFile.writeText(ini.stringify(phonenumber)); 
mobicontrol.agent.checkIn();

But how about store USSD code *135# instead as a contact which shows (afaik) the phone number when used instead or does the user not have the phone app accessible (would wonder why)?

A
APMOD
2 months ago

Hi @rathasatekun

Thank you for your post on SOTI Pulse.

Thanks @Rafael Schäfer for responding to the post, your expertise and willingness to help are greatly appreciated!

Thank you @Taylor W for your response.

Could you kindly let us know if your issue has been resolved?

If you have any additional questions or concerns, please don’t hesitate to reach out. We are here to provide support and assistance whenever you need it.

Kind regards,

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