Remotely execute commands on AstroContacts app using SureMDM

AstroContacts by 42Gears supports script commands to execute certain actions remotely on AstroContacts application using SureMDM.

 

Prerequisite

– Android devices should have AstroContacts and SureMDM Nix Agent installed.

– Android devices should be enrolled to 42Gears UEM Console.

 

Steps to create Run Script jobs and deploy them on Android devices:

  1. On the SureMDM Home, click Jobs.
  2. On the Job screen, click New Job.
  3. On the Select the OS screen, select Android.
  4. On the Select Job Type screen, select Run Script.
  5. On the Run Script prompt, enter the Job Name, Script and click Save.
  6. Select the device(s) and click Apply.
  7. Select the created job and click Apply to push the job to Android device(s).

 

Following script commands can be 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 000000

3. Login and Sync the contacts in AstroContacts app

am broadcast -a com.gears42.astrocontacts.ACTION -e action loginandsync -e email abc@abc.com -e password 000000

4. Logout from AstroContacts app

am broadcast -a com.gears42.astrocontacts.ACTION -e action logout

5. 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 phonebook app

am broadcast -a com.gears42.astrocontacts.ACTION -e action unsync

7. Enable Autosync

am broadcast -a com.gears42.astrocontacts.ACTION -e action autosync -e enabled true

Note: 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 false

9. Enable Auto Remove Duplicate contacts on matching all specified fields

am broadcast -a com.gears42.astrocontacts.ACTION -e action autoremoveduplicates -e enabled true -e condition all -e fields emailId,firstName,phoneNumber,lastName,middleName

Note:Once enabled, duplicate contacts that match all the specified fields will be removed from the phonebook app on contact sync.

10. 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,middleName

Note: Once enabled, duplicate contacts that match one or many specified fields will be removed from the phonebook app.

11. Disable Auto Remove Duplicate contacts on phonebook app

am broadcast -a com.gears42.astrocontacts.ACTION -e action autoremoveduplicates -e enabled false

 

To explore more features from AstroContacts, click here.

 

Leave a Reply

Your email address will not be published.