Go Back   Android Forums > Android Development > Application Development
Application Development Dev lounge for our application developers.

test: Reply
 
LinkBack Thread Tools
Old February 28th, 2012, 11:05 AM   #1 (permalink)
Junior Member
Thread Author (OP)
 
Join Date: Dec 2009
Posts: 19
 
Device(s):
Carrier: Not Provided

Thanks: 1
Thanked 0 Times in 0 Posts
Notsure Get Activity name from an application

Hi
I am trying to launch Google Voice when I double tap home.
I need to get the activity name to launch Google Voice. How can I get this?
To launch it, I need the full application name, which I have, com.google.android.apps.googlevoice but I also need the activity to start it up.
I have tried several guesses, but nothing has worked so far.
I just want it to start and open the main inbox ui
thanks

Advertisements
eatsleeplaxsoccer3 is offline  
Reply With Quote
sponsored links
Old February 28th, 2012, 05:21 PM   #2 (permalink)
Senior Member
 
jonbonazza's Avatar
 
Join Date: Jul 2010
Gender: Male
Posts: 1,935
 
Device(s): Nexus 4, Samsung Galaxy S II, HTC Evo 4G, Amazon Kindle Fire
Carrier: ATT

Thanks: 235
Thanked 482 Times in 294 Posts
Default

Im on my phone, so I cant really get into it right now, but google the concept of "reflection in Java."
__________________
My blog, Inverted Keystrokes, is looking for aspiring developers (not necessarily with Android) to post articles. If you have any development experience and are interested in participating, please PM me. =)
jonbonazza is offline  
Reply With Quote
Old February 28th, 2012, 06:06 PM   #3 (permalink)
Junior Member
Thread Author (OP)
 
Join Date: Dec 2009
Posts: 19
 
Device(s):
Carrier: Not Provided

Thanks: 1
Thanked 0 Times in 0 Posts
Default

i don't have an android developer kit set up on my machine, i just posted in the dev forum thinking one of y'all might know an easy way.
I'm looking at the classes.dex file but it's not that easy.
tried a java decompiler but didn't read .dex files
eatsleeplaxsoccer3 is offline  
Reply With Quote
Old February 29th, 2012, 09:11 AM   #4 (permalink)
Some say...
 
Stigy's Avatar
 
Join Date: Nov 2009
Gender: Male
Posts: 4,100
 
Device(s): Verizon LG G2 Retired: Galaxy Nexus, OG Droid, TMobile G1
Carrier: Verizon Wireless

Thanks: 1,688
Thanked 3,604 Times in 1,624 Posts
Default

See if this helps you with your problem - Stack Overflow is usually really good with stuff like this.

android - Open another application from your own (intent) - Stack Overflow
__________________
It's kind of fun to do the impossible. - Walt Disney

If someone's out in left field, the /!\ Report button is to the left of their post.
If someone gives you right-on advice or positively contributes, the Thanks button is to the right.
Stigy is offline  
Reply With Quote
Old February 29th, 2012, 09:29 AM   #5 (permalink)
Some say...
 
Stigy's Avatar
 
Join Date: Nov 2009
Gender: Male
Posts: 4,100
 
Device(s): Verizon LG G2 Retired: Galaxy Nexus, OG Droid, TMobile G1
Carrier: Verizon Wireless

Thanks: 1,688
Thanked 3,604 Times in 1,624 Posts
Default

Delete plz - double post.
Stigy is offline  
Reply With Quote
Old February 29th, 2012, 09:32 AM   #6 (permalink)
Junior Member
Thread Author (OP)
 
Join Date: Dec 2009
Posts: 19
 
Device(s):
Carrier: Not Provided

Thanks: 1
Thanked 0 Times in 0 Posts
Default

thanks,
it looks like if i could run this code on an adroid phone with google voice installed, i could find the string I'm looking for
PackageManager pm = context.getPackageManager();
Intent appStartIntent = pm.getLaunchIntentForPackage("com.google.android.a pps.googlevoice");
if (null != appStartIntent)
{
//get activity name from appStartIntent
}
however I don't have the capability of doing this


I've been going through the decompiled apk of google voice and trying to just find a startup activity.
the closest I've come is
com.google.android.apps.googlevoice/com.google.android.apps.googlevoice.activity.conve rsationlist.ConversationListActivity which launched it but only gave me a blank UI.
eatsleeplaxsoccer3 is offline  
Reply With Quote
Old February 29th, 2012, 10:05 AM   #7 (permalink)
Junior Member
Thread Author (OP)
 
Join Date: Dec 2009
Posts: 19
 
Device(s):
Carrier: Not Provided

Thanks: 1
Thanked 0 Times in 0 Posts
Default

I got it!
So others know
for Google Voice, the startup activity is
com.google.android.apps.googlevoice.SplashActivity
so if you want google voice to open when you double tap home, modify the double tap entry in SQLLite to com.google.android.apps.googlevoice/com.google.android.apps.googlevoice.SplashActivity
if you need to find the startup activity for something in general, open up the androidmanifest.xml (open the .apk with winzip or something, you don't need a full decompiler)
and look for an activity with the category main or launcher
<activity android:theme="@style/TranslucentThemeNoActionBar" android:label="@string/app_icon_name" android:name=".SplashActivity" android:configChanges="keyboard|keyboardHidden|ori entation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
eatsleeplaxsoccer3 is offline  
Reply With Quote
Reply
Tags
activity, google voice


Go Back   Android Forums > Android Development > Application Development
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 07:40 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.