I need to create a server which initially checks an Android applications trial period, so
In a way it's like an Android time bomb.
I'm completely new to servers and really just want a basic, secure, server that simply registers a phone and compares it against a trial limit.
Anyone have any information on how I could do this? Any code examples or tutorials are very much appreciated.
TCP/IP Direct Connection Here, the mobile application directly connects to the server database to get responses. To ensure confidentiality, you can use SSH or another encryption type. In this case, a mobile application uses TCP/IP sockets (or UDP if necessary) connected to the server.
Building an Android Web Server, SummarizedIf the website is relatively basic, you can use your Android device as a host and save money on powering an expensive server. Similarly, you can retake the space used by a server or a computer running as a web server. Perhaps you can use the server for a different purpose.
You will need a server if you want to serve your application content to the users. It doesn't matter if your app is on IOS, Android, or Amazon Echo, you will need some sort of server space. Most of the apps developed today are Cloud Applications that need one or more external servers for the app functionality.
You didn't specify your server technology, but in principal you need to do the following:
You would then return a simple JSON response containing the information whether the app has expired or not. The simplest form would be: { "hasExpired" : true/false }
You would call this WebService in Android using HttpClient as you would probably know already. Check this HTTP Client Tutorial
You could make the server more robust by storing the phone identifier and your GET URL change to http://yoursite/getTrial/[phoneID]. The only additional complexity is you have to look up the begin trial date by phoneID and then compare it again using the step #4
Let me know if you need more clarification and I will add it to the post
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With