Firebase As A Service



  • Hi,
    I want to use firebase as a service. To create a service in Qt my java class must extends QtService. But in order to handle firebase notifications my java class must extends FirebaseMessagingService. How can i use both ? I know that multiple inheritance not supported in java. Any idea? I must create a service in order to handle background notifications of the firebase api.


  • Moderators

    @NickV said in Firebase As A Service:
    How can i use both ? I know that multiple inheritance not supported in java

    you can't, for the reason you already mentioned.
    You need to create 2 separate services.



  • But in order to create a service in qt my java class must extends QtService or else no service is created
    To create service i followed this link: https://www.kdab.com/qt-android-create-android-service-using-qt/


  • Moderators

    @NickV
    After all it's still an Android app. So you can apply native coding principles.

    Also you can try to modify the QtService class to inherit your service of choice (keep in mind the license restrictions).
    The QtService class relies is in qtbase/src/android/java/src/org/qtproject/qt5/android/bindings and should be copied along the build process IIRC.



  • @raven-worx said in Firebase As A Service:

    Also you can try to modify the QtService class to inherit your service of choice (keep in mind the license restrictions).

    What do you mean by saying "Keep in mind license restrictions"?
    Can i modify or not QtService class?
    Any other way in order not to modify QtService Class?


  • Moderators

    @NickV said in Firebase As A Service:

    What do you mean by saying "Keep in mind license restrictions"?
    Can i modify or not QtService class?

    If you don't own a commercial license you are using Qt in LGPL. That means you need to make your source code public. This is already the case since you are developing an Android App (LGPLv3).

    Any other way in order not to modify QtService Class?

    If firebase requires you to use their service class and don't let you alternatively implement an interface etc. .... no.



  • Yes i know that i have to make my source code public but at this time i only make a test app to see if firebase notifications works or not. So i have to make public the code of an unpublished app?

    As about "If firebase requires you to use their service class and don't let you alternatively implement an interface etc. .... no." i've already tried interfaces and inner classes but nothing worked.


  • Moderators

    @NickV said in Firebase As A Service:

    So i have to make public the code of an unpublished app?

    of course not. I am talking about the published product.

    i've already tried interfaces and inner classes but nothing worked.

    then i don't know what else to tell you.



  • Ok! Thanks for your reply @raven-worx ! I will search for a solution and i will inform my topic if i found something! Thanks again!


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.