AstroContacts by 42Gears supports script commands to execute certain actions remotely on the AstroContacts application using SureMDM.
Prerequisite
– Android devices should have AstroContacts and SureMDM Agent installed.
– Android devices should be enrolled to 42Gears SureMDM Web Console.
Steps to create Run Script jobs and deploy them on Android devices:
1. On the Job screen, click New Job.
2. On the Select the OS screen, select Android.
3. On the Select Job Type screen, select Run Script.
4. On the Run Script prompt, enter the Job Name, Script, and click Save.
5. Select the device(s) and click Apply.
6. Select the created job and click Apply to push the job to Android device(s).
Following script commands can remotely execute commands on AstroContacts app using SureMDM:
NOTE: These script commands can be executed only on Android devices.
1. Launch AstroContacts app
am start -n com.gears42.astrocontacts/com.gears42.astrocontacts.MainActivity
2. Login to AstroContacts app
am broadcast -a com.gears42.astrocontacts.ACTION -e action login -e email abc@abc.com -e password 0000003. Login and Sync the contacts in the AstroContacts app
am broadcast -a com.gears42.astrocontacts.ACTION -e action loginandsync -e email abc@abc.com -e password 0000004. Logout from the AstroContacts app
am broadcast -a com.gears42.astrocontacts.ACTION -e action logout4a. For password-protected device settings –
am broadcast -a com.gears42.astrocontacts.ACTION -e action logout -e password 00005. Sync contacts to phonebook app
am broadcast -a com.gears42.astrocontacts.ACTION -e action sync
NOTE: Syncing of contacts happens only once.
6. Unsync contacts from the phonebook app
am broadcast -a com.gears42.astrocontacts.ACTION -e action unsync6a. For password-protected device settings –
am broadcast -a com.gears42.astrocontacts.ACTION -e action unsync -e password 00007. Enable Autosync
am broadcast -a com.gears42.astrocontacts.ACTION -e action autosync -e enabled trueFor password-protected device settings –
am broadcast -a com.gears42.astrocontacts.ACTION -e action autosync -e enabled true -e password 0000NOTE: Automatically sync the contacts in phonebook app whenever there is contact modification in the AstroContacts Console.
8. Disable AutoSync
am broadcast -a com.gears42.astrocontacts.ACTION -e action autosync -e enabled false8a. For password-protected device settings –
am broadcast -a com.gears42.astrocontacts.ACTION -e action autosync -e enabled false -e password 0000NOTE: Once enabled, duplicate contacts that match all the specified fields will be removed from the phonebook app on contact sync.
9. Enable Auto Remove Duplicate contacts matching one or many specified fields
am broadcast -a com.gears42.astrocontacts.ACTION -e action autoremoveduplicates -e enabled true -e condition any -e fields emailId,firstName,phoneNumber,lastName,middleName9a. For password protected device settings –
am broadcast -a com.gears42.astrocontacts.ACTION -e action autoremoveduplicates -e enabled true -e condition any -e fields emailId,firstName,phoneNumber,lastName,middleName -e password 0000NOTE: Once enabled, duplicate contacts that match one or many specified fields will be removed from the phonebook app.
10. Disable Auto Remove Duplicate contacts on phonebook app
am broadcast -a com.gears42.astrocontacts.ACTION -e action autoremoveduplicates -e enabled falseFor password-protected device settings
am broadcast -a com.gears42.astrocontacts.ACTION -e action autoremoveduplicates -e enabled false -e password 0000For more details on our products, click here
If you need further assistance, please submit a ticket here