How to implement both flexible and immediate In-App Update - android

How Do I implement both flexible and immediate in-app update in app at once and how do i set which type of update i want the user to see.

I found a solution for this problem which I have implemented for my project, I am using an API to send me if I want to give immediate or flexible update and based on that I have used if-else to run the desired code.

It is up to the user to decide which type of UPDATE they want.
It can also be configured via the remote config variable to decide which type of update they want.
It always returns true whether update type is FLEXIBLE or IMMEDIATE
isUpdateTypeAllowed(AppUpdateType.FLEXIBLE)
isUpdateTypeAllowed(AppUpdateType.IMMEDIATE)
I have already integrated in-app update API in Many Mobile Application and It is running all perfect now. The documentation had this ambiguity.
So you should write your own logic whether you want Flexible or Immediate Update via remote config or server.

Related

Android In App Updates and Play Developer API

I am looking to begin using inAppUpdates and publish an app on the Google Play store.
I've read through the documentation, and found it to be lacking at best.
As of now, I have the app published for Internal Testing, and I can get the app to recognize that there is an update and install it. However, it seems that I need to specify that it's either a FLEXIBLE update, or an IMMIDIATE update. I did find that I can use the Play Developer API to set the updatePriority, but the documentation on that is confusing and incomplete.
As I understand it, I need to implement the API, the set the updatePriority value to something between 0 and 5. But nothing on how to actually do that.
By default the AppUpdateInfo returns 0 as the updatePriority.
Since there is no other way to set the priority, and can't seem to find anything how how to implement the API in order to set it, I'm wondering if the API is even necessary. Can I just set a variable to check with each update and do it that way?
For example:
private String UpdateType;
Then when making a update I set UpdateType = "Flex"; or UpdateType = "Immediate";
and run the IMMEDITATE or FLEXIBLE update based on that?
Or should I be using the API, and if so, where can I find some good instructions on how to actually use it?

What is most simple way to send notification of unexpected events to users of Android application?

For example I expect this kind of situation: data in my application lost relevance and so it usless until update. And until update it have to show users some predefined message.
Is here any simple and free solution to this task?
Guess I can use some server to somehow send simple messages... but it sounds way too complicated.
If this is important I use Xamarin.
Update: main difficulty here is fact - my application can't in any way define if it's outdated or not. This may happen in random moment.
Although the requirement is not very clear I assume Update here means app update.
each time user launches app make call to an api on ur server to check if user needs to update app
If that returns true take user to a static view that says app needs update and redirects user to google play to install updates
If you want to avoid using a server, you should try Firebase (https://firebase.google.com/). More specifically, you should use Firebase Remote Config (https://firebase.google.com/features/remote-config/).
Define in a key-value pair of something like minimum_app_version_required in Firebase Remote Config. Every time user opens the your app, compare the values of app version and minimum_app_version_required that you are getting from Firebase console and show a dialog box accordingly. You can also change the value of minimum_app_version_required anytime you want.
Just set some internal flag. That when that situation occurs, you can set the flag to true and just edit whatever layout element you are using such as listView or any other element with your predefined messages saved in strings.xml. You can also build any custom pop up screen, depends how you want to show them. Let me know if you didn't understand or exactly how you want?
Need to implement versioning for this problem. To achieve this, you have to maintain a version number in server, this is the version number you app will have to save and use it to validate with server. If both are not same, then app will get the latest data from the server.

Piwik tracking in an android application

I want to do data analytics for my android application using Piwik.
In Piwik's documentation, they suggest using GitHub.
I got the Piwik API and download the following file:
https://github.com/piwik/piwik-java-tracking
which I don't know how to use.
What are the steps needed to get the data analysis using the Piwik working?
What should I do next?
I also would like to implement piwik tracking in my android app.
This is what I understood so far:
Unlike for iOS/MacOS applications, there is currently no SDK to help us out.
Piwik developers have a ticket opened in their bugtracker about this, which shows they're aware of the issue and willing to improve the situation, but it will take some time before this android tracking SDK is released.
At the moment, the Piwik team encourages android and Java developers to use the piwik-java-tracking library you mentioned. This is basically just a java wrapper for the web tracking API reference, which helps you to generate Tracking Request URLs to send to your Piwik instance.
This piwik-java-tracking project lacks documentation (there is none that I know of in Github), but there is javadoc in the java files.
Basically what you need to do to track an action is to:
Create a new instance of SimplePiwikTracker
Feed it with whatever values and parameters you wish to track using the various setters available
When you're done, get the URL using one of the methods defined in the PiwikTracker interface, depending of the type of "event" you want to track
Send a request to that URL to actually track your action into you Piwik instance.
This has several drawbacks:
If you need bulk tracking, you'll have to figure out a way of doing so. The web tracking API reference states you can use use a HTTP POST request containing a JSON object to do it.
It doesn't provide any help to handle the case where user is offline. If you need to, you'll have to find a way to cache your tracking request (in an sqlite database for example) and bulk send them when the user is back online.
You'll need to handle possible exceptions raised by network error for the tracking request, to make tat tracking does not interfere with your app normal behavior.
Be sure to read this article too. It gives you an overview of what you need to do to get up & running.
This is what I understood so far. I may update this answer as I progress in implementing piwik tracking in my own app.
Good luck.
Edit: I just noticed that Piwik released "Piwik SDK Android". There are some instruction on how to get this working in the project's wiki.

Put some values on internet to access from android

In my app a user can (only) see the values uploaded by admin.
For example. A salesman is using the app will be able to see the latest rate provided by the manger to trade.
Now the question is "where to put these values?"
I have .net webservice experience with android but I guess it wont work in this scenario,will it?
Any suggestion that the returned result be in (preferably) XML format.
It sounds like you already know how to do this. You can download and parse xml within your app. If you alreayd know how to set up the websever, the rest is easy. Limiting who can see what is just a matter of associating specific transactions with an individuals account. Then just have the phone check for updates on that transaction when the app loads (using someting like AsyncTask) or if you want to get more complicated you could push notificatinos using the android cloud service, or even use a REST model. More details are needed for a more specific answer but you can do what you want.
You can do it on your own, and build a webserver with a MySQL/PHP JSON API or you can use parse.com for a smaller project.

Android sync without content provider

I use a service to check for stuff on the server, and wanted to transition that to use the standard android sync capability. However, the config file confuses me.
android:contentAuthority
android:accountType
android:supportsUploading
I don't know what these represent and don't have any meaningful values for them. It seems like I'll need a content provider to use the sync, but that's not how I implemented everything.
Any good links or info on implementing sync with your own code?
You can implement anything you want for your sync needs. Android sync adapter provides a framework for sync'ing which includes states, callbacks, settings, scheduled events, etc. You can use what you need and leave the rest for other apps. There are helper functions that makes it easy to use consistently with the syncing that you find in Accounts & Sync Settings.
The android:contentAuthority is the unique identifier used during the broadcast that your sync adapter would respond to. It is like "com.mycompany.myproject. ...". The flag android:supportsUploading is required for permission to send data out of your application. I believe it is coordinated with some android:uses-permission setting.
I don't think you are required to have a CP, but quite often you would and if you do, it can be really thin to be the authority.

Categories

Resources