I just completed an android app (NOT dapp) building on top of IPFS.
There are several key steps in the process:
- copy ipfs binary to a directory in android app
- start ipfs daemon, with option --enable-pubsub-experiment
- add a file (take a picture for example), the hash of the file, set the description of the file, and the number of token should be payed to get the file, save this bean in the sqlite database . you may put more files.
- add the json file for these files generated from sqlite database, get the hash of this json file
- name publish the hash of json file, so that others can find it by the hash of the node
- pubsub the node with the topic “PUBLISH_NODE”, the data is "NAMEHASH:#nodehash;TOTAL_PRICE:100;PUBLISH_WALLET_ADDRESS:#walletAddress; others who subscribe the topic will get the hash of the node
- sub the topic “PUBLISH_NODE”, get the hash of the node, the total price of the node, and the wallet address, save them into local database
- choose one node, load the contract of the TOKEN used, get the PUBLISH_WALLET_ADDRESS, your wallet address, and how much token, click to pay it, which will run the smart contract to transfer the token from your wallet address to the PUBLISH_WALLET_ADDRESS.
- after pay for it, get the json file
- show the images listed in the json file.
People can sell their digital file with this app, no center server is used, and no one can stop it.
Also there are several issues should be resolved carefully, especially in the encryption step to make sure the digital product can be decrypted correctly only after payed.
Is this practical to make it a product?
You may reach me at skype account: rogerlzp if you are interested.
Comments are highly appreciated.