Win a copy of Spark in Action this week in the Open Source Projects forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

How to open one application from another one?

 
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all

i want to open another Android application from my application.

for example, when i click on a button, it should open the Messaging application for me, so that i can send SMS.

can anybody please help me... ???!!!
 
Ranch Hand
Posts: 643
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use
startActivity() function .

Intent i =new Intent(this,Display2.class);
startActivity(i);


 
Prajkti Khadse
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yeah fine...
but how would i know the Activity Class to start??

i want to open the actual Messaging application, Camera Application and Media Player from my application???
 
chetan dhumane
Ranch Hand
Posts: 643
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Prajkti Khadse wrote:yeah fine...

but how would i know the Activity Class to start??



i want to open the actual Messaging application, Camera Application and Media Player from my application???



You have created the Activity with its class name so embed class name and .class to it .Just I have given example
 
Prajkti Khadse
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply...

but, i think you are not getting my problem...

ok i'll explain...

i want to start The android's Camera application which obviously i've not written...!!

so how would i knw abt its activity...???

i referred the source code, but didn't get any clue???

 
chetan dhumane
Ranch Hand
Posts: 643
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll try to solve your problem.
I don't know solution now.

If I find it I'll forward it from my gmail at evening.

 
Prajkti Khadse
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you ssooo much...!!!
 
Rancher
Posts: 1369
1
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here are few links that can help -
First read up on Android How Tos: Opening New Screen
Then take a look at android.content.Intent class to find an Intent that can help launch a messaging application.
You can see all this knowlege being applied in this sample code: Sending Email from Android
 
Prajkti Khadse
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks...

i'll try it..
 
A lot of people cry when they cut onions. The trick is not to form an emotional bond. This tiny ad told me:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic