Find Your Forum
  
Welcome, Guest. Please login or register.
Did you miss your activation email?

News: HTC Evo 4G by Sprint
Instinct Forum, Samsung Instinct message board, Samsung Instinct By Sprint, Samsung Instinct phone, new Samsung Instinct, Samsung Instinct phone, Sprint Instinct, Samsung Instinct phone
Best Screen Protector for Samsung Instinct                 Free Sprint Phones and Cheap Plans
                Samsung Instinct Scratch Protection
Pages: [1]
Reply Print
Author Topic: Uploading .jar midlets larger than 2MB?  (Read 2874 times)
mhousser
Moderator
[I][N][S][T][I][N][C][T]
***

Cookies: 7
Hometown: Vancouver
Posts: 96



« on: August 25, 2008, 02:18:04 PM »

I'm working on an application. The .jar file is now ~2.5MB. Now that it's this big, rumkin and all its clones cease to work; I simply can't find a way to upload this file to my phone.

Does anyone know a way to upload a 2.5MB jar online? I can hardly compress the .jar any more...
Logged
mykoleary
[I][N][S][T][I][N][C]
*******

Cookies: 1
Hometown: Lancaster
Posts: 64


Email
« Reply #1 on: August 25, 2008, 03:02:14 PM »

Use better compression on the enclosed media files?  Whatcha using, 8MP raw jpgs? Wink
Logged
Egidio
Guest
« Reply #2 on: August 25, 2008, 03:04:47 PM »

Can you post the file in another location and send the URL to yourself via a text message?  When you get the text message with the link, you will be able to click on the link and download the file.
Logged
mewantbfp
Pro Member
[I][N][S][T][I][N][C][T]
******

Cookies: 7
Posts: 488



« Reply #3 on: August 25, 2008, 03:07:28 PM »

does the sprint cdma uploader not work?

http://144.230.114.35/adp3/CDMAUPLOAD/
Logged
mhousser
Moderator
[I][N][S][T][I][N][C][T]
***

Cookies: 7
Hometown: Vancouver
Posts: 96



« Reply #4 on: August 25, 2008, 03:15:41 PM »

Egidio, I've tried uploading the .jar file and then texting myself the link, but I get this in the browser:

"The Requested Page can not be displayed".

mykoleary, my jar contains 3,007 1-bit PNG files, each one being a 220 x 251px Kanji character. They're 1-bit, like I said, so.. we're talkign ~800bytes each. Maybe they're not compressed..? I'll look into it. I thought 1-bit PNG's by default had RLE compression applied. Not sure.

mewantbfp, I'm in Vancouver, hence I don't have a Sprint phone. That link you seems to want a phone number; I'll need to be using my SMS address.
Logged
mhousser
Moderator
[I][N][S][T][I][N][C][T]
***

Cookies: 7
Hometown: Vancouver
Posts: 96



« Reply #5 on: August 25, 2008, 03:24:04 PM »

I tried it with my non-sprint phone number just in case, and I get a connection error message anyway; seems like the upload size is the issue, regardless of my Canadian number.
Logged
KillerBeagle
Instinct Fanatic
******

Cookies: 234
Hometown: Wilmington
Posts: 1282



« Reply #6 on: August 25, 2008, 03:49:03 PM »

I guess if you open the jar with WinZip etc you should be able to see the actual sizes in there.

If all else fails you could upload the images to your phone's filesystem via USB and then modify the code to read them from there until you figure out how to fix the problem.
Logged
mhousser
Moderator
[I][N][S][T][I][N][C][T]
***

Cookies: 7
Hometown: Vancouver
Posts: 96



« Reply #7 on: August 25, 2008, 04:09:59 PM »

This would all be avoided if they actually supported the entire Unicode character set natively. =P

PS - I'm developing an application that is really targeted for a niche audience, most people here won't find it useful. To spill the beans a little, it's for those studying Japanese.

I'm using the 'get resources' method to access the files; no special permission required. It's a much faster/easier way than reading from the file system. The images are all included in the jar as packaged resources. I'm going to double check the compression of the 1-bit PNG's after work. Thanks for the advice..

I'll have to lower the size somehow; if it's this big of a problem for me, then it's surely a hint that mass deployment will be a pain.
Logged
mykoleary
[I][N][S][T][I][N][C]
*******

Cookies: 1
Hometown: Lancaster
Posts: 64


Email
« Reply #8 on: August 25, 2008, 05:19:23 PM »

mykoleary, my jar contains 3,007 1-bit PNG files, each one being a 220 x 251px Kanji character. They're 1-bit, like I said, so.. we're talkign ~800bytes each. Maybe they're not compressed..? I'll look into it. I thought 1-bit PNG's by default had RLE compression applied. Not sure.
Even at 800 bytes each, that's 2.294 megs for just those graphics...  Leaving about 210K for code and overhead like comments. 

