Hi,
I’m writing an app which is intended to call and send message to a list of phone numbers when a certain event (in this case, a free fall of phone).
I don’t understand why when the intended event occurs, my phone will show the msg and phone number as well, even though my phone number is not included in the list of phone numbers. And worse still, there is no way to clear away the msg and phone numbers on my phone other than to re-start my phone. I’m using a Samsung Note 8.
-you are using Location changes apparently (offsetGPS ???) as part of your app to determine if a phone is falling. Did you read the section about Accuracy in Using the Location Sensor ? The GPS** cannot detect small changes in location with any reliability at all.
you are using an Accelerometer and comparing it to what you call offsetGPS (whatever that is)
In some ways, the intent of your app is similar to this discussion of using a cell phone to determine falling and lack of movement
Hmmm. Have you gone to your phone's Messaging app and tried to delete the messages there? You do not have to re-start your phone most likely. When you use the Texting component, the component uses the device's system messsaging app; so the messages appear there too automatically. It is how Texting works.
Your list varPhone comes from somewhere. It probably includes your data when you imported it. When you iterate through the List, you get what is there.
Do I know for sure? Of course not, you did not share all your code.
Hopefully the tools here will help you figure this out. Good luck.
I used accelerometer to detect free fall by comparing the absolute value of each of the x,y and z components against the variable GPSoffset value of 1.
I have in fact write a separate app just to test and be sure that it works.
Regarding the second part of your reply, I did go to the phone’s Messaging app to delete the msg but as I said, the same msg will keep appearing. The msg actually appears as draft each time.
As for the varPhone, I have checked that my app has only one phone entry before I simulate a freefall of the phone by dropping it.
OK. Every time your if statement is satisfied in the AccelearationChanged event handler, the event handler will try to send both a Text message AND make a phone call. Requesting both could be a lot of text messages going out. and could be an issue (one might interfere with the other) without error control blocks. Are you sure you want to call Texting1.SendMessage instead of call Texting1.sendMessageDirect ? Do you really want to make a phone call and send a text simultaneously.
You can count them in your app (keep a log of tel no and no messages sent) then introduce a limit value to prevent sending of further texts until a time period is over ?
Thanks TIMAI2.
To set a limit for the number of texts sent will likely limit the usefulness of such an app.But I gather from your reply that the number of message sent is indeed equal to the length of phone list. Am I correct?
Therefore if a telco has a limit, the user will need to know what that limit is. They could enter this value to the app, which could then be compared to the count of the messages sent?
Indeed. This is what you coded and told the app to do when you used the for each item in list .. varPhone . The app iterates through the List and sends each a text; spamming all your contacts. Is this really what you want to do? And you want to do this for free?
Of course, the list will be restricted, consisting of phone numbers of selected members who are invited to join a group outing by texting certain code.