Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void addWall(final LitterBuggAPICallback callback, float latitude, float longitude, String title) {
- Network n = new Network();
- String url = LBConstants.LB_NEW_WALL_URL;
- Hashtable params = new Hashtable();
- params.put("lat", String.valueOf(latitude));
- params.put("lon", String.valueOf(longitude));
- params.put("title", title);
- n.setAuthorization(LitterBugg.oauth.oauth_header(url, HttpProtocolConstants.HTTP_METHOD_POST, params));
- // n.doPost(url, (byte[])null, new LitterBuggCallback(callback) {
- // n.doGet(url, new LitterBuggCallback(callback) {
- n.doPost(url, params, new LitterBuggCallback(callback) {
- public void onNetworkRequestSuccessful(InputStream reply) {
- String response = parseISToString(reply);
- System.out.println("********** add wall response **********\n" + response);
- System.out.println("*******************************");
- Object[] o = new Object[0];
- cb.onRequestSuccessful(o);
- /*Object[] p = parseWalls(reply);
- System.out.println("here are the walls:");
- for(int i = 0; i < p.length; i++) {
- System.out.println("Wall = [" + ((Wall)p[i]).getTitle() + "]");
- }
- cb.onRequestSuccessful(p);*/
- }
- });
- }
Add Comment
Please, Sign In to add comment