foreground

Detect current running application in Android Nougat 7.+ version

爷,独闯天下 提交于 2019-12-23 08:54:02
问题 Android team changed their approaches to get current running applications from time to time. I am able to get current running applications upto Marshmallow 6.0 version but i want to ask that how can i get these in Nougat 7.0 version? Is there anyway to do that? Please guide towards solutions. I have searched a lot but could find any appropriate way to that. Thanks 回答1: Simple answer: no, you can't. Long answer: you can't get the running process but you can retrospectively see what was running

NSRunAlertPanel shows up behind the “active window”

回眸只為那壹抹淺笑 提交于 2019-12-22 18:50:55
问题 I'm trying to put together a simple error reporting package. If my main program crashes, it saves a crashlog, then starts a reporter program. The reporter program asks the user if it can send the crash log to me, then does so. I'm using NSRunAlertPanel to create a basic message box. For some reason, that message box is showing up buried underneath any other windows that may be open. Run the main package from a Finder window, it shows up on top, force it to crash, the reporter window shows up

How to monitoring app swaping in foreground?

对着背影说爱祢 提交于 2019-12-22 18:33:02
问题 when my application run in background. It need to monitoring others application swaping in the foreground and get their name. How to implement? i.e. When an app goto the foreground. My app must be notified. then gets its name. 回答1: For monitoring other Applications you can use ActivityManager for getting current top Appliction for Activity Stack as in Your Appliction: ActivityManager am = (ActivityManager)context.getSystemService(Context. ACTIVITY_SERVICE); List<ActivityManager

How to monitoring app swaping in foreground?

守給你的承諾、 提交于 2019-12-22 18:30:09
问题 when my application run in background. It need to monitoring others application swaping in the foreground and get their name. How to implement? i.e. When an app goto the foreground. My app must be notified. then gets its name. 回答1: For monitoring other Applications you can use ActivityManager for getting current top Appliction for Activity Stack as in Your Appliction: ActivityManager am = (ActivityManager)context.getSystemService(Context. ACTIVITY_SERVICE); List<ActivityManager

android: how to call activity by clicking foreground service notification

随声附和 提交于 2019-12-22 12:26:40
问题 I start a foreground service which shows a notification. If my activity is hidden I want it start by clicking on the notification. A function called in onStartCommand does this: startForeground(noti_id, mNoti); The notification appears and works but it doesn't reactivate my MainActivity: notiIntent = new Intent(this, MainGate.class); notiPendingIntent = PendingIntent.getActivity(this, 0, notiIntent, PendingIntent.FLAG_UPDATE_CURRENT); MainGate.class is the activity which starts the foreground

TextBlock foreground being reset to inherited value after dynamic resource from merged dictionary is applied

為{幸葍}努か 提交于 2019-12-22 11:29:17
问题 EDIT : I was able to reproduce this in a very stripped-down version of the application. Here is a link to the .zip file http://www.mediafire.com/?cn918gi15uph1xe I have the module add the view to two different regions - the status bar region along the top is where the issue occurs. The weird part is, when the same view type is added to the main region, there are no problems. The status bar region is an ItemsControl and the main region is a ContentPresenter. That is the only difference. Please

Changing Foreground of a TreeViewItem upon selection

China☆狼群 提交于 2019-12-22 10:25:28
问题 In my program I have a TreeView in which the user will select different items from. There are a few items in my TreeView that are customized upon creation in my c# code-behind. Like so: public static TreeViewItem newItem = new TreeViewItem() //Child Node { Header = new StackPanel //ICON { Orientation = Orientation.Horizontal, Children = { new Border { Width = 12, Height = 14, Background = Brushes.Blue, BorderThickness = new Thickness(1.0), BorderBrush = Brushes.Black }, new Label { Content =

Change TextBlock foreground color based on the background

北城以北 提交于 2019-12-22 09:04:13
问题 I'm looking for a simple way to change the foreground color of a TextBlock based on the color of what is behind it, so that it is more readable. Since an image is more explicit than words, here's what I want: I assume it could be done with a custom shader effect, but I have no idea how to create it... Anyway, perhaps there is a simpler solution. Any idea would be welcome! 回答1: Assuming the above is a progressbar, here is a great solution: WPF progress bar with dynamic text & text color update

App not showing Notification receiving FCM when the app is Open

放肆的年华 提交于 2019-12-22 05:17:23
问题 When I send a push from Firebase, if the app is in background or closed, I'm receiving the notification, but when the app is open not... Debugging I've observed that it's stopping in MyMessagingService specifically at onMessageReceived, so I guess that my problem is in regards of generating the notification (or maybe the intent which goes with the notification). I've implemented the service: public class MyMessagingService extends FirebaseMessagingService { private static final String TAG =

How do i remove a foreground notification in Android Lollipop?

痴心易碎 提交于 2019-12-22 05:07:34
问题 I'm looking to stop/dismiss a foreground notification for a service for a mediaplayer, much similar to Google's implementation for Google Music. For instance in Google Music, if you are playing music then the the notification cannot be swiped away. However if you pause the music it can. This is completely different to how it is implemented on Android 4.4, where the notification starts only when you leave the app and removes itself when you go back into the app. I can't see how to implement