Choose a Image from Gallery and send to another Activity - java

So I have an app and in this app in the first activity you choose a image from the gallery or take a photo with the camera.
Then there are a few Activitys between the Activity I needed the picture. So how can I send this image choosen in the first Activity to the activity i need it in? I thought I can make it like these putExtra() Method but I was reading that I costs a lot of memory to send bitmaps to another Activity.
My Goal is to edit this Image as a bitmap in the last activity!
So who got some solutions how i can fix this Problem?! Any Ideas? Thank you!

I use Library called sandriosCamera, it is very costumizable and works in that it less than android 5.0 too (So use CameraApi and CameraApi2). It includes recent image in gallery picker and too shows a preview of the image doing a matrix (Rotate) when the image has an incorrect orientation.
Read this in android arsenal and look the github for the library code https://android-arsenal.com/details/1/4962
Then I pass with a putExtra() the image path (because of the image is temporal and then I need to getExtra() of the intent to have the path of the image in my SendActivity.
Hope it helps with all your problems.
PD: I recommend to download the master.zip and not to import as a library with gradle, because you can costumize if you want (But then you need to fix problems). Before of import to the gradle or manual I recommend too to update all your android tools, max version, etc.

Related

How can I open a user's camera and have it open, but NOT to take a photo on Android Studio

I want to open the camera but not in photo form so I can add an overlay. I just need the camera to display what is shows but not to take the photo if that makes sense... How can I do this?
maybe this article help you open camera view in your app by creating your own view and open camera in its own different thread ,
as it might take time to load and this will result in the lagging UI.
Maybe this article from android developers website will help you achieve what you want.
https://developer.android.com/training/camera/cameradirect#kotlin

React Native - Opening Android Image Gallery Directly

As the title states, I am wondering how to open the Android image gallery directly from my app. Every single package that is out there, including react-native-image-picker, react-native-image-crop-picker, and yes, even Expo's expo-image-picker all open the "Recents" area!
Opening the gallery MUST be possible, since apps like Whatsapp, Tinder, Facebook, etc. all have this functionality when choosing pictures.
Such a simple functionality - and yet after a month of on and off search I have come up with no solution. Can anybody provide me with a way to do this? Or guide me in the correct direction? At this point I am prepared to write native Android code or custom React Native to get this to work.
i found this library
react-native-multiple-image-picker
it will open camera roll not recent file

android get image from gallery and save another activity

I am making an app 'food maker' but the problem first is how to pick an image from the gallery second save this image into external storage like SQLite and shared preferences 3rd this store image and some title how I retrieve this image and title an another activity to open this and see this that set .....
Welcome, Please read How do I ask a good question? and edit your question accordingly.
You are asking multiple questions and i am not sure where your problem is...
i'll try to tackle the problems 1 by 1.
picking an image from gallery can be done by following this solution
saving a file to external storage can be done by following this solution
you can display/load an image from external storage by following this solution
Good luck

Downloading most recent Image from server in image view in android app

I am a newbie and as soon as I started learning the language I got one project. Most of it is done but I am strugglig in a basic programming problem. My app is supposed to provide the images of the price lists set by the commissioner in our city by downloadin from thir original website. The problem is after every few days a new image appears as new prices are set and the image's url in my app becomes obsolete. the new image that appears on the website does not have a ur that follow a pattern like image1,2,3 but it is a random number every time. Can someone please help me how can I solve this problem of mine?
PS. I know how to get an image in the imageView. All I want is to make the app smart enough to download the most recently added image every time. Please please respond. Thanks
You could search the image URL from the website using an html parser like Jsoup and then load the image into an imageview using the Picasso or Glide library

Image Edit SDK for Android?

I'm working on a project that requires taking pictures and putting stickers on that photo. From what I understand this requires 3 main actions:
1. User should be able to resize the sticker.
2. User should be able to rotate the sticker.
3. And once done, the whole thing should be merged into a single image.
I'm having a really hard time starting this since I simply don't know where I should start. Should I find, or ever write my own code to do the above, or maybe try to use existing projects (but I was not able to find any open-source ones).
I've heard about Aviary, but it was recently purchased by Adobe, and it is now part of the Creative Cloud, which is quite vague regarding the price, if there is any.
Where should I start?
Thanks.
We at Img.ly have released an image editing SDK for Android as part of our PhotoEditorSDK product suite.
Users can resize rotate and adjust stickers out of the box and you can also add your own stickers and assets.
You can find a demo application here. You can use the library for free in your open source projects, but there is a license fee for commercial applications.
For Resizing the image add two buttons one for increasing the image size and the other for decreasing . Then in the set an onClickListener() for that buttons.
Inside that function first get the dimensions of the image using getWidth() and getHeight() , then use setWidth() and setHeight() to change the size.
for Rotating the sticker refer this link
After all these things use a canvas to save the sticker and image as a single file . for doing this refer this link.
In future do not combine all your queries in a single question.
I use these libraries and plugins in my projects
for cropping an image use this : Cropper
for rotating an image you can use this: PhotoProcessing
and at the end you can get the whole image in to a single image-view

Categories