
- #Simple android app to show webpage how to#
- #Simple android app to show webpage apk#
- #Simple android app to show webpage install#
- #Simple android app to show webpage code#
Add the platform and get Cordova to build the apk file with the following two commands:
Now let’s export the app as a native Android APK so we can see it working on that platform. You can inspect, debug and profile it using the App Manager - read Using the App Manager for more details. Press the button then and you will see the app running in a Firefox OS simulator. Note: If you are running Firefox Aurora or Nightly, you can do these tasks using our new WebIDE tool, which has a similar but slightly different workflow to the App Manager. Press the button and navigate to the prepared firefoxos app directory, which should be available in school-plan/platforms/firefoxos/www.
Open the App Manager in the Firefox browser. The last step is needed every time you want to check the changes. To test the app quickly and easily, add the firefoxos platform as a cordova target and prepare the application by entering the following two commands:. Change the styling contained within We’ve chosen to use “zebra striping” for ease of reading. This can be structured however you want, but we’d recommend using HTML s for holding each separate plan: Copy the school plan HTML you saved earlier into separate elements. This will create a school-plan directory containing some files. On your command line, go to the directory in which you want to create your app project, and enter the following command:Ĭordova create school-plan SchoolPlan Start by setting up a plain Cordova project. #Simple android app to show webpage code#
See the stage 1 code on Github if you want to see what the code should look like at the end of this section. In this part of the tutorial we will set up the basic project, and display the school plans in plain HTML. Stage 1: Setting up the basic HTML project Save your markup in a safe place for now. Now you should find some sample HTML to use in the project - copy your own children’s online school plans for this purpose, or use our sample if you don’t have any but still want to follow along.
#Simple android app to show webpage install#
You can install Brick for your current project usingīut don’t do this right now - you need to put this inside your project, not just anywhere. To install Brick we will need to use the Bower package manager. It’s a set of ready-to-use web components that allow you to build up and use common UI components very quickly. Mozilla Brick is a tool built for app developers.
If you haven’t updated Firefox for a while, you should install the latest version to make sure you have all the tools you need. Note: On Linux or OS X, you may need to have root access.
Next, install Cordova globally using the npm package manager:. First install NodeJS: Cordova is a NodeJS package. You can build up your app using web technologies and then get Cordova to automatically port the app over to the different native platforms. We’ve decided to use Apache Cordova for this project as it’s currently the best free tool for delivering HTML apps to many different platforms. You could also read up on Mozilla Brick components to find out what they do.īefore building up the sample app, you need to prepare your environment. The Cordova documentation would also be a good thing to read, although we’ll explain the bits you need to know below. #Simple android app to show webpage how to#
Please also read the instructions on how to load any stage in this tutorial. You should understand the basics of HTML, CSS and JavaScript before getting started. Instead I would like to create an app that could be used by everyone in our family, regardless of the device they choose to use. Unfortunately this would not load offline, and currently would not work on iOS. Certainly I could copy the HTML to JSFiddle and load the plan as a Firefox app. I’ve got two kids and I’m always forgetting their school plan, as are they. The story behind the app, written by Piotr It will use Apache Cordova and Mozilla’s Brick web components. You will build a sample School Plan app, which will provide a dynamic “app-like” experience across many different platforms and work offline. This article is a simple tutorial designed to teach you some fundamental skills for creating cross platform web applications.