I want to store an URL in parse database and pass on to a webview in android. So I have to just store an URL and extract it and do webview.load(url)
But how do I store and retrieve URLs to and from Parse?
Well you can do it using String
String urlToStore="www.someurl.com";
ParseObject parseObject= new ParseObject("ClassName");
parseObject.put("url", urlToStore);
parseObject.saveInBackground();
Retrieving
ParseQuery<ParseObject> query = ParseQuery.getQuery("ClassName");
query.findInBackground(new FindCallback<ParseObject>() {
public void done(ParseObject object, ParseException e) {
if (e == null) {
String url_received= object.getString("url");
} else {
// something went wrong
}
}
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.