Remote update of license agreement

Leighton21 21 Reputation points
2022-07-02T01:25:05.267+00:00

Hi All,

I am intending on placing a license agreement against my Xamarin application. The application connects to a server side app to update information etc. The user must accept the agreement before they can use otherwise the application will close. After accepting the user can review the agreement from a menu item. Acceptance of the agreement is linked back to a central user store in the cloud where the agreement flagged as accepted against a particular version. The EULA can be updated periodically so a new version is inserted and the user flagged as not having agreed to the latest license. When the connect to our server side via API I have the app check for the update. Is there a way apart from using a Webview to embed a EULA which can be updated via a feed when a new version of the EULA is created? I don't want the user to have to update the application itself just send a new version of the EULA. The app also goes offline for weeks at a time so the Webview isn't a very clean solution if they need to review it. Any suggestions would be great.

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
5,377 questions
0 comments No comments
{count} votes

Accepted answer
  1. Leon Lu (Shanghai Wicresoft Co,.Ltd.) 79,546 Reputation points Microsoft Vendor
    2022-07-04T06:22:21.437+00:00

    Hello,​

    You can create a webAPI that contains EULA version and EULA's content. Then use HttpClient to get Json data from the webAPI in App.xaml.cs.
    Note: You can save EULA version and EULA's content to Xamarin.Essentials: Preferences

       if (APIVersionCode> Preferences.Get("SavedVersionCode", "default_value"))  
       	{  
                   Preferences.Set("SavedVersionCode", APIVersionCode);  
                   Preferences.Set("EULA", APIEULAContent);  
       			MainPage = new EULAPage();  
       	}  
       	else  
       	{  
                   MainPage = new MainContentPage();  
               }  
    

    You can use Label to show EULA content that comes from Preferences.

    If users do not agree with EULA, please execute System.Diagnostics.Process.GetCurrentProcess().Kill(); to terminate your Xamarin application.

    Best Regards,

    Leon Lu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


1 additional answer

Sort by: Most helpful
  1. Leighton21 21 Reputation points
    2022-07-05T23:02:02.82+00:00

    Thanks Leon

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.