Repository
https://github.com/hispeedimagins/steem
steemer is and will remain the first native android app which is and will be forever completely free for the people to use.
Because @steemit needs it. A quick way to interact with the blockchain. One that will not eat into the users rewards.
The user should be able to claim rewards available from within the app and hence this feature was added. When you launch the app it checks for any available rewards and if they are present, a dialog will be launched which will show the available rewards and a button to claim them.
Did not have any rewards available while writing this to show it in a screenshot. :(
How do you know if rewards are available?
Fetch a users profile.
Handy tip, just do this to retrieve any users profile via steemit
yup, just adding .json at the end will return its JSON form. This works for articles too.
"reward_sbd_balance": "0.000 SBD",
"reward_steem_balance": "0.000 STEEM",
"reward_vesting_balance": "0.000000 VESTS",
"reward_vesting_steem": "0.000 STEEM",
If rewards are available then these values will not be 0.00.
If available, this is the request to make it retrieve them.
Note : we use reward_vesting_balance instead of reward_vesting_steem. Do not send the wrong value.
This might fox a lot of people. A nonce is something used to calculate the hash. It is used while calculating the hash. So when we sign the data and it is not canonical we have to retry signing the transaction.
What is canonical?
The signature is composed of two values, the r value and the s value. In your third input, the s value is greater than N/2, which is not allowed. Just add in some code that if s is greater than N/2, then s = N - s.
Or this link
So even if we sign the transaction again the same result will be obtained. To avoid this, we either introduce a nonce or change the value, hence in our case we change the value of the date by a certain value until we get the right signature.
If you seem to be taking too long in signing transactions then you can increase the value of nonce and get better performance
Users who are following you will have their names colured in the accent colour of the app.
How do we do it? We return from the main parsing class if someone is following you and then in the binder we colour the name.
After opening a notification if the user would try to vote on a comment/article the app would crash on the vote slider.
The reason for this was that for calculating the value of your vote I needed some variables which would not be loaded as they only load on the first launch of the app.
The solution was to first store those variables and update them on each vote, then retrieve them when the app starts without them and the rest of them would be got via steem.
val runs = GeneralRequestsFeedIntoConstants(applicationContext)
runs.RunThemAll()
This gets the variables from steem. Which is the reward pool available and the steem median price
lastvotingtime
voting power
vesting shares
delegated vesting shares
received vesting shares
These variables are stored
The functions for calculated we changed slightly and viola the app does not crash anymore.
The time which steem delivers is in the pattern
yyyy-MM-dd'T'HH:mm:ss
This is in GMT.
When you make this date into a date object you get the wrong date as you get this date as the local time which throws off calculations.
The fix is simple.
yyyy-MM-dd'T'HH:mm:ssZ
you add a small Z at the end of the pattern and to the time you add
+0000
when you now parse this, you will get the correct time which you change to your regional time.
The commit is in the static misc files. Am lost atm.
The requests database stores these values for using while screen rotations or while loading the app from the background. The app would sometimes crash on startup when the data would be corrupted or stale.
The fix was to catch any errors while retrieving the data and not transmit the data ahead.
Fix a bug where while displaying the votes on a comment/post the app would crash
This was due to bad json or corrupt json which needed to be caught gracefully.
commit
Fixed a bug where the app would crash sometimes while posting an article
This needed many checks and a try catch block to display any error while signing or posting of an article or while uploading images.
commit
Fix a bug where the app would crash if the name was not present.
Sometimes while opening someone else's blog the app would crash as the name value would be null.
The required a check.
commit
Fixed a bug where the app would crash sometimes trying to post null comments, which is not allowed.
A check to make sure that the data is not null.
commit
Some images would not be identified and rendered. The regex has been updated to support them.
() have been removed and " is allowed now. Some conditions have been removed.
commit
Fixed a bug where if the user introduced a space in the username while signing in that would continue.
A simple trim fixed this on login and a function for installed apps which will execute on launch after updating and will remove the space.
commit
The steem lib from where some code was translated used steemitdevimages instead of steemitimages. This has now been corrected by me.
commit
Fix a bug where app would sometimes crash while deleting drafts.
This was due to incorrect id's being forwarded and then being used by the recycler view which throw an out of bounds exception.
commit
Fix a bug where while scrolling the floating date holder would move in the wrong direction in the end.
Introduced a variable to negate the animation if it is downwards.
commit
This commit was to make the transactions sign faster. It is now merged with the nonce one.
commit
These are many small fixes clumped together. They add stability by
https://github.com/hispeedimagins
Please note I forgot to comment on code and had to do it later here. comments
Also since this app was not open source when I started it, I did not comment much. Only after I have put it on Github have I started adding comments.
Want to contact me?
Discord server for steemer - https://discord.gg/GkNZCGu
My discord username - hispeedimagins#6619
email - [email protected]