How can I embed TouchDB in a phonegap html5 app? - html

Basically I want the sync feature of CouchDB while developing with HTML5 and package the app with phonegapp.
I see that couchbase mobile has a few drawbacks(large code size, long startup time) and TouchDB seems promising. However, I can't find an obvious way to integrate TouchDB with Phonegapp. Is this possible? Or what's the right way to do it? Thanks in advance.

I Think that the best way to use TouchDB on phone gap app's is to develop a phonegap-plugin that allow you to access touchDB from your JavaScript/HTML PhoneGap-app,
this means that you should develop a phonegap-plugin for Android that call TouchAndroid and another one for IOS that call TouchIOS, ...etc.
hope this help,

Related

ionic: using the framework with only HTML5

I'm thinking of using ionic for my project but in the beginning I'd like to only have a webapp without going to an app. Like what framework7 allows. But the information I gathered seems to indicate that this is not possible or fully supported by ionic.
Could someone share some experience to say if it's possible and how hard it is?
For ionic2 it is possible:
add codova platform browser
upload files under platforms/browser/www
point it in browser
done
Note: Plugins that depends on device will not work in browser (for instance camera etc..), the rest will work fine, so keep your app usable even without device plugins
It is possible to port your Ionic app as a mobile website.
Its basically an angular app with added benefits of Ionic ecosystem. This ecosystem includes nifty set of directives of mobile first ui components, js library for interactions (pull to refresh / slide etc) and other such things that compliments your app to make it look and feel like using a native app.
It really shines at accessing native components of your device (camera, location, battery info etc) using js apis (cordova.js). But it isn't of any use when you are building a mobile website with ionic. So, you could write platform specific code to support both web and native in conjunction. You could make the most of cordova.js when you start building your native apps. Else, leave it plain vanilla for your mobile site.
I have ported my ionic app as a web app to serve my audience on mobile browsers (also plan to roll out native apps soon) and I have not faced any major challenges so far. It truly has mobile first experience.
If making a single page desktop website is your sole objective, you should probably go for standard angular bootstrap web apps. Ionic isn't meant for it.

Is there any way to read a pdf using AS3? (Air)

I want to be able to read at least some of the info a pdf has, this is in mobile, using an installed app built with Air.
Are there any libraries or methods to do this?.
Thanks.
Easiest way to do it is through StageWebView if you are running iOS. On Android, I haven't really found a good way to do it. There are no good libraries for it. Almost every PDF-related AS3 library is focused on writing PDFs, not displaying them. I've found a few in the past that can display them, but the end result is terrible and slow.

ibeacon with HTML5 webpage

I am new guy to get know the IBeacon technology, as I understand taht IBecaon can invoke APP, I am thinking is it possible that we just use mobile phone webpage browser(HTML5), not to use the pre-installed APP.
In this way, can IBeacon send out the proximity signal as it always does and therefore to update the contents in the mobile phone webpage according to different IBeacon ID.
Is it difficult to implement this webpage and the back-end web service.
No, this is not possible. Unfortunately there are no standard HTML5 bindings to detect iBeacons. Building custom bindings would require you to build your own web browser.
See this answer for more info.

I need to set up a mobile app, based on an existing website

first off sorry for asking this question if it's something that has been covered already.
What I'm looking to do is build a mobile app that will run on multiple platforms that is based on an existing website. This will need to be a small app that is meant to keep people updated on upcoming events, and schedules and help make donations easier for a non profit sports team.
I have no idea where to start... I've seen things that directed me to the jquerymobile site, phonegap, phonegap build, and I gotta be honest I'm a bit lost.
This is what I need from the app:
- It won't carry every page from our site, just a few key pages... home page, calendar, schedule, donations, etc.
- I want the info in the app to update if/when the website is updated.
- Again, it will need to be used on multiple platforms (ios, WP8, android, blackberry)
I know I basically need a site "wrapper", which is fine. But I have no idea how to make one. Phonegap build is asking for "web assets", but I don't know how to get those. Also, they say I will need an Mac OS system to create an ios app? That's not an option here.
Will I need to create a mobile (HTML5) site before I can create the app?
Any help will be GREATLY appreciated.
Thanks
I think you have 2 options that will help you with phonegap.
The first one, very easy, is just to use phonegap to make an application that open your website in the application. It's called in phonegap the inappbrowser. With this, you just have to modify the website and everything will work on every phone. But you will have to adjust a little bit your website for the mobile.
The second one, is to create a similar website in html5, css and javascript in a www folder that will be the same for every platform. But this will take more time.
You will need a macos to deploy a ios app
If you still have question, don't hesitate

HTML5 code reuse Phonegap

Hello Fellow developers,
I am embarking on a new journey to develop HTML5/JS web site and looking a ways to reuse the same code for Mobile App (Would like to use it using PhoneGap or Appcelerator). The requirement is to develop once which can be used on desktop, and smartphones, but project sponser wants more secure way to handle data on smartdevices and hence we would like to choose this approach. Now my questions is
Can we reuse and architect the solution this way to reuse HTML5/jQuery code on Mobile within Appcelerator or Phonegap?
If yes, what percentage of rework will be required to support on mobile devices?
If no, what could be alternatives?
thanks all for your guidance.
(1).
If your current desktop website interact with server-side in webservice way,everything will be done very easy. Even you can directly modify the *.java in src\com\ like this:
super.loadUrl("http://balabalabala.com");
With phonegap wrap, your app can be access right now.
If not, you will need spend time in implementing the server-side interfaces for client-side.
(2).
You need to refactor your static html page with some javascript framework for mobile(such as jquery mobile,sencha touch).
Using them to make your phonegap app more simalar with native app.
That takes time too.
The 2 things above are what you need rework.
I hope you are planning to build a mobile website. If so, its very easy to convert it to a PhoneGap app with may be only 5% changes provided your website uses only HTML5,JS and CSS. Its not possible to run a a website written in serverside languages such as PHP, ASP.NET, ruby etc. Some important items to keep in mind:
start development of website and app together. test with mobile browser and phonegap so that you can fix issues as and when they arise.
use a mobile HTML5 based framework like Kendo UI Mobile/ jQuery Mobile etc for developement
so that you dont spend time fixing all the mobile related UI stuff.
Wherever you are using PhoneGap features, check whether you are running on PhoneGap or else fall back to the browser feature.