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
// Usage: | |
// blacklist | |
String[] blacklist = new String[]{"com.any.package", "net.other.package"}; | |
// your share intent | |
Intent intent = new Intent(Intent.ACTION_SEND); | |
intent.setType("text/plain"); | |
intent.putExtra(Intent.EXTRA_TEXT, "some text"); | |
intent.putExtra(android.content.Intent.EXTRA_SUBJECT, "a subject"); | |
// ... anything else you want to add | |
// invoke custom chooser |
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
# (42f63b0de7318fe1 is a device id) | |
adb -s 42f63b0de7318fe1 shell setprop log.tag.Volley VERBOSE |
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
$ git clone https://android.googlesource.com/platform/frameworks/volley | |
$ cd volley | |
$ android update project -p . | |
$ ant jar | |
// Then, copy bin/volley.jar into your libs/ folder and off you go! |
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
/*###################### | |
* Crittercism | |
* crittercism.com | |
######################*/ | |
JSONObject crittercismConfig = new JSONObject(); | |
JSONObject crittermeta = new JSONObject(); | |
try { | |
crittermeta.put("screen_name", "" + screen_name); | |
crittermeta.put("user_id", "" + user_id); |
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
package com.vuzz.snapdish.test.functional; | |
import android.os.Handler; | |
import com.android.volley.Cache; | |
import com.android.volley.Request; | |
import com.android.volley.RequestQueue; | |
import com.google.android.apps.common.testing.ui.espresso.contrib.CountingIdlingResource; | |
/** | |
* A dummy request queue which enables us to use the Volley Library properly with Espresso. |
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
// always rebuild our build config | |
tasks.whenTaskAdded { task -> | |
if (task.name ==~ /generate[\w\W]+BuildConfig/) { | |
task.dependsOn "clean" + task.name.capitalize() | |
} | |
} |
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
private byte[] junk = new byte[10*1024*1024]; |
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
// the flag Base64.NO_WRAP is essential | |
public String generateBasicAuthString() { | |
return "Basic " + Base64.encodeToString(String.format("%s:%s", Utils.deobfuscate(BuildConfig.USER), Utils.deobfuscate(BuildConfig.PW)).getBytes(), Base64.URL_SAFE | Base64.NO_WRAP); | |
} |
OlderNewer