I am developing App In android Kotlin I serach alot can anyone can help me to solve this
I want User athenticate his email in my app and i access his Account and when he allow me to send email from my app the permission is send email behalf of other i see in many apps i dont know how to do that i intergate Gmail Api but didnot scussfully done it because if i do code the error in packege that i used these `
`implementation 'com.google.android.gms:play-services-identity:19.2.0'
implementation 'com.google.api-client:google-api-client:2.0.0'
implementation 'com.google.oauth-client:google-oauth-client-jetty:1.34.1'
implementation 'com.google.api-client:google-api-client-android:1.23.0'
implementation'com.google.apis:google-api-services-gmail:v1-rev82-1.23.0'
implementation 'com.google.auth:google-auth-library-oauth2-http:1.11.0'`
` val credentials = GoogleAccountCredential.usingOAuth2(
applicationContext, Collections.singleton(GmailScopes.GMAIL_SETTINGS_BASIC)
)
val service = Gmail.Builder(
AndroidHttp.newCompatibleTransport(), GsonFactory(), credentials
).setApplicationName("YourAppName").build()
val sendAs = SendAs().apply {
sendAsEmail = "[email protected]"
}
val request = service.users().settings().sendAs().create("me", sendAs)
val response = request.execute()`
is their Any one who can solve this issue