Skip to content

Instantly share code, notes, and snippets.

View 0x1bitcrack3r's full-sized avatar
💻
Coding...

Vishnu Ramineni 0x1bitcrack3r

💻
Coding...
View GitHub Profile
@0x1bitcrack3r
0x1bitcrack3r / zshrc
Created September 13, 2022 21:13
Dev zshrc
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/Users/vishnuramineni/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
android:id="@+id/RelativeLayout01"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@drawable/call_bg">
<RelativeLayout
android:id="@+id/callInfoLayout"
import React, { Component } from 'react'
import { DeviceEventEmitter } from 'react-native'
class MainComponent extends Component {
componentDidMount() {
DeviceEventEmitter.addListener('accept', () => {
//Do something!
})
DeviceEventEmitter.addListener('reject', () => {
public class MainApplication extends NavigationApplication {
@Override
public boolean isDebug() {
// Make sure you are using BuildConfig from your own application
return BuildConfig.DEBUG;
}
protected List<ReactPackage> getPackages() {
// Add additional packages you require here
public class IncomingCallScreenActivity extends ReactActivity {
private static final String TAG = "MessagingService";
private Ringtone ringtone;
LocalBroadcastManager mLocalBroadcastManager;
BroadcastReceiver mBroadcastReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
if(intent.getAction().equals("com.incomingcallscreenactivity.action.close")){
public class FirebaseMessagingService
extends FirebaseMessagingService {
private static DeviceEventManagerModule.RCTDeviceEventEmitter eventEmitter = null;
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
try {
String notifDataType = remoteMessage.getData().get("type");
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE"/>
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
<permission
android:name="android.permission.INTERACT_ACROSS_USERS_FULL"
android:protectionLevel="signature" />
{
"to":<DeviceToken>,
"data": {
"type": "incomingcall",
"callerName":"Alex"
},
"priority": "high"
}
"dependencies": {
"react": "16.0.0-alpha.12",
"react-native": "0.60.0",
"rn-android-overlay-permission": "file:../node_modules/rn-android-overlay-permission"
}
package com.overlaypermission;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import com.facebook.react.ReactPackage;
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.uimanager.ViewManager;