cancel
Showing results for 
Search instead for 
Did you mean: 

Android using SMS instead of GCM for push

Former Member
0 Kudos

Hello,

I am trying to set up Afaria to have GCM be the primary method of device control for Android devices. However, I am unsure of exactly how to set this up.

Has anyone successfully got this up and running on Afaria 7.0 SP2, also using a relay server?

Whenever I try to send a lock command via the console, it tries to send using SMS. This is not the funtionality that we desire.

Any assistance will be appreciated.

Thanks,

~Tim

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Tim,

I've managed to successfully setup this in Afaria SP2 however without a relay server.

Here are the steps:

1. Go to https://code.google.com/apis/console and setup your account. This can be any google account. Take note of the Project Number and make sure you enable the service Google Cloud Messaging for Android from the Services tab.

2. Under API access, generate a new Server Key and take note of the API Key.

3. In Afaria, go to Server > Configuration > GCM Server and fill-up the following:

a) Server Address: https://android.googleapis.com/gcm/send

b) GCM Project ID: (This is your Project Number from Google API)

c) GCM API Key: (This is API Key generate for your Server Key)

4. In your Afaria database, check that this table A_CONFIGURATION_PROPERTY contains the following C2DM* related values. If it doesn't, please use UPDATE sql statements to update the DataValue accordingly based on the DataName.

C2DMServerAddress = _GCM_ON_https://android.googleapis.com/gcm/send

C2DMEmailAddress = _GCM_ON_

C2DMPassword = _GCM_ON_

5. Once you are done with the above, in Afaria, go to Android Enrollment Policy and make sure that your GCM Project ID checkbox is ticked and corresponds to what you have configure in Server configuration.

6. At this stage, assuming that you Android devices might have already been enrolled based on the previous enrollment policy, you might want to create a new Android Configuration policy with some relevant details under the Android - Device communications tab as shown below:

In your case where you have the relay server installed, you might need to enter the relay server details here as well.

7. After you have done the above, apply policies to your android devices. If it still doesn't work, please try to enroll another android device or repeat the enrollment process again.

8. To check if the Android client device is configure properly, check the Configuration and the Server GCM Project ID should have the Google API Project Number there as well. *The Server GCM Project Id should be all digits (12 digits in my case).

Please try it out and let me know how it goes.

Regards,

Kok Keong

Former Member
0 Kudos

Thank you so much! This did the trick!

~Tim

Former Member
0 Kudos

Hi!

I was able to do the steps you've provided but I'm still encountering the "The request failed with GCM message: Fail-GCM Service Not Available." error. In the GCM configuration under Key for server apps (with IP locking), do I need to provide the public IP of my Afaria server or an internal IP would suffice? The important thing here is that my Afaria server can access the ...gcm/send link right? Do I need to open a specific port for the GCM server?

Thank you!

-chan

Answers (0)