Code example for Context

Methods: registerReceiver

     * @return A new receiver that records and can be queried on how many downloads have completed. 
    protected MultipleDownloadsCompletedReceiver registerNewMultipleDownloadsReceiver() { 
        MultipleDownloadsCompletedReceiver receiver = new MultipleDownloadsCompletedReceiver();
        mContext.registerReceiver(receiver, new IntentFilter(
        return receiver;
     * Enables or disables WiFi. 
     * Note: Needs the following permissions: 
     *  android.permission.ACCESS_WIFI_STATE 
     *  android.permission.CHANGE_WIFI_STATE 
     * @param enable true if it should be enabled, false if it should be disabled 
    protected void setWiFiStateOn(boolean enable) throws Exception {
        Log.i(LOG_TAG, "Setting WiFi State to: " + enable);