Precautions for porting the j2-based project to the Android platform

Source: Internet
Author: User
Tags xml parser

How do many j2s projects be transplanted to the Android platform? Although Java is known as a cross-platform application, the current porting problem is still very serious. I don't know what problems will occur when Sun launches JavaFx or F3 in the future. How can I port it from the j2-based platform to the Android platform? The following is a simple analysis of the Android mobile phone network.

1. the virtual machines on the graphic display j2_platform are very different for Sun Midlet and Android Dalvik in terms of display, which brings great difficulties to the game. Many of the genie classes used in the past do not exist in Android, at the same time, there are a lot of new things in Android, there will be a lot of difference in display.

2. data is stored in systems such as RMS in j2ms, which can easily store some data, but Android does not. However, a more powerful SQLite can be added to execute the SQL language, however, it is relatively lightweight and does not support stored procedures. I believe that many companies have their own data definition formats, such as more common XML, and there is a DOM XML parser in Android.

3. the file network does not change much in Android, just like in the case of j2's. Users can directly call the I/O interface in j2's to complete the corresponding work, which is satisfactory, what will happen in the future? It is hard to say at present, because Android has added a new network transmission class. It can be seen that it is under development, and the latest M5 SDK is not perfect yet.

4. media Audio and Video. Android is much more powerful than j2's, and supports many decoders. It is compatible with MPEG4, AAC, and H. 264, MP3, AMR, PNG, JPG, and GIF are based on the OpenCORE engine. This shows that open-source things are fully utilized.

5. the SDK simulator is not as easy to read as the JME In the SDK documentation. It is well written by Microsoft MSDN, and each parameter is easy to read. Meanwhile, Google's documentation is incompatible with IE7 display, instead of using CHM files, HTML is also used for Linux and Mac OS considerations. On the simulator, j2_m's are Sun's WTK or mobile phone companies, while Android uses the open-source Linux simulator Qemu, which is quite reassuring.

6. in terms of browsers, Android uses webkit kernels similar to iPhone Safari. As for efficiency, it can be said that JS scripts are much more efficient than IE and Firefox, but the memory usage is very serious, currently, Opera Mini is the main competitor in Mobile Industry. This mechanism does not work. After all, the JVM cannot be compared with the system.

There are still many things at the end, but we have noticed that both Android and Symbian have made a downward compatibility problem, such as Android porting, the SDK upgrade from m3 to m5 needs to be greatly improved. The Win32 API on Windows Mobile platform can be said to be truly cross-desktop and Mobile platforms.

Related Article

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.