public boolean unregisterApplication ( String appIdentifier ) { String where = Contract . COLUMN_APP_IDENTIFIER + " = ?" ; String [ ] whereArgs = { appIdentifier } ; if ( mRegistryTable . getWritableDatabase ( ) . delete ( Contract . TABLE_NAME , where , whereArgs ) == 0 ) { return false ; } if ( SPF . get ( ) . getServiceRegistry ( ) . unregisterAllServicesOfApp ( appIdentifier ) ) { Intent i = new Intent ( DEREGISTRATION_INTENT ) ; i . putExtra ( DEREGISTERED_APP , appIdentifier ) ; mContext . sendBroadcast ( i ) ; return true ; } return false ; }
To be called from application uninstall monitor