Development and release of Firefox OS applications

Source: Internet
Author: User

Firefox OS itself and all of its above applications use HTML5 technical standards. For developers familiar with HTML, JS, and CSS technologies, the process of developing a Firefox OS application is very simple. The difference is that Firefox OS has some characteristics suitable for mobile devices, such as dialing, sending and receiving text messages, 3G and Wi-Fi network connections. Fortunately, these functions can be called very easily, just like calling common JS components, you can control JS objects. Mozilla is also communicating with W3C standards development organizations to add these features developed by itself to HTML5 technical standards.

The following describes two methods for publishing the Firefox OS application:

1. Before GAIA compilation, move your test app to the apps folder under the GAIA directory and execute the make command.

In this method, your test application can be flushed into the B2G device or run in the computer desktop simulator.

2. Publish your application to the network server for online installation. But the trouble is that you need to submit your application to the mozilla Application market and install it after the application is approved, or write your own APP installation page, and then install it through this page.

Next we will use a very simple DEMO to illustrate how to develop the Firefox OS application.

1. Create a folder named appdemo as the project root directory TIPS: the folder name must be a lowercase letter)

2. In the appdemodirectory, create index.html and COPY the following content:

 
 
  1. <!DOCTYPE html> 
  2.    
  3.    
  4.    
  5. <meta charset="utf-8" /> 
  6.    
  7.    
  8. <body> 
  9.    
  10. Welcome to visit:Mozfans.com  
  11.    
  12. </body> 
  13.    

3. Create a manifest. webapp file under the appdemo directory and COPY the following content:

 
 
  1. {  
  2.    
  3. "name": "Firefox OS App Tester",  
  4.    
  5. "launch_path": "/index.html",  
  6.    
  7. "developer": {  
  8.    
  9. "name": "chy",  
  10.    
  11. "url": "http://www.mozifans.com"  
  12.    
  13. },  
  14.    
  15. "appcache_path": "/cache.manifest",  
  16.    
  17. "fullscreen": "true",  
  18.    
  19. "icons": {  
  20.    
  21. "120": "/source/appdemo.png"  
  22.    
  23. },  
  24.    
  25. "permissions": [  
  26.    
  27. ]  
  28.    

Bytes

5. Release. Here I use the first method mentioned above to put the entire appdemo folder under the apps directory of the gaia folder. Recompile your GAIA source code and run the desktop simulator. On the simulator page, you will see your published application.

Source code download: http://chyblog-chyblog.stor.sinaapp.com/wp-content/uploads/2012/09/testapp.zip

Effect:

Running result:

 

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.