title: In-App billing connect to Firebase and get Products
body: <p>I'm starting to create an APP where I can buy items from it.
  Could be like this: <img src="https://www.geek.com/wp-content/uploads/2013/08/pvz2_plantshop-625x352.jpg" alt="image]"> where you can see an <code>Image</code>, <code>Name of product</code>, and <code>Price</code>. Well, I allready have a <code>Sign-in with Google</code> made with <code>Authentication Firebase</code> and I store it on <code>Firebase database</code>, I'd like to create the following this structure that @Alex Mamo recommend to me : </p>
  
  <pre><code>Firebase-root
      |
      --- users
      |     |
      |     --- uid1
      |          |
      |          --- //user details (name, age, address, email and so on)
      |          |
      |          --- products
      |                |
      |                --- productId1 : true
      |                |
      |                --- productId2 : true
      |
      --- products
      |     |
      |     --- productId1
      |     |     |
      |     |     --- productName: "Apples"
      |     |     |
      |     |     --- price: 11
      |           |
      |           |
      |           --- users
      |                |
      |                --- uid1: true
      |                |
      |                --- uid2: true
      |
      --- purchasedProducts
           |      |
           |      --- uid1
           |           |
           |           --- productId1: true
           |           |
           |           --- productId2: true
           |
           --- paidProducts
           |      |
           |      --- uid2
           |           |
           |           --- productId3: true
           |
           --- availableProducts
           |      |
           |      --- uid3
           |           |
           |           --- productId4: true
  </code></pre>
  
  <p>Looks fine to make an easy app like mine.
  Because the scenario is as easy as : </p>
  
  <ul>
  <li>User loggs in the APP</li>
  <li>User see the free products and can buy some products</li>
  <li>User can see that products that has allready paid for them</li>
  </ul>
  
  <p>From start I store the <code>uid</code> inside the <code>users</code>.
  What I do not know is;</p>
  
  <ol>
  <li>Do I have to create the same products on <code>Google Play Console</code> to <code>Firebase database</code>? I've already created 1 product to test it on <code>Google Play Console</code>, I have to create the product as well on my app (I mean on <code>Firebase database</code>)?</li>
  </ol>
  
  <p>To implement <code>in-app billing</code> I'm following this <a href="https://www.youtube.com/watch?v=9chvh1WYCvw" rel="nofollow noreferrer">tutorial</a> but I've found this <a href="https://github.com/anjlab/android-inapp-billing-v3" rel="nofollow noreferrer">android-inapp-billing-v3</a> library and looks good though.</p>
  
  <p>If there is any of you that has worked with <code>in-app-purchased</code> and has created items and know how to get them from <code>Google Play Console</code> please feel free to share a demo of how to.</p>
  
  <h2>EDIT</h2>
  
  <p>I allready got how to purchase items I ended up using this <a href="https://github.com/anjlab/android-inapp-billing-v3" rel="nofollow noreferrer">Library</a>, the thing is that on my <code>Login</code> page I have the db create of firebase I mean there I put the id of user and email... Do I have to add all the products there aswell?</p>