Youtube login from android

I am trying to get into the handset using the following code

mService = new YouTubeService("Nothing", developer_key); //Authentication try { mService.setUserCredentials(mUsername, mPassword); } catch (AuthenticationException e) { Log.v(TAG, e.toString()); } 

but I get:
ConnectYouTube: com.google.gdata.util.AuthenticationException: Error connecting with login URI

This code seems to me basic, and I can’t understand what mistake I am making here.

+4
source share
1 answer

Make sure you have the following permissions:

  • android.permission.INTERNET
  • android.permission.GET_ACCOUNTS
  • android.permission.USE_CREDENTIALS
  • android.permission.MANAGE_ACCOUNTS
0
source

All Articles