[LAMW] How to prompt contact picker directly? [SOLVED] lazarus / 43-Android ---------------------------------------------------------------------- Segator · 2020-12-22 21:33 i am trying to make an intent to open the contact manager directly but in the demos just Open a Dialog Recently with some items including the contacts item and the user must select it firt and them the contact this is some difficult and confusing for some users, this is the demo code: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i jIntentMana ger1.SetAction(jIntentManager1.GetActionGetContentUri());jIntentManage r1.SetMimeType('vnd.android.cursor.item/phone_v2');if jIntentManager1.ResolveActivity() thenbegin  jIntentManager1.StartActivityForResult(1003, 'Dial ...');endelse  ShowMessage('no contact manager found');  but this is no an intent directly to the contact manager, i test some example from internet but it fail to ResolveActivity, how i can do? ---------------------------------------------------------------------- Segator · 2021-01-23 22:26 Finally i resolve how make the intent action, thanks to @jmpessoa and take a look to the jIntentManager.java code, here is the way: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TAndroidModule1.jButton1Click(Sender: TObject);begin    if isRunTimePermissionGranted('android.permission.READ_CONTACTS') then  begin    jIntentManager1.SetAction(iaPick);    jIntentManager1.SetDataUri(jIntentManager1.GetContactsPhoneUri());     if jIntentManager1.ResolveActivity() then     begin       jIntentManager1.StartActivityForResult(2003, 'Dial ...');     end     else       ShowMessage('Debe instalar una app de contactos');  end  else  begin    Self.RequestRuntimePermission('android.permission.READ_CONTACTS', 2001);  end;end; procedure TAndroidModule1.AndroidModule1ActivityResult(Sender: TObject;  requestCode: integer; resultCode: TAndroidResult; intentData: jObject);var   jContactUri: jObject;   strContactNumber: string;begin    if (requestCode = 2003) and (resultcode=RESULT_OK) then    begin    strContactNumber:= '';      jContactUri:=jIntentManager1.GetDataUri(intentData);      strContactNumber:= jIntentManager1.GetContactNumber(jContactUri);    ShowMessage(strContactNumber);    end;end;