vendredi 15 mai 2015

How to block incomming call on android 5.X

I am trying to find a good solution to block incomming call. But it seems to be that the solution which I found only works on android verrsion 4.X and below. It doessn't work on android 5.X.

The below is solution to block incomming call which it runs perfectly on Android version 4.X

 Executor eS = Executors.newSingleThreadExecutor();
                eS.execute(new Runnable() {
                    @Override
                    public void run() {
                        Runtime runtime = Runtime.getRuntime();
                        try {
                            Log.d("ABCCCC", "service call phone 5 \n");
                            runtime.exec("service call phone 5 \n");
                        } catch (Exception exc) {
                            Log.e("ABCCCC", exc.getMessage());
                        }
                    }
                });

                return;

and the original link of this solution : http://ift.tt/1e5ucFq

I would like to know if this is possible and what api's do I need to use to cope with Android 5.X.

Thank you.

Aucun commentaire:

Enregistrer un commentaire