B4J Code Snippet [B4X] Notice notifications and new messages on the forum

I have long hoped that an Alert would be added in the IDE environment when someone writes a new message or there are new ALERTS for me.

Since my wish did not come true, I wanted to make it happen by myself. Here is a source that works on all platforms that scans over a period of time for new messages or ALERTS.
For the moment I use the polling method.

I attach only the example in B4J, but as soon as possible I will publish a version for B4A and B4i, even if the class is written for B4X and you can use it anyway on any platform.

1625721970480.png


PS. For the B4A version I was thinking of a floating App that remains running in the Background.
 
Last edited:

Star-Dust

Expert
Licensed User
Longtime User
Here is the B4A version. You start it then reduce the App and you are left with the floating button that updates you every 5 minutes on post notifications.
With each new notification it will vibrate.

PS. Required this library

1.png
2.png
 
Last edited:

Star-Dust

Expert
Licensed User
Longtime User
ops sorry.

I hadn't thought about it, I don't know how to prevent a DDOS attack. I remove the source.

I don't know what you don't like, it's convenient for me to have an alert while you are not logged in, just that
 

Star-Dust

Expert
Licensed User
Longtime User
@Star-Dust... You can check every 1 hour ... will be safer...
Sure but you can change it even at 1 second ... it should be a library closed in a JAR to make it uneditable.
But it seems that if I compile the okHttpUtils library in JAR I will generate problems
 

Star-Dust

Expert
Licensed User
Longtime User
That's clear. We just need to be careful not to cause excessive server load.
Yes I realize, it could also be used maliciously.
 

Magma

Expert
Licensed User
Longtime User
But generally any "code" with httputils can be used against b4x site or attacking any site... just login again and again will be a bruteforce program or make flood... I hope not having bad guys here...

So will be better for this job create a web-service (Specific from b4x site creator) like giving json result... and ofcourse blocking member and ip too if time period is smaller than the right... better make a "Wish" (as you had)
 

josejad

Expert
Licensed User
Longtime User
Star-Dust, you probably know it but you like to face your own challenges and learn things in the way, so this is just a (probably) obvious observation, but if you let the chrome app to notify your alerts, it will work in windows and android.
 

Star-Dust

Expert
Licensed User
Longtime User
I have found a way to compile it into a library in order to set polling at a frequency that does not cause excessive server load. As soon as I have another 5 minutes I will post
 

Star-Dust

Expert
Licensed User
Longtime User
I thought about it and changed my mind. Creating a closed library becomes insecure for those who use it, not knowing the source in theory you could send/stolten the credentials.

A closed library would not be safe for those who use it. I therefore prefer not to publish anything, in the source or compiled in this forum
 
Top