问题
My simple version of the question is ,how do i build .apk file on the server side ,assuming my server is in PHP language.Long version
Step 1: I am taking data from HTML form
Step 2: I am generating the RSS feed for it using PHP classes
Step 3: I will modify the java file in the server side to update the URL of the RSS feed i have generated in step 2
Step 4: Now i have all the files to build the Android app on the server side ,except that i have no info on how to build it actually .
ps: I have googled it ,I have not found any particular solution regarding Native Android apps ,Phone gap seems to have one solution ,but i am not interested in Phone gap.
回答1:
You will need to manage your Android project using the Ant and command line tools. Lars Vogel's article is quite useful: Creating Android applications via the command line and Apache Ant
Official Android resources:
- Managing Projects from the Command Line
- Building and Running from the Command Line
Also have a look at this SO question How to compile APK from command line?
If all that changes in your application is the RSS URL, wouldn't you be better of by creating a RSS redirect feed on the server side and leave a static URL inside the Android application?
That way you will not need to keep recompiling and redeploying the app in the first place, just modify the RSS feed on the server side. You can maintain a session object and redirect different users to different locations, as you see fit.
How to Properly Redirect Your RSS Feed
来源:https://stackoverflow.com/questions/25180386/how-to-build-apk-file-on-server-side