2014년 12월 24일 수요일

PhoneCall / PhoneNumber Variable if Number is hidden?

i am new to AppInventor and just build a Program, that can send 
SMS to callers if the call was missed.
It is thought for Meetings. I turn off sound and let the App send 
SMS to callers to let them know i am busy at the moment.

It works fine by now, but if someone with hidden (secret) number calls
the app causes an error.

Bad arguments to PhoneNumber
The operation PhoneNumber cannot accept the arguments: *nothing*


I tested:  (see Screenshot )

If get PhoneNumber <> ""
If get PhoneNumber <> "nothing"
If get PhoneNumber <> "*nothing*"
If get PhoneNumber <> false

but nothing helps...

does anyone know what Value phoneNumber has in that case?


SMS_Abwesenheitsnotiz.apk



If   get phoneNumber =/  nothing   will work ... if get phoneNumber does not equal "nothing" ... This block construction should work if the default response for a blocked phone ID is  nothing.

Try it.   If it works for you, please let us know, if you still have issues let us know and explain what you tried.



i got it :-)

Strings wont work, tried empty String, "nothing", "*nothing*" and so on.

If  is_a_number?  get_phoneNumber
works fine.


댓글 없음:

댓글 쓰기