Forums

OverviewFelgo 2 Support (Qt 5) › Using Firebase in two Felgo apps

Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #21840

    test opty

    <div class=”message-body”>

    Hello all,

     

    I’m going to develop two very simple Felgo apps for Android devices, one as the client app installed on many devices and the other a server app installed only on the admin’s device. Both projects are very easy. There is a text in the client app which will be updated by the server app when clicking a button on that app. For that I thought of making use of Firebase, to send the data from the server app to it, and then firebase forwards it to the client apps.

    The users on the client app only see the changes and it’s the admin’s app that make changes when needed.

    </div>
     

    My Felgo apps are ready and contains a lineEdit to get the new text and a button to send it to Firebase. The client app has only a simple text to show the new text sent by the server app.

    Now what code should I add to the projects so that they can both access to Firebase and the connection is made, please?

    Is there an easy example that I can use for this purpose, please?

     

    #21842

    Alex
    Felgo Team
    #21844

    test opty

    Hi Alex, and thanks for your response. ­čÖé

    It’s the first time I’m going to use Firebase. Do you think the link you sent is better than this one for my purpose, please?

    And my second question is that, is it possible for Firebase to forward the data sent by the server app, to the client apps too? I mean, I like to store the data (including text, int values and also images) on the client apps as well.

     

    Thanks for your time. ­čÖé

     

     

     

     

    #21864

    Alex
    Felgo Team

    Hi,

    both are fine. The one you sent is more in-depth and specific, while mine gives some general examples.

    I am not sure if I fully understand your question about forwarding the data. Firebase is only the database itself that you connect to. It is up to your implementation in your app who is allowed to see what data, and who is allowed to edit it.

    Cheers,
    Alex

    #21865

    test opty

    Thank you for your answer. So please let me clarify the task so that it will be easily understood.

    Simply, I want to develop two QML apps for Android devices, one installed only on the admin’s device sending packages┬áto a free physical sever and the other installed on many customers’ devices receiving those packages from that physical server, sent by the admin’s app. Each package is actually a set of data: a┬átext, a┬ádouble and an┬áimage┬ádenoting a product (for instance: text: laptop, double: $ 550, image: laptops’image)
    So the admin’s app only sends new products over the Internet, not on a shared network, and the clients’ app only shows the products. The client app primarily has some products in itself (for cases where the customer isn’t connected to the Internet). We maybe need to send┬áone or two new products to the server per week by the admins’ app. The server must store (for a while) and forward the products to those client apps, when they’re connected to the Internet.

    For this I think I need to tackle two issues:
    1) To know if Firebase can offer these two services (storing and sending the data) freely.
    2) Develop the clients’ app so that it can fit the new data, it has received, into itself and show it to customers.

    Now for the issues above, do you suggest that I use Firebase, as an answer to the first question, please?

    #21867

    Edward

    Hi,

    I have recently been working on an app combining Firebase in Felgo, and one of the deal breakers for me was the ability to segregate permission roles (Admin, User),

    Unsure if it would work for you – but in my instance, in each ‘Profile’ (user or admin), stored in firebase – also contains a key, “isAdmin”, then when logging in my app simply reads this key and should it be 1 (admin) or 0 (user), the admin section of the app is opened up;

    I have also used the Realtime Database Listeners, for continual updates of the app, so should ‘key’ that has been edited by an admin match the desired key for say a user subsection, all applicable devices are updated instantly, and no login/out needs to occur.

    Working with these is great because in your case, if the admins wish to add/remove a product, it syncs across all devices straight away!

     

    Hope I’ve offered some help!

Viewing 6 posts - 1 through 6 (of 6 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support