You do not need a special Android library to subscribe an authenticated user to a specific channel. Just send an authenticated POST request to the endpoint subscriptions/insertusing the channelIdchannel you want to subscribe to with the parameter Part snippet:
HTTP POST https://www.googleapis.com/youtube/v3/subscriptions?part=snippet&key={YOUR_API_KEY}
Request body:
{
"snippet": {
"resourceId": {
"channelId": "XXXXX" // channel ID you want to subscribe to
}
}
}
source
share