Skip to content

Instantly share code, notes, and snippets.

View tajchert's full-sized avatar
🏠
Working from home

Michal Tajchert tajchert

🏠
Working from home
View GitHub Profile
@tajchert
tajchert / gist:73422616624090851fa5
Last active August 16, 2019 00:01 — forked from mediavrog/gist:5625602
Due to Facebook not handling any text in share intent (ACTION_SEND), and not trying to fix it (it is a "feature"), lets remove it from share dialog - as otherwise it results in broken user experience and most likely users will blame us not the Facebook. Bug on Facebook issue tracker https://developers.facebook.com/bugs/332619626816423
// Usage:
// 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");
// invoke custom chooser that contains all apps just without Facebook
startActivity(Tools.customChooserIntentNoFb(intent, "Share using", context));
// Method:

Send uncaught Exceptions from Android Wear to Android

This is a short Gist showing how I transmit any uncaught exceptions happening in the Wearable part of my App to the connected Smartphone/Tablet. This is necessary because Android Wear devices are not directly connected to the Internet themselves.

##Wear

  • WearApp.java
  • AndroidManifest.xml
  • ErrorService.java