Skip to content

Instantly share code, notes, and snippets.

View adipascu's full-sized avatar
👾
TW1oaHBoISBNTUhIUEghISE=

Adrian Pascu adipascu

👾
TW1oaHBoISBNTUhIUEghISE=
View GitHub Profile
import android.util.Log;
import com.crashlytics.android.Crashlytics;
import com.crashlytics.android.core.CrashlyticsCore;
import timber.log.Timber;
/**
* Taken from https://gist.github.com/adi1133/2e76e69f8541c2d83473
*/
public class CrashlyticsTree extends Timber.Tree {
@adipascu
adipascu / gist:c888a5f16a95d9e0e9a9
Created November 23, 2014 05:26
Android intents
Intent intent = new Intent();
intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);
startActivityForResult(Intent.createChooser(intent, "Select Picture"), 0);
Intent pickContactIntent = new Intent(Intent.ACTION_PICK, Uri.parse("content://contacts"));
pickContactIntent.setType(ContactsContract.CommonDataKinds.Phone.CONTENT_TYPE); // Show user only contacts w/ phone numbers
startActivityForResult(pickContactIntent, 0);