RenderScript was deprecate
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Refactor
- Clarity
- Clearly specified
- Activity status
- Stale
- Tech stack
- android, kotlin
- Domain
- build-system, mobile
Research direction
Start in WorkerUtils.kt at fun blurBitmap and read the linked RenderScript migration instructions. Add the renderscript-toolkit module from the referenced repository to this Codelab project, then update the blur implementation as described in the issue. Done means the project builds and blurBitmap uses the replacement toolkit instead of RenderScript.
Written by the indexing model from the issue text.
Description
In WorkerUtils.kt fun blurBitmap
Change code
rsContext = RenderScript.create(applicationContext, RenderScript.ContextType.DEBUG)
val inAlloc = Allocation.createFromBitmap(rsContext, bitmap)
val outAlloc = Allocation.createTyped(rsContext, inAlloc.type)
val theIntrinsic = ScriptIntrinsicBlur.create(rsContext, Element.U8_4(rsContext))
theIntrinsic.apply {
setRadius(10f)
theIntrinsic.setInput(inAlloc)
theIntrinsic.forEach(outAlloc)
}
outAlloc.copyTo(output)
to
var blurredBitmap: Bitmap? = Toolkit.blur(bitmap,25)
return blurredBitmap!!
Instruction to migrate
https://developer.android.com/guide/topics/renderscript/migrate
You just need to download the project, get the renderscript-toolkit module and add it to this Codelab project.
https://github.com/android/renderscript-intrinsics-replacement-toolkit
- Dominant language
- Kotlin
- Stars
- 557
- Forks
- 242
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from android/codelab-android-workmanager
-
Difficulty 1/5 Under an hour Newbie friendliness 68/100
android/codelab-android-workmanager#261 · 1 reaction ·
-
Difficulty 1/5 Under an hour Newbie friendliness 62/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 45/100
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
android/codelab-android-workmanager#324 · 1 reaction ·
-
Difficulty 1/5 Under an hour Newbie friendliness 50/100
All issues in android/codelab-android-workmanager
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
index-request triaged
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Anthonyy232/Paperize#614 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bitcoindevkit/bdk-ffi#1125 ·
-
🌑 nextgen
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
CCBlueX/LiquidBounce#9214 · 1 comment ·