Maybe try making a build script that extracts the comments out before compilation.  Also try things like a constant for the path to the resource so you can save characters when referencing it (make it a short name...)  Even a shorter directory path might make the zip smaller since it has to reference the path to the graphics.
Logged
mhousser
Moderator
[I][N][S][T][I][N][C][T]
***

Cookies: 7
Hometown: Vancouver
Posts: 96



« Reply #9 on: August 25, 2008, 05:28:44 PM »

Comments shouldn't be included in compiled bytecode, anyway. I don't think they're an issue. I'm not exporting the source code/javadocs.

I'm referencing resources, so the directory is '/'; top level. Anyway, 99% of the space is going to the images, so clearly I have to focus on that.

In WinZip, the jar shows a compression of 0% applied to the images. Since I compile using the 'compress jar' option, that means that the PNG's *are*, in fact, compressed, which is why further compression did not succeed.

Does anyone know what other image formats are supported?
Logged
mugwumpj
[I][N]
**

Cookies: 11
Hometown: outerspace
Posts: 14


« Reply #10 on: August 25, 2008, 11:51:23 PM »

you could package your code separate from the images.   then have the app download the images the first time it starts up.  then write the images to the memory card for future use.
Logged
mhousser
Moderator
[I][N][S][T][I][N][C][T]
***

Cookies: 7
Hometown: Vancouver
Posts: 96



« Reply #11 on: August 26, 2008, 12:05:42 AM »

That's true. Again, this is a pain for deployment, though. Am I to make apps that are downloaded by a reasonable number of people, asking them to do the same would be a pain. Sad

Alas, I have cut the width and height of my font 1-bit PNG's exactly in half, and wrote code which scales Image instances. (J2ME scrapped Image scaling/AffineTransformations, so scaling functions have to be implemented manually.)

This leaves my resulting jar at 1.5MB, which I can upload just fine here:

http://pcs.cruz-network.net/

Rumkin doesn't have a 2MB cap, it seems; I get a 'too large' error.

100px images stretched to 200px don't look too great, but it seems to be my best option for now...

Thanks guys for the help!
Logged
Pages: [1]
Reply Print
Jump to:  

Got a new phone? Find the forum here


Subject Started by Replies Views Last post
Larger fonts and other tricks?
Instinct Application Developer
KillerBeagle 3 6198 Last post November 17, 2008, 07:00:15 PM
by MizzSprintpcs.com
Getting applications (Midlets) on Canadian Instinct « 1 2 »
Samsung Instinct in Canada
mhousser 18 4271 Last post August 30, 2008, 12:44:22 PM
by mhousser
Can't fast forward on larger MP3's
Listen to Music
lazerus06 8 1340 Last post January 10, 2009, 06:54:11 PM
by JEANIU5
Larger pictures not displayed on the Internet????
How To....
ark729 5 544 Last post November 19, 2008, 02:05:29 PM
by - Z -
Make Fonts Larger
How To....
TSteele 1 815 Last post May 07, 2009, 02:47:28 PM
by joseamirandavelez




Galaxy S3 | Galaxy Note | Galaxy Nexus | Kindle Fire | Atrix 4G | Motorola Xoom | Windows Phone 7
Nokia Lumia | Top Hosts | Samsung Galaxy Tab | Samsung Galaxy S2 | Samsung Galaxy S | Samsung Wave
HTC Evo 3D | HTC Evo 4G | HTC Incredible | HTC Incredible 2 | HTC Incredible S | HTC Thunderbolt
Motorola Droid Razr
| HTC Desire | HTC Desire HD | HTC Desire Z | HTC Desire S | HTC Wildfire
Motorola Droid | Galaxy Indulge | Nokia N8 | Droid Charge | Droid X | Droid X2 | Droid 2| Droid 3 | Fascinate
HTC Sensation | HTC Flyer | LG Revolution | Asus Transformer | Xperia Play | iPhone 4 | Nexus S | Droid Bionic
HTC One | HTC Wildfire S | HTC Droid Eris


This is an Un-Official fan based Website. The views expressed on this website are solely those of the proprietor, or contributors to the site, and do not necessarily reflect the views or opinions of the parties it covers, and is not affiliated with, endorsed or sponsored by parties involved.
If you have a problem with any of the content posted on this website, please contact "sales@verticalscope.com"
Term of Use | Privacy Policy | BlackRain 2006 by, Crip





















CopyRight 2008 www.instinct-samsung.com
Powered by SMF 1.1.11 | SMF © 2006-2007, Simple Machines LLC