Android UCrop Library using registerForActivityResult() Tutorial 2021

  Рет қаралды 2,603

Graphics Illusion

Graphics Illusion

Күн бұрын

This Video Is Part 2 for Understanding registerForActivityResult() API. In this, I will create a Custom Contract for this API to work along with an Android Image Cropping Library "UCrop"
UCrop is a Custom Library used for Cropping Images, It Launches a New Activity with the Selected Image's URI and Returns the URI of the Cropped Image. It's Fast and Easy to Use.
In the Part 1 Of this Video, I Use registerForActivityResult() API to use Gallery to get URI of any selected Image.
Part 1 Link :
• Android registerForRes...
Android Developer Link - - - registerForActivityResult() :
developer.andr...
uCrop Library Link :
github.com/Yal...

Пікірлер: 7
@marzesky
@marzesky Жыл бұрын
Thank you so much bro this is exactly what I searched for
@irene-nz9ew
@irene-nz9ew 2 жыл бұрын
First image it adds perfectly, but the second one is not displayed on the screen. Could you say why this is happenning?
@udleyharoldsson9863
@udleyharoldsson9863 6 ай бұрын
Same problem, still thinking on a solution, i think it happens because the outputUri always has the same name "croppedImage.jpg" which trigger cropImage to take the same old image rather than new one, i think the problem is that for some reason selecting new image won't override the old one. Edit: My solution would be to change the croppedImage.jpg to croppedImage_$timestamp.jpg that you can get from System.currentTimeMillis(), so that each time you take a new picture it will generate unique name
@АсланАртыкбаев-ф5ы
@АсланАртыкбаев-ф5ы 2 жыл бұрын
File(filesDir) dont work
@graphicsillusion8598
@graphicsillusion8598 2 жыл бұрын
It should... Try "context.filesDir" instead of just "filesDir"
@CptDuck
@CptDuck Жыл бұрын
@@graphicsillusion8598 hello can i ask something.. it seems i can only choose image once... when i tried to replace the image, it didn't change at all..
@curtisjonesid
@curtisjonesid 7 ай бұрын
@@CptDuck i have the same problem 🙁
Cropping Images on Android (Kotlin)
27:28
CodingWithMitch
Рет қаралды 19 М.
啊?就这么水灵灵的穿上了?
00:18
一航1
Рет қаралды 48 МЛН
小路飞嫁祸姐姐搞破坏 #路飞#海贼王
00:45
路飞与唐舞桐
Рет қаралды 29 МЛН
1 сквиш тебе или 2 другому? 😌 #шортс #виола
00:36
Android Permissions Using registerForActivityResult() 2021
13:17
Graphics Illusion
Рет қаралды 582
RecyclerView | Everything You Need to Know
25:07
Practical Coding
Рет қаралды 139 М.
Resources & Qualifiers - Android Basics 2023
16:14
Philipp Lackner
Рет қаралды 29 М.
We Built an App in 24 Hours [No Code]
11:56
Raw Startup
Рет қаралды 435 М.
Navigation Drawer and Bottom Navigation View in Android Studio | Kotlin
27:36
How to Send Notification in Android
14:15
Codes Easy
Рет қаралды 42 М.
Как подключить телефон к Android Studio
5:54
Create Mob App
Рет қаралды 52 М.
啊?就这么水灵灵的穿上了?
00:18
一航1
Рет қаралды 48 МЛН