I am using firebase to send Json thru my CN1 app. This is my code and it's working fine, but I want to send the stuff to Dropbox instead and I just can't make it work. (I already got my token, key and secret from their site)
Could you please tell me what I need to change in order to be able to upload my stuff into Dropbox?
@Override
protected void onPrincipal_ButtonJsonAction(Component c, ActionEvent event) {
final String data = Result.fromContent(hashtableWithInfo).toString();
String firebase = "https://fire-game-258.firebaseio.com/example.json";
ConnectionRequest request = new ConnectionRequest() {
@Override
protected void buildRequestBody(OutputStream os) throws IOException {
os.write(data.getBytes("UTF-8"));
}
};
request.setUrl(firebase);
request.setPost(true);
request.setHttpMethod("POST");
request.setContentType("application/json");
NetworkManager.getInstance().addToQueueAndWait(request);
}
Many many many thanks.