In companion app, it didnt work but in laptop while testing with DO IT feature it gave the result by updating the global variable.(When I opened and check the textfile, it is getting updated). BUT THE ISSUE IS THAT APP IS NOT WORKING AFTER INSTALLATION.
Actually, The purpose of the block is to modify the file once when new notification is recieved. Tasker event is set in such a way that the code will run whenever there is file modifications. So, once the file modification is done then Tasker will update the textfile with new onesignalid/keyword according to the Uniqueness of notofication ie, each notification will have some keyword to make it unique.
So, mitai2 app has to 1) Modify File first & 2)After file modification, Tasker will update the text file with another onesignalID/keyword, NOW mit ai2 app has to Parse/read that onesignalID/keyword from the text file.
How can I do it only by using MFile1? Why the app is not responding to new notification if it is installed as .apk?
WHILE TESTING USING DO IT FEATURE, ONLY GLOBAL VARIABLE IS UPDATING ITSELF WITH NEW VALUES BUT LABEL IS NOT WORKING.
I think, it is working when I added these 2 blocks. But, if I include these 2 blocks, it is putting the app in an endless loop (looped using clock3). I want to run these 2 blocks only once/twice additionally after each new Notification is received.
Text File is empty:
-- If text file = empty then go to Clock3 endlessly. Clock3 will read the text file to check if any value got updated or still it is empty.
Text File is not empty:
-- If text file is not empty then parse/read the value first and then make it empty. This time go to clock3 only one or two times (don't go endlessly) after that skip clock 3. Do, this for each new notification, ie, going to clock3 only one or two more times and then skip/stop.
I kept the app open, it is creating the text file successfully first time. But, after that it is not updating the file with empty text (or with some text) for each new notification. I shall share the .ab file.
Then, for each new notification, the app must modify/overwrite the text file with some predictable texts like Apple or empty text or etc.
Once mit ai2 app modified the text file, the Tasker (For testing purpose we can put some new text manually in the text file.) will update the same file with new text. NOTE: Tasker code is set in such way that it has to run whenever the text file got modified.
Mit ai2 app will read the text file continuously to detect the changes that will be done by the Tasker and once detected, the new text data will be updated in a global variable and the Label of the app.
ISSUE THAT I FACE:
Mit ai2 app is not updating the text file after once it created the text file.
If you are asking for help, I recommend you to make it as easy for others to be able to help you ...
You probably will get more feedback then...
which means in your case post a screenshot of your relevant blocks...
To download the aia file, upload it to App Inventor, open it, do some bug hunting for you, etc... this takes time, and most people will not do that...
Thank you.
I do not want to publish this app. This app will be used only on my phone so I don't need to publish. This app is kept open. Up & Running means keeping the App open, right?
So, since I do not want to publish the app, can I skip SAF? If so, why the problem persists, ie, not able to delete or overwrite the text file that was successfully created by the same app after installation (not created using companion).
Again, I am facing a small issue. Now, the text file is successfully getting updated by mit ai2 app with empty data. So, since the file is getting modified, Tasker is also updating the same text file with keyword/some ID.
Now, MIT ai2 app has to parse that data and put it in a global variable and a label. This is not working as expected. But, If I close and open the app again, the label is showing that parsed data from the text file ie, keyword/some ID. But, I want to make that happen without closing and reopening the app.
How can I solve this issue? I think, part of the code/blocks is not looping successfully so only it may be giving output only when I close and reopen the code. Help me to solve this ...
My expectation is that these two blocks will loop each other until the global variable will get updated with new keyword. But, facing the above said issue, so the looping may not be working... Give me clarity and guide me to solve this.