Creating groups with Firebase Realtime Database in Android app












0














I have an Android app that uses the Firebase Realtime Database. At the moment it is a single user app, in that when a user logs in, using Firebase Auth, the data they create is kept private to them. What I need to do for the next phase of the project is to allow for the creation of teams or user-groups that have access (read and write) to the data currently created by a single user.



The database structure and rules for doing this are understood, however, the issue I have is how to create the groups.



I did find the following blog and it is very close to what I need, it does not make clear how a new user would create the pending membership entry in a specific "chat" (this is a group chat sample).



https://firebase.googleblog.com/2016/10/group-security-in-firebase-database.html



Any points on resolving this final issue would be much appreciated.



Sid










share|improve this question





























    0














    I have an Android app that uses the Firebase Realtime Database. At the moment it is a single user app, in that when a user logs in, using Firebase Auth, the data they create is kept private to them. What I need to do for the next phase of the project is to allow for the creation of teams or user-groups that have access (read and write) to the data currently created by a single user.



    The database structure and rules for doing this are understood, however, the issue I have is how to create the groups.



    I did find the following blog and it is very close to what I need, it does not make clear how a new user would create the pending membership entry in a specific "chat" (this is a group chat sample).



    https://firebase.googleblog.com/2016/10/group-security-in-firebase-database.html



    Any points on resolving this final issue would be much appreciated.



    Sid










    share|improve this question



























      0












      0








      0







      I have an Android app that uses the Firebase Realtime Database. At the moment it is a single user app, in that when a user logs in, using Firebase Auth, the data they create is kept private to them. What I need to do for the next phase of the project is to allow for the creation of teams or user-groups that have access (read and write) to the data currently created by a single user.



      The database structure and rules for doing this are understood, however, the issue I have is how to create the groups.



      I did find the following blog and it is very close to what I need, it does not make clear how a new user would create the pending membership entry in a specific "chat" (this is a group chat sample).



      https://firebase.googleblog.com/2016/10/group-security-in-firebase-database.html



      Any points on resolving this final issue would be much appreciated.



      Sid










      share|improve this question















      I have an Android app that uses the Firebase Realtime Database. At the moment it is a single user app, in that when a user logs in, using Firebase Auth, the data they create is kept private to them. What I need to do for the next phase of the project is to allow for the creation of teams or user-groups that have access (read and write) to the data currently created by a single user.



      The database structure and rules for doing this are understood, however, the issue I have is how to create the groups.



      I did find the following blog and it is very close to what I need, it does not make clear how a new user would create the pending membership entry in a specific "chat" (this is a group chat sample).



      https://firebase.googleblog.com/2016/10/group-security-in-firebase-database.html



      Any points on resolving this final issue would be much appreciated.



      Sid







      android firebase-realtime-database firebase-authentication






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 18 '18 at 19:10

























      asked Nov 18 '18 at 1:35









      Sid

      91110




      91110
























          1 Answer
          1






          active

          oldest

          votes


















          0














          Just simply create groups like below



          |--Groups
          |---group1
          |-----uID1 - owner
          |-----uID2 - participant
          |-----uID3 - participant
          ..............


          follow this https://firebase.googleblog.com/2016/10/group-security-in-firebase-database.html link. There are example groups and rules. It will help for u to proceeds it.



          Follow this https://firebase.google.com/docs/database/ios/structure-data to make good structure of data to increase performance






          share|improve this answer





















          • Thank you, as I said in my question I know how to structure the database and rules. The question is how a new user would create the pending membership entry in a specific "chat" (in the linked group chat sample)
            – Sid
            Nov 18 '18 at 17:23










          • Seems I forgot to include the article link, the question is edited now.
            – Sid
            Nov 18 '18 at 19:11











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53357153%2fcreating-groups-with-firebase-realtime-database-in-android-app%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          Just simply create groups like below



          |--Groups
          |---group1
          |-----uID1 - owner
          |-----uID2 - participant
          |-----uID3 - participant
          ..............


          follow this https://firebase.googleblog.com/2016/10/group-security-in-firebase-database.html link. There are example groups and rules. It will help for u to proceeds it.



          Follow this https://firebase.google.com/docs/database/ios/structure-data to make good structure of data to increase performance






          share|improve this answer





















          • Thank you, as I said in my question I know how to structure the database and rules. The question is how a new user would create the pending membership entry in a specific "chat" (in the linked group chat sample)
            – Sid
            Nov 18 '18 at 17:23










          • Seems I forgot to include the article link, the question is edited now.
            – Sid
            Nov 18 '18 at 19:11
















          0














          Just simply create groups like below



          |--Groups
          |---group1
          |-----uID1 - owner
          |-----uID2 - participant
          |-----uID3 - participant
          ..............


          follow this https://firebase.googleblog.com/2016/10/group-security-in-firebase-database.html link. There are example groups and rules. It will help for u to proceeds it.



          Follow this https://firebase.google.com/docs/database/ios/structure-data to make good structure of data to increase performance






          share|improve this answer





















          • Thank you, as I said in my question I know how to structure the database and rules. The question is how a new user would create the pending membership entry in a specific "chat" (in the linked group chat sample)
            – Sid
            Nov 18 '18 at 17:23










          • Seems I forgot to include the article link, the question is edited now.
            – Sid
            Nov 18 '18 at 19:11














          0












          0








          0






          Just simply create groups like below



          |--Groups
          |---group1
          |-----uID1 - owner
          |-----uID2 - participant
          |-----uID3 - participant
          ..............


          follow this https://firebase.googleblog.com/2016/10/group-security-in-firebase-database.html link. There are example groups and rules. It will help for u to proceeds it.



          Follow this https://firebase.google.com/docs/database/ios/structure-data to make good structure of data to increase performance






          share|improve this answer












          Just simply create groups like below



          |--Groups
          |---group1
          |-----uID1 - owner
          |-----uID2 - participant
          |-----uID3 - participant
          ..............


          follow this https://firebase.googleblog.com/2016/10/group-security-in-firebase-database.html link. There are example groups and rules. It will help for u to proceeds it.



          Follow this https://firebase.google.com/docs/database/ios/structure-data to make good structure of data to increase performance







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 18 '18 at 2:48









          Lucefer

          1,1061511




          1,1061511












          • Thank you, as I said in my question I know how to structure the database and rules. The question is how a new user would create the pending membership entry in a specific "chat" (in the linked group chat sample)
            – Sid
            Nov 18 '18 at 17:23










          • Seems I forgot to include the article link, the question is edited now.
            – Sid
            Nov 18 '18 at 19:11


















          • Thank you, as I said in my question I know how to structure the database and rules. The question is how a new user would create the pending membership entry in a specific "chat" (in the linked group chat sample)
            – Sid
            Nov 18 '18 at 17:23










          • Seems I forgot to include the article link, the question is edited now.
            – Sid
            Nov 18 '18 at 19:11
















          Thank you, as I said in my question I know how to structure the database and rules. The question is how a new user would create the pending membership entry in a specific "chat" (in the linked group chat sample)
          – Sid
          Nov 18 '18 at 17:23




          Thank you, as I said in my question I know how to structure the database and rules. The question is how a new user would create the pending membership entry in a specific "chat" (in the linked group chat sample)
          – Sid
          Nov 18 '18 at 17:23












          Seems I forgot to include the article link, the question is edited now.
          – Sid
          Nov 18 '18 at 19:11




          Seems I forgot to include the article link, the question is edited now.
          – Sid
          Nov 18 '18 at 19:11


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53357153%2fcreating-groups-with-firebase-realtime-database-in-android-app%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          mysqli_query(): Empty query in /home/lucindabrummitt/public_html/blog/wp-includes/wp-db.php on line 1924

          How to change which sound is reproduced for terminal bell?

          Can I use Tabulator js library in my java Spring + Thymeleaf project?