I have a problem with kitkat api, while tringy to get google google services access token, google music in my case. So, if the user tries to get the token first, using the following method:
public String getAuthToken(Account account) throws AuthenticatorException, IOException { String s1; if (account == null) { Log.e("MusicAuthInfo", "Given null account to MusicAuthInfo.getAuthToken()", new Throwable()); throw new AuthenticatorException("Given null account to MusicAuthInfo.getAuthToken()"); } String s = getAuthTokenType(mContext); try { s1 = AccountManager.get(mContext).blockingGetAuthToken(account, s, true); } catch (OperationCanceledException operationcanceledexception) { throw new AuthenticatorException(operationcanceledexception); } if (s1 == null) { throw new AuthenticatorException("Received null auth token."); } return s1; }
here I get s1 == null and a system startup notification:

When the user clicks on the notification, the following dialog box appears:

When the user clicks “ok”, all subsequent iterations receiving the token will succeed.
Question: How to bypass this confirmation or show only a dialog without clicking on the notification?
source share