DataWedge
203
Error messages will be logged for invalid actions, parameters and failures, for example, 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.
Reset Default Profile
Use the resetDefaultProfile API function to reset the default Profile back to Profile0.
$ adb logcat -s DWAPI
// define action and data strings
String setDefaultProfile = "com.symbol.datawedge.api.ACTION";
String extraData = "com.symbol.datawedge.api.SET_DEFAULT_PROFILE";
public void onResume() {
// create the intent
Intent i = new Intent();
// set the action to perform
i.setAction(setDefaultProfile);
// add additional info (a name)
i.putExtra(extraData, "myProfile");
// send the intent to DataWedge
this.sendBroadcast(i);
}