×

Discussion Board

Results 1 to 9 of 9
  1. #1
    Registered User
    Join Date
    Mar 2009
    Location
    Gdansk, Poland
    Posts
    139

    [moved] JAR size too large for Asha devices

    Hello,

    I've got a game which works on all versions of Symbian. The game's JAR size is about 2.8MB, out of which about 800KB is the actual code and images and 2MB is taken by a precomputed table used by the AI in the game.
    The goal is to have the very same JAR work on old Symbian AND on the new Asha phones. Because of the table however the JAR is too large to work on the Ashas (2MB limit).

    The table is non-essential to the game and I can drop it (and thus drop one feature from the game: ability to play against the computer) if I want. However, I'd rather keep this feature if possible.

    The question: what are my options? Obviously on the Asha 311, 310, etc (everything <501) the hard limit is 2MB with no way around it, right? So I'd need to get my table from 2MB to less than 1.2MB, which is impossible (it is already compressed on bit level, i.e. every single bit is used ) The code is also stripped, png-optimized and all of that.

    In principle it is possible to simply do not include this table in the JAR but compute it on the device the first time user tries to play against the computer and then save it in RMS. The computation takes about 20minutes on a Nokia E7 however so this is also not a practical approach.

    The table is really composed of 5 independent datasets. I imagine I could include only 3 smaller ones in the JAR (and the JAR would be 800KB + 1.12MB = 1.92MB then) and compute the last 2 remaining datasets on the device. I haven't measured yet, but it looks like that would still take some 5-7 minutes on a Nokia E7, and probably longer on the Ashas. So still hardly a practical approach to make the user wait so long.

    Can I install a JAR and tell the Nokia Store to download the 2MB table from the network?


    In Google Play for example I can have one item in the Store which has several .apk files , each one for some group of devices. That nicely solves the problem at hand - I'd simply have a 2.8MB JAR with the table for the Symbians, and a 0.8MB version with no table and playing against the computer switched off for the Ashas. That is sadly missing from Nokia Store AFAIK...

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,697

    Re: [moved] JAR size too large for Asha devices

    I think this is where the concept of content items vs. content files applies. http://developer.nokia.com/Resources...w-content.html and http://developer.nokia.com/Resources...tent-file.html
    Either I completely misunderstand the documentation, or you can different files for different platforms.

    EDIT: For the calculation thing: you may still consider running it in the background, incrementally whenever the app is used. After some time playing against the machine becomes available. You may want to show the progress somewhere (even on the related menu button, if it is a custom screen, not the standard pop-up). If multi-player happens over some local connection, devices can transfer the table between each other.
    Last edited by wizard_hu_; 2013-07-19 at 17:12.

  3. #3
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    686

    Re: [moved] JAR size too large for Asha devices

    Wizard: there is no such option to add files to be downloaded (thats not the concept i'm afraid) content items just represent the application meta-data and the content files are the different binaries depanding on the device+country+language support of that binary.

    Utumno: if its just 1.2 MB why dont u simply put it on an http server and download that tables at first startup and save it to RMS?

  4. #4
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,697

    Re: [moved] JAR size too large for Asha devices

    Quote Originally Posted by shai.i View Post
    Wizard: there is no such option to add files to be downloaded (thats not the concept i'm afraid) content items just represent the application meta-data and the content files are the different binaries depanding on the device+country+language support of that binary.
    I did not mean supplementary files, I meant exactly what you write (and highlighted with bold). Utumno describes it as something what is possible with Google Play, and impossible with Nokia Store. However in my interpretation it is perfectly possible, and you actually say the same.
    Last edited by wizard_hu_; 2013-07-20 at 16:39.

  5. #5
    Nokia Developer Champion
    Join Date
    Mar 2013
    Posts
    686

    Re: [moved] JAR size too large for Asha devices

    I believe he meant supplementary files (which is available on google play) from what i understood in his message since even if he can target the 501 with the higher Jar file size restiction he would still want to target the rest of the devices.

  6. #6
    Regular Contributor
    Join Date
    Feb 2012
    Posts
    124

    Re: [moved] JAR size too large for Asha devices

    Is a specific part of the AI quicker to compute than the rest?
    Otherwise downloading the table to the phone when the user want's to play multiplayer would also work. The topic of downloading the rest of an app after installation was presented in a webinar, I think it was one of these webinars:
    http://youtu.be/LtSU5iygDaA
    or this one: http://forumnokia.adobeconnect.com/p4z1pnkbq5a/

  7. #7
    Registered User
    Join Date
    Mar 2009
    Location
    Gdansk, Poland
    Posts
    139

    Re: [moved] JAR size too large for Asha devices

    Wizard_hu: interesting - I checked in the shop and indeed, it looks like one CAN have one item in the Nokia Store and several .jars inside, each one with a different Distribution List. Interesting! I havent tried yet, but if it works it would indeed solve everything. I dont know how I didn't notice this option in the Store before - it's not particularly well advertised I guess.

    Incidentally I also actually tried running a 2.8 MB jar on a Asha 311 (which clearly says the jar size limit is 2 MB) and... It works, at least in Remote Device Access.

  8. #8
    Registered User
    Join Date
    Mar 2013
    Location
    Poland
    Posts
    1

    Re: [moved] JAR size too large for Asha devices

    Yep, you can have several files in one content item. Actually I also had to split every my application to three different platforms: S60, Asha S40 pre 501 (obviously there can be small changes between those two platforms), and recently Asha S40 501 - just to add square icon, and remove "Exit" button (and yes, you can fail QA when you have rounded icon, or exit button).

    Also what do you mean by "bit level compression"? Have you tried using any compression algorithms (lzc, deflate, etc.)?
    Last edited by Poklik; 2013-07-24 at 22:21.

  9. #9
    Registered User
    Join Date
    Mar 2009
    Location
    Gdansk, Poland
    Posts
    139

    Re: [moved] JAR size too large for Asha devices

    While the table is of course a result of a deterministic computation, it is - to a compressor - for all practical purposes a sequence of random bits, every single one of them used. So no, trying to compress that only increases its size.

Similar Threads

  1. Nokia Asha 501 Emulator - jar size issue
    By Giorg189 in forum Mobile Java Tools & SDKs
    Replies: 4
    Last Post: 2013-07-16, 18:13
  2. playing 3gp video on Asha devices.
    By aaaa123aa in forum Mobile Java Media (Graphics & Sounds)
    Replies: 4
    Last Post: 2013-07-15, 11:14
  3. Asha Platform devices are now available in Publishing tool
    By Kalle Nevala in forum Publishing to Nokia Store
    Replies: 4
    Last Post: 2013-06-05, 12:57
  4. Images not showing on Asha devices (and maybe others) for s40 web app
    By peoplepilot in forum Nokia Asha Web Apps
    Replies: 3
    Last Post: 2012-12-17, 07:31

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×