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
// add on manifest | |
// <receiver android:name=".receiver.MyCallReceiver" /> | |
public class MyCallReceiver extends BroadcastReceiver { | |
@Override | |
public void onReceive(Context context, Intent intent) { | |
switch (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
public class CallNotification { | |
private static final int CALL_NOTIFICATION_ID = 3697; | |
public static final int ONGOING_CALL_NOTIFICATION_ID = 5658; | |
public static final int ACCEPT_VIDEO = 1231; | |
public static final int ACCEPT_AUDIO = 1232; | |
public static final int REJECT = 1233; | |
public static final int HANG_UP = 1234; | |
private static final String CALL_NOTIFICATION_BROADCAST = "CALL_NOTIFICATION_BROADCAST"; | |
public static final String SHOW_ONGOING_CALL_NOTIFICATION = "show_ongoing_notification"; |
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
// ./gradlew clean build generateRelease | |
apply plugin: 'maven' | |
def groupId = project.PUBLISH_GROUP_ID | |
def artifactId = project.PUBLISH_ARTIFACT_ID | |
def version = project.PUBLISH_VERSION | |
def localReleaseDest = "${buildDir}/release/${version}" | |
task androidJavadocs(type: Javadoc) { |
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
#!/bin/bash | |
sp="/-\|" | |
sc=0 | |
spin() { | |
printf "\b${sp:sc++:1}" | |
((sc==${#sp})) && sc=0 | |
} | |
endspin() { | |
printf "\r" | |
} |