How to create a background service in ionic 2 application? - javascript

I want to create a background service that keeps sending device's location to the server even when the application is not running.
I tried the background-geolocation and background-mode plugins,but it didn't work as i want.
Can you help me please?

I do not think ionic provides this kind of functionality.
Do enlighten me if there's a github library for that.
Your best bet would be native android , in which u may want to look at the following regarding to sticky service.
Link Here Offical Docs Or Link2 Github
PS: You might want to consider the reason of your application regards to background collection of user location data. It might be a infringement of privacy and might be a violation to privacy laws in some countries.

Related

Integrate Payment Gateway into NativeScript App

i am quite new to Mobile App Development, Payment Gateway implementation and NativeScript itself. Now i shall integrate an IPG into a Mobile App build with NativeScript to allow the user to buy goods via the Application (it is already possible to do so via the Website). I do not have any information regarding supported payment methods yet.
Whenever coding something i do have the opportunites to either write it on my own or use an existing open-source API. I've decided to try an open-source API to make it work.
My Problem is that i don't really know where to start. I have been doing some research on "how nativescript works" and Payment Gateway itself. Basically any JavaScript code is going to work with NativeScript, so any open-source API for IPG working with JavaScript should do it for my Application, right? Since i did not find any open-source API's for NativeScript itself, i started looking for any JavaScript API. Sadly, all if found was an API of telecash (https://www.telecash.de/produkte-services/e-commerce/support-fuer-entwickler/downloads-handbuecher/) (watch out, thats a german side), whose documentation seems quite fine, but it did not seem open-source.
So my Question(s):
Can anyone tell me a little bit about any experience you might have with that topic (perhaps just a link or a tip)? Maybe there is even another thing that i should start with that i have forgotten? And i think i did not understand the difference (if there is one) between Payment Gateways itself and IPG. Maybe someone can help me out on that.
I can not post code here since i am still on the "research"-phase (have been for quite a long time), but I can not see any progress within it so I am counting on your help. Feel free to correct me if I did a mistake or understood something wrong I mentioned here. :-)
Best regards.

work with OAuth2 in appcelerator

I'm trying to implement a OAuth2 appcelerator connector for Studio to connect to a wordpress (WP has installed plugins REST API, OAuth2 server). And appcelerator download this module https://github.com/JiriChara/titanium-oauth2-client, but it is a version of 2012 which certainly has flaws. Unfortunately I could not make them work together.
I want to ask the community (Since it is the first time I am developing this type of connection between an app and a website in wordpress), if they have any solution please.
Thank you very much
I think that since the oAuth protocol hasn't changed, you should still be able to use that library you linked to. I see that it hasn't been updated in a while - and maybe that's because there is nothing to update.
If you encounter specific problems using the library you can clone the source and try to fix (maybe even revive the project and push back to GIT).
Basically, oAuth is a set of HTTP calls - so you can write it on your own. But since a lot of the job was already made in that module I would try to get it working and push whatever fixes I can so others searching for the same thing can enjoy it as well.
Take a look at this repo. It is an Appcelerator Titanium widget that was written to work with Azure oAuth2 but it would only take slight modifications to make it work with other oAuth2 systems. I was successful doing this for a recent project.
https://github.com/grantges/co.grantges.azure.adal
The first is that they can update the code (include to require) . I also try to take this module, but does not work .
regards

web based screen recording

is there any way to have access to the client's system screen through the browser? i'm implementing an e-learning web application i need to implement screen-casting right through my application so i want to find a way of recording screen through the web browser exactly like Screenr service, i searched but found no suitable api, there was just a chrome extetntion and html2canvas that didn't exactly match my needs, they were able to capture browser tab! not the whole system screen. i know that Screenr is doing it through Java but i'm looking for a better and dependency free way of doing it, do you have any suggestion for me? thanks.
Ok after some search and questions, i ended up with this answer:
to implement this, the best way is to use a java applet that get the user screen, of course it needs java installed and that's a disadvantage but this is the only way for now, i hope in the future some api for this is implemented in html just like filesystem api or the api that is used to access the user camera.

Converting Grails web application to offline web application

I've been doing some research on the HTML5 local storage/offline capabilities and I'm beginning to get a better understanding of it. I've been designing a billing application with Grails and I'm just wondering if it is possible to set up a Grails application to be an offline web application, like you can with HTML5 (by utilizing a Manifest file). If so, would it be set up in the same way that you'd set it up with HTML5, or would there be any key differences to make a note of? Also, what is the best way to implement the local storage functionality of HTML5 in Grails? Is there any plugin or framwork available for this purpose . Has anyone ever used this plugin/framework before, and if so, do you know if there are any guides or examples that use it anywhere that would be really able help me get started with it?
I'd appreciate the information on making a Grails app work "offline
Thanks in advance!
I am developing an offline HTML5 app, myself. The biggest difference is that it is a single page rather than many small ones (but it might work that way if you tried it; you would need to be sure it got all the data it needs at startup).
Don't forget to add the application cache mime type to your configuration.
I never thought to look for a plugin for local storage. In my project, the local tables (I'm using WebSQL because it's in Webkit browsers) are different from the domain classes because they have a different function; that is, they have to hold the data for the domain tables untilthe device can sync with the host.
I hope there is something useful here.
Ed

App Engine and Facebook: which libraries to use?

I will be developing a web application with Google App Engine that will use Facebook Connect as the only means of registering / logging in. The web app will be written in Python. I need to know their name, profile pic, how many friends the user has, as well as their age and also possibly location, relationship status, work info, etc. (although those are mostly optional besides name, pic, age and friend count).
There seem to be a number of libraries that can do the task. There is the official Facebook Javascript SDK, minifb, and pyfacebook to name a few.
How do you think I should go about this task? Which libraries should I use, and what are the pros / cons?
Also to be considered is how well documented the code is and how widely it is used. If you can provide links to relevant example code / documentation, that would be greatly appreciated.
Facebook python-sdk has an example application to use Facebook connect with Google App Engine. I guess, you are looking for the same.
This should be a comment for the answer which suggests using the Facebook python-sdk.
Note that at github it says
This SDK is deprecated. It does not support the new cookie format that
we rolled out as part of the OAuth Migration. In short, it doesn't
work.
I've had success with the facebook-sdk project, which I believe is a fork of Facebook's original (and now dead) python-sdk project noted above. However you may also wish to check out EngineAuth.
Why don't you check out this similar question asked by another StackOverflow user:
Simple Facebook Connect in Google App Engine (Python)
There are some links provided here that sound exactly like what you're looking for.
For all specified detail you need to go with respective permission from users and then you can extract all specific information you needed.
You can go by either Graph Api or Javascript Api:
But with javascript you need to use many ajax request through your application where graph api only need access_token once for particular instance and also independent of client action.
Graph API also helps you in preventing use of other framework like pyfacebook, minifb, etc.
Apart from pros and cons you can also look some example code for both javascript and graph api
Hope this information will be useful to you.

Categories