Skip to content

Commit

Permalink
[PR] Added new bitmap with bottom blank space. (#60)
Browse files Browse the repository at this point in the history
* Added new bitmap with bottom blank space.
* Refactor to support image into raw.
  • Loading branch information
jonathan-botero-meli authored Dec 9, 2024
1 parent 8859f29 commit 8f7bafb
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# v4.0.0
## Added
- Updated sdk library with unified version to SmartApps
- Moved bitmap print to raw resources, and replaced with new image with addition blank bottom space.

# v3.0.1
## Added
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,18 @@ class PrinterBitmapActivity : AppCompatActivity() {
}

private fun printImageBitmap() {

val bitmap = BitmapFactory.decodeResource(resources, R.drawable.point_mainapp_demo_app_ic_datafono)

MPManager.bitmapPrinter.print(bitmap) { response ->
response
.doIfSuccess { result ->
onResultSuccess(result)
}
.doIfError { error ->
onResultFailure(error.message.orEmpty())
toast(error.message.orEmpty())
}
val inputStream = resources.openRawResource(R.raw.point_mainapp_demo_app_ic_datafono)
BitmapFactory.decodeStream(inputStream)?.run {
MPManager.bitmapPrinter.print(this) { response ->
response
.doIfSuccess { result ->
onResultSuccess(result)
}
.doIfError { error ->
onResultFailure(error.message.orEmpty())
toast(error.message.orEmpty())
}
}
}
}

Expand Down
Binary file not shown.
Binary file not shown.

0 comments on commit 8f7bafb

Please sign in to comment.