5,598,171 Members 44,334 Now Online
XDA Developers Android and Mobile Development Forum

[Q] Main Activity name of an app

Tip us?
 
Moonbloom
Old
#1  
Senior Member - OP
Thanks Meter 97
Posts: 442
Join Date: Aug 2011
Default [Q] Main Activity name of an app

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
Please click the "Thanks" button if I helped you

If you really want to thank me, or just need a Dropbox account, use my referral link by clicking on the image below and we both get 500 MB more space when you install the program, completely free!
acubens Old
#2  
Guest
Thanks Meter
Posts: n/a
Quote:
Originally Posted by Moonbloom View Post
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
The Following User Says Thank You to For This Useful Post: [ Click to Expand ]
 
jakuburban
Old
#3  
Account currently disabled
Thanks Meter 288
Posts: 978
Join Date: Jan 2011

 
DONATE TO ME
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
The Following User Says Thank You to jakuburban For This Useful Post: [ Click to Expand ]
 
Moonbloom
Old
#4  
Senior Member - OP
Thanks Meter 97
Posts: 442
Join Date: Aug 2011
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 :eek:
Please click the "Thanks" button if I helped you

If you really want to thank me, or just need a Dropbox account, use my referral link by clicking on the image below and we both get 500 MB more space when you install the program, completely free!
 
jakuburban
Old
#5  
Account currently disabled
Thanks Meter 288
Posts: 978
Join Date: Jan 2011

 
DONATE TO ME
Hi,
the action name is always on the begging (but not on the top)
For example:


Send me the Calendar app and I will search for it
 
Moonbloom
Old
#6  
Senior Member - OP
Thanks Meter 97
Posts: 442
Join Date: Aug 2011
How do you know what to look for?

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
Attached Files
File Type: apk com.android.calendar.apk - [Click for QR Code] (261.1 KB, 8 views)
Please click the "Thanks" button if I helped you

If you really want to thank me, or just need a Dropbox account, use my referral link by clicking on the image below and we both get 500 MB more space when you install the program, completely free!
 
plainjane
Old
#7  
plainjane's Avatar
Senior Member
Thanks Meter 461
Posts: 1,675
Join Date: Jan 2011
Location: 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
HTC Supersonic (EVO 4G)
HW 003
Hboot 2.02 S-Off
Amon Ra recovery
More stuff that I'm too lazy to figure out and type.
MIUI 2.3.2_b1 ES (by Swiperat)
Extended Settings Mod
Tiamat 4.1.0 SBC

My wallpaper collection
GTalk: ohhhgeez@gmail.com

If you think I can help you with something or need me to elaborate on a post then feel free to pm me. I'll try my best to help you out.

Oh, and I have a vagina. Fear me :P
 
Moonbloom
Old
#8  
Senior Member - OP
Thanks Meter 97
Posts: 442
Join Date: Aug 2011
Quote:
Originally Posted by plainjane View Post
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?
Please click the "Thanks" button if I helped you

If you really want to thank me, or just need a Dropbox account, use my referral link by clicking on the image below and we both get 500 MB more space when you install the program, completely free!
 
jakuburban
Old
#9  
Account currently disabled
Thanks Meter 288
Posts: 978
Join Date: Jan 2011

 
DONATE TO ME
Quote:
Originally Posted by Moonbloom View Post
How do you know what to look for?

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
The Following User Says Thank You to jakuburban For This Useful Post: [ Click to Expand ]
 
plainjane
Old
(Last edited by plainjane; 1st March 2012 at 05:36 AM.)
#10  
plainjane's Avatar
Senior Member
Thanks Meter 461
Posts: 1,675
Join Date: Jan 2011
Location: Charlotte, NC
Quote:
Originally Posted by Moonbloom View Post
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.AgendaAct ivity - 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!
HTC Supersonic (EVO 4G)
HW 003
Hboot 2.02 S-Off
Amon Ra recovery
More stuff that I'm too lazy to figure out and type.
MIUI 2.3.2_b1 ES (by Swiperat)
Extended Settings Mod
Tiamat 4.1.0 SBC

My wallpaper collection
GTalk: ohhhgeez@gmail.com

If you think I can help you with something or need me to elaborate on a post then feel free to pm me. I'll try my best to help you out.

Oh, and I have a vagina. Fear me :P

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

Advanced Search
Display Modes