P postasat Active Member Licensed User Longtime User Feb 24, 2018 #1 Hi, I would like to use Gmail rest Api to send mail from activity that is not "Main". I need to know how can I use Starter service to delegate the event coming from GoogleOAuth2 to another activity that I called "elaboration" and in which I started the "Sub Send (msg As MailCreator)". Using the code from the following example: https://www.b4x.com/android/forum/threads/b4x-sending-emails-with-gmail-rest-api.81736/#content once allowed the permission to send from google page, my app resume from "main" activity and all is stopping (and mail is not send, because the events are not raised). Thank you.
Hi, I would like to use Gmail rest Api to send mail from activity that is not "Main". I need to know how can I use Starter service to delegate the event coming from GoogleOAuth2 to another activity that I called "elaboration" and in which I started the "Sub Send (msg As MailCreator)". Using the code from the following example: https://www.b4x.com/android/forum/threads/b4x-sending-emails-with-gmail-rest-api.81736/#content once allowed the permission to send from google page, my app resume from "main" activity and all is stopping (and mail is not send, because the events are not raised). Thank you.
Erel B4X founder Staff member Licensed User Longtime User Feb 25, 2018 #2 There is nothing special with the main activity. It raises the events on the module that is passed with this line: Code: Copy oauth2.Initialize(Me, "oauth2", ClientId, "https://www.googleapis.com/auth/gmail.send") 'Me = current module Upvote 0
There is nothing special with the main activity. It raises the events on the module that is passed with this line: Code: Copy oauth2.Initialize(Me, "oauth2", ClientId, "https://www.googleapis.com/auth/gmail.send") 'Me = current module
Andris Active Member Licensed User Longtime User May 2, 2018 #3 Seee this post: Sending emails with Gmail REST API from another Activity causes a refresh token problem Upvote 0
Seee this post: Sending emails with Gmail REST API from another Activity causes a refresh token problem