Android DEV Package Manager help

Search This thread

PGiorgos

Member
Apr 15, 2014
36
24
Good evening guys i m new on android development and i am making a car mode app. simply 4 buttons to open 4 most common apps you use. I have calls contacts music and gps. But in every phone the package has different package name in exmple in google is com.google.music but in htc is different so the app crashes. i need the code when i click the button to give me all the apps and then choose the app i want to open.
 

mohamedrashad

Senior Member
Nov 15, 2012
1,087
618
26
ismailia
Good evening guys i m new on android development and i am making a car mode app. simply 4 buttons to open 4 most common apps you use. I have calls contacts music and gps. But in every phone the package has different package name in exmple in google is com.google.music but in htc is different so the app crashes. i need the code when i click the button to give me all the apps and then choose the app i want to open.

you can use intents, gallery intent, camera intent, music intent, they are global and work on any device
 

PGiorgos

Member
Apr 15, 2014
36
24
Well i ve found the intent for music
Intent intent = new Intent(MediaStore.INTENT_ACTION_MUSIC_PLAYER);
startActivity(intent);
But i have problem finding the same for contacts any suggestion?
 

mohamedrashad

Senior Member
Nov 15, 2012
1,087
618
26
ismailia
Well i ve found the intent for music
Intent intent = new Intent(MediaStore.INTENT_ACTION_MUSIC_PLAYER);
startActivity(intent);
But i have problem finding the same for contacts any suggestion?

Intent intent = new Intent(Intent.ACTION_PICK, ContactsContract.Contacts.CONTENT_URI);
startActivityForResult(intent, PICK_CONTACT);

here we go ;)

press thanks if i helped you
 
  • Like
Reactions: PGiorgos

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Well i ve found the intent for music
    Intent intent = new Intent(MediaStore.INTENT_ACTION_MUSIC_PLAYER);
    startActivity(intent);
    But i have problem finding the same for contacts any suggestion?

    Intent intent = new Intent(Intent.ACTION_PICK, ContactsContract.Contacts.CONTENT_URI);
    startActivityForResult(intent, PICK_CONTACT);

    here we go ;)

    press thanks if i helped you