Skip to content

Instantly share code, notes, and snippets.

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

Tanay Mondal tanaymondal

🏠
Working from home
View GitHub Profile
#!/bin/bash
sp="/-\|"
sc=0
spin() {
printf "\b${sp:sc++:1}"
((sc==${#sp})) && sc=0
}
endspin() {
printf "\r"
}
@tanaymondal
tanaymondal / android-release-aar.gradle
Created September 21, 2018 09:40
android-release-aar.gradle code
// ./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) {
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";
// add on manifest
// <receiver android:name=".receiver.MyCallReceiver" />
public class MyCallReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
switch (id) {