[Q] Main Activity name of an app

Search This thread

Moonbloom

Senior Member
Aug 22, 2011
444
98
Hello :)

I'm currently in the process of making a theme for MIUI lockscreen.
I've successfully gotten shortcuts for stock messaging, dialer and camera onto the lockscreen.

To do so i've used code such as this:
Code:
<Intent action="android.intent.action.MAIN" type="vnd.android-dir/mms-sms" category="android.intent.category.DEFAULT"/>
and
Code:
<Intent action="android.intent.action.MAIN" package="com.miui.camera" class="com.miui.camera.Camera"/>

And then linked it to a button of course.
I've gotten these action, package and class names from looking at other people's manifest.xml files in their MIUI themes.

But now i find myself wanting to put other apps on the lockscreen, such as XDA and FriendCaster.
I can't seem to find the action, package and class names for these apps anywhere.

So here's my question, how do i find these strings?

I've tried opening an .apk file and taking a look at the files in there, but most of them can't be opened in Notepad++ (Do i need another program to open them or what?), and i can't find what i need.

Hope someone more experienced can help me :)

- Moonbloom
 
A

acubens

Guest
Hello :)

I'm currently in the process of making a theme for MIUI lockscreen.
I've successfully gotten shortcuts for stock messaging, dialer and camera onto the lockscreen.

To do so i've used code such as this:
Code:
<Intent action="android.intent.action.MAIN" type="vnd.android-dir/mms-sms" category="android.intent.category.DEFAULT"/>
and
Code:
<Intent action="android.intent.action.MAIN" package="com.miui.camera" class="com.miui.camera.Camera"/>

And then linked it to a button of course.
I've gotten these action, package and class names from looking at other people's manifest.xml files in their MIUI themes.

But now i find myself wanting to put other apps on the lockscreen, such as XDA and FriendCaster.
I can't seem to find the action, package and class names for these apps anywhere.

So here's my question, how do i find these strings?

I've tried opening an .apk file and taking a look at the files in there, but most of them can't be opened in Notepad++ (Do i need another program to open them or what?), and i can't find what i need.

Hope someone more experienced can help me :)

- Moonbloom

Download apk manager its available on XDA but dont have a link for you just search with google and you will see, you then can unpack the apk and edit the files that you can't edit at the moment. the manager uses smali and baksmali to unpack and pack the file again.

here you can find more info http://code.google.com/p/smali/wiki/BuildProcedure

Cheers
 

jakuburban

Senior Member
Jan 22, 2011
977
289
I think the code for XDA FREE would be >> package="com.quoord.tapatalkxda.activity" and "com.quoord.tapatalkxda.activity.EntryActivity" for the activity.
Anyway, try to decompile the apk with apk manager and then find the code in AndroidManifest.xml
 
  • Like
Reactions: Moonbloom

Moonbloom

Senior Member
Aug 22, 2011
444
98
Thanks for the information :)

I've sucessfully been able to decompile the .apk's (i grabbed them out of my Titanium Backup folder ^^), and i've checked out the AndroidManifest.xml files in various apps.

To see if i could match the strings i found in other people's theme to the ones i could find the android manifest, i used MIUI Player (just to test my theory)

Code from other persons theme (works fine):

Code:
<Intent action="android.intent.action.MAIN" package="com.miui.player" class="com.miui.player.drawerActivityGroup.MainActivityGroup"/>

I can easily find the "package" name, as it's in the top of every AndroidManifest.xml.

But my issue is finding the correct "action" and especially "class" to go with it.

I can open the AndroidManifest.xml in the MIUI Player app, and find
Code:
android:value=".drawerActivityGroup.MainActivityGroup" />

But if i didn't already have the string, i wouldn't have known what to look for in the first place :S

At the moment i'm trying to get the Calendar app working, so i can unlock it from the lockscreen and be taken straight into the calendar.
All my other code is setup and works fine, but it's just this 1 line i can't get working properly:
Code:
<Intent action="android.intent.action.MAIN" package="com.android.calendar" class="com.android.calendar.android.task.calendar"/>
When i try and unlock using this, it just unlocks normally and doesn't launches the Calendar app.

This is a lot more confusing than i thought i'd be :O
 

jakuburban

Senior Member
Jan 22, 2011
977
289
Hi,
the action name is always on the begging (but not on the top)
For example:
zrzutjqr.jpg


Send me the Calendar app and I will search for it :)
 

Moonbloom

Senior Member
Aug 22, 2011
444
98
How do you know what to look for? :eek:

I've tried with just the "action:name", but there's loads of those, and i've tried with several other combinations as well, neither seem to work.

