1 / 25

Java Mobile Application sms,sim,mms and barcode application

Java Mobile Application sms,sim,mms and barcode application. Presented by Ayedh(SIM and MMS) Asad(SMS and Barcode Application). Introduction. All network accesses in MIDP devices work through Generic Connection Framework.

Télécharger la présentation

Java Mobile Application sms,sim,mms and barcode application

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Java Mobile Applicationsms,sim,mms and barcode application Presented by Ayedh(SIM and MMS) Asad(SMS and Barcode Application)

  2. 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.

  3. 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

  4. GSM Cell broadcast overview

  5. 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.

  6. Clean up private 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()} }

  7. 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.

  8. 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.

  9. 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

  10. 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……

  11. 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.

  12. Receiving a message MessageConnection c; C=(MessageConnection)Connector.open(“sms://50000”); Message msg=c.receive(); If(msg instanceof TextMessage)msg { //handle message }

  13. 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.

  14. Barcode Application It is an emerging technology. User can scan the bar code and almost immediately user will get the product details.

  15. 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

  16. 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.

  17. 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

  18. Example: Send MMS Public 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(); }

  19. 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.

  20. SIM Card Application

  21. SIM Card (Subscriber Identity module) • What is SIM card? SIM Card Specification. • SIM Operating System. • Nice thing with SIM Card application • Examples.

  22. 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

  23. Data Stored in SIM Card • Subscriber identity. • SMSC (Centre). • SPN: Service Provider Name

  24. 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

  25. Example • Call management application:  enable you to send an automatic message or call back people who tried to reach you while you are unavailable.

More Related