View Single Post
Old 07-23-2012, 03:13 PM   #1
MaPePeR
Connoisseur
MaPePeR can shake the floor when laughingMaPePeR can shake the floor when laughingMaPePeR can shake the floor when laughingMaPePeR can shake the floor when laughingMaPePeR can shake the floor when laughingMaPePeR can shake the floor when laughingMaPePeR can shake the floor when laughingMaPePeR can shake the floor when laughingMaPePeR can shake the floor when laughingMaPePeR can shake the floor when laughingMaPePeR can shake the floor when laughing
 
Posts: 58
Karma: 63518
Join Date: Apr 2012
Device: KT
Quick and Dirty Tic Tac Toe Kindlet - Kind Let Toe

So, this is my first Kindlet.
It allows you to play the popular TicTacToe game against yourself or an human opponent.
I created this mostly for educational purposes and only tested it on the Kindle Touch and would wonder if it would work on any other Kindle without further improvements
(For unknown reasons i used JPanels+MouseListeners instead of JButtons+ActionListeners. I think the Actionlisteners would be more likely to work on the KNT)

I'm planning to go into detail about the development process, but at the moment i only have limited time and my internet will possible be gone for a few weeks in the future, so i will post this now, before i have forgotten everything i have done.

First of all i used the JDK from this site (untrusted source?!) and configured my eclipse to use this JDK (Window->Preferences->Java->Installed JREs->Add... and later in the create-project-dialog select the right JRE)

The source .zip file also contains an Applet-class, that can be used to view the Kindlet on your Home-Computer. This was great for testing.
When i was done coding, i exported the Project as a Jar-file (not runnable) out of Eclipse and manually edited the META-INF/MANIFEST.MF file to contain
Code:
Manifest-Version: 1.0
Main-Class: com.mobileread.mapeper.kindlettoe.KindLetToeKindle
Implementation-Title: Kind Let Toe
Implementation-Version: 0.1
Implementation-Vendor: MaPePeR
Extension-List: SDK
SDK-Extension-Name: com.amazon.kindle.kindlet
SDK-Specification-Version: 2.1
Toolbar-Mode: persistent
Font-Size-Mode: point
(Source)

After that i signed the jar file with an bash script: (also quick and dirty):
Code:
keystorefile=${keystorefile:-"developer.keystore"}
KEYSTORE_PASS=${KEYSTORE_PASS:-"password"}
YOUR_ALIAS=${YOUR_ALIAS:-"test"}
jarsigner -keystore ${keystorefile} -storepass $KEYSTORE_PASS $1 dk$YOUR_ALIAS
jarsigner -keystore ${keystorefile} -storepass $KEYSTORE_PASS $1 di$YOUR_ALIAS
jarsigner -keystore ${keystorefile} -storepass $KEYSTORE_PASS $1 dn$YOUR_ALIAS
i copied the keystore from the ixtab's Font Hack repository: https://bitbucket.org/ixtab/ktfontha...loper.keystore
(I also installed this keystore on my device, for more information on how to install a keystore see the Merged Developer Keystore Thread)

finally i renamed the .jar to .azw2 and copyed it to my Kindle documents Folder.

For the sake of file extensions i cannot upload the compiled azw2

Greetings
MaPePeR
Attached Thumbnails
Click image for larger version

Name:	screenshot_2012-07-23T20_41_55-0159.gif
Views:	417
Size:	9.7 KB
ID:	89617  
Attached Files
File Type: zip KindLetToe.zip (8.7 KB, 542 views)
MaPePeR is offline   Reply With Quote