πŸ”” MelonNotification β€’ Various styled notifications + Itoo

I have tried that method, has not worked.

What have you tried?
Start with a working example in the foreground, then follow the usage tips of itoo Open Source β€’ Background Tasks: Itoo πŸš€ and try to get it running in the background and if you got stuck, post a screenshot of your relevant blocks

Usage

  • Before you try to do something with Itoo, first get it working normally.
  • Do not use global variables, or try to access/set them.
  • Do not use user interface components such as Label, TextBox or even Notifier since there is no interface in background.
  • You cannot use Tiny DB, alternatively you are supposed to make use of the similar storage features Store/Fetch property blocks offered by this extension.
  • For the main background procedure, you need to include an argument "x".
  • You cannot use normal Event blocks in background, use RegisterEvent block to listen to component events.
  • You cannot run more than one foreground or background service.
  • A component does not get created until you touch any of its block.

Taifun

1 Like

this is my tried, it is not worked

Yes, because you are using a global variable

Use StoreProperty/FetchProperty methods instead
Also set the timer interval before registering the Timer event

Taifun

1 Like

It working but time not updated :slightly_frowning_face:

Can you post the blocks of your

EDIT: you also might wamt to look into this example

which updates the permanent notification regularly

Taifun

1 Like

Why are you using global variables? Variable global timer is not initialized in the background... It can be null or cause a crash.

Hey, any idea regarding the blocks I sent?

Hi, could you please post your .aia file so I can check later? Also before running it in background, does it run properly without it?

Sorry, cannot post the aia file as it contains sensitive information. Building a simple notification works, let me highlight that the notifications are called by Itoo via the foreground service. However if I try to add an action button or set the intent for the notification, the notification simply doesn't come up.

Also to note, I have tested on Android 16 beta and Android 15 stable release devices (Pixel 7).

Create a test project and provide a screenshot of your relevant blocks

Taifun

I have provided a screenshot of the blocks used earlier. Maybe you haven't seen it?

I have seen those
Sorry, I can't help with that
Provide a test project, so @Kumaraswamy can check

The question is

Taifun

Hello, I'm building this small app that receives data from an Arduino motion sensor. When motion is detected a NOTIFICATION is sent to mobile phone.
I'm bit of a beginner to this.
can someone please give me tips.

Im not entirely sure if notifications blocks in "detected" case are placced correctly

1 Like

Always fill all socketls
Ask for permission during Screen Initialize and create the channel there

Try the example project from the first post of this thread to better understand how the extension is working

Taifun

thanks, will check it out

Can it be used to show music notification?

Ok, so let's put the question in a different way: by Melon Notification extension, is it possible just to update the message of an existing notification, without forcibly raising a new notification?

Plsase see the documentation in post 1

  • Posts the notification with the given Id. You may also use this to update a notification.
    If id is less than 1, a random Id will be choosen.

Taifun

Alright, addressing my issue.

So if you have an Itoo foreground task which sends notifications (syncs from web using a timer), you need to create an ITOO INTENT, standard intent will NOT work when posting the notification using an Itoo foreground service.

1 Like