Under certain conditions, I need to bring the dialer on top during an ongoing call. I used to use activityManager.getRunningTasks to look for "com.android.phone", and then use the activityManager.moveTaskToFront to bring the in-call screen to the front.
Unfortunately, with Lollipop, getRunningTasks is deprecated and only returns activity from my own app, so that no longer works.
So I tried using packageManager.getLaunchIntentForPackage("com.google.android.dialer") and while starting that activity works, it doesn't get me to the call in progress but another screen.
Does anybody have another idea?
Please note that it needs to be the in-call screen (where you can mute, drop the call, etc.), not opening a new dialer to make a new call.
Related
I'm trying to test changes to our website, which is a dynamic application. When making edits to certain elements, the visual editor gives a warning:
"The number of elements selected changed after the page was initially loaded. Make sure that your changes appear as expected using preview mode." I've read all the official Google documentation on this specific warning. See the layout here
I've enabled activation events, set it to optimize.activate and made sure it is being pushed to dataLayer.
When I preview in debug mode, it says the experience was applied, the activation event was triggered on 'optimize.activate' and the url matches. Yet only one of the changes have been applied. See here
When I open the console and call dataLayer, optimize.activate is right there.
I'm honestly baffled. I read here that filters on the Analytics view linked to your Optimize container can stop events 'showing up'. We use filters to IP block our staff from showing up in our Analytics data.
Any help on this would be amazing.
p.s. I'm not a developer so go easy on me :)
Ok this maybe for a couple of reasons... I've had a few instances where I can view changes in preview mode:
First of all, if you're viewing changes in incognito mode, you need to make sure the following option is switched off in your browser - Block third-party cookies. If this is switched on, then in preview mode, your browser will block the Optimize 360 cookie and your experiment will not run. (This means you will not see your changes).
Secondly, if you have Audience Targeting set, these features do not work or show in preview mode.
Thirdly, your test may not be firing on the correct event trigger. EG pageload. So make sure the correct event is attached to your AB Test. As you will be able to see the changes in edit mode, but again not in preview mode.
Your issue is likely to be point 1 or 3.
I'm doing a training class right now and one of the games I plan on doing is a Jeopardy style of Q & A. The problem I'm trying to figure out is the buzzer. My idea is to use the projector as the question board I control. The trainees would go to an HTML page with nothing more than a single button. They would turn their monitors around to face me up front. As soon as I read the question they would click the button and it would change their screens the color red.
The button and background color change is easy enough, I got that. There are two problems I'm facing: 1) I need it so that they can't click the button until I'm done reading the question - this one isn't as important, I can just make up a rule. 2) Only the fastest person will have a red screen. To show me who clicked first. The others' buttons will be disabled.
I just have no idea how to even Google these two things. Like: "Disable button for other users"...? Or maybe, "only one click"...?
Any direction to search is appreciated. Eventually, I'd like to add other aspects to like the presenter could click an "incorrect button" then it would clear the screen and enable all the buttons again, for the answer steal.
You can do it with modern WebSocket or applications interact via TCP. However, WebSocket may be overkill for the simple application with a few teams. I faced the same problem before and developed a simple solution with PHP using Flock to write into a shared file on disk. Only request from one team gets the chance to write into that file. Stick to not to use WebSocket, the web page on client site does some polling to receive the "restart" signal from the server for the new question/round. It can run in LAN, different team gets different site, i.e. http://[server-ip]/team1, http://[server-ip]/team2.
You can have control over the round: allow them to press button/ restart, start a new question in http://[server-ip]/admin.
Further improvement can be made in several ways to facilitate your needs (i.e. assign team name, register team, use database instead of a flock file). The code is available here : https://github.com/minhhn2910/buzzergameshow
I'm building a game in HTML using Cordova/Phonegap (well, specifically https://github.com/MobileChromeApps/mobile-chrome-apps) and I'm looking to add a +1 (google plus one) button for my app's play store page, and have it actually work.
I can currently get it to add the button, and show the current number of +1's, but when you tap it, it tries to open another window then returns the the game, without having added the +1 (I check my +1's page to make sure it wasn't working, but failing to update)
I'm using the web way to add the button, but would prefer a cordova plugin.
Any help is awesome,
Cheers!
Some parts of my web-application are using the standard crosshair cursor. When a request to the server is pending, I would like to notify the user by displaying the progress cursor.
However, the use of crosshair is really important. Is there a way to display a cursor which would look like the progress one, but with a cross (like in crosshair) instead of the arrow?
I know I can use my own cursors in order to do that, but that would be disastrous for the user experience. In summary:
Can I use together two cursors?
If not, can I use a system cursor as an image, in order to create my own-compound cursor?
If not, what solution would you propose?
From the UX point of view - I would advice against using the "wait" cursor; If your app is asynchronous and you're using ajax for your requests - you should display a "loader" swirl in the relevant component (table/list/etc.) and leave the cursor as it should be.
Cursor is like an extension of user's hand :-)
If a part of the app is doing something in the background - I would let the user interact with the rest of the app normally.
I'm trying to make an extension for Google chrome which requires me to be able to identify the currently selected tab. I did this with the chrome.tabs.onSelectionChanged method, however when I switch windows this isn't fired. I plan to use chrome.windows.onFocusChanged to detect when the window changes then use the chrome.tabs.getSelected method. However the problem is that chrome.windows.onFocusChanged seems to be fired more than once. If I'm not mistaken, it returns window -1, then the first window created (usually 1), then the current window. If the first window is selected then it's fires -1, then 1.
Am I using the right method here? Is there a better way of doing this? If I stick with it I might need to keep track of how window changes which is a bit messy.
Kinda worked on my own solution for this. For anyone interested in doing something similar, what I did instead was to use the onFocusChanged as an indicator that there is a window change happening which then starts a requestListener. Using content scripts, I sent a request to the extension whenever there was a window.focus event indicating that the focus is already on that window. The requestlistener then just removes itself. Unfortunately this approach requires all tabs to send requests every time they get focus. Some more tweaking to fix that I guess but for the mean time I think that suffices since sending requests every time there is a change of focus doesn't seem to eat up that much resources.