Get Activity name from an application

Last Updated:

  1. 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, 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

  2. jonbonazza

    jonbonazza Well-Known Member

    Im on my phone, so I cant really get into it right now, but google the concept of "reflection in Java."
  3. 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
  4. Stigy

    Stigy Some say... VIP Member

  5. Stigy

    Stigy Some say... VIP Member

    Delete plz - double post.
  6. 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("");
    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 which launched it but only gave me a blank UI.
  7. I got it!
    So others know
    for Google Voice, the startup activity is
    so if you want google voice to open when you double tap home, modify the double tap entry in SQLLite to
    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|orientation|screenSize">
    <action android:name="android.intent.action.MAIN" />
    <category android:name="android.intent.category.LAUNCHER" />

Share This Page