Is there a way for Android to preprocess an html page (like PHP) using templates or whatever and then output the right HTML?
Example of what I mean.
Let's say I have a variable in android that holds a URL of an address or a file for JavaScript. I want to output the right script tags from Android preprocessing the file.
So in the Android activity there could be
String loc = "http://example.com/file.js"
and when I pass the loc using a webview JavascriptInterface thingy I want src from above to equal loc.
<script type="text/javascript" src="loc variable here"></script> //but how?
Also, dynamically add or remove scripts as needed. So, this sounds like a job for templates (like how Ruby On Rails ERB files work). But can Android do this? If so, how do you do it?
Thanks.