0
아래 링크를 따라 가며 onCreate에 표시되는 2 개의 알림을 생성했습니다.Android 단순 알림
How to create a notification with NotificationCompat.Builder?
내 질문은 당신이 알림을 누를 때 나는 웹 브라우저에서 웹 페이지를 열 수있는 방법인가?
이것은
Wait a seccond , i'm a newbie .. I have this code
public class MainActivity extends Activity {
private WebView mWebView;
NotificationCompat.Builder mBuilder =
new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.notif)
.setContentTitle("Notification title1")
.setContentText("Notification text1");
NotificationCompat.Builder pBuilder =
new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.photoline)
.setContentTitle("Photoline Studio")
.setContentText("App sponsorizate de Photoline Studio!");
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getWindow().requestFeature(Window.FEATURE_NO_TITLE);
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.notify(0, mBuilder.build());
notificationManager.notify(1, pBuilder.build());
가 어디 의도가 있음을 넣어해야 내 코드?
아, 나는 내 코드에 내 코드를 구현하는 방법을 알지 못하는 초보자입니다. 이제 내 코드를 게시했습니다. –
내 업데이트마다 구현하려고합니다. thnx –
좋아, 나는 이것을 좋아하지 않았다. –