This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Response.Listener<JSONObject> responseListener = new Response.Listener<JSONObject>() { | |
@Override | |
public void onResponse(final JSONObject response) { | |
} | |
}; | |
Response.ErrorListener errorListener = new Response.ErrorListener() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void testSendMessage() throws Exception { | |
CIUser user = new CIUser(); | |
user.setDirectAddress("ADDRESS"); | |
List<CIUser> toList = new ArrayList<CIUser>(); | |
toList.add(user); | |
String subject = "SUBJECT"; | |
String messageText = "MESSAGE"; | |
Random r = new Random(); | |
int forwardId = r.nextInt(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ClicksService extends IntentService { | |
private static final String TAG = ClicksService.class.getSimpleName(); | |
final Object locker = new Object(); | |
public ClicksService(String name) { | |
super(name); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ClicksService extends IntentService { | |
private static final String TAG = ClicksService.class.getSimpleName(); | |
public ClicksService(String name) { | |
super(name); | |
} | |
public ClicksService() { | |
super("ClicksService"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static void query(QueryListener cursorListener, Context context, | |
Uri uri, String[] cols, String[] selectionArgs, | |
String selection, String sortOrder) { | |
new Thread(new QueryRunnable(cursorListener, context, | |
uri, cols, selectionArgs, | |
selection, sortOrder)).start(); | |
} | |
private static class QueryRunnable implements Runnable { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Implement a memorable ID string. | |
The original idea for this comes from Asana where it is documented on their | |
blog: | |
http://blog.asana.com/2011/09/6-sad-squid-snuggle-softly/ | |
There are other partial implementations of this and can be found here: | |
Node.js: https://github.com/linus/greg | |
Java: https://github.com/PerWiklander/IdentifierSentence |