Recently I am reading the article Build a Personal Safety Application in App Inventor 2
It told me about how to make a self protect button which can send text and phone call to someone when in danger.
I follow the exact instruction there and I run the program and save my text.But when I press Help button, the app said "Run time error , attempt to get length of null array"
I also found that the link above can use the same TinyDB(TinyDB1) and notifier(notifier1) between two screens, how he did that?
I really want to make this function so please help me.
--
If you want help, you should provide more information.
Please attach a screenshot of your blocks!
The information in a TinyDB is shared between all screens, you just have to define it in every screen you are using it,
A notifier is not really shared, it just happens to have the same name.
Please attach a screenshot of your blocks!
The information in a TinyDB is shared between all screens, you just have to define it in every screen you are using it,
A notifier is not really shared, it just happens to have the same name.
--
I am suvarna. I am making app for multiple sensor data display on app. I have a made two screen in my app. In my app Bluetooth is connected on first screen and sensor data receive on second screen.I have trouble in receiving data on second screen. would you please explain me how can i receive data on second screen. which component is used for data receiving on second screen from bluetooth.
please reply as soon as possible.
waiting for your positive reply.
--
Could you please open a new thread for your question about a very different subject? I will tell you there that you can only use Bluetooth from Screen1.
--
Your logic is probably not what you want:
if TextContact is empty then show notifier
else (TextContact is not empty)
if Callcontact is empty then show notifier
else (both text and call conact are not empty!)
if both are empty (this cannot happen here!)
In short it is possible that there are empty fields when you store the values.
What you can do is, to simplify this:
if not is empty TextContact AND not is empty CallContact
then store the values in the TinyDB
else show notifier: both fields must be filled
--
if TextContact is empty then show notifier
else (TextContact is not empty)
if Callcontact is empty then show notifier
else (both text and call conact are not empty!)
if both are empty (this cannot happen here!)
In short it is possible that there are empty fields when you store the values.
What you can do is, to simplify this:
if not is empty TextContact AND not is empty CallContact
then store the values in the TinyDB
else show notifier: both fields must be filled
--
Thank you so much. I solved the problem
--
Did you notice that you were using different TinyDB tags to store and retrieve the same data?
--