Code for implementing Notifications in Sketchware

This tutorial shows a Sketchware android project example in which a Notification is displayed when a Button is clicked and when the Notification is clicked, it opens a new Activity.

1. Create a new project in Sketchware. In VIEW area add an EditText edittext1, and a Button button1.

2. Using Image Manager add an images mail_white. This will be used as the Notification icon.

3. In Library manager switch on AppCompat and Design.

4. Create a new VIEW two.xml /

5. Add a More Block: createChannel.

6. In More Block createChannel, use add source directly block and put following code:
CharSequence name = "Channel name 1";
String description = "Notification channel";
int importance = NotificationManager.IMPORTANCE_DEFAULT;
NotificationChannel channel = new NotificationChannel("id 1", name, importance);

NotificationManager notificationManager = getSystemService(NotificationManager.class);


7. In onCreate event, use the More Block createChannel.

8. Suppose you want to display content in edittext1 as notification when button1 is clicked. Then in button1 onClick event use an add source directly block and write the following code:

Intent intent = new Intent(MainActivity.this, TwoActivity.class);
PendingIntent pendingIntent = PendingIntent.getActivity(MainActivity.this, 0, intent, 0); builder = new, "id 1")
.setContentTitle("My notification")
.setContentText("The text in EditText is " + edittext1.getText().toString())
.setAutoCancel(true); notificationManager =;

'MainActivity.this' has to be changed to the Activity in which the code is used.

'TwoActivity.class' has to be changed to the Activity to be opened when notification is clicked.

Change contentTitle, contentText and SmallIcon as per your requirement.

9. You can also set a CustomView in Sketchware as notification by making little modifications to the code above. Suppose name of your Custom View is 'cview.xml'. Then add the following code just before the code provided above, to display it as notification:

RemoteViews contentView = new RemoteViews(getPackageName(), R.layout.cview);

Now in the code provided earlier, replace
.setContentTitle("My notification")
.setContentText("The text in EditText is " + edittext1.getText().toString())


This will display the contents of Custom View as notification.

10. Save and run the project. When button1 is clicked, it displays a notification showing contents of edittext1, and when the Notification is clicked, it opens TwoActivity.


  1. Hi there,
    I watch your videos on the youtube and i learn many tricks about sketchware, but i have a question: i need to put a web page in a string to edit it and extract some data. There many "how to" about it in the internet, but only works in the android studio. Can you help me? How to put a entire web page in a string in sketchware?

    Thank you,

    Flávio (from Brazil)
    my email:

  2. Dude Why You Not Add To Create Own I mean Create Notiffication and Edit Text And Info And Add Progress Ba4

  3. How can I make the project work on the main screen of the phone like app of the battery

  4. This comment has been removed by the author.

  5. How to acces data from any kind of notification.means want activity in response on notification.

    1. The intent part in code above let's it open MainActivity. You can change that to open any other Activity. Change it in this line: Intent notificationIntent = new Intent(getApplicationContext(),MainActivity.class);

    2. Sir,i need to access normal text message content trough sketchware app,is it possible.

    3. This comment has been removed by the author.

    4. A app which is to be read a text message and retrive the part of text or whole,reacting upon the content of message.

  6. Hello please tell me how to implement notification for new message in chat ?

  7. I think hes means can you create an Android widget in sketchware i myself am interested in doing so

    1. it's simple:
      for textview "TextView androidText = new TextView(this);"
      for edittext "EditText androidEdit = new EditText(getActivity());"
      for linear "LinearLayout androidLayout = new LinearLayout(this);"

  8. How to make notification permanent?

    1. Spam the intent of the phone's CPU by running the code every millisecond. Try that

  9. how to integrate the keypad into firebase notification so that client get the message?
    if the tutorial you share is only for applications that we install ourselves not for clients

  10. This comment has been removed by the author.

  11. How to the send. Push notifications to user .. like one signal push notifications

  12. Failed to post on channel null

  13. How to submit app IN sketchware competition

  14. How to get premium sketchware for free

  15. Now notification deprecated .
    How could I solve it

    1. You need to specify channel in builder . Does not generate run errors .

  16. hai.. i love your blog so much!!!

    How do I make a webview riderect to the Play Store application when I will download an application from Google?

    Thank you for the help..

  17. Hi. Why notifications do not work to all devices? This procedure give good results only to some phones.

  18. how to integrate the firebase notification so that client get the message?
    bcz the tutorial you shared is only for applications that we install ourselves not for clients

  19. create push notifications sketchware

  20. But it's not working on Android 8 and higher...
    How to do it in new Android versions?

    P.s. sorry for long mail.

  21. This Code for implementing Notifications don't work with Android 8. There is a New codes?

  22. I found that this works terrific on my device, however, it does not push the notification to other devices. For example, say a chat app, when I send a message, I get notified that I sent it. None of the other 6 devices recieve notification, just the message.

  23. Can you guys please help me about how to show listview contents in notifications when a listview item is clicked.

  24. How to make notifications for newly added data in listview on Firebase

  25. This comment has been removed by the author.

  26. Hi ,
    I want to create a to-do list app.
    In that even if the app activity gets destroyed,i still want to give user a notification about completing task as a reminder. Is it possible through sketchware.

    (Eg. Like any alarm app , even if we close the app from RAM it still rings at certain time)

  27. How set Snal Icon from file picker and size of the icon


Post a Comment

Popular posts from this blog

A Flash Light App in Sketchware

Create Music Player app in Sketchware

Simple car racing android game in Sketchware

In Sketchware: How to create a calculator for any simple formula?

Firebase auth in Sketchware for Login Activity