Android Question Chat App based on Realtimedatabase ?

Adamdam

Active Member
Licensed User
Longtime User
Dear All,

Greetings,
Kindly, how can I find example here in this community for "Chat-like App based on Realtimedatabase" ?

Thanks on advance,

Best regards
 

MicroDrie

Well-Known Member
Licensed User
I don't know what you want exactly, but what do you think of using RealtimeDatabase as a search term on this community and studying for the second hit as a startingpoint?
 
Upvote 0

Adamdam

Active Member
Licensed User
Longtime User
Thanks Mr. MicroDrie for your reply.

I need example for Chat-App , this Chat-App sure use database between users,
I need this app use RealTimeDatabase instead of using normal server (with MySQL, or any other traditional DB).

i.e. I need Chat-App use RealtimeDatabase

Thanks on advance for any help
 
Upvote 0

MicroDrie

Well-Known Member
Licensed User
I need example for Chat-App , this Chat-App sure use database between users,
The point is RealTimeDatabase has more then one meaning. In principle, you either have a central database to record all chat conversations. A matter of 'what's a name' but if you don't want a central database, it seems more like you want to log your own chat conversations in a local database. The more precisely you define your desired functionality, the better you can search for the necessary (partial) solutions on this forum.
 
Upvote 0

Adamdam

Active Member
Licensed User
Longtime User
I need central DB to store all conversations between users
This DB of type RealtimeDatabase to grantee high speed conversation.
 
Upvote 0

Adamdam

Active Member
Licensed User
Longtime User
Yes Mr. Andrew I need Chat App based on Firebase RealtimeDatabase as you mentioned,
I can't find example here, can you help me for that, please
Thanks on advance for any help,
Best regards
 
Upvote 0

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
The link I provided in my previous post is the forum search results for "realtimedatabase". Not sure why you can't see the posts. They contain examples and libraries.
 
Upvote 0

josejad

Expert
Licensed User
Longtime User
I can't find example here
Probably you can't find exactly what you want, but you will get some useful starting points as MicroDrie and Andrew says.
You will have to put them together and ask any question you have (better if you upload your project)
 
Upvote 0

Adamdam

Active Member
Licensed User
Longtime User
Many thanks Mr. Jose, Many thanks Mr. Andrew, Many thanks Mr MicroDrie,
Really many thanks for your support.

I found this example :
https://www.b4x.com/android/forum/threads/chat-mqtt-over-internet-free-source-code-b4a-b4j.142597/
It work well, just it not have notifications,
and suffer from , if any user not run software all messages not received, ( to receive all messages you must run app forever ).
So, there is any other example solve this problem (don't miss any message even the app not run) or even app can receive all of missed message from Realtimedatabase's archive ?

Best regards
 
Upvote 0

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
I would suggest that you also have another method of getting messages from the database as well as receiving the notifications. When the app starts it can use this call to the read all messages which were sent whilst it was closed.

I am not aware of an example of this so you will probably have to code it yourself.

perhaps Erel's implementation of a Mastadon client will help.

 
Upvote 0

MicroDrie

Well-Known Member
Licensed User
It work well, just it not have notifications,
and suffer from , if any user not run software all messages not received, ( to receive all messages you must run app forever ).
First of all, I'm not an expert on this issue, but Google is sticking all kinds of "band-aids" on Android to improve user security and privacy in each new Android release = higher API level. The annoying consequence for software designers is that what works normally at first, unfortunately no longer works in a new higher API version. The API level can be seen in the manifest file and the comment in the log about the current API level. Some things with the current API level 33 only work in the foreground when the app is active. So what you need is a receiver that remains active in the background (and possibly gives a toast message when a new message is received) while the received message is add to the database.
 
Upvote 0

Adamdam

Active Member
Licensed User
Longtime User
I would suggest that you also have another method of getting messages from the database as well as receiving the notifications. When the app starts it can use this call to the read all messages which were sent whilst it was closed.

I am not aware of an example of this so you will probably have to code it yourself.

perhaps Erel's implementation of a Mastadon client will help.


Many thanks Mr. Andrew

It seam very good example.

Just I have problems,
- How to upload and run server ?
- I have shared server, can I upload and run on it ?

Best regards
 
Upvote 0

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
There are many options for the server.

If you want to run a B4J server then you need to have VPS hosting so that you can run java on the server. Most, if not all shared servers do not have this.

I have experience with PHP so I use Laravel to create my servers. This will run on a shared hosting platform as most shared hosting platforms have PHP and a MYSQL variant.

There are also other PHP options.

They can all be found by using the forum search.

Cheers
 
Upvote 0

Adamdam

Active Member
Licensed User
Longtime User
There are many options for the server.

If you want to run a B4J server then you need to have VPS hosting so that you can run java on the server. Most, if not all shared servers do not have this.

I have experience with PHP so I use Laravel to create my servers. This will run on a shared hosting platform as most shared hosting platforms have PHP and a MYSQL variant.

There are also other PHP options.

They can all be found by using the forum search.

Cheers
Dear Mr. Andrew

Many thanks for your answer, and your interest.
Many thanks for your help.

There is any way to convert this server code to PHP ? that I have good knowledge and experience with php.
That also, php work with all server type

thanks on advance for any help.
Best regards
 
Upvote 0
Top