CodenameOne to VueJS back and forth communication - javascript

We have a web app build in Vue JS and it's SPA, now we want mobile version of the app but due to time and other factors we don't want to build the mobile app from scratch so we resort to using CodenameOne BrowserComponent to load the web app and because it's CodenameOne we can submit to app stores.
The issue we're have now is that the app will have phonebook contacts access on the mobile device, CodenameOne have full access to mobile device once the user grant the permission but reading the contacts in CodenameOne and sending it to VueJs component that will display it is where our issue lie.
CodenameOne can interact with Javascript but I've not seen sample codes for VueJs.

Related

How can I link Firebase auth Android app and web app?

I have two projects a web app and an Android app and I want to link them together. I have Firebase auth set up on the Android app (user app) and I want the admin web application to link the auth account as 2 way (admin and user). Is that possible? If it is, can you explain how?
Is that possible?
For sure it's possible. This can be simply done inside the Firebase console. Once you have successfully created your project, then you'll be able to add as many apps as you need. Since you have a web and an Android app, you should go to "Project settings" and hit the blue Add app button. The first time you should create the web app and the second time, the Android app. How? Simply follow the instructions that are provided. There are only 2 steps in the case of a web app, and four in the case of an Android app.

Communication between mobile web app and phonegap app

Both applications run on same device, I would like to exchange data between the phonegap app running in background and my web app, even while offline.
Is there a way to achieve this ? I could make only a single phonegap app but I prefer to keep a web app solution for the main application.

update native google maps app from a web app

Can I have a web app running, and a native google maps app launched by the web app running on a droid, and have actions performed by the user on the web app automatically update the native map app?
Ex. User clicks link on web app. Query string values in the address feed maker points to the maps app and it launches in the native app rather than a browser if the user chooses that. Then, user goes back to web app, makes changes. When user goes to map app, changes on web app are already reflected in map app via some sort of push notification system from the web app to the native map app.
Is this at all possible to do?
if you are talking about web app runs on the same devices, you can at least use some URL scheme to open the native Maps app. But there seems to have no way for returning the information back to your web app. (well, for the sign-in app, there seems to be some connection and data sharing between the signed in devices, but not sure how it works.)
but the ultimate solution I can think of to this question is to develop your own version of the Maps app, which should be an app that use Google Maps API to do basically the same thing the google maps does, which also sync data with your backend web server.

Is it ok to build a logo quiz app with Phonegap using multiple pages?

I want to create an app that runs on iOS and Android using Phonegap.
I have the web app working properly on my desktop browser, my only concern is regarding the page where user has to guess the logo and submits his answer.
Actually, I've made separate page for each logo, so I ended up having more than 200 pages.
Will I encounter any issue with phonegap while "compiling the app", or should I use a template page, to load data dynamically based on questions ID's ?
Also, I am storing the user's answers with localStorage, will the data be saved forever when the app will be running on a mobile device ? Or should I do it differently ?

How to send real-time data to a page loaded in UIWebView from iOS app

I've built a web page that shows a map along with geo-tagged images. I would like to also show some real-time sensor data, for example noise levels.
I can put the page in a UIWebView in iOS and I can access the sensors I need from a native app (built in Xamarin if that's relevant).
I can obviously build web services on my server and send the sensory data from the native app, then use ajax to get the data to the web page. While there are good reasons to do this I would still like my app to continue working (albeit with decreased functionality) while it's not connected to the internet - I need to be able to pass the sensory data (json) from the native app to the web page without reloading the web view itself.
Q: Is there a way to continuously pass data from the native app to the page inside the UIWebView?
I have implemented the bridge for Xamarin (and WP8) here: https://github.com/sami1971/SimplyMobile/tree/master/Core/SimplyMobile.Web
Take a look at the WebHybrid class (it has partial class implementation for Android, iOS & WP8 in addition to the core partial class).
Here is a small sample application: https://github.com/sami1971/SimplyMobile/tree/master/iOS/Tests/WebClientTests
Take a look at this Xamarin Component
Allows for bidirectional communication with the UIWebView in
Monotouch.
http://components.xamarin.com/view/jsbridge

Categories