Forums Register Login

Its about uniqueIDs again! Problems with downloading modified jar files

+Pie Number of slices to send: Send
Ok I created a game. When a user goes to the wap site to download the game I have created a servlet that generates a uniqueID and then creates a java file with the uniqueID in it..
public final class GameProperties {
public final static long userID = 23423526;
public final static int gameID = 1;

public long getUserID(){ return userID;
}
}

I then compile this java file on the server and then add it to the games jar file. This works!
The problem is when I have created the jar file I use an outputstream to send the file to the phone. It works on most of the phones I use to test on, Nokia 6230, Nokia 3510i, Sony Ericsson K700i, Motorolo V80 and Motorola V500. But on the Sony Ericsson T630i I get the error "You client is not allowed to access the requested object" and on the Sharp GX-30 I get "unsupported content type"
So instead I tried to store the modified jar file on the server and use the jad file to send a request to the servlet to modify the jar file. This doesn't work on any phone. Would it be because the file size in the jad file is different from the actual size of the jar file?

I think this is the only possible way of giving a user a unique ID from the server. If anyone has any other way that will stop me having to modify the jar file (I've already tried modifying the jad file and its no good cos some phones don't download them) it would be a great help
+Pie Number of slices to send: Send
The size of the Jar mentioned in the Jad MUST be the size of the actual jar on the server for OTA to work.

As for the unique ID .. this is a real issue ... but depends on your implementation.. i am lucky in a way that i can ask the downloading user for his/her ID in the WML page before showing them the Jad to download the MIDlet.

Is it possible for you to do it this way ? I really am not sure
- User accesses WAP page.
- Selects link to download Jad
- Now in the earlier step when the user click on Download Jad.. that request is sent to the server. The server creates a new jar file ... gets its size .. writes the new size into the jad ... and then shoots back another WML ( or xHTML) page to the phone having a link "GET IT NOW"
- When the user clicks on GET IT NOW .. they download the new Jad and Jar..

I know this is not the best way .. but it can work .. i.e. if you are willing to add another step from the users perspective ( going to the GET IT NOW page) to the download process..


QUESTION >> Dont all the devices have to download the Jad file during OTA... I am under the impression that this part of the OTA specification.. Can anyone please clear my doubt.


Regards
+Pie Number of slices to send: Send
I'm looking into modifying the jad file after creating a new jar file. Seems like the only way about it.
From what I've seen, the Sony Ericsson phones do not download the jad files. I discovered this by trying to put the userID in a user defined key in the jad file is have the midlet retrieve the userID from the jad. It was not possible to do this with Sony Ericsson. Why they have decided to do this is beyond me! Also, can't understand why Motorola phones are so crap, don't they compare them to other phones?! Not just talking about their Java capabilites but eveything else is so slow. It would be nice if every phone manufacter would just copy Nokia!!
+Pie Number of slices to send: Send
hmmmm....

something just occurred to me .. Do the SE phones send the install-notify and more important delete-notify messages ???

did u ever try this out ???

Regards
+Pie Number of slices to send: Send
Yeah they do send install notify. I think they read from the jad file and gets the file info for the download and then downloads the jar but not the jad.
+Pie Number of slices to send: Send
SE phones read from the MANIFEST file. I was able to modify the jars for SE before download. Since it reads from MANIFEST, no size problem since no such information there.
+Pie Number of slices to send: Send
Good one. Bit late now cos I've got all that sorted. But I'll know in future. Still having problems with downloading images. Can't get a response from the server. Think it might be a provider thing cos it works on some phones.
We noticed he had no friends. So we gave him this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1314 times.
Similar Threads
OTA deployment issues
How do you uniquely identify a user of a midlet on a server?
Its about uniqueIDs again! This is starting to get to me.
JSR 75 for Sony Ericcson
necessity of JAD in OTA ???
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 04:14:27.