Get Disabled App List

DataWedge 11.4

GET_DISABLED_APP_LIST

Introduced in DataWedge 6.5.

Returns the Disabled Apps List, a list of apps and activities that are blocked from using DataWedge.

Function Prototype

Intent i = new Intent();
i.setAction("com.symbol.datawedge.api.ACTION");
i.putExtra("com.symbol.datawedge.api.GET_DISABLED_APP_LIST", "");

Parameters

ACTION [String]: "com.symbol.datawedge.api.ACTION"

EXTRA_DATA [String]: "com.symbol.datawedge.api.GET_DISABLED_APP_LIST"

Return Values

APP_LIST [ ]:

  • APP_LIST [0]:

  • PACKAGE_NAME [String]: "com.symbol.emdk.barcodesample1"

  • ACTIVITY_LIST [String array]: [“com.symbol.emdk.barcodesample1.MainActivity” ,”com.symbol.emdk.barcodesample1.ResultsActivity”]

  • APP_LIST [1]:

  • PACKAGE_NAME [String]: "com.symbol.emdk.notificationsample1"

  • ACTIVITY_LIST [String array]: [“*”]


Example Code

The code below sends an intent to request the current Disabled App List:


// create the intent and action
    Intent i = new Intent();
    i.setAction("com.symbol.datawedge.api.ACTION");
    i.putExtra("com.symbol.datawedge.api.GET_DISABLED_APP_LIST","");

// send the intent
    this.sendBroadcast(i);

// process the results inside onReceive callback
    ArrayList<Bundle> disabledAppList  = new ArrayList<>();
    if(intent.hasExtra("com.symbol.datawedge.api.RESULT_GET_DISABLED_APP_LIST"))
        disabledAppList = intent.getParcelableArrayListExtra("com.symbol.datawedge.api.RESULT_GET_DISABLED_APP_LIST");

    if(disabledAppList!= null && disabledAppList.size() > 0){
        for (Bundle bundle:disabledAppList) {
            String packageName = bundle.getString("PACKAGE_NAME");

            ArrayList<String> activityList = new ArrayList<>();
            activityList =bundle.getStringArrayList("ACTIVITY_LIST");

            Log.d("TAG","PackageName: " + packageName);
            for(String activityName : activityList){
                Log.d("TAG","\t\t\tActivity: " + activityName);
            }
        }
    }
    else{
        Log.d("TAG","Disabled app list is empty");
        }

Notes

(none)


SEE ALSO:

Zebra Support Central | Integrator Guides, Product Manuals, Software Downloads and Support

LaunchPad | Zebra Developer Community

Intent | Android Developers

Intents and Intent Filters | Android Developers

Android Intents | Tutorial