Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 12-31-2011, 10:36 AM   #1
LittleLui
Member
LittleLui began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Dec 2011
Device: Kindle Touch
[Touch] getting rid of searchbar

Hi everyone,

I'm pretty sure I'm missing something rather obvious here, but:

I'm working on a Kindlet and I'd like to turn off the search bar (with back-button, shop-button, search) while my kindlet is running. It takes up real estate that I'd rather have for my content.

regards,
lui
LittleLui is offline   Reply With Quote
Old 12-31-2011, 10:41 AM   #2
PollyN
Junior Member
PollyN began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Dec 2011
Device: Kindle Touch
I'd sure be interested as well. I can't just tap the top to get rid of it like I do to pull it up.
PollyN is offline   Reply With Quote
 
Enthusiast
Old 01-01-2012, 06:17 AM   #3
ixtab
Mayan Goddess
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,290
Karma: 4902879
Join Date: Dec 2011
Device: K3/K4/K5/PW
Could you post a minimal sample Kindlet source code along with instructions on compiling and getting it on the Kindle? (I remember that on the K3 the thing needed to be signed, the dev key added on the device etc.)

I'm willing to help in finding the solution, but I don't want to start from scratch by figuring out how to get a Kindlet working in the first place
ixtab is offline   Reply With Quote
Old 01-01-2012, 09:03 AM   #4
ixtab
Mayan Goddess
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,290
Karma: 4902879
Join Date: Dec 2011
Device: K3/K4/K5/PW
Ah whatever, I found some old project for the Kindle and reused that.



Source code and .azw2 are attached. READ ON BEFORE INSTALLING, though:

This will NOT work out of the box.
From within your Kindlet, you get a com.amazon.kindle.kindlet.KindletContext. The standard implementation of it, com.amazon.kindle.kindlet.internal.StandardKindlet Context, includes three additional methods beyond those defined in the interface: getOrientationController(), getToolbar(), and setScreenUpdateMode().

So while these methods are actually available in the implementation, they are not declared in the interface. This is probably a glitch.

Now, you can't just cast the instance to the actual class, because the Kindlet class loader does not allow you to access these. In fact, it'll simply give you a ClassNotFoundException. The (only) classes which you are allowed to access are listed in the resource com/amazon/kindle/kindlet/internal/security/whiteListedClassNames (contained in KindletImplementation-2.0.jar). You will have to break out of this classloader first in order to get full access to your device.

This is what the json_simple-1.1.jar is there for. It allows to escape the restrictive class loader, and also allows you to do other nifty things, like gaining additional permissions to write to the file system, read additional properties etc. You have to copy this one into /opt/amazon/ebook/lib as well.

This is actually a project which I did for the Kindle 3 about a year ago, but never released it. Now that I see it's actually required to get some fundamental stuff done on the K-Touch, I'll probably make it public.


PS: You can use the keystore from here: http://www.mobileread.com/forums/sho...d.php?t=152294
Attached Files
File Type: zip hellokindle.RENAME_TO_azw2.zip (28.5 KB, 56 views)
File Type: zip hellokindle-src.zip (2.49 MB, 65 views)
File Type: zip json_simple-1.1.RENAME_TO_jar.zip (28.4 KB, 61 views)
ixtab is offline   Reply With Quote
Old 01-01-2012, 04:42 PM   #5
LittleLui
Member
LittleLui began at the beginning.
 
Posts: 16
Karma: 10
Join Date: Dec 2011
Device: Kindle Touch
oh dear... thanks, ixtab! I'd love to see the sourcecode for the json_simple (well.. the breaking free from classloader limitations part at least) though
LittleLui is offline   Reply With Quote
Old 01-01-2012, 05:00 PM   #6
ixtab
Mayan Goddess
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,290
Karma: 4902879
Join Date: Dec 2011
Device: K3/K4/K5/PW
Quote:
Originally Posted by LittleLui View Post
oh dear... thanks, ixtab! I'd love to see the sourcecode for the json_simple (well.. the breaking free from classloader limitations part at least) though
There you go. Source project is attached.

A few more things to note:
You will need to bundle the "frontend" jar with your application (see build.xml) of the sample app. Take a look at the SuicidalKindlet and Jailbreak classes in there. You can also start and stop jailbreak mode at runtime (jailbreak.enable() and jailbreak.disable() etc.), or you can subclass Jailbreak to get additional permissions directly when the application launches. Or, from within your own code, you can request them when needed:
Code:
jailbreak.getContext().requestPermission(new FilePermission(...));
Et cetera. From a "user" (Kindlet developer) perspective, the frontend is more interesting. From a "hacker" perspective, it may be the backend
Attached Files
File Type: zip jailbreak-src.zip (30.2 KB, 56 views)
ixtab is offline   Reply With Quote
Old 03-21-2012, 02:15 AM   #7
ixtab
Mayan Goddess
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,290
Karma: 4902879
Join Date: Dec 2011
Device: K3/K4/K5/PW
Update:

If you don't need to change the style at runtime, you can be set it in the .azw2 manifest. This is also working without the jailbreak.
Quick example from an ant buildfile:
Code:
            <manifest>
            	<attribute name="Implementation-Title" value="${product.name}"/>
            	<attribute name="Implementation-Version" value="${product.version}"/>
            	<attribute name="Implementation-Vendor" value="${product.vendor}"/>
            	<attribute name="Main-Class" value="${product.mainclass}"/>
            	<attribute name="Amazon-Cover-Image" value="${product.image}"/>
            	<attribute name="Toolbar-Style" value="none"/>
            </manifest>
Allowable values are "none", "transient", and "persistent".

More interesting information about supported Kindlet attributes can be found in the com.amazon.kindle.kindlet.internal.install.Metadat a class
ixtab is offline   Reply With Quote
Reply

Tags
kindlet, search

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle 3, Nook Simple Touch, Kobo Touch and Libra Pro Touch jbcohen Which one should I buy? 4 06-18-2011 07:58 PM
Is there a way to get rid of this annoyance? TonytheBookworm Amazon Kindle 7 12-26-2010 08:59 PM
get rid of all tags - how ? cybmole Calibre 4 09-29-2010 08:50 AM
hi, i am currently getting rid of the russellmz00 Introduce Yourself 6 05-25-2010 01:42 PM
Just to get rid of the message pshrynk Introduce Yourself 10 04-17-2009 01:47 AM


All times are GMT -4. The time now is 04:22 AM.


MobileRead.com is a privately owned, operated and funded community.