- Developers
- Professional Navigation for Fleets
- Android
- Installation and Activation
- Remote Activation for offline devices
Remote Activation for offline devices
Introduction
Offline devices do not allow the comfort of the preactivation from Sygic license web portal or the automatic real-time activation on device. With offline devices it is necessary to place a unique license activation code directly on device with some kind of preinstallation procedure.
This typically involves building a script or an application with a temporary internet access and access to device id, which reads ID of a device, performs activation operation communicating with Sygic server and finally places the activation code on a device.
We support the activation part of the process with the following 3 options:
- activation php request
- activation application
1. Remote activation with PHP request
You can develop your own tool for remote activation of the licenses using https/php request which allows you to connect directly to sygic server and perform activation operations. The requirement is that each device is having established internet connection.
Please note on August 2, 2016 we have migrated business license system into the new generation version where product id's have different values than before so you might need to update your activation script to use new values. Besides we are also changing service URL, but for the compatibility reasons we still keep the old one till December 31, 2016. For details check the Backward compatibility paragraph bellow.
Request format
The request to be used is in the following format:
https://api.bls.sygic.com/partners/activate.php?type=2&SD_password=%s&product_ID=%s&device_code=%s&description=%s
Replace %s sign in the request above with a real SD password, Product ID, Device Code and Description (as specified in the request) to assign a license to your account.
- SD password is the password you can generate through the Business License site. Check Password retrieval.
- Product ID is a specific number, that your Sales Account Manager will give you on request.
- Device code is a unique code identifying your device by Sygic Navigation application. Check Device code retrieval.
- Description is optional. It can be a number or a name used to identify the owner of the license.
Activation process
You can integrate the php request into your own tool or even you can execute it via a web browser
As a response to the request sent to the Sygic license server, an activation code will be generated (e.g. "cc20fean7d0d" like on the picture below). Please, save it as "license.txt" file and store it in the same folder as the .mlm file that is located in the map folder on your device. Now you can launch the navigation on your device and it will read valid activation code for the map.
Protocol details
The following are the possible outputs of the service
topic | Http Status | Response |
---|---|---|
successful activation of a free license | 200 | OK1:activationcode |
successful reactivation of an already activated license | 200 | OK2:activationcode |
no more free licenses | 200 | ERROR:no free SD license on this product |
wrong service type | 200 | ERROR:Incorrect service type |
wrong or expired password | 200 | ERROR:Incorrect SD_password |
missing product id in the request | 200 | ERROR:Missing product_ID |
referring to non existing product | 200 | ERROR:Non existing product_ID |
referring to incorrect product | 200 | ERROR:Incorrect product_ID |
missing device code in the request | 200 | ERROR:Missing device_code |
Backward compatibility
We have this protocol change from August 02, 2016 on.
topic | before August 02, 2016 | after August 02, 2016 |
---|---|---|
url | http://www.sygic.com/partners/activate.php? | https://api.bls.sygic.com/partners/activate.php? |
passwords | 8 hexadecimal numbers | 8 alphabet lowercase characters |
protocol security | http | https |
password retrieval | not available anymore through www.sygic.com/partners | through bls.sygic.com tab Orders button Remote activation |
product ids retrieval | not available anymore through www.sygic.com/partners | through bls.sygic.com tab tab Orders Remote activation |
For backward compatibility we keep the old URL link http://www.sygic.com/partners/activate.php? valid till December 31, 2016.
However for new remote activations you need to use new passwords and product id's.
2. Remote activation with apk utility
Sygic offers the utility RemoteActivation.apk, through which you can activate navigation licenses in an automated way.
This type of activation is suitable for mass activation. The activation utility is called from your application with a single activation request per device.
It is important that there is an internet connectivity during the activation request. The activation request requires a password and the location of license file. You can retrieve the password through logging to your Sygic Partner account. Check Password retrieval.
Each activation request consumes one licence from your account. Make sure you don't call the activation twice on the same device as it can consume two licenses for one device.
Activation process
You first need to install the apk on your Android device. The installation of the apk will open a channel for your application to perform the remote activation operation.
You need to create an Android intent and send it over. The intent contains two main parameters: password to your partner's account and path to the license file (mlm path).
Example
Intent intent = new Intent("com.sygic.intent.action.activate");
intent.putExtra("com.sygic.intent.extra.passwd", "029BC5E3");
intent.putExtra("com.sygic.intent.extra.mlm", "/mnt/external/Maps/europe.mlm");
sendBroadcast(intent);
Alternatively the mlm path can be the license file name located in the Maps directory:
intent.putExtra("com.sygic.intent.extra.mlm", "europe.mlm");
the result is sent as intent, you need to register a broadcast receiver and add the action to its intent filter, to get the extra:
if (intent != null || intent.getAction() != null || intent.getAction().equals("com.sygic.intent.action.result") || intent.getExtras() != null)
{
String result = intent.getExtras().getString("com.sygic.intent.extra.result");
}
The result string contains either "fail" or "success" string, i.e.
- "fail: password or mlm missing"
- "success: licence activated"
For the operation success it is important that mlm file exists in Navigation (i.e. navigation is fully preinstalled).
At the same time the log file activationLog.txt is created in the Drive/Android directory which contains some additional data.
You may use symbolic names for intents using the following definition:
public static final String INTENT_ACTION_ACTIVATE = "com.sygic.intent.action.activate";
public static final String INTENT_ACTION_RESULT = "com.sygic.intent.action.result";
public static final String INTENT_EXTRA_PASSWD = "com.sygic.intent.extra.passwd";
public static final String INTENT_EXTRA_MLM = "com.sygic.intent.extra.mlm";
public static final String INTENT_EXTRA_RESULT = "com.sygic.intent.extra.result";
Finally you need to enable the application service in your application as follows.
<service
android:name="com.sygic.activation.ActivationService">
</service>
<receiver
android:name="com.sygic.activation.ActivationReceiver">
<intent-filter>
<action android:name="com.sygic.intent.action.activate"/>
</intent-filter>
</receiver>
Activation password
In order to obtain a password for remote activation you need to enter the Business License System site through your login credentials. If you do not have the login or you forgot it please contact your Sygic sales representative.
Password retrieval steps
- Go to the site bls.sygic.com
- Go to the Orders tab and Select your product of interest subject to remote activation
- Click on the Remote activation button
- You will obtain the password, product ID and the template for remote activation requests generated on the screen
- Previous article: Web activation for online devices
- Next article: Remote Activation with Rest API