Posts

Showing posts with the label Gsm

Class 0 SMS (flash SMS) On Android

Answer : For rooted Android it is possible to bypass an API and send Class 0 SMS. There is a project on Git Hub called ZeroSMS: ZeroSMS is a proof-of-concept demonstrating a way to send Class 0 SMS on android >=2.3. Note: this only works on versions 2.2 -> 4.1.2, the sendRawPdu method was removed, so you will need to find a new way to do this. It was possible to send Flash SMS (that's the term for class 0 SMS) before Android 2.2. Google removed the sendRawPdu API, so even if you used reflection, you wouldn't be able to do it. Here's how I did it previously (this was tested on Android 1.6 and worked) private void sendSms(String phone, String sms) { if ((phone == null) || (sms == null) || (phone.length() == 0) || (sms.length() == 0)) { String message = "Phone or message empty!!!"; Toast notification = Toast.makeText(getBaseContext(), message, Toast.LENGTH_SHORT); notification.show(); ...

Answer Incoming Call Using Android.telecom And InCallService

Answer : How do you get notified about, and acquire instances of GSM Calls First, the user will need to select your app as the default Phone app. Refer to Replacing default Phone app on Android 6 and 7 with InCallService for a way to do that. You also need to define an InCallService implementation the system will bind to and notify you about the call: <service android:name=".CallService" android:permission="android.permission.BIND_INCALL_SERVICE"> <meta-data android:name="android.telecom.IN_CALL_SERVICE_UI" android:value="true" /> <intent-filter> <action android:name="android.telecom.InCallService" /> </intent-filter> </service> There you should handle at least onCallAdded (set up listeners on Call , start your UI - activity - for the call) and onCallRemoved (remove listeners). How does one answer these calls If the user wants to answer the...