K kohle Active Member Licensed User Longtime User Jun 6, 2017 #1 Hi, i open the email app with this code. I think, the first time I get a dialog to choose the app. I selected the notes app. Now it always open the notes app. First, how can I prefend this dialog . It should open always gmail. Second how can I change back via script , without deinstall . Code: Dim msg As Email subject=en.desc_plaintext & " - " & en.Title msg.Subject=subject msg.Body= gl_BODY msg.To.Add(gl_EMAIL) StartActivity(msg.GetIntent)
Hi, i open the email app with this code. I think, the first time I get a dialog to choose the app. I selected the notes app. Now it always open the notes app. First, how can I prefend this dialog . It should open always gmail. Second how can I change back via script , without deinstall . Code: Dim msg As Email subject=en.desc_plaintext & " - " & en.Title msg.Subject=subject msg.Body= gl_BODY msg.To.Add(gl_EMAIL) StartActivity(msg.GetIntent)
DonManfred Expert Licensed User Longtime User Jun 6, 2017 #2 kohle said: Now it always open the notes app. First, how can I prefend this dialog . It should open always gmail. Second how can I change back via script , without deinstall . Click to expand... You can set the default apps in the settings of your device. Upvote 0
kohle said: Now it always open the notes app. First, how can I prefend this dialog . It should open always gmail. Second how can I change back via script , without deinstall . Click to expand... You can set the default apps in the settings of your device.
K kohle Active Member Licensed User Longtime User Jun 6, 2017 #3 I know this, but the users are no programmers, maybe old people. When they quickly choose the wrong app .... So is there no way to say open gmail ...., nothing else ? Upvote 0
I know this, but the users are no programmers, maybe old people. When they quickly choose the wrong app .... So is there no way to say open gmail ...., nothing else ?
DonManfred Expert Licensed User Longtime User Jun 6, 2017 #4 kohle said: When they quickly choose the wrong app .... Click to expand... You can create a tutorial for your users and send them a link to the tut.... kohle said: So is there no way to say open gmail Click to expand... You can check the GMail packagename and start the app manually. But i dont know how to define the intent to send a mail in this case. But i dont know a way to change the setting the user used. You can not change the setting programmatically. Upvote 0
kohle said: When they quickly choose the wrong app .... Click to expand... You can create a tutorial for your users and send them a link to the tut.... kohle said: So is there no way to say open gmail Click to expand... You can check the GMail packagename and start the app manually. But i dont know how to define the intent to send a mail in this case. But i dont know a way to change the setting the user used. You can not change the setting programmatically.
K kohle Active Member Licensed User Longtime User Jun 6, 2017 #5 one option is like the code, but it always open the dialog to choose Code: Dim msg As Email subject=en.desc_plaintext & " - " & en.Title msg.Subject=subject msg.Body= gl_BODY msg.To.Add(gl_EMAIL) Dim i As Intent i = msg.GetIntent i.SetComponent("android/com.android.internal.app.ResolverActivity") StartActivity(i) Upvote 0
one option is like the code, but it always open the dialog to choose Code: Dim msg As Email subject=en.desc_plaintext & " - " & en.Title msg.Subject=subject msg.Body= gl_BODY msg.To.Add(gl_EMAIL) Dim i As Intent i = msg.GetIntent i.SetComponent("android/com.android.internal.app.ResolverActivity") StartActivity(i)
R ronell Well-Known Member Licensed User Longtime User Jun 6, 2017 #6 Code: Dim msg As Email Dim intent1 As Intent msg.Subject="subject" msg.Body= "body" msg.To.Add("[email protected]") intent1 = msg.GetIntent intent1.SetComponent("com.google.android.gm/.ComposeActivityGmail") StartActivity(intent1) choose from here Code: Dim pm As PackageManager For Each em As String In pm.QueryIntentActivities(msg.getintent) Log(em) Next Last edited: Jun 6, 2017 Upvote 0
Code: Dim msg As Email Dim intent1 As Intent msg.Subject="subject" msg.Body= "body" msg.To.Add("[email protected]") intent1 = msg.GetIntent intent1.SetComponent("com.google.android.gm/.ComposeActivityGmail") StartActivity(intent1) choose from here Code: Dim pm As PackageManager For Each em As String In pm.QueryIntentActivities(msg.getintent) Log(em) Next
K kohle Active Member Licensed User Longtime User Jun 6, 2017 #7 ronell said: Code: Dim msg As Email Dim intent1 As Intent msg.Subject="subject" msg.Body= "body" msg.To.Add("[email protected]") intent1 = msg.GetIntent intent1.SetComponent("com.google.android.gm/.ComposeActivityGmail") StartActivity(intent1) choose from here Code: Dim pm As PackageManager For Each em As String In pm.QueryIntentActivities(msg.getintent) Log(em) Next Click to expand... This give an error : java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.SEND_MULTIPLE typ=text/plain flg=0x20000 cmp=com.google.android.gm/.ComposeActivityGmail (has extras) } from ProcessRecord{eac19be 24238:jk.rt_calendar/u0a202} (pid=24238, uid=10202) not exported from uid 10092 Upvote 0
ronell said: Code: Dim msg As Email Dim intent1 As Intent msg.Subject="subject" msg.Body= "body" msg.To.Add("[email protected]") intent1 = msg.GetIntent intent1.SetComponent("com.google.android.gm/.ComposeActivityGmail") StartActivity(intent1) choose from here Code: Dim pm As PackageManager For Each em As String In pm.QueryIntentActivities(msg.getintent) Log(em) Next Click to expand... This give an error : java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.SEND_MULTIPLE typ=text/plain flg=0x20000 cmp=com.google.android.gm/.ComposeActivityGmail (has extras) } from ProcessRecord{eac19be 24238:jk.rt_calendar/u0a202} (pid=24238, uid=10202) not exported from uid 10092
R ronell Well-Known Member Licensed User Longtime User Jun 6, 2017 #8 can you post you project(or create small project) ? il try it on my device i guess your device is 6.0 and up edit: try this Code: intent1.SetComponent("com.google.android.gm/.info.activityInfo.name") Last edited: Jun 6, 2017 Upvote 0
can you post you project(or create small project) ? il try it on my device i guess your device is 6.0 and up edit: try this Code: intent1.SetComponent("com.google.android.gm/.info.activityInfo.name")
K kohle Active Member Licensed User Longtime User Jun 6, 2017 #9 yes my device is 6.0.1. It works with : i.SetComponent("com.google.android.gm/.ComposeActivityGmailExternal") insteed of "com.google.android.gm/.ComposeActivityGmail" But will it work on all device >= Android 4 ? Upvote 0
yes my device is 6.0.1. It works with : i.SetComponent("com.google.android.gm/.ComposeActivityGmailExternal") insteed of "com.google.android.gm/.ComposeActivityGmail" But will it work on all device >= Android 4 ?
R ronell Well-Known Member Licensed User Longtime User Jun 6, 2017 #10 kohle said: But will it work on all device >= Android 4 ? Click to expand... tested on my device 4.4 & 4.2 didnt work .. just use this code to see the right intent for different android version Code: Dim pm As PackageManager For Each em As String In pm.QueryIntentActivities(msg.getintent) Log(em) Next Last edited: Jun 6, 2017 Upvote 0
kohle said: But will it work on all device >= Android 4 ? Click to expand... tested on my device 4.4 & 4.2 didnt work .. just use this code to see the right intent for different android version Code: Dim pm As PackageManager For Each em As String In pm.QueryIntentActivities(msg.getintent) Log(em) Next
K kohle Active Member Licensed User Longtime User Jun 6, 2017 #11 ronell said: tested on my device 4.4 didnt work .. Click to expand... Yeah, on my samsung s4 mini with 4.4 it didnt work either. Arrr. maybe I check the os version and decide what I open I check with packetmanger for gmail... Upvote 0
ronell said: tested on my device 4.4 didnt work .. Click to expand... Yeah, on my samsung s4 mini with 4.4 it didnt work either. Arrr. maybe I check the os version and decide what I open I check with packetmanger for gmail...
R ronell Well-Known Member Licensed User Longtime User Jun 6, 2017 #12 i edit my last post.. you can easily resolve that issue by using package manager Upvote 0
K kohle Active Member Licensed User Longtime User Jun 6, 2017 #13 ronell said: i edit my last post.. you can easily resolve that issue by using package manager Click to expand... I edited my post too. Zhis i had in mind too. Thanks a lot . Upvote 0
ronell said: i edit my last post.. you can easily resolve that issue by using package manager Click to expand... I edited my post too. Zhis i had in mind too. Thanks a lot .