Using java.awt classes in Android

Put your problem here if it does not fit any of the other categories.

Using java.awt classes in Android

Postby at_198x » Wed Jun 30, 2010 10:48 am

Hi everybody,
I want to ask a way to import java.awt.* into Android project (the class i want is BufferedImage). I'm trying to make an app which can read pdf file, but all open-source pdf libraries of Java is not supported on Android. My solution is converting pdf page to image, then using ImageView or something else to displays it, but all libraries return image as BufferedImage object. That's why i need import java.awt (and I still don't figure out how to do), then get byte array of BufferedImage and create a Bitmap object from that byte array.
If anyone know how to do, please help me!
And sorry for my English.
at_198x
Developer
Developer
 
Posts: 29
Joined: Tue Apr 27, 2010 4:48 am

Top

Re: Using java.awt classes in Android

Postby anarche » Thu Jul 01, 2010 12:15 am

You need to include the entire awt (and related code) source or binaries in your project - the only native Android support for awt is java.awt.font.
anarche
Master Developer
Master Developer
 
Posts: 369
Joined: Sun Apr 11, 2010 5:21 am

Re: Using java.awt classes in Android

Postby at_198x » Thu Jul 01, 2010 7:41 am

Thank for your answer. Can you show me how to include the awt source or binaries in my project? I still don't know how to do it ^_^
at_198x
Developer
Developer
 
Posts: 29
Joined: Tue Apr 27, 2010 4:48 am

Re: Using java.awt classes in Android

Postby anarche » Thu Jul 01, 2010 7:54 am

actually short of copying the whole damn jar and pasting it I haven't successfully managed this.

I've posted elsewhere to import into project (successfully), I know that theoretically a standard eclipse import is supposed to work. I just can't get it to do so.
anarche
Master Developer
Master Developer
 
Posts: 369
Joined: Sun Apr 11, 2010 5:21 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 16 guests