Library saves important logs wchich might help in debugging into database. Library is able to send saved logs to remote server. To ask library for logs use method:

sendLogsToServer();

To add more logs into database we could use Utils class method insertMyLog() which use JobIntentService to save logs into database. It is safe to call this method from both processes: application and mobiencesdk.

insertMyLog(Context context, int level, String message, String tag)

SearchPlaces and research applications have implemented FCM push mechanism. When application receive specific type message it will send logs to remote server. Push message payload must contain key/value : "msgType" : "log download". Applications checks for presence of a key and if it exists sends logs to server. Currently there is no implementation of user friendly interface to send push message but we could use tools like Postman or other open source push websites. 

Push message parameters:
type: POST
Address: https://fcm.googleapis.com/fcm/send
Headers:
Authorization : key=<fcm_server_key>
Content-type : application/json

Body:
{
"to" : "application token registration key",
"collapse_key" : "type_a",
"data" : {
 "msgType" : "log download"
 }
}

If you don't want create http request by yourself import into Postman prepared http push request

Tags:
 
Spicy Mobile
spicymobile.pl