Skip to content

Instantly share code, notes, and snippets.

@tuanva
tuanva / PhonecallReceiver.java
Created May 10, 2017 10:22 — forked from ftvs/PhonecallReceiver.java
Detecting an incoming call coming to an Android device. Remember to set the appropriate permissions in AndroidManifest.xml as suggested in the Stackoverflow link. Usage example in comments. Source: http://stackoverflow.com/a/15564021/264619 Explanation: http://gabesechansoftware.com/is-the-phone-ringing/#more-8
package com.gabesechan.android.reusable.receivers;
import java.util.Date;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.telephony.TelephonyManager;
public abstract class PhonecallReceiver extends BroadcastReceiver {

Keybase proof

I hereby claim:

  • I am tuanva on github.
  • I am tuanva (https://keybase.io/tuanva) on keybase.
  • I have a public key ASBlGzKORG-5uboILK1JHo8rOqqJCh6PrM9AYcZyoN_cHQo

To claim this, I am signing this object:

@tuanva
tuanva / springer-free-maths-books.md
Created December 29, 2015 04:07 — forked from bishboria/springer-free-maths-books.md
Springer have made a bunch of maths books available for free, here are the direct links
# First install tmux
brew install tmux
# For mouse support (for switching panes and windows)
# Only needed if you are using Terminal.app (iTerm has mouse support)
Install http://www.culater.net/software/SIMBL/SIMBL.php
Then install https://bitheap.org/mouseterm/
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/