Skip to content

Instantly share code, notes, and snippets.

View qpqg's full-sized avatar
:accessibility:
Working from home

techwizardry qpqg

:accessibility:
Working from home
View GitHub Profile
@matheusjardimb
matheusjardimb / facebook_share_intent
Created December 18, 2014 11:26
Facebook Share Intent
public static void shareURL(Context context, String url) {
try {
Intent intent1 = new Intent();
intent1.setClassName("com.facebook.katana", "com.facebook.composer.shareintent.ImplicitShareIntentHandler");
intent1.setAction("android.intent.action.SEND");
intent1.setType("text/plain");
intent1.putExtra("android.intent.extra.TEXT", url);
context.startActivity(intent1);
} catch (Throwable e) {
// If native FB app is not installed, try share through SEND (browser or 3rd party apps)
@deltheil
deltheil / msgpack.sh
Created October 4, 2012 20:58
Android NDK advanced example: build msgpack w/ the Standalone Toolchain
export NDK=/tmp/android-ndk-r8b
# 1. Use the tools from the Standalone Toolchain
export PATH=/tmp/my-android-toolchain/bin:$PATH
export SYSROOT=/tmp/my-android-toolchain/sysroot
export CC="arm-linux-androideabi-gcc --sysroot $SYSROOT"
export CXX="arm-linux-androideabi-g++ --sysroot $SYSROOT"
export CXXSTL=$NDK/sources/cxx-stl/gnu-libstdc++/4.6
# 2. Clone the Github repo and run the bootstrap actions