View Single Post
Old 09-14-2013, 11:29 AM   #2
ixtab
(offline)
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,907
Karma: 6736094
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by phatmanace View Post
Hi Folks,

would anyone have a code example lying around to show a png on a kindle?

I guess you can just use the java Graphics context like you would with any other java application -but it would be nice to see an example if anyone has one.
Yes, but only a rather cryptic one. Start with the handleSpecialEntry() method here, and try to understand how it works. This is the code that implements the easter egg hidden in Collections Manager. (That's also why it's somewhat cryptic - it is not meant to be very easily understandable at a first glance). What it does is this: when CM is told to hide itself, it will refuse to do so. Instead, it will display a png for 15 seconds, then return to its normal display. Donwload CM and try it out to see it in action.

But in one sentence: yes, displaying a png works pretty much exactly like in any other Swing application. You use the standard classes for handling Images and for loading and painting them.

Quote:
secondly - is there a recommended way to auto start an application on a kindle?
There's no autostart folder or anything like that. There's an event handler here which may, or may not, be useful.

PS: Please update your profile and correct your device list.
ixtab is offline   Reply With Quote