I'm making an android app and I want to know if is there any way to:
Reject/Answer the incomming call ( I just need a function line. Something like this example "android.bluetooth.adapter.action.REQUEST_ENABLE" but of course I don't mean bluetooth. )
Get the text of incommig SMS and store it in text variable.
I'm almost sure the first point is doable by activity starter but I can't figure that out.
You can't do this with the Activity Starter.
Please take a look at the documentation about the PhoneCall component and the Texting component.
For the PhoneCall component there are the following events available:
IncomingCallAnswered(text phoneNumber)
Event indicating that an incoming phone call is answered. phoneNumber is the incoming call phone number. PhoneCallEnded(number
status, text phoneNumber)
Event indicating that a phone call has ended. If status is 1, incoming call is missed or rejected; if status is 2, incoming call is
answered before hanging up; if status is 3, outgoing call is hung up.
phoneNumber is the ended call phone number.PhoneCallStarted(number
status, text phoneNumber)
Event indicating that a phonecall has started. If status is 1, incoming call is ringing; if status is 2, outgoing call is dialled.
phoneNumber is the incoming/outgoing phone number.
to reject/answer an incoming call is not possible with App Inventor.
to get the text of an incoming SMS is easily doable, but your App Inventor app must be up and running. Just use the MessageReceived event, see also the No Text While Driving tutorial.
First do the tutorials to learn the basics of App Inventor, then try something and follow the Top 5 Tips: How to learn App Inventor
Related
I have developed android application which call the other person on button click, but now i want to send dtmf tones from application to that outgoing call when ever i need. so how to do that?
Actually it's possible. It's not so obvious and not so elegant. But it works :)
In my project I requested permission for accessibility service. It gives me possibility to programmatically emulate clicks on the screen. Then I get the screen coordinates for the 'open keyboard' button and all number buttons which I need to press (tones which needed to be send).
Then it's super easy - catch income call with receiver, make small delay and then run sequence of emulated clicks.
Tada 🎉🎉🎉
In case someone need code - I can share it.
You can't send DTMF tones during an active call, but you can send them when you "program" them when you initiate the call. see the following post: https://stackoverflow.com/a/12986066/475472
Actually DTMF possible for key when call alive that time manual key touch and same will send to receiver.
we also check it on embedded gsm module and it will in receiving mode and DTMF enable and after calling when we press any key it will send to receiver side.
sorry fo my complete ignorance developing an Android.
I'm asking about the feaseability of this pseudocode I would like to implement as native app; let imagine a task that:
when a specific SMS arrive (only those sent from a specific sender number)
possibly (multi-SMS in case of text bigger than 160 chars )
elaborate/format each received SMS:
. save text content on a local db
. print text on a bluetooth printer
. reply to sender with some sort of "ACK" SMS
BTW, what above could be sort of background task, and I would need on foreground a sort of user interface that visualizes received SMS and do some user actions (sending back SMS to sender)
Is all that possible on Android ? Any issue ?
I mean, above all: is possible to "catch" specific SMSs (by example those sent by a specific sender number), living unalterated the usual SMS workflow for ALL other SMSs ?
Sorry for my beginner question and Thanks for your patience
giorgio
www.giorgiorobino.com
Following this link to implement a BroadcastReceiver that will listen for incoming SMS.
Inside your onReceive from your BroadcastReceiver, handle your logic (print/save/..)
It is possible, yes. But not recommended. That being said the way to set this up is to catch the SMS intent, so your app would be started when an SMS is received. Otherwise it would not run at all (as long as you don't have any other interface open). For a code example on the message interception part, see this post. For the database part look up local storage on android phones. Look up on SMS messaging for the reply. Not sure how bluetooth printing would work as I've never done it, but if it's a standard protocol I'm sure there's either built in support or a library for it.
It's possible to do many things in MIT's app inventor, yet, there is no clear way on how to receive a phone-call/SMS or even showing the calling number ... is that possible?
You can't receive a phone call with App Inventor, there is the PhoneCall component, but you can only Use this component to dial the phone and make a call.
There is the Texting component, which can send and receive SMS and also display the sending phone number: When a message arrives, the MessageReceived event is raised and provides the sending number and message.
Please see the reference documentation for more info.
http://ai2.appinventor.mit.edu/reference/components/social.html:
PhoneCallStarted(number status, text phoneNumber)
Event indicating that a phonecall has started. If status is 1, incoming call is ringing; if status is 2, outgoing call is dialled.
phoneNumber is the incoming/outgoing phone number. Using this block
will add dangerous permissions that will require additional approval
if your app is submitted to the Google Play Store.
I want to develop an android application which allow to me to track and save into an online database the following information:
Incoming and outgoing call
Incoming and outgoing SMS
Keystrokes typed by keyboard
Questions:
How can I run my application in the background (must use service or thread)?
Is it possible to got incoming or outgoing calls with details
(phone number, date of call, call duration, etc.)?
Is it possible to got incoming or outgoing messages with details
(destination/origin number , message content)?
Is it possible to got all keystrokes typed by keyboard?
Do I need root access to do this?
How can I run my application in the background (must use service or thread)?
Use a service
Is it possible to got incoming or outgoing calls with details (phone number, date of call, call duration, etc.)?
Yes.
Is it possible to got incoming or outgoing messages with details (destination/origin number , message content)?
For incoming there is official SDK support. For outgoing, there are only unofficial methods.
Is it possible to got all keystrokes typed by keyboard?
This is impossible, unless you also wrote the keyboard app being used.
Do I need root access to do this?
No.
I'm looking for a sort of trigger in Android, that would let me perform a task whenever a sound is played, so for incoming calls, SMS and e-mail notifications. I did find something like this, but it's only for when the phone is called:
http://developer.android.com/reference/android/telephony/TelephonyManager.html
What I want to achieve with this is sending a bluetooth signal to a bracelet, so it starts vibrating. This would be suited for the hearing impeared or people that work/live in a loud environment who don't carry their phone attached to their bodies.
Calls, SMSes and email are handled by different apps and they have different notifications. Besides calls, you can also get notifications for SMS but not for emails.
SMS broadcast is a private API, meaning that it is not officially supported and can change without notice: Android - SMS Broadcast receiver