Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Android DEV Package Manager help

OP PGiorgos

15th April 2014, 06:28 PM   |  #1  
OP Junior Member
Thanks Meter: 12
 
12 posts
Join Date:Joined: Apr 2014
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.
16th April 2014, 08:56 PM   |  #2  
mohamedrashad's Avatar
Senior Member
Flag ismailia
Thanks Meter: 459
 
975 posts
Join Date:Joined: Nov 2012
More
Quote:
Originally Posted by PGiorgos

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
17th April 2014, 03:31 PM   |  #3  
OP Junior Member
Thanks Meter: 12
 
12 posts
Join Date:Joined: Apr 2014
Quote:
Originally Posted by mohamedrashad

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

thank you!
17th April 2014, 05:07 PM   |  #4  
OP Junior Member
Thanks Meter: 12
 
12 posts
Join Date:Joined: Apr 2014
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?
17th April 2014, 07:11 PM   |  #5  
mohamedrashad's Avatar
Senior Member
Flag ismailia
Thanks Meter: 459
 
975 posts
Join Date:Joined: Nov 2012
More
Quote:
Originally Posted by PGiorgos

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
The Following User Says Thank You to mohamedrashad For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes