Filtering SMS messages that only pertain to my application
So I've gotten some great information from开发者_StackOverflow people on here pertaining to how to allow my application to receive text messages before the native messaging app catches them.
However, I'm looking for a little more specifics on how I can mold this to fit the needs of my application
What I'm ultimately looking to do, is to only have text messages pertaining to my application be the ones that are caught by my application before the native messaging app, while all other text messages just head to the normal spot
Is there any way to add extra data to a text message, or some sort of port, where text messages can be filtered into my app as opposed to the native messaging app, without losing out on my 160 character max? I'm really not looking for my application to replace the native messaging app for all text messages, and would only like to have it deal with text messages that are pertaining to my application, as it seems right now to be much easier to have them come into the application from an end-user standpoint, as there's no good way (at least on hTC phones) to copy or import individual text messages from the native messaging application to be brought into the application.
Any help would be very very appreciated... and if there's any wording in there that is hard to understand (as I'm sure it might be somewhat difficult to follow), please let me know and I will try to clarify! Thanks!
The answer is probably no, assuming you have a filter set up before your native messaging app to do some regex (regular expression) filtering on the message content, you will have to use up some of your character limit - or make sure your application is extended to handle multi-sms messages (i.e. one message using 2,3 or more sms's).
The best, easiest to read description of the inner details of an sms I know of is this, SMS and the PDU format, short of going through the official ITU-T protocol documents. There are other fields in the SMS there, but I doubt you could reliably hijack one of them for your purposes. But then again, if you did a whole bunch of trial & error, you might find a way.
精彩评论