aspose file tools*
The moose likes Java Micro Edition and the fly likes sending jar file in a  binary SMS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "sending jar file in a  binary SMS" Watch "sending jar file in a  binary SMS" New topic
Author

sending jar file in a binary SMS

Girish Vasmatkar
Ranch Hand

Joined: Apr 24, 2008
Posts: 201
Hi Ranchers,

My question : Is it possible to send jar file from a web application in a binary SMS?I am developing an application which will send a jad and jar file to the mobile phone similar to the one mobile service providers send configuration settings to the mobile phone.My application will accept mobile number from the user and then the web application will communicate to the SMSC and the SMSC will in turn send the jar file to the user's mobile phone so that user dont have to bother about the GPRS connection.
My doubt is whether it is possible or the content have to be sent using MMS which requires GPRS connection.

Thanks and Regards,
Girish Vasmatkar
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16145
    
  21

In theory, yes. But there are 2 practical problems.

1. SMS is limited to 160 characters or less. That means a really small JAR file!

2. Notice I said characters. It has to be text. So you'd need to MIME-encode it. Which is going to cut the actual allowable JAR size even more, since MIME requires multiple characters to encode a single byte.

You're better off using the HTTP data channel instead. On my network, web and SMS come as part of the same pricing structure anyway, although I'm cheap and haven't gone for the flat fee for unlimited use (not enough usage to make it pay for me). So they'd bill me by the kilobyte.


Customer surveys are for companies who didn't pay proper attention to begin with.
Rashid Mayes
Ranch Hand

Joined: Jan 11, 2006
Posts: 160
Host the jar/jad on your web server and send a SMS with a link to the app or a WAP push.


Rashid Mayes
http://www.hostj2me.com/ - http://www.worlddeveloper.org/
Girish Vasmatkar
Ranch Hand

Joined: Apr 24, 2008
Posts: 201
Host the jar/jad on your web server and send a SMS with a link to the app or a WAP push.


Thanks for the reply but what i want to do is to send the application in the message itself rather the link to the application so that user don't have to be dependent on the GPRS. My application will be represented in an XML and that XML will be converted to WBXML format. So here is the question that is it possible to convert the appliocation(jad/jar file) in to the XML form?If it is then how can i accomplish this using a program.?

Thanks and Regards,
Girish Vasmatkar
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16145
    
  21

JAR files and the Java compiled classes in them are binary data, not text data. XML isn't really suited for transmission of binary data - the only truly safe way to pack a JAR or other binary file into XML is to MIME-encode it into text. Which makes it bigger. And you'd still have to make the whole thing, XML tags and all be 160 characters or less to be able to fit it in an SMS message packet.
Arno den Hond
Greenhorn

Joined: Nov 02, 2005
Posts: 4
how about specifying the MMS:// protocol in stead of SMS:// in the connection construction method?
also, how would a MMS message need to be marked up to properly attach a binary file (such as a jar)??
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16145
    
  21

The only MMS I'm familiar with is Microsoft's multimedia server stuff, and that probably won't work on all those non-Windows Nokia phones (among others).

SMS itself has the 160-character limit wired into it - as far as I know, the telephone companies may even have routers that kick out anything longer at the hardware level.

You can embed a URL into an SMS message and thereby turn the upload responsibilities to a protocol and program that don't suffer from that limit. In fact, a number of SMS-based information services do exactly that.
bharath bs
Greenhorn

Joined: Nov 14, 2008
Posts: 3
Tim Holloway wrote:The only MMS I'm familiar with is Microsoft's multimedia server stuff, and that probably won't work on all those non-Windows Nokia phones (among others).

SMS itself has the 160-character limit wired into it - as far as I know, the telephone companies may even have routers that kick out anything longer at the hardware level.

You can embed a URL into an SMS message and thereby turn the upload responsibilities to a protocol and program that don't suffer from that limit. In fact, a number of SMS-based information services do exactly that.
Amit Ghorpade
Bartender

Joined: Jun 06, 2007
Posts: 2716
    
    6

"bharath bs "please check your private messages for an important administrative matter. You can check them by clicking the My Private Messages link above.


SCJP, SCWCD.
|Asking Good Questions|
 
 
subject: sending jar file in a binary SMS