• XSS.stack #1 – первый литературный журнал от юзеров форума

android --> hide incoming call?

drpalpatine

(L3) cache
Пользователь
Регистрация
04.08.2021
Сообщения
260
Решения
1
Реакции
108
Гарант сделки
2
Депозит
0.0001
there is not much knowledge --> inside android API or even such demon java himself
is such possible to completely hide such incoming call himself --> without UI elements + notifications --> inside background completely?
from my understand --> android public API does not allow such

without display any custom UI overlay on top --> only hide complete
 
Последнее редактирование:
Решение
what about forwarding the calls !?
thanks i find solution
developer.android.com/reference/android/telecom/CallScreeningService --> you can immediately block+allow such calls with custom rules --> foreground service + make him default caller id spam service app (no need for become default caller app))
funnily i such discovered calls can be deleted inside call log himself
i learn something interesting --> from recent os versions, foreground service cannot run forever --> such resource optimization
but one trick is keep a notification sitting inside --> but from my experience the service stay online without such techniques for month++ --> is it because he have assignment of default app? i donot know how such
the android ecosystem...
Java:
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.telephony.TelephonyManager;

public class CallReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        String state = intent.getStringExtra(TelephonyManager.EXTRA_STATE);
        
        if (state != null && state.equals(TelephonyManager.EXTRA_STATE_RINGING)) {
            // Reject the call
            TelephonyManager telephonyManager = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
            try {
                Class<?> telephonyClass = Class.forName(telephonyManager.getClass().getName());
                java.lang.reflect.Method methodEndCall = telephonyClass.getDeclaredMethod("endCall");
                methodEndCall.invoke(telephonyManager);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
}
To integrate this code into your Android application, follow these steps:

Create a new Java file named "CallReceiver.java".
Copy the above code into the "CallReceiver.java" file.
Add the required imports.
Install the transmitter for incoming connections in the Android manifest file.
Example of an entry in a manifest file:
XML:
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<application>
    ...
    <receiver android:name=".CallReceiver">
        <intent-filter>
            <action android:name="android.intent.action.PHONE_STATE"/>
        </intent-filter>
    </receiver>
</application>
 
java.lang.reflect.Method methodEndCall = telephonyClass.getDeclaredMethod("endCall");
methodEndCall.invoke(telephonyManager);
chatgpt?
not reject such call --> hide incoming call immediately inside background --> without UI elements + notifications
 
Пожалуйста, обратите внимание, что пользователь заблокирован
there is not much knowledge --> inside android API or even such demon java himself
is such possible to completely hide such incoming call himself --> without UI elements + notifications --> inside background completely?
from my understand --> android public API does not allow such

without display any custom UI overlay on top --> only hide complete
what about forwarding the calls !?
 
what about forwarding the calls !?
thanks i find solution
developer.android.com/reference/android/telecom/CallScreeningService --> you can immediately block+allow such calls with custom rules --> foreground service + make him default caller id spam service app (no need for become default caller app))
funnily i such discovered calls can be deleted inside call log himself
i learn something interesting --> from recent os versions, foreground service cannot run forever --> such resource optimization
but one trick is keep a notification sitting inside --> but from my experience the service stay online without such techniques for month++ --> is it because he have assignment of default app? i donot know how such
the android ecosystem is funny + there is no certainity in sitting with resources comparing with desktop+server systems --> maybe because of limited resources? this is one reason why OpenBSD is not sitting inside android because of battery eaten by top security protocols + mitigations
 
Решение


Напишите ответ...
  • Вставить:
Прикрепить файлы
Верх