Hello again,
This week was a bit of an eye-opener for me in regards to the downsides of using App Inventor.
There were several aspects about the No Texting While Driving app that I found problematic:
1. It is rendered useless without a means of keeping the phone awake
2. It showed no means of selecting "approved" contacts to receive additional information such as current location
3. There was no way of connecting phone calls received or messages via Whatsapp, for example, to the app
...all making for one heck of a mediocre solution...
So I embarked on a frustrating journey to try to find some answers! I succeeded in solving the second issue, but not the first or third (not satisfactorily at least).
Digging through various forums pertaining to app inventor, I discovered that there was no direct way of keeping the phone awake without it charging or sending out messages after receiving phone calls - period. It's on the wish list, but it's not possible now. Okay, that's the downside of relying on a middle-man.
On a positive note, though - in attempting to find a solution for the other problems, I found out how to use Activity Starters - not only to incorporate other apps into mine, but also to make up for some of the shortcomings of App Inventor. Very useful stuff...
In order to partially solve the first issue, I used an Activity Starter to allow the user to access the phone's "Settings" menu. Here, they can adjust the settings to keep the phone awake while charging. Not incredible - but an attempt at least. I did find one solution that I thought would work out, but although it didn't, I find it good to keep in mind. Someone posted that by inserting a tiny 1x1 pixel video into the app and allowing it to loop, that you could keep the app running. I tried this but to no avail. I do like the out-of-the-box creative problem solving, though, and thinking along these lines might be useful in the future when facing another problem.
The Activity Starter component also proved useful in solving the "phone picker" problem. Although App Inventor provides a phone picker component, it does not work on Samsung phones. Argh. But I found an app which, when installed on the phone, provides a solution that works. By using the Activity Starter, I was able to incorporate this app into my own. Brilliant. No idea if it will work for all phones though, and it does mean that the user has to download the second app, but until the MIT team comes up with another solution, it will have to do.
There might be a solution for receiving messages sent via Whatsapp, but since I do not know the "intent" to call the program up or to pick the information that I need, I decided to leave it for now. I also attempted to use the Activity Starter to invoke "Stay Awake" apps, but I wasn't able to find the proper intents for those either.
One enormous pain was that somehow all of my variables and a few other components got corrupted in the process of developing. I had to redo most of the coding by replacing the corrupted components and blocks with new ones, one-by-one. I read that others have had the same thing happen to them and that there is most likely a bug in app inventor which causes it.
So a big lesson learned is that although App Inventor has truly made app inventing accessible to the average Joe - it has its limits in functionality. I will most likely outgrow it after some time. But I read something about the "App Inventor Java Bridge" which might prove useful for me after I gain more experience with App Inventor. It's good to know that I can continue to build upon what I'm learning now, even if I decide that App Inventor can't provide the service I need it to.
So - all in all - a week filled with colossal pains in the app... but a lot learned! :)
This week was a bit of an eye-opener for me in regards to the downsides of using App Inventor.
There were several aspects about the No Texting While Driving app that I found problematic:
1. It is rendered useless without a means of keeping the phone awake
2. It showed no means of selecting "approved" contacts to receive additional information such as current location
3. There was no way of connecting phone calls received or messages via Whatsapp, for example, to the app
...all making for one heck of a mediocre solution...
So I embarked on a frustrating journey to try to find some answers! I succeeded in solving the second issue, but not the first or third (not satisfactorily at least).
Digging through various forums pertaining to app inventor, I discovered that there was no direct way of keeping the phone awake without it charging or sending out messages after receiving phone calls - period. It's on the wish list, but it's not possible now. Okay, that's the downside of relying on a middle-man.
On a positive note, though - in attempting to find a solution for the other problems, I found out how to use Activity Starters - not only to incorporate other apps into mine, but also to make up for some of the shortcomings of App Inventor. Very useful stuff...
In order to partially solve the first issue, I used an Activity Starter to allow the user to access the phone's "Settings" menu. Here, they can adjust the settings to keep the phone awake while charging. Not incredible - but an attempt at least. I did find one solution that I thought would work out, but although it didn't, I find it good to keep in mind. Someone posted that by inserting a tiny 1x1 pixel video into the app and allowing it to loop, that you could keep the app running. I tried this but to no avail. I do like the out-of-the-box creative problem solving, though, and thinking along these lines might be useful in the future when facing another problem.
The Activity Starter component also proved useful in solving the "phone picker" problem. Although App Inventor provides a phone picker component, it does not work on Samsung phones. Argh. But I found an app which, when installed on the phone, provides a solution that works. By using the Activity Starter, I was able to incorporate this app into my own. Brilliant. No idea if it will work for all phones though, and it does mean that the user has to download the second app, but until the MIT team comes up with another solution, it will have to do.
There might be a solution for receiving messages sent via Whatsapp, but since I do not know the "intent" to call the program up or to pick the information that I need, I decided to leave it for now. I also attempted to use the Activity Starter to invoke "Stay Awake" apps, but I wasn't able to find the proper intents for those either.
One enormous pain was that somehow all of my variables and a few other components got corrupted in the process of developing. I had to redo most of the coding by replacing the corrupted components and blocks with new ones, one-by-one. I read that others have had the same thing happen to them and that there is most likely a bug in app inventor which causes it.
So a big lesson learned is that although App Inventor has truly made app inventing accessible to the average Joe - it has its limits in functionality. I will most likely outgrow it after some time. But I read something about the "App Inventor Java Bridge" which might prove useful for me after I gain more experience with App Inventor. It's good to know that I can continue to build upon what I'm learning now, even if I decide that App Inventor can't provide the service I need it to.
So - all in all - a week filled with colossal pains in the app... but a lot learned! :)