Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

[Q] Main Activity name of an app

OP Moonbloom

28th February 2012, 02:56 PM   |  #1  
OP Senior Member
Thanks Meter: 97
 
442 posts
Join Date:Joined: Aug 2011
More
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
acubens
28th February 2012, 06:17 PM   |  #2  
Guest
Thanks Meter: 0
 
n/a posts
Quote:
Originally Posted by Moonbloom

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: [ View ]
28th February 2012, 07:13 PM   |  #3  
Account currently disabled
Thanks Meter: 290
 
978 posts
Join Date:Joined: 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: [ View ]
28th February 2012, 07:19 PM   |  #4  
OP Senior Member
Thanks Meter: 97
 
442 posts
Join Date:Joined: Aug 2011
More
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:
28th February 2012, 07:35 PM   |  #5  
Account currently disabled
Thanks Meter: 290
 
978 posts
Join Date:Joined: 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
28th February 2012, 08:00 PM   |  #6  
OP Senior Member
Thanks Meter: 97
 
442 posts
Join Date:Joined: Aug 2011
More
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)
28th February 2012, 11:45 PM   |  #7  
plainjane's Avatar
Senior Member
Flag Charlotte, NC
Thanks Meter: 462
 
1,674 posts
Join Date:Joined: Jan 2011
More
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
29th February 2012, 12:11 AM   |  #8  
OP Senior Member
Thanks Meter: 97
 
442 posts
Join Date:Joined: Aug 2011
More
Quote:
Originally Posted by plainjane

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?
29th February 2012, 07:36 AM   |  #9  
Account currently disabled
Thanks Meter: 290
 
978 posts
Join Date:Joined: Jan 2011
Donate to Me
Quote:
Originally Posted by Moonbloom

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: [ View ]
1st March 2012, 06:28 AM   |  #10  
plainjane's Avatar
Senior Member
Flag Charlotte, NC
Thanks Meter: 462
 
1,674 posts
Join Date:Joined: Jan 2011
More
Quote:
Originally Posted by Moonbloom

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!
Last edited by plainjane; 1st March 2012 at 06:36 AM.

The Following User Says Thank You to plainjane For This Useful Post: [ View ]
Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes