Code example for AppWidgetHost

Methods: deleteHost

0
                    "displayMode INTEGER" + 
                    ");"); 
 
            // Database was just created, so wipe any previous widgets 
            if (mAppWidgetHost != null) {
                mAppWidgetHost.deleteHost();
                sendAppWidgetResetNotify(); 
            } 
             
            if (!convertDatabase(db)) {
                // Populate favorites table with initial favorites 
                loadFavorites(db);
            } 
        } 
 
        private boolean convertDatabase(SQLiteDatabase db) {
            if (LOGD) Log.d(TAG, "converting database from an older format, but not onUpgrade");
            boolean converted = false;
 
            final Uri uri = Uri.parse("content://" + Settings.AUTHORITY +
                    "/old_favorites?notify=true");