Hello, Greetings to all!!
Thank you for being able to participate in this forum!
I'm almost new to appinventor, and although I've studied a little bit of python, I still don't master much.
I'm trying an app that opens the chrome browser and works well with activitystarter, but when I want to go back to the appinventor again with the back button of the mobile, it doesn't come back... How could I do that?
I’m stumped for an answer - your App should still be on Screen, so closing Chrome would reveal it, but perhaps it is possible that the behaviour differs by device manufacturer.
By the way, test the Web Viewer if your App is targeting later version Android (8+), it’s possible that you do not need to launch an external browser.
Hey, ChrisWard,
Thank you for your help. Yes, with the web viewer it works, but for what is the application I need to open the chrome, and then come back again!
Another thing I need to do and looking in the documentation and web pages I can’t find is to close the application when the application goes to the background.
You could try doing something with Taifun's Tools Extension: ActivityStateChanged - not sure if putting Close Application in there when activity state is pause or stop ? If it does work, this may have undesirable effects on the operation of your app....
As an alternative you could use this to "reset" your app, I found this worked very well - to clear sensitive data from the app on pause/resume.
Thank you very much TimAI2 for your help!
I just tried it (android 9) and when I hit the back button it minimizes the app, but it doesn’t come back. When I click again on the application’s shortcut, it opens the Chrome again, but the tab I had opened has closed it. So with back button, it closes the opened tab in the chrome, but it doesn’t come back to the application.
Yes, I generated the apk and installed it, but it still doesn’t work. When I hit the back button, it minimizes the chrome and shows me the home screen. But the apk stays open with the chrome in the background…
I tried it on the samsung tablet with android 7 and pixel 2 with android 10
Need to resurrect this thread as I am seeing the same behaviour with compiled apps on an HTC10 Android 7 device when going to Chrome with the activityStarter. On pressing the back button I am returned to the home screen of the device. If I press the square button and select the Chrome page, I am then returned to the app. I should be going straight back to the app.
All works fine with compiled and companion on my Genymotion Android 9.
Don't think there is anything untoward with my blocks that could be causing the problem...:
It is worse with companion on that device, when selecting the Chrome page after pressing the square button, it opens Chrome on the last tab previously used/available (I have three tabs running). Tested without any tabs same issue.
Works when compiled as well....crazy stuff....
Need to force use to use Chrome (or probably a proper browser) to get the web pages from Google to work.