Offline only app for smartphones in Javascript - javascript

Can I write a offline only application using HTML, CSS and Javascript ( + AngularJS) for mobile devices (for example with cordova), so the user won't need any internet connection to start and use the application. As far as I know cordova just creates a webview and I wonder now, how will the page be shown, when there is no hosting...
Imagine a simple calculator or todo app which works just offline.
Is this possible? Or do I have other ways except cordova...

The pages are hosted inside the app. The html,js,css files are packed inside the apk. When a user install the app it download the pages within the app. And webview access the pages locally. So you can make app both online and offline.
suppose the android project directory. Html pages are kept in the directory
yourprojectfolder\android\assets\www
And in the java file at the app start it just create the webview and call the index.html page. Now if you need any device function like notification / geolocation you can use them using plugin. Plugins are those that creates bridge between html and java files.
Also several databases are available for phonegap development. So you can store data locally. Go through the documentation for more and create & understand the structure.

Related

UWP Secured file location for Database

currently I'm working with an application using ionic framework and testing it as of now as UWP application.
May I know where should I put my sqlite database file where the other window users can't see or access it except the application that created it?
Thank you.

Multiple http pages on electron

I am using electron to convert my web app to desktop. I have two HTML pages that I would like the user to be able to access. Is there an elegant way to switch between pages via electron? Im thinking like a side panel or something similar. I have tried electron tabs and it was no good.
Electron only provides a headless chrome environment to run your app in. There should be no difference between your web app and your electron app functionality wise.

C# / JavaScript local code in hosted web apps on Windows 10

We have a fully functional website. Now we want to develop a windows 10 app and since hosted web apps seem the quickest way we want to explore that option. I have created hosted web app for our site but can I embed any local code in the app that can communicate with code website. Like can I change the user agent string to recognize request is from hosted web app? Can I access camera from local code? I was unable to find any resources on these. Or do I have to use a webview in UWP app and load website in it? Any suggestions?
Check this page first. If your url is defined within the app’s bounds(ACURs), then you can call windows runtime api which can help you acess to camera. But I didn't find any windows runtime API which can help you change your user agent.

How to load remote webpage on Android Hybrid App(the easy way)?

I have decided to learn how to create Android APK on windows for personal/learning use (Not for Android Play).
My design plan is to load a remote HTML page on android app and allow user to click a few links and then app make a post request to an API to get m3u8 of the video and play it !I already created the HTML web page and have the API access.
So could you guys point me to a beginner tutorial/example and what software and tools I need and which one is easiest to start with (to achieve my design goal)? (I installed PhoneGap but not sure if that is the only tool I need and if it is the easiest path. So I wait for your advice).
Furthermore, does installing java JDK creates any security issues for my PC? (since I heard lots of bad news about Java in past few years.)
If you are going with Phonegap, I would recommend you to first read the phonegap documentation so you can setup a basic phonegap project (phonegap). I would recommend to implement the site functionality inside phonegap instead of just loading an external site; this way you have access to more phone controls than from a web browser. But if it is really a requirement to load the external site, basically, the phone gap would load an empty page that would load your external site using the cordova inappbrowser plugin, here is the github page of this project (inappbrowser).

Is it possible to get this facebook plugin working with pure phonegap app

This might be really a basic issue. I am kind of confused. I don't understand one thing. Phonegap app is pure html5 and javascript. But for this plugin (https://github.com/davejohnson/phonegap-plugin-facebook-connect/tree/master/example/HackBook) to work we need separate java code for android and xcode for ios.
I got the java version of the android tutorial working with the simulator but when I just copy the assets folder to build a pure phonegap app. it does not work.
Then it beats the purpose if i still have to maintain 2 code lines.
Does just the html and JavaScript code in this plugin is not supported by phonegap app without java or xcode.
Here is my phone gap app. you can download it. https://build.phonegap.com/apps/211586/share
My code in the git repositiry is here
https://bitbucket.org/sunmeet/phonegab2.0_fbapi
PhoneGap Build service only Supports ChildBrowser , Barcode Scanner, Google Analytics recently.
if you try to use any external plugin which needs assets other than HTML / CSS / JS, you can't use them with PhoneGap Build Service. But, PhoneGap Team are trying to push out different plugins like Facebook Connect in Future Releases.
So, here they gave two Options to Deveopers.
Use Child Browser and Do Process Facebook OAuth Authentication.
Build Locally.
Andriod developement environment is "Eclipse" IOS
developement environment is "XCode"(OS: MacOS)
I Suggest you to work with first option and once plugin is our from build service its really easy to integrate anytime.

Categories

Resources