Git Product home page Git Product logo

broadcastreceiver-for-all-devices's Introduction

๐Ÿ’ซ About Me:

  • ๐Ÿ‘‹ Hi, Iโ€™m @devggaurav
    - ๐Ÿ‘€ Iโ€™m interested in kotlin, KMM, java, Jetpack-Compose, Dart,JS
    - ๐ŸŒฑ Iโ€™m currently learning KMM
    - ๐Ÿ’ž๏ธ Iโ€™m looking to collaborate on Compose Animation, KMM
    - ๐Ÿ“ซ email me at [email protected]
    - ๐ŸŽฌ My youtube channel https://www.youtube.com/channel/UCXyU4Zoi3LkWeXnHu0XeGcA

๐ŸŒ Socials:

LinkedIn YouTube

๐Ÿ’ป Tech Stack:

Java Kotlin Dart Swift Python GraphQL AWS Firebase Flutter React React Native Socket.io RxDB Jenkins SQLite Canva Dribbble Figma Adobe XD Docker Confluence Prezi Postman Trello Swagger Notion Kubernetes Jira Gradle

๐Ÿ“Š GitHub Stats:



โœ๏ธ Random Dev Quote

๐Ÿ˜‚ Random Dev Meme


broadcastreceiver-for-all-devices's People

Contributors

devggaurav avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

broadcastreceiver-for-all-devices's Issues

didn't works after killing the app

Hey gaurav, that's really a great work. I just wanted to know that if there is a way that this broadcast receiver work even after killing the app in nougat and oreo + devices.

TelephonyManager.ACTION_PHONE_STATE_CHANGED not detecting in my broadcast receiver

TelephonyManager.ACTION_PHONE_STATE_CHANGED

//app service (its a foreground service)
static
{
_intentFilter = new IntentFilter();
_intentFilter.addAction(Intent.ACTION_TIME_TICK);
_intentFilter.addAction(Intent.ACTION_TIMEZONE_CHANGED);
_intentFilter.addAction(Intent.ACTION_TIME_CHANGED);
_intentFilter.addAction(Intent.ACTION_BATTERY_CHANGED);
_intentFilter.addAction(TelephonyManager.ACTION_PHONE_STATE_CHANGED);
_intentFilter.addAction(TelephonyManager.EXTRA_STATE);
_intentFilter.addAction(TelephonyManager.EXTRA_STATE_IDLE);
_intentFilter.addAction(Intent.ACTION_NEW_OUTGOING_CALL);
}

@Override
public void onCreate()
{
    super.onCreate();
    _instance = this;
    registerReceiver(broadcastRecevier, _intentFilter);

//// broadcastRecevier
@OverRide
public void onReceive(Context context, Intent intent)
{
final String action = intent.getAction();
Log.i("PhoneAction",action);

        if(action.equals(TelephonyManager.ACTION_PHONE_STATE_CHANGED)){
            Bundle extras = intent.getExtras();
            if (extras != null) {
                String state = extras.getString(TelephonyManager.EXTRA_STATE);

                if (state.equals(TelephonyManager.EXTRA_STATE_RINGING)) {
                    lastCallLogPhoneNumber = extras
                            .getString(TelephonyManager.EXTRA_INCOMING_NUMBER);
                    Log.i("CallSTATE", lastCallLogPhoneNumber);
                }

                if (state.equalsIgnoreCase(TelephonyManager.EXTRA_STATE_IDLE)
                        && !prevState.equalsIgnoreCase(TelephonyManager.EXTRA_STATE_IDLE)) {

                    Log.i("CallSTATE", "Call ended");
                    if(_callLogHelper==null)
                        _callLogHelper = new CallLogHelper();

                    startCallLogsTracking(lastCallLogPhoneNumber);

                }
                prevState = state;
            }
        }

//////////////////////////////////////////////
its not calling at phone state change in oreo but its work fine less than oreo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.