Nova King

unread,
Jul 11, 2018, 9:23:07 PM7/11/18
to MIT App Inventor Forum
I've been looking everywhere and I can't find a way to add flags to an ActivityStarter intent. I want to hide one of my pages from recents (idea from https://stackoverflow.com/questions/13385289/remove-app-from-recent-apps-programmatically).

As far as I've seen the option isn't there. I can't find a suggestions thread anywhere, but this also might be considered a problem. Can anyone help or is there a better place to go?

Hayder Hussein

unread,
Jul 11, 2018, 11:08:29 PM7/11/18
to mitappinv...@googlegroups.com
Yeah, me too just now I was searching for this!!

Is it possible to addFlags on intent with Activity Starter?

An equivalent java line would be:

 Intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_SINGLE_TOP );

There are many flags that can be added on intents. For the above example, I tried it on Android Studio and solved me an issue when starting an Intent to a Facebook or Twitter profile. They were opening inside my app, instead of as a new activity. Adding the FLAG_ACTIVITY_NEW_TASK fixed that.

Nova King

unread,
Jul 12, 2018, 6:04:49 AM7/12/18
to MIT App Inventor Forum
I'm sure there would be a way, but you'd either have to mod the source code of appinventor or create a whole rewrite of ActivityStarter as an extension....

Hayder Hussein

unread,
Jul 12, 2018, 10:06:28 PM7/12/18
to MIT App Inventor Forum
I found this extension for my case and it worked:

It turned out, it is using the same flags that I need. However, there is no way to add other flags.

If you tried and did not find any solution, perhaps you can ask Taifun (the developer of that extension), whether you can sponsor him with a small donation to extend his extension to include custom flags. But I hope you will find other workaround.

Good Luck!

Nova King

unread,
Jul 12, 2018, 11:04:48 PM7/12/18
to MIT App Inventor Forum
Yeah i noticed that extension but idk how the whole donation process works. Thanks for pointing that out!

Hayder Hussein

unread,
Jul 13, 2018, 4:01:25 AM7/13/18
to MIT App Inventor Forum
Open the website of the extension and check his email. As far as i remember it is :

info (at) puravidaapps (dot) com

Email him and ask how much would cost to sponsor for such feature? 

I asked him 2 or 3 times before and payed him via PayPal and within just few days he made the feature that  I asked for. However, my last request 1 year ago, he told me he was very busy and could apologized so I learned myself how to do an extension, but took me around 2 weeks. If this is an option for you, go for it. You will never regret it. And even the best part is that you will learn a little java and you will be encouraged to fiddle with android studio. A whole better world is out there. 

Anyway, you can try. And if not him, you can contact any other extension developer. I like Thunkable Community forum. There are a few brilliant extension developers out there. 

Good luck bro! 
Reply all
Reply to author
Forward
0 new messages