I am trying to develop an app for GPS tracking in cordova for android users which also includes android 2.3, they might have very less internal memory. So I want to reduce my app size as much as possible.
The only external resource I am using is google maps API. Yet, my app data is over 3 Mb. I searched in google but, I couldn't find. Can anyone give some guidance to reduce my app data. I would like to know where can I find the detail description of what does this app data contains of.
The problem is, whatever Cordova receives is cached into app_webview/Cache and dunno why, but there isn't something which controls this well.
This plugin should help you clear the data: https://github.com/Sharinglabs/cordova-plugin-cache. It is compatible with Cordova 3.3.1 and above. It works with my Cordova 4.2.0 app.
Related
I'm writing a simple android app detection using Ionic (fairly new too as well with mobile apps dev using Ionic). Using this plugin App Availaibility I was able to get a list of installed apps, however is there a way or plugin or is it possible to know what was the recent app that was used in the foreground? Like if a com.android.appname was run, it may be able to detect it? Thanks.
No there is not, I'd assume that there won't be a plugin for this either. In order for the device to know what app has ran in the past, it must hold this data somewhere. I doubt google or apple does anything like this.
or
you can always try and build a plugin yourself and see if its possible.
I am familiar with web tech (html5) and want to build an app to track location in background in every 5 mins. so, the required features include auto start, GPS location, run in background in every 5 mins.
I want to know if i do it with an pure web tech. if not, which html based framework can do it well, such as RN, WEEX, Angular?
thanks very much!
I did some research these days and have my answer here. I preferred the solution with Ionicframework with Cordova and its plugins.
if I did a correct search, I can get the answer quickly. This https://github.com/mauron85/cordova-plugin-background-geolocation provided a solution for me.
why choose Ionic?
Ionic provided a framework to build an app for devices, desktop, and web. It is not a perfect solution but can help me deliver my app to all platform easily. I am not sure if Ionic is OK to build a high-quality app because it depends on some immature library or tools. But it can reduce lots of work to build a prototype with limited resource. What you need just an HTML5 developer.
I do not choose RN because RN only supports Device. cannot be deployed to desktop and published as web app.
I'm a relative PHP newbie (10 months) and Javascript absolute novice, so please go easy on me.
I've just started playing with Cordova and have a couple of small apps for use internally within our small business that I could really do with, but testing my code is causing me grief. I've been using Intel XDK with the built in simulator, but it can't simulate SQLite or the FileTransfer plugin.
At the moment, the only way I can see of doing this in XDK would be to compile the app and transfer it to my Samsung mobile for testing, but this seems very cumbersome and will lead to everything taking much longer. I've just found Apache Ripple, but didn't want to spend a day looking into it to find there's a better tool.
Is anybody able to point me at a tutorial page that gives the easiest method for testing a Cordova app with plugin support, please? I tend to work from about 4 different computers, so something web-based that means I can pull the latest version of my code from Google Drive and start working with no setup hassle would be excellent, if it exists.
Cheers
Andy
The Ripple Emulator has similar coverage as the Cordova Simulator. Unlike Ripple, the Simulator can be extended to support specific plugins, but it will require writing simulation code to make that happen. See the cordova-simulate project for details on how to do that.
Otherwise, the next best option (and the most accurate) is to build the app and use remote Chrome DevTools to debug the app (see this XDK doc page for some help with setting that up). It is not necessary to rebuild your app to make this work. If you structure your code so that you can redefine key functions using the JavaScript console, you can actually debug quite a bit without performing a rebuild and reinstall.
Use the interactive JavaScript console to redefine functions within your app and then run those redefined functions directly from the console or restart your app, in situ, using the window.location.reload() function. An example of using this technique can be seen in this video, starting at about 18:30. The video is demonstrating the use of the weinre debugger, but the debugging technique can also be applied to remote CDT when debugging a built app.
I am using Ionic and Cordova to build a mobile app which will go on the iOS and Android stores. I have done this many times, and I really hate the process of having to update the app (specifically with Apple).
Would it be safe to dynamically load all of my templates and controllers from my server when the app loads, potentially caching them or having a server call to check if there is a new version? Basically, I would have all images and styles saved locally to the phone, but load the templates and controller code on app load.
And, if it was ok to do programmatically, are there any rules against this in Apple or Android's terms of use?
This is possible and there are tools like Cordova Hot Code Push to help you accomplish it. As long as you don't use this to break other app store review rules or significantly change the purpose of your app it's fine with Apple.
OK I have done a lot of research over the last few days, reading a lot of posts on here. I have build an app that using the accelerometer and geo-location.
Now thanks in part to many different posts on here and other sites I have got most of my app working without any problems.
I now have to get it working as a background app. I am building this for iOS and android, but the main aim is iOS. I know that iOS7 changed a few things but also add support for BackgroundFetch, how do I use that within a app that I will be building with build.phonegap.com?
Now I have found this plugin, de.appplant.cordova.plugin.background-mode but when I added it to the config.xml file, phonegap build says its unsupported?
I know there is a list of areas, What's solution to make task background in iOS same service in Android? , where you can list in your 'plist file' for iOS and state what type of application it is and iOS will run it in the background because its using one of these features.
Now I have read somewhere - not to sure where - that the config.xml is built, when phonegap build runs into the plist file, so somewhere in that file I should be able to state that it is application using this and that, therefore run in the background?
So is there any many of making my app run in the background?
Any help would be most welcome
Thanks
Glenn.
The resources you have found are referring to building apps locally on your machine, not with phonegap build. You will not be able to achieve the functionality you are looking for with PGBuild as they don't allow that level of configuration.
To achieve this you will need to setup a local cordova/phonegap client and build your app from your computer.