Also, when i use the xda info you posted earlier (also found them in the decompiled AndroidManifest.xml from the XDA app), and try and launch that from my lockscreen, it opens up some weird kind of XDA i've never seen before. It doesn't open the usual app? o_O
 

Attachments

  • com.android.calendar.apk
    261.1 KB · Views: 12

plainjane

Senior Member
Jan 14, 2011
1,674
463
35
Charlotte, NC
I use the app "Quick Shortcut Maker" to create shortcuts to certain parts of an app (a specific setting in the settings app, for example). In the app, as you're making the shortcut, it allows you to test it. Use that app to find the correct activity and then add it to your theme.

Supersonic Evo 4G | MIUI | Tapatalk
 

Moonbloom

Senior Member
Aug 22, 2011
444
98
I use the app "Quick Shortcut Maker" to create shortcuts to certain parts of an app (a specific setting in the settings app, for example). In the app, as you're making the shortcut, it allows you to test it. Use that app to find the correct activity and then add it to your theme.

Supersonic Evo 4G | MIUI | Tapatalk

I can't seem to find this app anywhere.
I've found some called "Shortcut Maker" (without the "Quick"), but one of them costs around 2$ and the other one literally didn't do anything. Downloaded it, no app icon anywhere, no extra buttons when adding widgets, nothing.

Could you link it please? :)
 

jakuburban

Senior Member
Jan 22, 2011
977
289
How do you know what to look for? :eek:

I've tried with just the "action:name", but there's loads of those, and i've tried with several other combinations as well, neither seem to work.

Also, when i use the xda info you posted earlier (also found them in the decompiled AndroidManifest.xml from the XDA app), and try and launch that from my lockscreen, it opens up some weird kind of XDA i've never seen before. It doesn't open the usual app? o_O

I think this is what You need
pomoc.jpg
 
  • Like
Reactions: Moonbloom

plainjane

Senior Member
Jan 14, 2011
1,674
463
35
Charlotte, NC
I can't seem to find this app anywhere.
I've found some called "Shortcut Maker" (without the "Quick"), but one of them costs around 2$ and the other one literally didn't do anything. Downloaded it, no app icon anywhere, no extra buttons when adding widgets, nothing.

Could you link it please? :)


It was QuickShortcutMaker, all one word. You can either open the app and go through the activities there, or by adding a shortcut. Direct link to download from my Dropbox is here: http://db.tt/Voekw2wN

Edit: Also be careful when using the activity names shown on the screen. It first shows the main package name of the app, then the activity. For example, if you wanted to open the agenda view of the calendar, it would show as com.android.calendarcom.android.calendar.AgendaActivity - without spaces between the two. You'd want to use com.android.calendar.AgendaActivity, not the whole string shown in the app. If you have a little experience with activity names you'll be able to tell what you need to use without problem, just wanted to point that out.
If you do need assistance, shoot me a pm and I'll find the right names for whatever you need. Good luck!
 
Last edited:
  • Like
Reactions: Moonbloom

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    I think the code for XDA FREE would be >> package="com.quoord.tapatalkxda.activity" and "com.quoord.tapatalkxda.activity.EntryActivity" for the activity.
    Anyway, try to decompile the apk with apk manager and then find the code in AndroidManifest.xml
    1
    How do you know what to look for? :eek:

    I've tried with just the "action:name", but there's loads of those, and i've tried with several other combinations as well, neither seem to work.

    Also, when i use the xda info you posted earlier (also found them in the decompiled AndroidManifest.xml from the XDA app), and try and launch that from my lockscreen, it opens up some weird kind of XDA i've never seen before. It doesn't open the usual app? o_O

    I think this is what You need
    pomoc.jpg
    1
    I can't seem to find this app anywhere.
    I've found some called "Shortcut Maker" (without the "Quick"), but one of them costs around 2$ and the other one literally didn't do anything. Downloaded it, no app icon anywhere, no extra buttons when adding widgets, nothing.

    Could you link it please? :)


    It was QuickShortcutMaker, all one word. You can either open the app and go through the activities there, or by adding a shortcut. Direct link to download from my Dropbox is here: http://db.tt/Voekw2wN

    Edit: Also be careful when using the activity names shown on the screen. It first shows the main package name of the app, then the activity. For example, if you wanted to open the agenda view of the calendar, it would show as com.android.calendarcom.android.calendar.AgendaActivity - without spaces between the two. You'd want to use com.android.calendar.AgendaActivity, not the whole string shown in the app. If you have a little experience with activity names you'll be able to tell what you need to use without problem, just wanted to point that out.
    If you do need assistance, shoot me a pm and I'll find the right names for whatever you need. Good luck!