Can I force EULA to be installed during the installation of an Android application?

When I downloaded the Android application to the Google Playstore, I did not see any option to specify the EULA text. I am wondering if it is possible to enforce the EULA so that the user can agree to it before the installation happens.

If this is not possible, I will need to programmatically force the user to agree to the first use.

+6
source share
1 answer

I had to deal with this recently. I could never understand how to integrate our licensing agreement with the Google Play Store, so I decided to solve the problem of using EULA when I first used it. I had an additional limitation in that I had to re-show the license agreement with each application update.

This was a basic overview of my approach:

  • Use SharedPreferences to save the current version of the EULA license that has been accepted.
  • Compare the current version of the application at startup with the one in SharedPreferences
  • If they do not match, display the DialogFragment user dialog with the web view so that I display EULA (since mine was an html file). I configured DialogFragment as modal. that is, have an Accept button and not deviate if they touch out.
  • Update the current version of the application in the previously announced variants of SharedPreferences.
+1
source

All Articles