android-notification-bar

Copy paste via notification bar in Android

送分小仙女□ 提交于 2019-12-11 09:38:41
问题 Have you seen these password managers like Lastpass ? They allow you to copy-paste via Notification bar in Android. Typically, the sequence is like this.. User in Lastpass presses a button, that puts two notifications in Notification Bar. User switches to any other application say a browser and when he has to insert username and password He opens notification bar, selecting the notifications from Lastpass pastes the username or password into the textfield of the browser. Can anyone break this

Hide notification bar without using fullscreen

怎甘沉沦 提交于 2019-12-10 11:05:35
问题 Here is my problem: is it possible to hide the android notification bar without using the fullscreen flag? I need to adjustResize my app when the soft keyboard is shown, but fullscreen apps ignore the resizing (as far as i know). Has anyone an idea on how to make my app look fullscreen without this flag? Here is the problem with the fullscreen flag: it only tries to show everything important, but i need to resize my app: and the xml: <RelativeLayout xmlns:android="http://schemas.android.com

Smooth transition between full-screen-activity and one with notification-bar and action bar

怎甘沉沦 提交于 2019-12-10 03:12:22
问题 Background I have an app that has 2 activities : splash activity, which is shown in full screen (no action bar, no notification bar) main activity, which has both action bar (uses actionBarSherlock) and notification bar. The problem For some reason, when going from the first activity to the second, there is a "jumpy" layout process , which shows the content of the second activity without the action bar and notification bar, and a moment later it shows them both. This causes the content below

Why does the “download completed” notification disappear on Gingerbread devices?

对着背影说爱祢 提交于 2019-12-10 01:31:09
问题 I'm using the DownloadManager class to programatically download a file. All works fine but I can't get the download completed notifcation to persist. It disappears immediately once the download has completed. Here's my code: Request rqtRequest = new Request(Uri.parse(((URI) vewView.getTag()).toString())); if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) { rqtRequest.setShowRunningNotification(true); } else { rqtRequest.setNotificationVisibility(Request.VISIBILITY_VISIBLE

How to keep track of notifications to know when to show a summary notification

瘦欲@ 提交于 2019-12-09 16:08:01
问题 I want to emulate Gmail's app behavior regarding notification bar notifications, which complies with the recommended Android pattern: http://developer.android.com/design/patterns/notifications.html When the app is in background and I get a new e-mail I get a notification in the notification bar like this: Line 1 : Jane Smith Line 2 : Hi John, this is a sample message... That is, a notification that is specific for a single message, and tapping it leads to a screen showing that specific e-mail

Custom notification sound not playing

流过昼夜 提交于 2019-12-09 06:02:42
问题 I'm trying to make a custom sound play on a status bar notification. The .mp3 file is in res/raw/ . But when I notify the user the sound is not played. I've tryied with MediaPlayer, and it works, but I dont want to make it play with MediaPlayer. Here is my method: public void showNotification() { String ns = Context.NOTIFICATION_SERVICE; NotificationManager mNotificationManager = (NotificationManager) getSystemService(ns); int icon = R.drawable.feedback; // icon from resources CharSequence

How to tell the activity has been covered by the notification area?

心不动则不痛 提交于 2019-12-08 17:06:02
问题 Usually, Android calls onPause on your Activity when it starts being obscured or hidden, followed by onStop when it's no longer shown at all. In my game, I pause the game in onPause , so the user doesn't lose the game while looking elsewhere. However, when the user drags down the notification bar, it covers my Activity , but neither onPause nor onStop are called. This doesn't seem to be mentioned in the documentation. The game ticks away in the background with nobody looking at it. Is there

How to send notification from AsyncTask while main Activity is not started?

 ̄綄美尐妖づ 提交于 2019-12-08 11:03:09
问题 I have an AsyncTask which starts on boot (called by a service). In some cases I would like to send a notification to start the main Activity. My problem comes when I try to call: NotificationManager notManager = (NotificationManager) getSystemService(ns); where eclipse shows me an error because AsyncTask hasn't got getSystemService method. Any idea? Thank you. 回答1: Because getSystemService is a method of Context class. Check it out here. Before you call the function, create a Context variable

How to match text color with notification color bar?

↘锁芯ラ 提交于 2019-12-07 16:05:31
问题 My application use white color font which is okay on my phone that has a black theme. But on other phone the notification bar color and the menus background color is white or a light color. Is there any way (beside giving the user the option to chose the color in the app settings) to know what kind of color or dark/light theme use the phone and match the font color ? 回答1: When you use Notification and set the text by using built-in means, the following line creates the layout: RemoteViews

Get text from expanded notification in status bar?

二次信任 提交于 2019-12-07 07:19:16
问题 Is it possible to get the text within an expanded notification in the statusbar ? This means text set my Notification.BitTextStyle.bigText() , such as in an email notification from Gmail. I would like to get it using Notification.extras but there seems to be no constant, such as Notification.EXTRA_BIG_TEXT for example, that allows this to work. Is there another way of getting this text? Furthermore when I use String bigTitle = mExtras.getString(Notification.EXTRA_TITLE_BIG; it returns null ,