Enabling RxLogger through AirWatch

Mark Jolley -
3 MIN READ
297
7

A few people have asked how it is possible to start RxLogger automatically using AirWatch.

 

This is possible by doing the following

 

1) Go to Products->Files and Actions and create a new one

2) In the manifest section and a new item under Run Intent

3) Add the following parameters to the Intent mode=implicit,broadcast=true,action=com.symbol.rxlogger.intent.action.ENABLE

4) Add this to a product and deploy to the devices

 

For other intents the following documentation is available

 

RunIntent action

Overview

The runIntent action is used to cause an Android intent to be launched. An Intent provides a facility for performing late runtime binding between the code in different applications. Its most significant use is in the launching of activities, where it can be thought of as the glue between activities. It is basically a passive data structure holding an abstract description of an action to be performed. The runIntent action supports both explicit and implicit intents.

Depending on the arguments used, the AirWatch agent will use either of the following to launch the specified intent:

  • android.content.Context.startActivity(Intent intent)
  • android.content.Context.sendBroadcast(Intent intent) to launch the specified intent.

RunIntent Syntax

The argument syntax changes depending on whether explicit or implicit mode is specified:

mode=explicit, broadcast=[true|false] , action= action>, package=
, class= [, data=][, extraString==[,...]][, extraInt==[,…]]

mode=implicit, broadcast=[true|false] , action= [,category=][, uri=] [, data=] [, extraString==[,...]][, extraInt==[,…]]

Arguments

Argument Explanation

mode=[explicit|implicit]

Specifies whether the intent to be launched is explicit or implicit.

broadcast=[true|false]

Specifies whether the intent to be launched using startActivity() or sendBroadcast().

action=

action specifies the Android action string for the intent. An example of an Android action string is android.intent.action.MAIN.

package=

package specifies the Android package name of the java class to be explicitly launched. Android package names are generally of the format com.mycompany.myapplication.

class=

class specifies the java class in the specified package that is to be explicitly launched.

uri=

uri optionally specifies the URI that is to be passed with the implicitly launched intent.

category =

category optionally specifies the Android category string that is to be passed with the implicitly launched intent. An example of an Android category string is android.intent.category.DEFAULT

data=

data optionally specifies the value of the Android data parameter that is to be passed with the explicitly or implicitly launched intent.

extraString==

string name optionally specifies the name of an extra string parameter that is to be passed with the explicitly or implicitly launched intent. string value specifies the value of the extra string. The extraString argument can be used multiple times to specify additional extra string name/values.

extraInt==

int name optionally specifies the name of an extra int parameter that is to be passed with the explicitly or implicitly launched intent. int value specifies the value of the extra int. he extraInt argument can be used multiple times to specify additional extra int name/values.

 

The following table indicates which arguments are required, optional, or not applicable for the explicit and implicit modes:

mode

explicit

implicit

broadcast

required

required

action

required

required

package

required

n/a

class

required

n/a

uri

n/a

optional

category

n/a

optional

data

optional

optional

extraString

optional

optional

extraInt

optional

optional

Example RunIntent

mode=explicit,broadcast=false,action=android.intent.action.MAIN,package=com.examples.myappl,class=com.examples.myappl.MainActivity

profile

Mark Jolley

Please Register or Login to post a reply

7 Replies

P Pietro Francesco Maggi

Mark, do you know if is possible to start RxLogger just changing the configuration file?

Given that RxLogger re-enable itself after a reboot if it was previously running, it may be possible to change that configuration and then reboot the device...

~Pietro

J John Thurmes

If anyone is looking, here are the commands to perform the same in Soti.

sendintent -b "intent:#Intent;action=com.motorolasolutions.rxlogger.intent.action.ENABLE;end"
sendintent -b "intent:#Intent;action=com.motorolasolutions.rxlogger.intent.action.DISABLE;end"

Depending on OS version, you may need

sendintent -b "intent:#Intent;action=com.symbol.rxlogger.intent.action.ENABLE;end"
sendintent -b "intent:#Intent;action=com.symbol.rxlogger.intent.action.DISABLE;end"

I'm also looking for any ability to enable the TCP Dump Plugin if anyone has any tips or tricks.

B Brandon Campbell

I thought I had figured out the intent but it turns out it didn't work. I did however come up with another solution. If Soti will allow you to copy files like in Airwatch. Once the rxlogger is ran a folder is created that contains a config folder with xml files. These xml files appear to be the configuration files for rxlogger. Change the line for the plugin you would like to have enabled to true. ex ""  - The route I am taking is to set up rxlogger environment within the application, save it then copy the updated XML file with all the settings to all the devices.

S Sebastien Laporte

Hello,
how we can enable Rxlogger remotely when we don't have MDM like Airwatch or SOTI ( a 3rd party MDM)?

T Tu Pham

So is the general consensus to leave RXLogger on? I have concerns that it will cause too much data to be consumed. Also if RXLogger is on, then I presume I should lower my debug log level in airwatch from "Verbose" to "Error"?

So has anybody found a seemless way to make these files available from the Airwatch console? I know there's a folder that Airwatch collects which ends up under the "Attachments" from the console.

I've also see this Push/Pull server which you can stand up for collecting log files only. Is there any integration with the FTP relay server functionality in Airwatch at all?

M Mark Jolley

I dont believe so, this is the only way according to the documentation

E Edward Correia

Sebastian-  The intent to enable RxLogger also can be invoked through adb. And adb can be accessed remotely over TCP if the device is configured for it in advance. Hope that helps.