samedi 5 août 2017

Android how do to reflection in android.telecom.Call class

I want to block a phone call and i try using reflection android.telecom.Call class with following code

try {
        Class c = Class.forName("android.telecom.Call");
        Method m = c.getMethod("disconnect");
        m.setAccessible(true);

        Object o = m.invoke(c, new Object[] {});

    } catch (Exception e) {
        Log.e("Exception of Reflection", e.getLocalizedMessage());
    }





Aucun commentaire:

Enregistrer un commentaire