Thread: PRS-T1 Modified Sony home screen
View Single Post
Old 01-16-2012, 08:07 PM   #46
Morkl
Connoisseur
Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.Morkl can talk to the animals.
 
Posts: 80
Karma: 68347
Join Date: Oct 2009
Location: Sweden
Device: PRS-T1
Quote:
Originally Posted by bardo View Post
>Does anyone else have any requests, irks or other ideas about how to make the stock home screen better?

- I would like to have an easy access to dictionaries or even offline Wikipedias like WikiDroyd or Aard. Could be a link or even an input field.

- A defaults manager, selecting the stock reader or coolreader, same for audio: stock or Mortplayer Audio Books, maybe MIME-based.
Access to dictionary or wiki apps can be accomplished by setting them as custom apps and assigning them to a button. On a related note, setting custom websites and dictionary apps as highlight text-shortcuts might be a nifty feature, e.g. to set your own language version of Wikipedia.

Regarding input fields, a "custom app button that takes data from a text field" type of widget might be achievable.

Quote:
Originally Posted by ewandeep View Post
Sorry for the stupid question, but How may I find the right componentname, intentaction and intentcategory for other applications I installed on the nook?

See the example:
Code:
<customAppDefinition name="app_rootexplorer" title="Root Explorer">
<iconNormal>ic_rootexplorer.png</iconNormal>
<iconPressed>ic_rootexplorer_pressed.png</iconPressed>
<componentName package="com.speedsoftware.rootexplorer" class="com.speedsoftware.rootexplorer.RootExplorer" />
<intentAction>android.intent.action.MAIN</intentAction>
<intentCategory>android.intent.category.LAUNCHER</intentCategory>
Not a stupid question, just a poorly documented feature

I don't really know if there is a "real" way to find out what activities and intents an application can do, I usually just unpack the apk (apktool d filename.apk) and check AndroidManifest.xml.

The AndroidManifest.xml in the stock Reader app on the PRS-T1, for example, begins with (after I've done some modifications):
Code:
<manifest
android:sharedUserId="com.sony.drbd.ebook.netapp_mod"
android:versionCode="22" android:versionName="1.0"
package="com.sony.drbd.ebook_mod.reader"
xmlns:android="http://schemas.android.com/apk/res/android">
So the "package" part of the ComponentName is "com.sony.drbd.ebook_mod.reader".

Then there is a list of activities that the app provides, e.g. the BookReadingActivity:
Code:
<activity
android:theme="@style/WindowFullscreen"
android:name="com.sony.drbd.ebook.reader.activities.BookReadingActivity"
android:configChanges="keyboardHidden|orientation">
So the "class" part of the ComponentName is "com.sony.drbd.ebook.reader.activities.BookReading Activity".

Each activity (at least those that can be started with an intent) also has a list of intent-filters that specify how they can be started.
BookReadingActivity has:
Code:
<intent-filter>
	<action android:name="android.intent.action.VIEW" />
	<category android:name=, />
	<data android:mimeType="application/epub+zip" android:scheme="file" />
	<data android:mimeType="application/pdf" android:scheme="file" />
	<data android:mimeType="text/plain" android:scheme="file" />
	<data android:mimeType="application/fb2" android:scheme="file" />
	<data android:mimeType="application/xmdf" android:scheme="file" />
	<data android:mimeType="application/x-dotbook" android:scheme="file" />
	<data android:mimeType="application/vnd.sony.mnb" android:scheme="file" />
</intent-filter>
<intent-filter>
	<action android:name="android.intent.action.MAIN" />
	<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
Which means it can be started either with action="android.intent.action.MAIN" and category="android.intent.category.LAUNCHER", or with action="android.intent.action.VIEW", category="android.intent.category.DEFAULT" and a URI of any of the specified types as data.

I hope this makes some kind of sense; just say the word if you need help with a specific app

Quote:
Originally Posted by rupor View Post
Done!
Great, thanks! Now that I've got a rudimentary Reader release out, I'll start cleaning and refactoring my code and publishing it

For those who don't follow the font thread, I just posted a modified stock Reader with custom font support.
Morkl is offline   Reply With Quote