3 messages in com.googlegroups.android-developersRe: showNotification problem
FromSent OnAttachments
eric m25 Feb 2008 17:09 
Dan U.25 Feb 2008 18:56 
eric m25 Feb 2008 19:54 
Subject:Re: showNotification problem
From:Dan U. (dan.@gmail.com)
Date:02/25/2008 06:56:56 PM
List:com.googlegroups.android-developers

In your showNotification method, have you tried printing those Strings out with a Log call to make sure they aren't empty?

On Feb 25, 5:09 pm, eric m <EMUL@gmail.com> wrote:

Everything seems to work great except the strings I pass into this function "noticeTitle" and "appTitle" do not show up in the notification - the areas where they should be are simply blank. I am confident these strings are not just null. I have tried two different methods to get this to work:

1) Passing the strings as arguments into the showNotification function (code below) 2) Declaring the strings as global variables to the service class I am using

The strings do not show up using either method. Any help is greatly appreciated!

Eric

private void showNotification(int icon_Id, int textId, String noticeTitle, String appTitle) { // Launch this class if user selects the notification Intent contentIntent = new Intent(this, wirelessmockup.class);

// Launch this class if user chooses the app icon in notification Intent appIntent = new Intent(this, wirelessmockup.class);

//textId is passed in from the new thread CharSequence text = getText(textId);

mNM.notify(WIFI_NOTIFICATIONS, //use unique resource ID to ID notification new Notification( this, // our context icon_Id, // the icon for the status bar "new net was found", // notification text System.currentTimeMillis(), // the timestamp for the notification noticeTitle, // the title for the notification text, // the details to display in the notification contentIntent, // the contentIntent (see above) R.drawable.app_sample_code, // the app icon appTitle, // the
name of the app appIntent)); // the appIntent (see above)