Why do new Activities create new Windows on ChromeOS? How to constrain them to just one window? - androidappsonchromeos

Problem
I have a simple Android app with 3 activities: Login, Browse_Catalog, and View_Item. On ChromeOS, I expected the Activities to stack in a single window. Instead, each Activity is appearing in its own, independently managed window on ChromeOS. Why is that happening? And how do I stop that behavior?
Request
My hope is that there is some configuration detail to keep activities stacked in a single window. I've tried looking for some flag in the Intent that launches the Activity, or some setting in the Manifest, but haven't found anything that indicates this behavior is intentional, or that there is a way to disable it.
Technical Details
ChromeOS 76.0.3809.102 (Official Build)(64-bit)
Asus Chromebox
Android Studio 3.4.2
targetSdkVersion: 28
minSdkVersion: 25
jvmTarget: 1.8
Observations
No error messages as far as I can tell. Just an awful user experience with multiple windows leading the user to think there are three separate programs running.
The Activities that should be hidden on the backstack, aren't very responsive, the windowmanager allows them to be resized briefly before reasserting a z-ordering on the activities.
The windowmanager does allow me to close an Activity/window from the backstack (e.g. Browse Catalog, while Viewing Item), but then backing off from the top Activity goes nowhere.
Possible Workarounds that are Unsatisfactory
I can kind-of workaround this by making the Activities launch in full-screen, but it feels like a huge kludge. It doesn't prevent users from minimizing or resizing individual windows.
Perhaps I could do this as single activity with multiple fragments, but I don't want to invest that much work, unless I absolutely have to.

For posterity: My mistake was the Browse_Catalog Activity had a line in the Manifest
<activity ...
android:launchMode="singleInstance"
/>
This creates the Activity as a single "Task", and won't launch any additional Activities into that Task. Here's a page with more details about Activities, Tasks, and BackStack
The default behavior (aka android:launchMode="standard") is what I was expecting, so removing this spurious setting solved the problem.

Related

Is it possible to keep track of the Revit ribbon buttons which were clicked on?

I've been trying to figure out a way to record user interface actions to retrieve information about which ribbon buttons were clicked, but I've been unsuccessful so far.
I've spend a lot of time finding the related events in the API, but apparently there are none.
There are many ways to record user events in Revit. One of the simplest ways is to look at the journal file. It is always generated and stored automatically by Revit, so you don't have to do anything at all to obtain it. Look at its contents; all relevant user interactions are recorded there.
As said, there are other ways as well.
Afaik, recording which buttons are clicked is not officially supported and may be a bit tricky, cf. the Revit API discussion forum thread on obtaining button name using events for plugins working inside of another plugin.

ADO Not Allowing User to Create A New Task Within The To Do Column or Move the Flow of an Item Without Opening the Item

I am a support Anaylst that works with a group of developers on ADO. I am having trouble changing the status or adding a task to an item without having to open the story or bug up in full then adding the progression or adding the task. Others on my team are able to do this by clicking on the dropdown within the box without the need to open. Same for the Tasks, in the To Do column there is a green plus where they click to add the task. I have to take the long route and create a child as a task and do this long form. It is quite time consuming. I have read on some posts online that this is becuase i have the Stakeholder role and that it needs to be basic in order for me to do this. Which would be great to try but my other teammates havethe stakeholder role as well and they are not having the same problem as I. I asked our ADO admin and he informed me that this is not a permissions issue and hinted that it could be a browser setting. I am using the latest version of Chrome but, this happens with Firefox and IE as well. I didn't try edge seeing outi it is powered by Chrome.
If anyone has any idea what this is and how I can fix this it would be awsome to go back to work and let them know what it was and what the fix is. They are all really busy, as am I, plus it's really not keeping me from doing my job...but if there is anything that I hate, it is wasting time and that's what I'm doing while taking several extra steps to do something.
adding a task to an item without
having to open the story or bug up in full then adding the progression
or adding the task.
For this issue, you need to check if Task is enabled in the Annotations of Settings .
having trouble changing the status , in the To Do column there is a green plus where they click to add the
task. I have to take the long route and create a child as a task and
do this long form.
For this issue, if the member is a stakeholder access level user,the New Items option will not be displayed. For details ,please refer to this official document.

Showing messages and errors to users, alternative to alert()

I'm working on a Chrome extension that'll need to display some messages to the users, be them instructions or errors. Right now the former are completely missing and errors are displayed in alert boxes.
We came up with this
alert(message); Not great, especially for instructions. Currently used.
chrome.notifications are not meant to be used this way: they appear off-center and disappear before the user may be done reading.
appending html content to the current tab, which we see as a last resort since we don't want to risk conflicts
Is there a better way to inform the user?
There is some other ways to do that, although none of them can be what you are looking for. Anyway, I'll share my solutions
1) Customizing default popup
You can append customized content to your popup window and let your users informed by setting the badge text:
chrome.browserAction.setBadgeText({text: "error"})
See https://developer.chrome.com/extensions/browserAction#method-setBadgeText
I think this is the best solution to show errors because your user won't be annoyed
2) Creating a new tab
To show instructions most extensions I used creates a new tab
chrome.tabs.create({url: "instructions.html"});
See https://developer.chrome.com/extensions/tabs#method-create
This occurs usually after the user installs the extension.
We ended up using humane.js to show messages on the page since it only required two small files, both of which have been "isolated" to avoid any possible CSS class clash with the existing content.
Still not ideal since I'd rather not having to add any elements/CSS to the page, but that's the best we got now.

Show a specific process dialog in petrel?

I want to show a specified dialog under simulation category like "Developement Strategy" and do something after its "OK" click. Is there a way to show a native petrel process window?
I can see some class and interfaces in "Slb.Ocean.Petrel.UI" like DialogBuilder , DialogPage, IDialogPageFactory, IDialogPage...but I can't use them, even I don't know if they supply my required objects.
I think you want to create a Workstep (Slb.Ocean.Petrel.Workflow). The Ocean wizard lets offers a quick start. It creates optionally a process wrapper for you, which is the item showing up in the process tree.
Once you got familiar with the concepts, you can evolve the simplistic initial implementation by using the WorkflowEditorUIFactory. Check the namespace documentation in the Ocean documentation for more details.
IProcessDiagram offers different Add methods for your custom Process to enable custom positioning in the tree node sequence.
You can programmatically show a particular process dialog using DialogBuilder.ShowSettings(object) and passing the Process instance. This is typically used by a plug-in to launch its own process dialog, but it's possible to obtain a reference to the instance of a native Process by name using FindProcess(string). This is, of course, a very fragile approach:
Process p = PetrelSystem.ProcessDiagram.FindProcess("Development strategy");
PetrelSystem.DialogBuilder.ShowSettings(p);
It would need a lot of error handling, not just to guard against changes to the process name, but also to handle the case where an exclusive process dialog is already open.
However, this will still only launch the dialog. There is no way to know if/when the user clicks the OK button. Petrel processes are typically stand-alone pieces of functionality, and any kind of chaining is generally supported by creating workflows.

KOLite Activity Indicator Configuration

I am using KOLite on a project, and have everything working properly. The activity indicator works perfectly inside a button or in a small area.
My question is: Is there a way to configure the activity indicator per binding? For instance, it would be nice to have a large indicator in a div while records are loading, etc.
I hate to use a different indicator in certain places.
The one in kolite hooks into the control you nbind it to. However, you could create your own activity indicator for the page (or region) and wire up the code to turn it on and off in your kolite commands' completed handlers. Its a bit more custom, but there's nothing wrong with that.

Resources