[Frog frog recommendation] mobile phone address book Implementation

Source: Internet
Author: User
Tags urlencode vcard
Yanben Program Server can also be written using Asp.net, or. NET Article Let's talk about all the ideas. It has little to do with technology. I will share my thoughts with you on the homepage.
[Goal]
I learned how to create a mobile phone address book over the weekend. It is just a demonstration. It is not as powerful as a worry-free address book or a spider address book, but the core functions are all implemented. sometimes we accidentally lost our cell phone and changed a new mobile phone. We had to lose the old contacts, if we upload the address book on our phone to the server before dropping the phone number, we can download the contact list directly with the new phone number. There is also a new fetion service, but there is no friend in it. If you can import all contacts on your mobile phone to fetion, it would be nice. Unfortunately, fetion does not have this function now.
Well, I am here to solve your two problems.
[Idea]
Most mobile phones have a kjava environment, while jsr75 defines APIs for accessing local resources (pictures, calendars, events, address books, etc. stored on mobile phones, most mobile phones also support this standard, even Nokia 400 or 500 yuan support, but mobile phone manufacturers do not achieve the same. Besides, several network access APIs, such as HTTP, socket, serial port, and infrared, are supported. Okay. Here on the client, the runtime environment (kjava), Pim API (jsr75), and communication API (httpconnection) are all available. As for the server, you only need to provide the HTTP service. Asp.net, Servlet, PHP, and ASP can all be used. We will use ASP. As long as the client reads the address book through the pim api and converts it to a formatted string (serialized) and uses httpconnection post to send the address book to the server, the server receives the request and converts the parsing string to the name and phone number list (deserialized) then, store the data in the database. This is just to upload the address book, which is easy to download. The client sends a GET request to the server. The server serializes the address book in the database and returns it to the client. The client parses the network stream and converts it to the contact list, save it to your phone using the pim api.
The idea is like this, but let's take a look at some details. Code For example, for Chinese characters, some mobile phones do not have the permission to open or store the address book by default. The j2s do not have the split and urlencode functions. The replace function can only replace characters and cannot replace strings, use the progress bar to enhance the experience of the mobile client when uploading and downloading the address book.
It is worth mentioning that some mobile phones directly support SyncML and can directly synchronize the address book and calendar with the sync4j server. I used this program on some low-end mobile phones. In fact, jsr75 also supports vCard format import. However, the format is too large, and network transmission is too high to consume GPRS traffic. I manually designed the Protocol to minimize the traffic, use commas (,) and press enter as separators. There are no vCard fields or labels.
If a low-end mobile phone does not support Java or jsr75, you can use the serial port to connect the mobile phone and send the AT command to the mobile phone to export the address book. It seems that all GSM modules support at commands. I'm not sure.
[Source code and video tutorials]
Video tutorial Link (in EXE format, recorded in S-demo, no virus)

Http://ishare.iask.sina.com.cn/cgi-bin/fileid.cgi? Fileid = 1, 2188548

Source code (including all j2's code and ASP code on the server and Access database)

Http://ishare.iask.sina.com.cn/cgi-bin/fileid.cgi? Fileid = 1, 2188545

With the server source code, you can build your own address book synchronization server. With the client source code, you can use AWT Meihua's interface to add a pop-up screen and write the copyright, I have no opinion on how to perfect a product and try to win more than worry-free and spider, but I should declare that the urlencode class in the Code is written by a leader of the j2medev website, as well as split, replace and the function for converting Chinese characters are all found online, and the copyright is still owned by them. No matter who they copy.
[Reference link]
Jsr75 Doc

Http://www.j2medev.com/Soft/ebook/200507/59.html

Nokia PIM API

Http://wiki.forum.nokia.com/index.php/FileConnection_&_PIM_API

Http://www.forum.nokia.com/info/sw.nokia.com/id/8837fbf6-b655-4990-be73-d6cffd5f8b29/Introduction_To_The_PIM_API_v1_1.zip.html

Questions about reading mobile phone address book using AT commands (Serial programming)
Http://community.csdn.net/Expert/TopicView3.asp? Id = 5720756
[Other links]
A summary of all-round basic explanations for the development of j2s

Http://blog.csdn.net/HuDon/archive/2007/06/11/1647959.aspx

How can I read the local contact data of a mobile phone using j2_m2?

Http://www.matrix.org.cn/thread.shtml? Topicid = 40259 & forumid = 4

Devices supporting the PDA optional packages

Http://www.j2mepolish.org/devices/devices-pdaapi.html

Implementation class of urlencoder on the j2-based Platform

Http://www.sf.org.cn/j2me/network/20111.html

Question about Chinese j2's Chinese Encoding

Http://wiki.forum.nokia.com/index.php/%E4%B8%AD%E6%96%87_J2ME%E4%B8%AD%E6%96%87%E7%BC%96%E7%A0%81%E9%97% AE %E9%A2%98

J2's progress bar and threading model

Http://www.52rd.com/S_Txt/2005_12/TXT3014.htm

A question about TCP communication !!!

Http://topic.csdn.net/t/20061215/11/5232692.html

Comprehensive Analysis of MIDP communication API and external system interaction

Http://developer.e800.com.cn/articles/2007/11/1167664871895394054_1.html

Use ant to package

Http://pandonix.javaeye.com/blog/110985

Package Antenna and j2s

Http://www.javaeye.com/post/364587

JSR 75 permission issues

Http://www.j2medev.com/bbs/dispbbs.asp? Boardid = 17 & id = 6202 & page = 39

Introduction to PIM

Http://www.9dong.cn/InfoView/Article_243797.html

Using the pim api for Java me, Part 3-security considerations

Http://developers.sun.com/mobility/apis/pim/pim3/

Basic knowledge of J2EE

Http://www.51cto.com/art/200601/18978.htm

Set and obtain the MIDlet attribute in the MIDP Program

Http://www.cnjm.net/tech/article1303.html

Section]
It seems that some applications on the mobile phone are still somewhat touchat, and it is also a user interface. I think Java is just like this. net strong, internal enterprise applications (Bureau Network web applications ). net is faster and better than Java, Windows applications. net is also better than AWT, swing user experience is good, Internet applications as long. NET architecture is ready, and the number of users supported is no less than that of Java. If the architecture is better, it means adding machines will not be able to meet the user request volume, network devices and storage devices have long been bottlenecks, regardless of Java or. net is not a solution. On mobile phones,. NET is not widely used. It is generally relatively advanced to support. NET mobile phones, and I can't afford it. So it is good to occasionally use it for mobile phone applications.
Next can be done is the Yahoo (http://local.yahoo.cn/) Local Search (that is to search the local food and shelter, Yellow Pages information, merchant discount information such as the search) an interface for the access to, in this way, you can check what you want to eat and where you want to play. You don't need to turn on your computer. (It seems that Sina's AIQ and Baidu's local services have WAP versions, but his business is yours ). Mobile phone search also has a promising future for local search. Unfortunately, there is no CP (content provider) partner, so I crawled the Yahoo local search page and used it as the CP, of course, it doesn't matter if you look at which local search is good.
Then I made a bus route query. For example, I got lost and found out where I got lost and where I made a few cars. In fact, if I had a computer, I just went to sogou and checked it. I could go out and play it, who is always on the computer? Let's create a kjava program and pass the request parameters to the server. The server will help you post the request to sogou, after parsing the returned data of sogou, I can return the information to the mobile phone?
Well, you can't get lost when you go out. You also know which food is cheap and delicious, and there may be some messy problems in your life. It seems that little I Robots know a lot about it, what are stock queries, weather forecasts, Dictionary translation, storage of notebook information, and any other chats? Please try to hack its Protocol or find an interface on the website, you can send a message to it, accept the information, and then provide an interface for kjava to let the user talk to xiaoi on the phone. In this way, there is a mobile phone, basically everything is done.
The above ideas are all evil ideas, but they adapt to other people's websites and allow their own kjava clients to use them. However, it is not technical and easy to use, so it is worth doing.
The rest is the mobile RSS and Mobile Phone mailbox. In fact, these two services are different from the above services. The above services are stateless. Just forward the request and it will be OK, you need to save the RSS subscription address of each user on the server, and you have to receive new information from the local database, when returning the content to kjava, you have to consider that if the RSS content is large, you need to transmit it to kjava by page. If there is an image, you have to adapt it to the desired size on your mobile phone. The Mobile Phone mailbox must have an SMTP server on the server to help the user receive the mail locally and send it to another SMTP server. Although these two services are practical, they are troublesome, so we will not do it. We can use ucweb for free, and we will do it ourselves when he is charged. It is the final principle to make money with simple technologies. The right idea is the right one. In fact, the technology that can make money is not necessarily very responsible and very advanced.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.