Contacts

Solved Locked

The phones we have are work managed and have a profile set up. 

Is there any way to get the google contacts to show the contacts list that is in the company google account?

5 years ago
SOTI MobiControl
ANSWERS
RC
Raymond Chan Diamond Contributor
4 years ago (edited 4 years ago)

As your Android device agent should be v14.5.0 or later, VCF contact import operation could be done directly without needing a separate utility app.  Just try using the script command

     import_contacts_vcf <filePath> 1/0

where the last argument should be


0  to add contacts to existing contacts
1  to replace existing contacts with the new contacts of the vcf file

Solution
J
JVMOD@SOTI Platinum Contributor
5 years ago

Hello Tom,

Thank you for your post, it's an interesting use-case, I will do research on my end and will get back to you.

Regards,

TF
Tom Ford
5 years ago

Thanks, 

I have the google account linked for the app play store. and the google contacts is on the phone but its blank and you cant add an account as it is work managed. 

Just wondered if there is a way to have it working. 

J
JVMOD@SOTI Platinum Contributor
5 years ago

Hello Tom,

Thank you for your response, yes I am aware that we cannot add an account to Work Managed devices but 

if you have .vcf file with all the contacts they want to sync across all their devices then you can try the steps mentioned below -

Please follow the following steps:

Create a new package in the MobiControl Package Builder.

Add a post-install script to the package and it should contain two commands: sleep and uninstall. 
The post-install script command will look something like:

sleep 60

uninstall cgy.rgy.xpi

Sleep command will postpone the execution of the next command line for a specified number of seconds.
This will allow the VCF import APK (Contacts_Import.apk) to finish contact import before it's removed.

For the uninstall script the appID is an ID of the Contacts_Import.apk on the handset.

In the Add Files step please click Add button and select "Add Android APK...". 
Browse to the folder with Contacts_Import.apk and add it to the package. 
On the "Android Application File Attributes" window make sure that "Automatically Run Activity after install" is selected.

Click OK, leave all other options default and build the package. 
Add this package to the profile and test it in your test environment on a couple of devices.
You should run this only if the contacts.vcf file was synchronized successfully to the Downloads folder on the devices otherwise the contact import will fail due to the missing vcf file.

You can download the Contacts_Import.apk from here (link expires after 30 days)

Please note the following requirements:

1. The contacts file must be named “Contacts.vcf”
2. Sync this file down to the device using file sync to the Download folder (the folder must specifically be called download) on the device’s storage, if the folder doesn’t exist please create it.
NOTE: If the device is in lockdown, please add the process “launch://cgy.rgy.xpi” to the lockdown.


Please let me know if that works for you.

Regards,

TF
Tom Ford
5 years ago

Sorry, 

I don't have a clue how to do that. 

J
JVMOD@SOTI Platinum Contributor
5 years ago

Hello Tom,

Were you able to get .vcf file? for contacts?

Regards,

TF
Tom Ford
5 years ago

Hi Yes, 

have got a vcf card but don't know how to build packages etc. 

J
JVMOD@SOTI Platinum Contributor
5 years ago

Hello Tom,

Thank you for your response, please follow below steps and if you cross any issue I would recommend you to create a Support case.

Step 1 - Create a new package in the MobiControl Package Builder.

Step 2 - Add a post-install script to the package and it should contain two commands: sleep and uninstall. 
The post-install script command will look something like:

sleep 60

uninstall cgy.rgy.xpi

Sleep command will postpone the execution of the next command line for a specified number of seconds.
This will allow the VCF import APK (Contacts_Import.apk) to finish contact import before it's removed.

For the uninstall script the appID is an ID of the Contacts_Import.apk on the handset.

Step 3 - In the Add Files step please click Add button and select "Add Android APK...". 

Step 4 - Browse to the folder with Contacts_Import.apk and add it to the package. 
On the "Android Application File Attributes" window make sure that "Automatically Run Activity after install" is selected.

Step 5 - Click OK, leave all other options default and build the package. 

Step 6 - Add this package to the profile and test it in your test environment on a couple of devices.


You should run this only if the contacts.vcf file was synchronized successfully to the Downloads folder on the devices otherwise the contact import will fail due to the missing vcf file.

Regards,

IS
Ian Stuart Bronze Contributor
5 years ago

Hello,

I just came across this and would actually be quite useful... could you share the link for the Import_Contacts.apk again please?

J
JVMOD@SOTI Platinum Contributor
5 years ago

Hello Ian,

Thank you for your post, here is the link to download .apk file Contacts_import.apk.

Please let me know if that works for you.

Regards,

RC
Raymond Chan Diamond Contributor
5 years ago (edited 5 years ago)

This is not the only thread on this forum with posts repeatedly asking about the download link for the related apk.  Isn't it ridiculous that the download link is temporary for 30 days or so  each time there is a request ??!!

Didn't some moderators of this forum always urge people to mark relevant post (implicitly or explicitly hinting their own posts as solutions in most of the cases) as solution and have the thread locked a.s.a.p?   Why not do the same for this and other threads asking about the same contact app apk ??

Why aren't Soti support personnels proactive enough to put the apk file in a permanent download location, and have the app properly documented in the online manual alongside other support apps such as Settings Manager?

TA
Tan, Adrian
4 years ago

@JVMOD@SOTI, I just tried this APK that you've uploaded but it does not work on newer versions of Android. Do you have an updated version?

RC
Raymond Chan Diamond Contributor
4 years ago

What is the Android version running on your devices?

What about the version number of the Android device agent installed?

TA
Tan, Adrian
4 years ago

It's an Android 10 device running the latest MobiControl agent version 

TA
Tan, Adrian
4 years ago

Awesome Raymond. Just tested this out and it works. 

J
JCMOD@SOTI Platinum Contributor
4 years ago

Hi Both,

I'll proceed to lock this discussion post now, please reference this information moving forward:

We released the 14.5.0 Agent which has a silent VCF Importing Script feature.

Format of the Script is:
import_contacts_vcf <filePath> 1/0
0 = Add contacts to existing contacts
1 = Replace existing contacts with the new contacts of the vcf file

The Contacts should import silently and this script is supported for Android Classic and Android Enterprise.

Sources - 

1. https://docs.soti.net/soti-mobicontrol/android-agent/release-notes/v145/android-enterprise-agent-maintenance-releases/

2. https://discussions.soti.net/thread/contacts-distribution/

Regards,