Back to project page android-udoo-rover.
The source code is released under:
Copyright (c) 2014, Emanuele Palazzetti and contributors All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the followin...
If you think the Android project android-udoo-rover listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package me.palazzetti.adkrover.utils; //from w w w . j a va2 s .com import android.util.Base64; import org.json.JSONException; import org.json.JSONObject; /** * Some class helpers */ public class Helpers { public static boolean isInteger(String s) { try { Integer.parseInt(s); } catch(NumberFormatException e) { return false; } return true; } public static JSONObject createMockTweet(String text) throws JSONException{ return new JSONObject().put("id", "240859602684612608").put("text", text); } public static String oAuth2TwitterEncoding(String consumerKey, String consumerSecret) { String combinedKey = consumerKey + ":" + consumerSecret; return Base64.encodeToString(combinedKey.getBytes(), Base64.NO_WRAP); } }