So in my app i need to send my location's coordinates every 5 minutes through web service, I need to send it when app is in background state also. I am using background-geolocation plugin. Anyone please help me to do that. Thanks in advance
The other way running prcocess in background is by using android core if you know that.
I was also facing the problem of running process in background. I have installed the background plugin too. But it did not work. Then i wrote a customized code in android.
Steps i followed.
1.) Stored the data in cordova prefrences.
2.) Fetch the data from prefrences in android core file( a java file).
3.) Written service in android that check the prefrences after every 2 minutes.
I know this is quiet tuff but this was the only solution i got in hybrid app.
Related
First of all I'm new as React-Native programmer. Currently I want to add a button to my React-Native(Expo) app, in which the user can turn off or on a setting. Is this possible and if so, how can I do that? For example in Android > Settings > Mobile Networks > Turn off mobile roaming?
Thank you in advance
I have tried to use HeadlessJS or a module called background actions. But there are no well documented examples and I also don't know if those modules answer my question. Because my task is more "straightforward" since I keep the app running in the foreground.
I use AngularJS and Cordova build app android.
I want have a button with action restart app.
How to restart this app?
Whatever you exactly want, you can have a look at this post which gives you a very simple answer:
location.reload();
As stated in the comments, it does not properly restart your application (meaning completely stop and then start it again) but it should do the trick most of the time.
I have a hybrid application built using a WKWebView. I have gotten around the loading local files issue, but I am having trouble loading an AngularJS application from local files. I am getting the following error:
Cross origin requests are only supported fro HTTP.
With Android I was able to update setting on the WebView control to allow this from file:// schemes. Is there anything similar that I am missing in iOS? Or another solution?
I am using XCode 6.3 (6D570)
This is a known issue with WKWebView in iOS 8, and I suspect that's why UIWebView remains undeprecated.
I haven't had time to use the betas yet, but my only suggestion is to give the latest Xcode 7/iOS 9 a shot, and use the new WKWebView API
- (WKNavigation * _Nullable)loadFileURL:(NSURL * _Nonnull)URL allowingReadAccessToURL:(NSURL * _Nonnull)readAccessURL
which would ideally let you pull in other HTML files as templates in the readAccessURL that you provide.
Please file any bugs you see in the latest beta. Apple is way too slow to move on the issues in WKWebView.
If you just need the Angular app to work now, then you'll need to switch to UIWebView, which is confirmed to work with angular-based webapps stored on the device.
Some apps got tutorial when the first time open.It seems cool.
I'm trying to create an opening tutorial that consists of four panes for my AngularJs app.
I build my app with css3 and html5 ,use cordova to generate apk.
How to create tutorial for my app when the first time open it?
Is there any solution?
Thanks a lot!
Sorry maybe I didn't make myself clear.The app is almost done,and splash screen has done.
But I need few pages or images on the first time run.
Use database. For example if you use localStorage, inside the deviceready function
check=localStorage.getItem('first_time');
if(check.length<0)
{
startTutorial();
localStorage.setItem('first_time','NO it is old');
}
After the first run value will be changed and tutorial will be shown once.
You can use other databases like indexedDB or webSQL.
Currently I am developing an app in corona sdk. It is still very early in the development stage so I can change the IDE or SDK if needed to achieve my goal.
I wish to create an app that can be played on multiple platforms(mainly ios and android) and I eventually want the users to be able to use the browser to continue playing at home with their progress saved. It is a simple app and could probably be recreated in html. They will have to login their accounts in order to play
How do i go about to achieve this? Should I complete my app in corona first, and then recreate the app in html and php and link the database to it separately or is there a specific development kit I could use that has this ability. Also, I am new to the development scene, how do I detect if the user is logged in a particular platform as I realize if they are logged in, in multiple places and give multiple entries it may cause problems.
If you are new to the development scene then you should continue developing with Corona.
Corona doesn't povide any web port but I know Unity does.
I think first you should complete your game for mobile platforms and if it will have success you can port it to web.
You can read this:
http://www.graphic-buffet.com/2012/06/indie-game-development-where-start/
You might want to try phonegap (http://phonegap.com/). I have never used it, I just know that it exists, so do some research to see if it would be a good fit. This might allow you to create the app once for both browsers and mobile.