Android app with automatic sync - android

recently, I've started the developing of a new app, and this app is in need of constant update. I know I can do it with alarms, but I think that a better way is to add my app to android automatic sync service (the one that is added gmail app and whatsapp for example).
I've looked for that topic, but couldn't find any answer about how to interact with that service. Can anybody provide me an example of how to accomplish it?
Thank you so much,
Vyrphan

Check out the SampleSyncAdapter code under the SDK samples. It will be in a directory akin to;
C:/Program
Files/Android/android-sdk/samples/android-10/SampleSyncAdapter/

Maybe this can help you http://developer.android.com/training/cloudsync/index.html

Related

Foreground service example in Flutter

I am new to Flutter. Can anyone post the link or code for "android foreground service example with a notification"? I googled but didn't get any good example of foreground service.
I'm working on a project that includes an SMS package. This App has to be active on the foreground.
Update:
I have created my own implementation of android foreground service for Flutter called android_long_task. check it out it solved my problem. let me know if it solves your problem by raising an issue.I created my own library because the tutorial I mentioned just shows how to create a foreground service in java and that's all and as you have found out by now the other foregorund_service plugins have some problems.
Old answer (didn't help me):
if you're having a problem with this and none of the libraries mentioned in other answers worked for you. you might wanna give this tutorial from RetroPortal Studio a try. it's a total of 26 minutes which teaches you how to write a working foreground service for flutter android
I tried flutter_foreground_service but it has a big problem. When app closes this plugin throwing error. This bug is reported in here: https://github.com/pauldemarco/foreground_service/issues/1
foreground_service has problem too: https://github.com/pauldemarco/foreground_service/issues/1
Probably there isn't a good solution for now (Jan 2020). If someone develops a good solution may be I add it to here.
I think Google should find solution for this kind of problems. We're using flutter becouse we're thinking that flutter is more effective. If we lost our time kind of this absurd errors why we using flutter? Using kotlin for android, swift for ios this is more good probably.
Pauldemarco has created some excellent flutter packages for flutter. He has developed one for Foreground service too. As of now, it is only supported in android. It is not supported for iOS. I hope this helps.
https://github.com/pauldemarco/foreground_service
You can use library flutter_foreground_task for long or always running task.

Implement AndroidQuery for getting last version of my app on Google Play

I would like to check by code if the app installed on device is the last update. I've tried many things but does not work. Finally I've found this interensting API: https://code.google.com/p/android-query/wiki/Service. I'm trying to implement it but i find it kinda difficult for me (I'm quite new in this world). I would like to know if anybody can help me to do this. I don't care if I have to use another API or maybe I can use a google's API to get this information. I just wanto get the version number like: "Application.getLastUpdate" (this is just an example) and compare to app installed version. Can anybody give me a hint?? I would appreciate it too much. Sorry if I haven't explain well myself, I can try it again. Thanxs a lot.

Android Synchronize API?

On my samsung galaxy I navigate to "Settings>Wireless and network> Synchronize" and I find options to create profiles and set the sync server,but I never came across any API which would let me create a sync server or let my application specify the contents I can sync.
Is it something that provides the functionality what iCloud provides to iPhones?
Please let me know if there are any tutorials that may help.
Check out the SampleSyncAdapter code under the SDK samples. It will be in a directory akin to;
C:/Program Files/Android/android-sdk/samples/android-10/SampleSyncAdapter/
Link to original SO answer by me here

What is an Airbrake Notifier in android?

I have come accross code for AirBrakeNotifier in an app. However, Before that i should know what it does. All i have come to know is that it tracks error. I could not find a documentation on it. Can anyone please tell? Thanks
It refers to this library
https://github.com/airbrake/airbrake-android
The original owner now works on https://bugsnag.com/ which may be another tool to track errors in your android application. If you have an API Key, we should be able to find the account as we may already have errors for your app.
Ben from Airbrake.

Android app content updates

I wrote a super simple android app for a conference using phonegap and jquery mobile. At the last minute, there was a room change. At the time, I had all of the info in the html file, so I could only update it by deploying a new version of the app and hoping everyone updated. How can I make this better for next time? I know I could store the info remotely in an xml file and download it, but I don't want to needlessly use up their data if nothing has changed. What is an efficient way to do this?
Thanks
Just have a super simple service which your app contacts every now and then if there are updates available and if so then download the new infos ... I would say ;-) More elaborate would be using some push services like parse.com offers.
You could host the project on a GIT or SVN repository, and then just tell them to check out/clone your project at the beginning of each session.
That way you can confirm and be sure that they are all running what you want them to run.

Categories

Resources