No, I donβt know a free open source CMS oriented to mobile applications, however for standard web pages there are some free CMS listed.
Use one of these web-based CMS to edit content through a browser and save it to the database. Create a web service on your side to extract the desired content for your Android application. Additional information in this post .
To change this content when updating the application, you must first save the version of the application to SharedPreferences when you start the application, and then check the current version of the application each time it starts. To get the application version, you can use the following code:
PackageManager manager = context.getPackageManager(); PackageInfo info = manager.getPackageInfo(context.getPackageName(), 0); string version = info.versionName;
If the version number has changed, call your web service to pull the new content into your application. If you want to do this only when connecting WiFi, you can perform a check using the ConnectivityManager :
ConnectivityManager connManager = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE); NetworkInfo wifi = connManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI); if (wifi.isConnected()) { // Retrieve data from web server }
Do not forget the appropriate permission:
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
ashatte
source share