java mobile application sms,sim,mms and barcode application presented by ayedh(sim and mms) asad(sms...
TRANSCRIPT
![Page 1: Java Mobile Application sms,sim,mms and barcode application Presented by Ayedh(SIM and MMS) Asad(SMS and Barcode Application)](https://reader035.vdocument.in/reader035/viewer/2022062421/56649e4f5503460f94b46d6b/html5/thumbnails/1.jpg)
Java Mobile Application
sms,sim,mms and barcode application
Presented byAyedh(SIM
and MMS)Asad(SMS and
Barcode Application)
![Page 2: Java Mobile Application sms,sim,mms and barcode application Presented by Ayedh(SIM and MMS) Asad(SMS and Barcode Application)](https://reader035.vdocument.in/reader035/viewer/2022062421/56649e4f5503460f94b46d6b/html5/thumbnails/2.jpg)
Introduction All network accesses in MIDP devices work
through Generic Connection Framework. According to MIDP 2.0 specification devices
must support HTTP and HTTPS connections. It promises any mobile application to be done
more securely connected to the Internet.
![Page 3: Java Mobile Application sms,sim,mms and barcode application Presented by Ayedh(SIM and MMS) Asad(SMS and Barcode Application)](https://reader035.vdocument.in/reader035/viewer/2022062421/56649e4f5503460f94b46d6b/html5/thumbnails/3.jpg)
Different components of connections There is a one class connector and 7
connection Interfaces
http://www.j2medev.com/api/midp/javax/microedition/io/package-tree.html
![Page 4: Java Mobile Application sms,sim,mms and barcode application Presented by Ayedh(SIM and MMS) Asad(SMS and Barcode Application)](https://reader035.vdocument.in/reader035/viewer/2022062421/56649e4f5503460f94b46d6b/html5/thumbnails/4.jpg)
GSM Cell broadcast overview
![Page 5: Java Mobile Application sms,sim,mms and barcode application Presented by Ayedh(SIM and MMS) Asad(SMS and Barcode Application)](https://reader035.vdocument.in/reader035/viewer/2022062421/56649e4f5503460f94b46d6b/html5/thumbnails/5.jpg)
Making a connection Pass a connection string(URLs with a
protocol,network address and optional parameter) to one of the Connector’s open method.
Connection is not useful by itself,so you must cast the return value..
HttpConnection hc=(HttpConnection)Connector.open(url);
It hands you back some connection implementation.
You can use that to get input and output stream.
![Page 6: Java Mobile Application sms,sim,mms and barcode application Presented by Ayedh(SIM and MMS) Asad(SMS and Barcode Application)](https://reader035.vdocument.in/reader035/viewer/2022062421/56649e4f5503460f94b46d6b/html5/thumbnails/6.jpg)
Clean upprivate void loadBytes(String url) throws IOException{HttpConnection hc =(HttpConnection)Connector.open(url);
try{
InputStream in=hc.openInputStream();try{
//read data from in.}
finally{in.close();}
}
finally{hc.close()}
}
![Page 7: Java Mobile Application sms,sim,mms and barcode application Presented by Ayedh(SIM and MMS) Asad(SMS and Barcode Application)](https://reader035.vdocument.in/reader035/viewer/2022062421/56649e4f5503460f94b46d6b/html5/thumbnails/7.jpg)
SMS SMS and MMS are most popular facilities since
the advent of 2G mobile telephony Wireless Messaging API is a bridge
between the MIDlets and the text and Multi Media Messaging
Java ME supports short text ,binary and multipart message on the wireless messaging API
Jsr205 is the wireless messaging API 2.0 which adds support for multi media message service and replaces the early API jsr120.
![Page 8: Java Mobile Application sms,sim,mms and barcode application Presented by Ayedh(SIM and MMS) Asad(SMS and Barcode Application)](https://reader035.vdocument.in/reader035/viewer/2022062421/56649e4f5503460f94b46d6b/html5/thumbnails/8.jpg)
Why messaging SMS and SMS are travelled through store-
and-forward network, which means messages are not lost even if the destination is not available.
They don’t involve a server. you can easily communicate between applications running on different devices with no server side programming.
![Page 9: Java Mobile Application sms,sim,mms and barcode application Presented by Ayedh(SIM and MMS) Asad(SMS and Barcode Application)](https://reader035.vdocument.in/reader035/viewer/2022062421/56649e4f5503460f94b46d6b/html5/thumbnails/9.jpg)
Commercial values Value of SMS per year around the world? $100 bn How big is that? Take all of hollywood
movie box office revenues worldwide. Add all of the global music industry revenues. And add all of videogaming revenues around the world. Even all those three together, we don't reach 100 billion.
SMS reaches 3bn people - 2x more than TV, 3x more than internet
![Page 10: Java Mobile Application sms,sim,mms and barcode application Presented by Ayedh(SIM and MMS) Asad(SMS and Barcode Application)](https://reader035.vdocument.in/reader035/viewer/2022062421/56649e4f5503460f94b46d6b/html5/thumbnails/10.jpg)
Steps for sending a message
public void sendText(String address,String text){String cs=“sms://”+address+”:50000”;MessageConnection
mc=(MessageConnection)Connector.open(cs);TextMessage
tm=(TextMessage)mc.newMessage(MessageConnection.TEXT_MESSAGE);
tm.setPayloadText(text);mc.send(tm);}
contd……
![Page 11: Java Mobile Application sms,sim,mms and barcode application Presented by Ayedh(SIM and MMS) Asad(SMS and Barcode Application)](https://reader035.vdocument.in/reader035/viewer/2022062421/56649e4f5503460f94b46d6b/html5/thumbnails/11.jpg)
Steps…… Obtain MessageConnection from
Connector Get a new message from
MessageConnection calling newMessage(); Fill up the message.Here in the example
setPayloadText() is specific to a Textmessage.
Send the message by passing it to the MessageConnection’s send() method.
![Page 12: Java Mobile Application sms,sim,mms and barcode application Presented by Ayedh(SIM and MMS) Asad(SMS and Barcode Application)](https://reader035.vdocument.in/reader035/viewer/2022062421/56649e4f5503460f94b46d6b/html5/thumbnails/12.jpg)
Receiving a messageMessageConnection c;C=(MessageConnection)Connector.open(“sms://
50000”);Message msg=c.receive();If(msg instanceof TextMessage)msg{//handle message}
![Page 13: Java Mobile Application sms,sim,mms and barcode application Presented by Ayedh(SIM and MMS) Asad(SMS and Barcode Application)](https://reader035.vdocument.in/reader035/viewer/2022062421/56649e4f5503460f94b46d6b/html5/thumbnails/13.jpg)
Two ways to receive message Create a thread that loops on calling
MessageConnection’s receive() method. Secondly by using MessageListener.You
supply the listener and register with the MessageConnection.Whenever the message arrives ,listener’s notifyIncomingMessage() is called.Then you call the receive() method knowing that a message is waiting.MessageConnection gives you a message.
![Page 14: Java Mobile Application sms,sim,mms and barcode application Presented by Ayedh(SIM and MMS) Asad(SMS and Barcode Application)](https://reader035.vdocument.in/reader035/viewer/2022062421/56649e4f5503460f94b46d6b/html5/thumbnails/14.jpg)
Barcode ApplicationIt is an emerging technology.
User can scan the bar code and almost immediately user will get the product details.
![Page 15: Java Mobile Application sms,sim,mms and barcode application Presented by Ayedh(SIM and MMS) Asad(SMS and Barcode Application)](https://reader035.vdocument.in/reader035/viewer/2022062421/56649e4f5503460f94b46d6b/html5/thumbnails/15.jpg)
Usefulness During shopping user can compare the
price by scanning barcode of the product through internet.
User can down load the ring tone , picture, music in music store.
User can bid on e-bay
![Page 16: Java Mobile Application sms,sim,mms and barcode application Presented by Ayedh(SIM and MMS) Asad(SMS and Barcode Application)](https://reader035.vdocument.in/reader035/viewer/2022062421/56649e4f5503460f94b46d6b/html5/thumbnails/16.jpg)
Steps to get barcode application on phone Get the free software from the internet. Download the software to a cell phone
with camera. It is ready to use . Take a picture of any barcode with the
camera and you can get the product details.
![Page 17: Java Mobile Application sms,sim,mms and barcode application Presented by Ayedh(SIM and MMS) Asad(SMS and Barcode Application)](https://reader035.vdocument.in/reader035/viewer/2022062421/56649e4f5503460f94b46d6b/html5/thumbnails/17.jpg)
MMS Next generation of SMS. JSR205,WMA 2.0 ,adds support for MMS
with the MultipartMessage class. It keeps track of multiple addresses,a
message subject and some number of MessageParts,which are essentially file with associated content type.
Exact size limit on MMS depends on the phone and the carrier. Max is 100KB
![Page 18: Java Mobile Application sms,sim,mms and barcode application Presented by Ayedh(SIM and MMS) Asad(SMS and Barcode Application)](https://reader035.vdocument.in/reader035/viewer/2022062421/56649e4f5503460f94b46d6b/html5/thumbnails/18.jpg)
Example: Send MMSPublic void sendMultipart(Stringaddress,String
subject,MessagePart[] parts){String cs=mms://+address+”applicationIdentifier”
MessageConnection mc=(MessageConnection)Connector.open(cs);
MultipartMessage mm=(MultipartMessage)mc.newMessage(MessageConnection.MULTIPART_MESSAGE);
mm.setSubject(subject);for(int i=0;i<parts.length();i++)mm.addMessagePart(parts[i]);mc.send();
}
![Page 19: Java Mobile Application sms,sim,mms and barcode application Presented by Ayedh(SIM and MMS) Asad(SMS and Barcode Application)](https://reader035.vdocument.in/reader035/viewer/2022062421/56649e4f5503460f94b46d6b/html5/thumbnails/19.jpg)
MMS in brief It looks same, get a MessageConnection,get
message,populate it and send it. Connection string starts with mms and it includes
application identifier (more reliable). Application identifier=an inverted domain
name+an application name and the size of AI can be a maximum of 32 char.
U can use addAddress() in MultipartMessage to add more address.
Each multipart message has a content type,a content ID,an optional location and an optional encoding scheme.ContentID should be unique for each part of multipart message.
![Page 20: Java Mobile Application sms,sim,mms and barcode application Presented by Ayedh(SIM and MMS) Asad(SMS and Barcode Application)](https://reader035.vdocument.in/reader035/viewer/2022062421/56649e4f5503460f94b46d6b/html5/thumbnails/20.jpg)
SIM Card Application
![Page 21: Java Mobile Application sms,sim,mms and barcode application Presented by Ayedh(SIM and MMS) Asad(SMS and Barcode Application)](https://reader035.vdocument.in/reader035/viewer/2022062421/56649e4f5503460f94b46d6b/html5/thumbnails/21.jpg)
SIM Card (Subscriber Identity module) What is SIM card? SIM Card Specification. SIM Operating System. Nice thing with SIM Card application Examples.
![Page 22: Java Mobile Application sms,sim,mms and barcode application Presented by Ayedh(SIM and MMS) Asad(SMS and Barcode Application)](https://reader035.vdocument.in/reader035/viewer/2022062421/56649e4f5503460f94b46d6b/html5/thumbnails/22.jpg)
SIM Card Part of smart card ICC for mobile phones 2-types of SIM Cards:
1- credit card size 2- phone card
SIM OS: JAVA Card Native OS
![Page 23: Java Mobile Application sms,sim,mms and barcode application Presented by Ayedh(SIM and MMS) Asad(SMS and Barcode Application)](https://reader035.vdocument.in/reader035/viewer/2022062421/56649e4f5503460f94b46d6b/html5/thumbnails/23.jpg)
Data Stored in SIM Card Subscriber identity. SMSC (Centre). SPN: Service Provider Name
![Page 24: Java Mobile Application sms,sim,mms and barcode application Presented by Ayedh(SIM and MMS) Asad(SMS and Barcode Application)](https://reader035.vdocument.in/reader035/viewer/2022062421/56649e4f5503460f94b46d6b/html5/thumbnails/24.jpg)
Nice thing with SIM application For Operator: deploy the application to all
subscriber easily For Application provider: SIM card is a standard environment
regardless of brand, age or features
![Page 25: Java Mobile Application sms,sim,mms and barcode application Presented by Ayedh(SIM and MMS) Asad(SMS and Barcode Application)](https://reader035.vdocument.in/reader035/viewer/2022062421/56649e4f5503460f94b46d6b/html5/thumbnails/25.jpg)
Example Call management application: enable you to send an automatic
message or call back people who tried to reach you while you are unavailable.