Referral option

Pls I need a referral option that, "A" user refers "B" user and then "A" will earn referral bonus/reward for referring "B" .

Write the code using the advice in Programming Your App to Make Decisions to program what should happen.

What have you tried?

You will need to do a bit of bookkeeping.

Here's a possible set of columns for a rewards table:

  • Username of referrer ("A")
  • referral date (optional)
  • Username of referree ("B")
  • Date reward given to referrer
  • Amount of rewards given to referrer

How can I do this

Thank you so much for assistance all these while,

in the explanation i heard,
bonus will be given at sign up.

In my case I want the bonus to be given to "A" when "B" subscribed . Which means it will given in the homepage not sign-in page,.

I stored the data in another firebase DB " Which is "firebase refer" , but when, user "B" homepage is initialized the "firebase refer" did not load correctly, it combined every data on the database instead to download separately.

I believe if it loads correctly in Homepage, I will be able to add bonus to it easily when user "B" pay for subscription.

Check the attached screenshots of the blocks I used.

Thanks.

Thank you so much for assistance all these while,

in the explanation i heard,
bonus will be given at sign up.

In my case I want the bonus to be given to "A" when "B" subscribed . Which means it will given in the homepage not sign-in page,.

I stored the data in another firebase DB " Which is "firebase refer" , but when, user "B" homepage is initialized the "firebase refer" did not load correctly, it combined every data on the database instead to download separately.

I believe if it loads correctly in Homepage, I will be able to add bonus to it easily when user "B" pay for subscription.

Check the attached screenshots of the blocks I used.

Thanks.

This is the firebase of the referrals

How did you manage to obscure your block images with an Android screen overlay?

It obscures the all-important event block headers.

Please download and post each of those event block(s)/procedures here ...
(sample video)

Please go into your Firebase data console and post an image of the data contents tree for us to inspect.

  1. Where is your Firebase .GotData event block(s)?

I download the blocks and screenshot to be able to circle the firebase block events, you can see it "firebase refer"

This is the data tree

Tell me how you are using the start value block,
and why.

I did not use any start value, when u used start value in the home page no data was downloaded so I removed the start value and the data came with everything in the database, iam confused please tell me what to do, if you have another idea to do it, to get the data to homepage , Tag and value

Export your .aia file and upload it here.
export_and_upload_aia

Ok.

TWOcards_No2_checkpoint2.aia (7.8 MB)

Herr is it

Hope you got my massage sir

You seem to use buckets of confetti as your database.

I added a multiple database browser Screen to your project to allow browsing the different databases and buckets.

Every single one of them lacked depth.
Capture


Screen_dump_Firebase.aia (7.8 MB)
Somedatabases

I suggest you read the Bus Route tutorial at

and pay special attention how they add '/' to the tags to nest data.

image

Than you very much, I'll try it now , really appreciate

I understand the blocks, but in the block I circled I want the value to come to a text box or label so the i can edit the value in the app. Not in list view.

To do that, you would need to add an event block for the ListView for when an item is selected from the ListView.
Study the ListView blocks and show us how you would handle that event, extracting the tag and value from the ListView Element and putting them into textbox .Texts for editting.

Wow ABG, you are a genius, thanks it work like magic, I've sent you the AIA so pls check how I did it.

Screen_dump_Firebase2.aia (7.8 MB)

But another problem, users can not click and select from multiple databases, the firebase refer IAM using for referral is in index 14, so I want automatic selection on index 14 when the button is clicked.

I want this to be hidden.
Thanks

Don't mistake the diagnostic tool I posted for instruction on how to build an app.

It is meant only to help you see what is going on under the hood and to tweak the stored data for diagnostic and repair purposes.

That would be like an auto mechanic returning a car to a customer with the hood open and wires, hoses, and meters hanging out on the road.

I am not yet convinced that you have a data storage design that fulfills your aims for the app.

Perhaps if you would write a few paragraphs listing your databases, their keys and values, and how they tie together?

Also, show me how you use '/' in your tags to evolve your data from a plain of grass into a forest of trees with branches.