5

ユーザーがアプリの Android アカウントからアカウントを削除できないようにしたいと考えています。Androidには、アカウントの削除を防ぐために使用できるAbstractAccountAuthenticator方法が用意されています。getAccountRemovalAllowedここまでは順調ですね。

しかし、設定からアカウントを削除しようとすると、ダイアログが怖いです。工場出荷時設定にリセットすることによってのみ削除できると言います。アカウントを削除するには、アプリをアンインストールする必要があるとカスタマイズしたいと思います。それを行う方法はありますか?

KEY_INTENT私は自分の活動を提供しようとしましたが、効果はありませんでした。

public Bundle getAccountRemovalAllowed(AccountAuthenticatorResponse response,
        Account account) throws NetworkErrorException {
    // Cannot remove the account.
    final Bundle result = new Bundle();
            Intent i = new Intent(mContext, MyDialog.class);
    result.putParcelable(AccountManager.KEY_INTENT, i);
    return result;
}
4

0 に答える 0