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:

Magma

Well-Known Member
Licensed User
very very very GOOD work - spider-robot-datamining like :)
 

Star-Dust

Expert
Licensed 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
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
 

Magma

Well-Known Member
Licensed User
@Star-Dust... You can check every 1 hour ... will be safer...
 

Star-Dust

Expert
Licensed 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
 

Magma

Well-Known Member
Licensed User
Hey... ok i will "delete" the code or not? (thinking about it) - anyway was a good example of data-mining :) -->will better not use it too "As is for b4x site"
 

Star-Dust

Expert
Licensed 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

Well-Known Member
Licensed 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)
 

Star-Dust

Expert
Licensed 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
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
 

Magma

Well-Known Member
Licensed User
You ve right... as always, your history here shows your ethic... and have to say that your total work for/with B4X is brilliant !
 
Top