As @Ankit says, you can use iTelephony in the same way as in AutoAnswer , but you need to add a line to this file (which you must add to your project):
boolean isVideoCall();
and then you can use it like this:
private Boolean isVideoCall(Context context) { Class<?> c; try { c = Class.forName(manager.getClass().getName()); Method m = c.getDeclaredMethod("getITelephony"); m.setAccessible(true); telephonyService = (ITelephony) m.invoke(manager); return telephonyService.isVideoCall(); } catch (Exception e) { telephonyService = null; e.printStackTrace(); return false; } }
Just identify the incoming call, for example, the code that is in the automatic answer, and then do this check to see if this video is.
source share