Datawedge Configuration
145
Error messages will be logged for invalid actions, parameters and failures (e.g. Profile not found or associated with
an application).
Example
Comments
The API command will have no effect if the specified Profile does not exist or if the specified Profile is already
associated with an application. DataWedge will automatically switch Profiles when the activity is paused, so it is
recommended that this API function be called from the onResume method of the activity.
Zebra recommends that this Profile be created to cater to all applications/activities that would otherwise default to
using Profile0. This will ensure that these applications/activities continue to work with a consistent configuration.
$ adb logcat -s DWAPI
// define action and data strings
String setDefaultProfile = "com.symbol.datawedge.api.ACTION_SETDEFAULTPROFILE";
String extraData = "com.symbol.datawedge.api.EXTRA_PROFILENAME";
public void onResume() {
// create the intent
Intent i = new Intent();
// set the action to perform
i.setAction(setDefaultProfile);
// add additional info
i.putExtra(extraData, "myProfile");
// send the intent to DataWedge
context.this.sendBroadcast(i);
}