create account

[HapRamp Android] Transaction History, Wallet improvements and User Search by bxute

View this thread on: hive.blogpeakd.comecency.com
· @bxute · (edited)
$166.75
[HapRamp Android] Transaction History, Wallet improvements and User Search
#### GitHub Repository: 
https://github.com/hapramp/Hapramp-Android

-----

![Drawing.png](https://cdn.steemitimages.com/DQmYRoVDJHGskjCaS2WZvBS1HgshKQZub44oj5RJp9Medu8/Drawing.png)

## New Features
To make Android app useful and complete so that users can take all possible actions on the Steem, we are continuously adding  new features to it.

Now HapRamp's Android app supports
1. **users search** 
2. **wallet information**
3. **transaction history** view along with memo.

This gif will give you a tour of all three updates combined--

<center>![hapramp-app-updates.gif](https://cdn.steemitimages.com/DQmZwidiKqWFMHAmRe56pm817Zh8RZfvWMRXPi9mTAFfkJD/hapramp-app-updates.gif) </center>

-----

# 1. Transaction History
Now users can see the wallet transaction history on HapRamp's Android app. From the user's profile, one need to click on **My Wallet** and tap on **Go To History**.

Here is how it looks like.

<center>
![Screenshot_2018-07-12-17-52-50-714_com.hapramp_pixel_really_blue_portrait.png](https://cdn.steemitimages.com/DQmZmPVuQUr6irCajiSreJSAhPxcmtmfSdgnzubPzF5jmj5/Screenshot_2018-07-12-17-52-50-714_com.hapramp_pixel_really_blue_portrait.png)
</center>

#### Code Snippet

We need to use `database_api` for getting state of a user`s transfer history.

The following method illustrates the http call:
![transfer-carbon.png](https://cdn.steemitimages.com/DQmUeLeDta6j5CRkRGyNsQM5UWGbELNzPYnk2g8eeih8nnY/transfer-carbon.png)

After this, we have to parse response for each of the type of `operation`(author_reward, curation_reward, comment_benefactor_reward , transfer, claim_balance etc.)

-----

# 2. Improvements in the Steem Wallet View
Previously, in the HapRamp's app, only the Steem and Steem Dollars were visible. ([Here](https://steemit.com/utopian-io/@bxute/added-steem-wallet-information-steem-balance-and-steem-power-on-hapramp) is the corresponding update).

This time, I've updated it with a more informative view which shows: 
* Steem
* Steem Power
* Steem dollars
* Savings balance
* Estimated Account Value
*  Current Conversion Rate (STEEM to USD and SBD to USD)

<center>
![wallet_pixel_really_blue_portrait.png](https://cdn.steemitimages.com/DQmTkjPkAPMbd1d5zAy6bm2hcoZ2UwBXiYfLpngCtjs3dRm/wallet_pixel_really_blue_portrait.png)
</center>

#### Code Snippet

Steem Power and Steem Reputation are the two things we need to calculate from the raw data.

**Method used to calculate Steem Power**
![steem_calc.png](https://cdn.steemitimages.com/DQmYeH22693qvgDctR4yNRRLD68AQhKfE9NpdLQ7XANFZaV/steem_calc.png)

**Method used to calculate Steem Reputation**
![reputation_calc.png](https://cdn.steemitimages.com/DQmVVUhaAyYRotV3AabavbkzTvNbXavrFJpVn2GRFzz2g1U/reputation_calc.png)

-----

### 3. User Search
Now on HapRamp's Android app it is possible to search and view profile of any user on the Steem. You need to go to search and query for a username of a profile.

<center>
![Screenshot_2018-07-13-14-56-28-870_com.hapramp_pixel_really_blue_portrait.png](https://cdn.steemitimages.com/DQmbttA1NkwdE4LjmLHQFtA7kaXb5MVEiwMsJadn6yrFv73/Screenshot_2018-07-13-14-56-28-870_com.hapramp_pixel_really_blue_portrait.png)
</center>

#### Code Snippet
For searching account from a segment of strings, we used `condenser_api.lookup_accounts`.
As user goes typing, user accounts matching to that is returned as response.

![user_search.png](https://cdn.steemitimages.com/DQmNvdfKHjLvcAbpWpBwZLV2McXsfM1DRsWUGnPNAtD3u3q/user_search.png) 

-----

## GitHub Account
@bxute - https://github.com/bxute

### Commits
https://github.com/hapramp/Hapramp-Android/commit/69dc96f12f7f7eec7b1a23efd8be5dc4e296c8fd

https://github.com/hapramp/Hapramp-Android/commit/dd73e5a7f20840665aa1c914fc729e41e802ec26

https://github.com/hapramp/Hapramp-Android/commit/144a961aa424179be5df07e218e1f255ced3c148

https://github.com/hapramp/Hapramp-Android/commit/467ea4f629e3c25e293b1322a7fe833288a82711

https://github.com/hapramp/Hapramp-Android/commit/98530de50f9dc82a348a25a1f25c2b28984f52be

-----

<a href="https://discord.gg/PkgCv8j">
<center>
https://pbs.twimg.com/media/DhaADYzXcAACLGd.jpg:large
### Join the conversation on Discord
</center>
</a>
πŸ‘  , , , , , , , , , , , , , , , , , , ,
properties (23)
authorbxute
permlinkhapramp-android-transaction-history-wallet-improvements-and-user-search
categoryutopian-io
json_metadata{"tags":["utopian-io","development","hapramp","steem","technology"],"users":["bxute"],"image":["https://cdn.steemitimages.com/DQmYRoVDJHGskjCaS2WZvBS1HgshKQZub44oj5RJp9Medu8/Drawing.png","https://cdn.steemitimages.com/DQmZwidiKqWFMHAmRe56pm817Zh8RZfvWMRXPi9mTAFfkJD/hapramp-app-updates.gif","https://cdn.steemitimages.com/DQmZmPVuQUr6irCajiSreJSAhPxcmtmfSdgnzubPzF5jmj5/Screenshot_2018-07-12-17-52-50-714_com.hapramp_pixel_really_blue_portrait.png","https://cdn.steemitimages.com/DQmUeLeDta6j5CRkRGyNsQM5UWGbELNzPYnk2g8eeih8nnY/transfer-carbon.png","https://cdn.steemitimages.com/DQmTkjPkAPMbd1d5zAy6bm2hcoZ2UwBXiYfLpngCtjs3dRm/wallet_pixel_really_blue_portrait.png","https://cdn.steemitimages.com/DQmYeH22693qvgDctR4yNRRLD68AQhKfE9NpdLQ7XANFZaV/steem_calc.png","https://cdn.steemitimages.com/DQmVVUhaAyYRotV3AabavbkzTvNbXavrFJpVn2GRFzz2g1U/reputation_calc.png","https://cdn.steemitimages.com/DQmbttA1NkwdE4LjmLHQFtA7kaXb5MVEiwMsJadn6yrFv73/Screenshot_2018-07-13-14-56-28-870_com.hapramp_pixel_really_blue_portrait.png","https://cdn.steemitimages.com/DQmNvdfKHjLvcAbpWpBwZLV2McXsfM1DRsWUGnPNAtD3u3q/user_search.png","https://pbs.twimg.com/media/DhaADYzXcAACLGd.jpg:large"],"links":["https://github.com/hapramp/Hapramp-Android","https://steemit.com/utopian-io/@bxute/added-steem-wallet-information-steem-balance-and-steem-power-on-hapramp","https://github.com/bxute","https://github.com/hapramp/Hapramp-Android/commit/69dc96f12f7f7eec7b1a23efd8be5dc4e296c8fd","https://github.com/hapramp/Hapramp-Android/commit/dd73e5a7f20840665aa1c914fc729e41e802ec26","https://github.com/hapramp/Hapramp-Android/commit/144a961aa424179be5df07e218e1f255ced3c148","https://github.com/hapramp/Hapramp-Android/commit/467ea4f629e3c25e293b1322a7fe833288a82711","https://github.com/hapramp/Hapramp-Android/commit/98530de50f9dc82a348a25a1f25c2b28984f52be","https://discord.gg/PkgCv8j"],"app":"steemit/0.1","format":"markdown"}
created2018-07-13 10:19:12
last_update2018-07-13 10:23:30
depth0
children4
last_payout2018-07-20 10:19:12
cashout_time1969-12-31 23:59:59
total_payout_value125.212 HBD
curator_payout_value41.533 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length4,151
author_reputation7,043,008,489,088
root_title"[HapRamp Android] Transaction History, Wallet improvements and User Search"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id64,516,506
net_rshares72,925,740,617,673
author_curate_reward""
vote details (20)
@amosbastian ·
Thanks for the contribution, @bxute! You've added some great features, good work!

Is there a reason you are calling the API yourself and not using a wrapper (not sure if there is one for Java)? Also, was curious why your tab size is so large? It makes the code very wide and less readable (in my opinion).

Your contribution has been evaluated according to [Utopian policies and guidelines](https://join.utopian.io/guidelines), as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, [click here](https://review.utopian.io/result/3/1112213).

---- 
Need help? Write a ticket on https://support.utopian.io/. 
Chat with us on [Discord](https://discord.gg/uTyJkNm). 
[[utopian-moderator]](https://join.utopian.io/)
πŸ‘  , ,
properties (23)
authoramosbastian
permlinkre-bxute-hapramp-android-transaction-history-wallet-improvements-and-user-search-20180715t163923502z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"users":["bxute"],"links":["https://join.utopian.io/guidelines","https://review.utopian.io/result/3/1112213","https://support.utopian.io/","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"}
created2018-07-15 16:39:21
last_update2018-07-15 16:39:21
depth1
children1
last_payout2018-07-22 16:39:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length797
author_reputation174,473,586,900,705
root_title"[HapRamp Android] Transaction History, Wallet improvements and User Search"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id64,776,788
net_rshares7,726,161,463
author_curate_reward""
vote details (3)
@bxute ·
Thank you very much @amosbastian for reviewing my work. 

```
Is there a reason you are calling the API yourself and not using a wrapper (not sure if there is one for Java)?
```
> Yes you are right.
There is one named `SteemJ` which provides many functionalities.
Since we are using `SteemConnect` for most of the purpose,`SteemJ` is a large library, so taking use `SteemJ` for small calls will be infeasible. Hence we decided to make plain Http call.




```
Also, was curious why your tab size is so large? It makes the code very wide and less readable (in my opinion).
```
> Actually my Studio IDE had an incorrect `editorconfig`. Due to which i was getting correct view here but when i pushed the code, it changed there on GitHub.
I assure to rectify it in the next update.
properties (22)
authorbxute
permlinkre-amosbastian-re-bxute-hapramp-android-transaction-history-wallet-improvements-and-user-search-20180716t063919029z
categoryutopian-io
json_metadata{"community":"busy","app":"busy/2.5.2","format":"markdown","tags":["utopian-io"],"users":["amosbastian"],"links":["/@amosbastian"],"image":[]}
created2018-07-16 06:39:18
last_update2018-07-16 06:39:18
depth2
children0
last_payout2018-07-23 06:39:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length778
author_reputation7,043,008,489,088
root_title"[HapRamp Android] Transaction History, Wallet improvements and User Search"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id64,834,971
net_rshares0
@steemitboard ·
Congratulations @bxute! You have completed the following achievement on Steemit and have been rewarded with new badge(s) :

[![](https://steemitimages.com/70x80/http://steemitboard.com/notifications/votes.png)](http://steemitboard.com/@bxute) Award for the number of upvotes

<sub>_Click on the badge to view your Board of Honor._</sub>
<sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub>



**Do not miss the last post from @steemitboard:**
[SteemitBoard World Cup Contest - Play-off for third result](https://steemit.com/steemitboard/@steemitboard/steemitboard-world-cup-contest-play-off-for-third-result)

---
**Participate in the [SteemitBoard World Cup Contest](https://steemit.com/steemitboard/@steemitboard/steemitboard-world-cup-contest-collect-badges-and-win-free-sbd)!**
Collect World Cup badges and win free SBD
Support the Gold Sponsors of the contest: [@good-karma](https://v2.steemconnect.com/sign/account-witness-vote?witness=good-karma&approve=1) and [@lukestokes](https://v2.steemconnect.com/sign/account-witness-vote?witness=lukestokes.mhth&approve=1)

---

> Do you like [SteemitBoard's project](https://steemit.com/@steemitboard)? Then **[Vote for its witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1)** and **get one more award**!
πŸ‘  
properties (23)
authorsteemitboard
permlinksteemitboard-notify-bxute-20180714t225220000z
categoryutopian-io
json_metadata{"image":["https://steemitboard.com/img/notify.png"]}
created2018-07-14 22:52:18
last_update2018-07-14 22:52:18
depth1
children0
last_payout2018-07-21 22:52:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,348
author_reputation38,975,615,169,260
root_title"[HapRamp Android] Transaction History, Wallet improvements and User Search"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id64,696,671
net_rshares1,964,059,977
author_curate_reward""
vote details (1)
@utopian-io ·
Hey @bxute
**Thanks for contributing on Utopian**.
We’re already looking forward to your next contribution!

**Want to chat? Join us on Discord https://discord.gg/h52nFrV.**

<a href='https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1'>Vote for Utopian Witness!</a>
πŸ‘  , ,
properties (23)
authorutopian-io
permlinkre-hapramp-android-transaction-history-wallet-improvements-and-user-search-20180715t171508z
categoryutopian-io
json_metadata"{"app": "beem/0.19.42"}"
created2018-07-15 17:15:09
last_update2018-07-15 17:15:09
depth1
children0
last_payout2018-07-22 17:15:09
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length297
author_reputation152,955,367,999,756
root_title"[HapRamp Android] Transaction History, Wallet improvements and User Search"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id64,779,780
net_rshares7,326,146,624
author_curate_reward""
vote details (3)