Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update notification icon #28

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
import android.view.View;
import android.view.inputmethod.InputMethodManager;

import chipset.lugmnotifier.R;

public class Functions {

/*
Expand Down Expand Up @@ -44,7 +46,7 @@ public void hideKeyboard(Context context, View view) {
/*
* Function to show notification
*/
public void showNotification(String title, String subtitle, int icon,
public void showNotification(String title, String subtitle,
Intent resultIntent, Context context, NotificationManager mNotifyMgr) {

Uri soundUri = RingtoneManager
Expand All @@ -53,7 +55,7 @@ public void showNotification(String title, String subtitle, int icon,
0, resultIntent, PendingIntent.FLAG_CANCEL_CURRENT);
Notification mBuilder = new NotificationCompat.Builder(context)
.setContentTitle(title).setContentText(subtitle)
.setSmallIcon(icon).setContentIntent(pendingResultIntent)
.setSmallIcon(R.drawable.notificationicon).setContentIntent(pendingResultIntent)
.setSound(soundUri).setAutoCancel(true).build();
mNotifyMgr = (NotificationManager) context
.getSystemService(Context.NOTIFICATION_SERVICE);
Expand All @@ -65,14 +67,14 @@ public void showNotification(String title, String subtitle, int icon,
* Fuction to show notification without sound
*/
public void showNotificationNoSound(String title, String subtitle,
int icon, Intent resultIntent, Context context,
Intent resultIntent, Context context,
NotificationManager mNotifyMgr) {

PendingIntent pendingResultIntent = PendingIntent.getActivity(context,
0, resultIntent, PendingIntent.FLAG_CANCEL_CURRENT);
Notification mBuilder = new NotificationCompat.Builder(context)
.setContentTitle(title).setContentText(subtitle)
.setSmallIcon(icon).setContentIntent(pendingResultIntent)
.setSmallIcon(R.drawable.notificationicon).setContentIntent(pendingResultIntent)
.setAutoCancel(true).build();
mNotifyMgr = (NotificationManager) context
.getSystemService(Context.NOTIFICATION_SERVICE);
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.