Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,732,778 Members 51,430 Now Online
XDA Developers Android and Mobile Development Forum

Android DEV Package Manager help

Tip us?
 
PGiorgos
Old
#1  
Junior Member - OP
Thanks Meter 0
Posts: 5
Join Date: Apr 2014
Post Android DEV Package Manager help

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
Old
#2  
mohamedrashad's Avatar
Senior Member
Thanks Meter 416
Posts: 878
Join Date: Nov 2012
Location: ismailia
Quote:
Originally Posted by PGiorgos View Post
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


Try Pi Developers apps

Socials Addict || Floata For Twitter
| | Pi locker

Check Pi Developers Blog

pidevelopers.blogspot.com


My Work For Android



 
PGiorgos
Old
#3  
Junior Member - OP
Thanks Meter 0
Posts: 5
Join Date: Apr 2014
Quote:
Originally Posted by mohamedrashad View Post
you can use intents, gallery intent, camera intent, music intent, they are global and work on any device
thank you!
 
PGiorgos
Old
#4  
Junior Member - OP
Thanks Meter 0
Posts: 5
Join Date: 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?
 
mohamedrashad
Old
#5  
mohamedrashad's Avatar
Senior Member
Thanks Meter 416
Posts: 878
Join Date: Nov 2012
Location: ismailia
Quote:
Originally Posted by PGiorgos View Post
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


Try Pi Developers apps

Socials Addict || Floata For Twitter
| | Pi locker

Check Pi Developers Blog

pidevelopers.blogspot.com


My Work For Android



The Following User Says Thank You to mohamedrashad For This Useful Post: [ Click to Expand ]
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes