create account

InSteem app update:pictures in comments (so unique right?), bug fixes (nasty large cockroaches) and performance improvements by hispeedimagins

View this thread on: hive.blogpeakd.comecency.com
· @hispeedimagins ·
$55.90
InSteem app update:pictures in comments (so unique right?), bug fixes (nasty large cockroaches) and performance improvements
![STEEMER-BANNER02.png](https://steemitimages.com/640x0/https://cdn.steemitimages.com/DQmVBkdxenpMTs4ENP4Y7QkLVTWS4sgjHYV5fnjECyaBxWW/playwall.png)

#### Repository
https://github.com/hispeedimagins/steem

<hr style="color:blue;background-color:blue;border-color:blue">

[InSteem](https://play.google.com/store/apps/details?id=com.insteem.ipfreely.steem) is and will remain the first native android app which is and will be forever completely free for the people to use.

Take a look at the utopian task and get me some icons. [Task request](https://steemit.com/utopian-io/@utopian.tasks/task-request-graphics-steemer-rebranding)

### Why free?
Because @steemit needs it. A quick way to interact with the blockchain. One that will not eat into the users rewards.

<hr/>

## New Features

### pictures in comments (finally)
Posting to the blockchain with images was a feature which was added a long time back. But InSteem did not have the ability to post pictures in a comment. Something which comes in use when you add that funny image at the right time. That has now been added to the app. 

To facilitate this a lot of code was moved from the post activity into a static class. Then used as a common function between the comment modal sheet and the post activity. So the ui and everything else used to upload the image remains the same across the app and easy to maintain. Some small amount of code has been copied again but will made common too once some testing is done on it's impact. 

The dialogue now opens just like the post dialogue which allows either uploading from the gallery or by taking an image from the camera. In the future we can add more options easily. 

![totj.jpg](https://cdn.steemitimages.com/DQmaNFFgxP4UUGT4ZP93SHtbJeyc1rRjhR6bCTGFqu99fmC/totj.jpg)

and the  result

![res.jpg](https://cdn.steemitimages.com/DQmeip1DQUh6jCpDdcehHHnmth9V9uXQYvTZADisWT47S9R/res.jpg)

Some code was also written to route the progress bar and textview from the modal sheet either from the comments recyclerview or the article view to the article activity where they are stored in a variable, then updated with the image link once it is uploaded to steemit servers. A big thank you to steemit. This routing is needed as  I have made modal sheet for comments stateless and not a singleton. It is created when needed and then destroyed. This also saves ram, the time of clearing the textviews and updating the ui each time. 

#### commits
1. [commit](https://github.com/hispeedimagins/steem/commit/a2ba076366a0d5cd54d00d9b13ef36a4ad913095)

<hr/>

## Bug fixes & performance improvements

### Fix a bug where app would crash while loading tags which do not exist
The app would crash if a user searched for a bug which did not exist. This was because while paring the result json we would expect the result object to be of the type array but it was of the type object if the tag did not exist or some other error occurred and would contain the resultant error as an object as well. 

With this line of code we check if it is an object

``` 
val res = body.get("result")
        if(res is JSONObject){
```

if it is an object then the error is extracted out and displayed to the user via an interface.

#### commits
1. [commit](https://github.com/hispeedimagins/steem/commit/1aa174d1380aa02ac50c52da619d11990c126bd5)

<hr/>

### Fix a bug where favourites would crash and nonce value set too high would crash the app
Favorites would crash while opening because a data object would not be set, this is now checked if not null and only then processed. 
If the nonce value for signing in settings was set to too high, this would crash the app while signing. This is now limited to 5 characters. 10000 is the limit for the nonce value now.

#### commits
1. [commit](https://github.com/hispeedimagins/steem/commit/7ed969c20c8b3435c5319007781ea28444c07b7b)

<hr/>

### Fix a bug where loading a profile would crash the app
Loading the profile would crash the app because the json model had some fields marked as int because they were 0 for my profile but others had a different value for those fields and their type was actually long. These are now fixed.

#### commits 
1. [commit](https://github.com/hispeedimagins/steem/commit/e8443f25408df3477a0f2ad5fa397ad020bf5860)

<hr/>

### Fix a divide by zero error
A divide by zero error existed while loading followers as sometimes followers can be zero. This is now fixed with a check at the source.

#### commits
1. [commit](https://github.com/hispeedimagins/steem/commit/0a044d6d4253eedf65c564b878fe13d8630e1c4e)

<hr/>

### Fix 3 bugs
1. fix a bug where the app would crash on null context in notifications
2. fix a bug where the app would crash while parsing bad json result
3. fix a bug where app would crash while liking a post before contants were loaded - this happened when the values required for calculating a vote value were not loaded and the user clicked on liking a post and moved the slider for setting the percentage. 

#### commits
1. [commit](https://github.com/hispeedimagins/steem/commit/795afe33edb94b87395895bdb0cfaf13ad7fe225)

<hr/>

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 to the whole app and am doing it slowly. Removing dead code slowly with each update and adding comments is a painstaking task. 

<hr/>

#### Want to contact me?
Discord server for steemer - https://discord.gg/GkNZCGu
My discord username - hispeedimagins#6619
Email - hispeedimagins@gmail.com

<hr/>

#### GitHub Account\nhttps://github.com/hispeedimagins
๐Ÿ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 210 others
properties (23)
authorhispeedimagins
permlinkinsteem-app-update-pictures-in-comments-so-unique-right-bug-fixes-nasty-large-cockroaches-and-performance-improvements
categoryutopian-io
json_metadata{"tags":["utopian-io","development","steem-dev","android","steemitdev"],"users":["steemit"],"image":["https://steemitimages.com/640x0/https://cdn.steemitimages.com/DQmVBkdxenpMTs4ENP4Y7QkLVTWS4sgjHYV5fnjECyaBxWW/playwall.png","https://cdn.steemitimages.com/DQmaNFFgxP4UUGT4ZP93SHtbJeyc1rRjhR6bCTGFqu99fmC/totj.jpg","https://cdn.steemitimages.com/DQmeip1DQUh6jCpDdcehHHnmth9V9uXQYvTZADisWT47S9R/res.jpg"],"links":["https://github.com/hispeedimagins/steem","https://play.google.com/store/apps/details?id=com.insteem.ipfreely.steem","https://steemit.com/utopian-io/@utopian.tasks/task-request-graphics-steemer-rebranding","https://github.com/hispeedimagins/steem/commit/a2ba076366a0d5cd54d00d9b13ef36a4ad913095","https://github.com/hispeedimagins/steem/commit/1aa174d1380aa02ac50c52da619d11990c126bd5","https://github.com/hispeedimagins/steem/commit/7ed969c20c8b3435c5319007781ea28444c07b7b","https://github.com/hispeedimagins/steem/commit/e8443f25408df3477a0f2ad5fa397ad020bf5860","https://github.com/hispeedimagins/steem/commit/0a044d6d4253eedf65c564b878fe13d8630e1c4e","https://github.com/hispeedimagins/steem/commit/795afe33edb94b87395895bdb0cfaf13ad7fe225","https://discord.gg/GkNZCGu","https://github.com/hispeedimagins"],"app":"steemit/0.1","format":"markdown"}
created2019-03-21 11:23:42
last_update2019-03-21 11:23:42
depth0
children24
last_payout2019-03-28 11:23:42
cashout_time1969-12-31 23:59:59
total_payout_value42.465 HBD
curator_payout_value13.437 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length5,602
author_reputation14,595,451,873,135
root_title"InSteem app update:pictures in comments (so unique right?), bug fixes (nasty large cockroaches) and performance improvements"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id81,672,377
net_rshares85,565,659,404,283
author_curate_reward""
vote details (274)
@harry-heightz ·
Hi! Thanks for the update. I've been trying to use the app. Nothing seems to be working. I can't upvote, I can't resteem a post, I can't do anything.
๐Ÿ‘  
properties (23)
authorharry-heightz
permlinkre-hispeedimagins-insteem-app-update-pictures-in-comments-so-unique-right-bug-fixes-nasty-large-cockroaches-and-performance-improvements-20190321t114633550z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2019-03-21 11:46:36
last_update2019-03-21 11:46:36
depth1
children16
last_payout2019-03-28 11:46:36
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_length149
author_reputation132,636,183,236,424
root_title"InSteem app update:pictures in comments (so unique right?), bug fixes (nasty large cockroaches) and performance improvements"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id81,673,615
net_rshares28,114,752,096
author_curate_reward""
vote details (1)
@hispeedimagins ·
mmpf. ohk we can debug this. I am typing this from the app. 
1. Is your feed and blog loaded?
2. did you enter your posting key?
3. If you have entered your posting key then does it say signed while liking or commenting?

if it does not say signed try a nonce value of like 39 or some weird number. Can you tell me your phone model so maybe I can tey and debug? 
properties (22)
authorhispeedimagins
permlinkre-harry-heightz-re-hispeedimagins-insteem-app-update-pictures-in-comments-so-unique-right-bug-fixes-nasty-large-cockroaches-and-performance-improvements-20190321t172941041z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"Steemer\/1.0","format":"markdown"}
created2019-03-21 11:59:45
last_update2019-03-21 11:59:45
depth2
children15
last_payout2019-03-28 11:59:45
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_length362
author_reputation14,595,451,873,135
root_title"InSteem app update:pictures in comments (so unique right?), bug fixes (nasty large cockroaches) and performance improvements"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id81,674,289
net_rshares0
@harry-heightz · (edited)
My feed and blog is loaded. I entered my posting key. I never get the signed message when I perform any activity. Just an unending progress bar.

My phone model is Redmi note 5 pro.

Btw I reported some new bugs, please check them out.
properties (22)
authorharry-heightz
permlinkre-hispeedimagins-re-harry-heightz-re-hispeedimagins-insteem-app-update-pictures-in-comments-so-unique-right-bug-fixes-nasty-large-cockroaches-and-performance-improvements-20190321t124710486z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2019-03-21 12:47:12
last_update2019-03-21 12:49:39
depth3
children14
last_payout2019-03-28 12:47:12
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_length235
author_reputation132,636,183,236,424
root_title"InSteem app update:pictures in comments (so unique right?), bug fixes (nasty large cockroaches) and performance improvements"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd0
post_id81,676,884
net_rshares0
@helo ·
$11.54
- Good post with images, code sample and explanations of development improvements.
- Good code comments and commit messages.
- Don't hesitate to remove dead code instead of commenting it out.  You can always retrieve old code from git.

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/1-2-1-2-1-1-1-).

---- 
Need help? Chat with us on [Discord](https://discord.gg/uTyJkNm).

[[utopian-moderator]](https://join.utopian.io/)
๐Ÿ‘  , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorhelo
permlinkre-hispeedimagins-insteem-app-update-pictures-in-comments-so-unique-right-bug-fixes-nasty-large-cockroaches-and-performance-improvements-20190324t194636502z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"links":["https://join.utopian.io/guidelines","https://review.utopian.io/result/3/1-2-1-2-1-1-1-","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"}
created2019-03-24 19:46:36
last_update2019-03-24 19:46:36
depth1
children2
last_payout2019-03-31 19:46:36
cashout_time1969-12-31 23:59:59
total_payout_value8.777 HBD
curator_payout_value2.758 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length685
author_reputation121,547,934,535,311
root_title"InSteem app update:pictures in comments (so unique right?), bug fixes (nasty large cockroaches) and performance improvements"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id81,871,106
net_rshares17,812,983,818,628
author_curate_reward""
vote details (22)
@hispeedimagins ·
Thank you. will do. :) 
properties (22)
authorhispeedimagins
permlinkre-helo-re-hispeedimagins-insteem-app-update-pictures-in-comments-so-unique-right-bug-fixes-nasty-large-cockroaches-and-performance-improvements-20190325t083349049z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"Steemer\/1.0","format":"markdown"}
created2019-03-25 03:03:51
last_update2019-03-25 03:03:51
depth2
children0
last_payout2019-04-01 03:03:51
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_length23
author_reputation14,595,451,873,135
root_title"InSteem app update:pictures in comments (so unique right?), bug fixes (nasty large cockroaches) and performance improvements"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id81,887,028
net_rshares0
@utopian-io ·
Thank you for your review, @helo! Keep up the good work!
properties (22)
authorutopian-io
permlinkre-re-hispeedimagins-insteem-app-update-pictures-in-comments-so-unique-right-bug-fixes-nasty-large-cockroaches-and-performance-improvements-20190324t194636502z-20190327t014203z
categoryutopian-io
json_metadata"{"app": "beem/0.20.17"}"
created2019-03-27 01:42:03
last_update2019-03-27 01:42:03
depth2
children0
last_payout2019-04-03 01:42:03
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_length56
author_reputation152,955,367,999,756
root_title"InSteem app update:pictures in comments (so unique right?), bug fixes (nasty large cockroaches) and performance improvements"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id82,014,877
net_rshares0
@steem-ua ·
#### Hi @hispeedimagins!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
**Feel free to join our [@steem-ua Discord server](https://discord.gg/KpBNYGz)**
properties (22)
authorsteem-ua
permlinkre-insteem-app-update-pictures-in-comments-so-unique-right-bug-fixes-nasty-large-cockroaches-and-performance-improvements-20190324t212425z
categoryutopian-io
json_metadata"{"app": "beem/0.20.19"}"
created2019-03-24 21:24:27
last_update2019-03-24 21:24:27
depth1
children0
last_payout2019-03-31 21:24:27
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_length293
author_reputation23,214,230,978,060
root_title"InSteem app update:pictures in comments (so unique right?), bug fixes (nasty large cockroaches) and performance improvements"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id81,874,443
net_rshares0
@steemitboard ·
Congratulations @hispeedimagins! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

<table><tr><td>https://steemitimages.com/60x70/http://steemitboard.com/@hispeedimagins/commented.png?201903211443</td><td>You got more than 200 replies. Your next target is to reach 300 replies.</td></tr>
</table>

<sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@hispeedimagins) and compare to others on the [Steem Ranking](http://steemitboard.com/ranking/index.php?name=hispeedimagins)_</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:**
<table><tr><td><a href="https://steemit.com/carnival/@steemitboard/carnival-challenge-here-are-the-winners"><img src="https://steemitimages.com/64x128/http://i.cubeupload.com/rltzHT.png"></a></td><td><a href="https://steemit.com/carnival/@steemitboard/carnival-challenge-here-are-the-winners">Carnival Challenge - Here are the winners</a></td></tr></table>

###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) to get one more award and increased upvotes!
๐Ÿ‘  
properties (23)
authorsteemitboard
permlinksteemitboard-notify-hispeedimagins-20190321t151129000z
categoryutopian-io
json_metadata{"image":["https://steemitboard.com/img/notify.png"]}
created2019-03-21 15:11:30
last_update2019-03-21 15:11:30
depth1
children0
last_payout2019-03-28 15:11:30
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,261
author_reputation38,975,615,169,260
root_title"InSteem app update:pictures in comments (so unique right?), bug fixes (nasty large cockroaches) and performance improvements"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id81,684,122
net_rshares27,552,043,820
author_curate_reward""
vote details (1)
@steemitboard ·
Congratulations @hispeedimagins! You received a personal award!

<table><tr><td>https://steemitimages.com/70x70/http://steemitboard.com/@hispeedimagins/birthday2.png</td><td>Happy Birthday! - You are on the Steem blockchain for 2 years!</td></tr></table>

<sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@hispeedimagins) and compare to others on the [Steem Ranking](https://steemitboard.com/ranking/index.php?name=hispeedimagins)_</sub>


**Do not miss the last post from @steemitboard:**
<table><tr><td><a href="https://steemit.com/steemfest/@steemitboard/the-new-steemfest-badge-is-ready"><img src="https://steemitimages.com/64x128/https://cdn.steemitimages.com/DQmRUkELn2Fd13pWFkmWU2wBMMx39EBX5V3cHBEZ2d7f3Ve/image.png"></a></td><td><a href="https://steemit.com/steemfest/@steemitboard/the-new-steemfest-badge-is-ready">The new SteemFestโด  badge is ready</a></td></tr></table>

###### [Vote for @Steemitboard as a witness](https://v2.steemconnect.com/sign/account-witness-vote?witness=steemitboard&approve=1) to get one more award and increased upvotes!
properties (22)
authorsteemitboard
permlinksteemitboard-notify-hispeedimagins-20191012t084906000z
categoryutopian-io
json_metadata{"image":["https://steemitboard.com/img/notify.png"]}
created2019-10-12 08:49:06
last_update2019-10-12 08:49:06
depth1
children0
last_payout2019-10-19 08:49:06
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,086
author_reputation38,975,615,169,260
root_title"InSteem app update:pictures in comments (so unique right?), bug fixes (nasty large cockroaches) and performance improvements"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id91,475,640
net_rshares0
@utopian-io ·
Hey, @hispeedimagins!

**Thanks for contributing on Utopian**.
Weโ€™re already looking forward to your next contribution!

**Get higher incentives and support Utopian.io!**
 Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via [SteemPlus](https://chrome.google.com/webstore/detail/steemplus/mjbkjgcplmaneajhcbegoffkedeankaj?hl=en) or [Steeditor](https://steeditor.app)).

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

<a href='https://steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1'>Vote for Utopian Witness!</a>
๐Ÿ‘  
properties (23)
authorutopian-io
permlinkre-insteem-app-update-pictures-in-comments-so-unique-right-bug-fixes-nasty-large-cockroaches-and-performance-improvements-20190325t060406z
categoryutopian-io
json_metadata"{"app": "beem/0.20.17"}"
created2019-03-25 06:04:06
last_update2019-03-25 06:04:06
depth1
children0
last_payout2019-04-01 06:04:06
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_length596
author_reputation152,955,367,999,756
root_title"InSteem app update:pictures in comments (so unique right?), bug fixes (nasty large cockroaches) and performance improvements"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id81,895,810
net_rshares28,116,752,931
author_curate_reward""
vote details (1)