Pouria Parhami
Pouria Parhami

Reputation: 182

hybrid android cordova ionic

Hello this is my first time i use cordova and ionic for android app , my qustions is : 1-in this app i just want use html css and js for design , so i must use cordova ? 2-i have a method in js get the latitude and longitude then show some values to user, but i need this method use in background and do this work automaticly all day , i need use java code ? or i can do it with cordova and ionic ? 3- if i need use to hardware in android , is better use java or cordova plugins ? 4- where is webviw cordova use for show index.html ?

i read to many way and i confuse to how can i do , i need best practis way to make hybrid app , pls help and show me the way .

Upvotes: 0

Views: 83

Answers (1)

Nitishkumar Singh
Nitishkumar Singh

Reputation: 1839

Don't worry, we all have to begin some day. Let me first clear your few doubts about Cordova.

Cordova wraps your HTML/JavaScript app into a native container which can access the device functions of several platforms. These functions are exposed via a unified JavaScript API, allowing you to easily write one set of code to target nearly every phone or tablet on the market today and publish to their app stores.

so in short cordova helps you to access device functionality via javascript.

Ionic is a mobile css framework, which is built on top of angular js and allows support for cordova functionalities.

Now I will give answer's for your all questions:

  1. Yes, if you want to create a mobile app using html and js, you need to use cordova. Since, cordova will wrap these files in the native container of respective mobile os.
  2. You can run the task in background using cordova. There is a plugin for that which you can use Cordova Background Plugin
  3. purpose of cordova is only, to allow device hardware access via javascript
  4. You don't need to code anything to show index.html, cordova will do everything for you while building the app

Upvotes: 3

Related Questions