All Projects → jaisonfdo → ImageAttachment

jaisonfdo / ImageAttachment

Licence: other
Example App to show how to pick an image from Camera/Gallery

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to ImageAttachment

Camerafragment
A simple easy-to-integrate Camera Fragment for Android
Stars: ✭ 2,312 (+9952.17%)
Mutual labels:  camera, capture
Rxpaparazzo
RxJava extension for Android to take images using camera and gallery and pick files up
Stars: ✭ 467 (+1930.43%)
Mutual labels:  gallery, camera
Agimagecontrols
cool tools for image edition
Stars: ✭ 217 (+843.48%)
Mutual labels:  camera, capture
Album
android 图片视频加载库,单选,多选,预览,自定义UI,相机,裁剪...等等 已适配android10,11
Stars: ✭ 53 (+130.43%)
Mutual labels:  gallery, camera
Album
🍉 Album and Gallery for Android platform.
Stars: ✭ 2,430 (+10465.22%)
Mutual labels:  gallery, camera
Nextlevel
NextLevel was initally a weekend project that has now grown into a open community of camera platform enthusists. The software provides foundational components for managing media recording, camera interface customization, gestural interaction customization, and image streaming on iOS. The same capabilities can also be found in apps such as Snapchat, Instagram, and Vine.
Stars: ✭ 1,940 (+8334.78%)
Mutual labels:  camera, capture
Pickimage
Shows a DialogFragment with camera and gallery options. User can choose wich provider wants to pick images from. 📸 🖼️
Stars: ✭ 386 (+1578.26%)
Mutual labels:  gallery, camera
Ypimagepicker
📸 Instagram-like image picker & filters for iOS
Stars: ✭ 3,661 (+15817.39%)
Mutual labels:  gallery, camera
Croperino
📷 A simple image cropping tool that provides gallery or camera help for Native Android (Java)
Stars: ✭ 176 (+665.22%)
Mutual labels:  gallery, camera
Android Image Picker
Image Picker for Android 🤖
Stars: ✭ 847 (+3582.61%)
Mutual labels:  gallery, camera
Albumcamerarecorder
一个高效的多媒体支持操作库,可多方面的简单配置操作相册、拍照、录制、录音等功能。也支持配套使用的展示图片、视频、音频的九宫格功能。 (An efficient multimedia support operation library, can be a variety of simple configuration operation album, photo, recording, recording and other functions.Also support supporting the use of the display of pictures, video, audio of the nine grid function.)
Stars: ✭ 106 (+360.87%)
Mutual labels:  camera, capture
ProPicker
ProPicker is a file picker (image, video, file) library for Android. It helps you to pick any file and return the result in a convenient way
Stars: ✭ 25 (+8.7%)
Mutual labels:  gallery, camera
Cameraengine
🐒📷 Camera engine for iOS, written in Swift, above AVFoundation. 🐒
Stars: ✭ 554 (+2308.7%)
Mutual labels:  camera, capture
Pbjvision
📸 iOS Media Capture – features touch-to-record video, slow motion, and photography
Stars: ✭ 1,940 (+8334.78%)
Mutual labels:  camera, capture
Android Camera2 Secret Picture Taker
Take pictures 📷 secretly (without preview or launching device's camera app) using Android CAMERA2 API
Stars: ✭ 275 (+1095.65%)
Mutual labels:  camera, capture
Paparazzo
Custom iOS camera and photo picker with editing capabilities
Stars: ✭ 714 (+3004.35%)
Mutual labels:  gallery, camera
TakePhoto
🔥Kongzue的APP拍照&相册选择工具
Stars: ✭ 41 (+78.26%)
Mutual labels:  gallery, camera
ios-permissions-service
An easy way to do permissions requests & handling automatically.
Stars: ✭ 25 (+8.7%)
Mutual labels:  gallery, camera
Dr0pFi
Using this tool, You can capture all WiFi Passwords stored on Windows Computer and mail them to your email account!
Stars: ✭ 38 (+65.22%)
Mutual labels:  capture
todo-list
TodoList using Ionic2/3 & Firebase: * PWA * SSO Google plus. * Share list via QRcode. * Upload image from Camera or Storage. * Speech Recognition.
Stars: ✭ 18 (-21.74%)
Mutual labels:  camera

ImageAttachment

Example App to show how to pick an image from Camera/Gallery

ImageUtils: Used to capture/pick the image. from camera/gallery.

It contains the following methods.

  • imagepicker : shows the picker with the options Camera and Gallery.
  • launchCamera : Launch camera using native intent.
  • launchGallery : Launch gallery using native intent.
  • checkimage : Pass the filename and the file path ,then it will return the boolean value( Image exist or not).
  • getImage : Pass the filename and the file path ,then it will return the bitmap if the image not exist then return null value.
  • createImage : Pass the bitmap, filename, file path, and replace flag then it will store that image in the given path in the given name.

ImageAttachmentListener: This is a callback interface which returns the image capture/pick by you.

public interface ImageAttachmentListener {
    public void image_attachment(int from, String filename, Bitmap file);
}

For implementing this image attachment process , first you need to create an instance for the class ImageUtils.

Imageutils imageutils;
imageutils =new Imageutils(this,this);

Then call the relevant function based on your need.The following steps helps you to get the image.

// Request code - 1
if (imageutils.isDeviceSupportCamera()) 
      imageutils.imagepicker(1);

Next redirect your onRequestPermissionsResult to imageutils.request_permission_result and onActivityResult to imageutils.onActivityResult.

For getting the callbacks you need to include ImageAttachmentListener interface into your activity, and also implement the needed methods.

public class ImageAttachmentActivity extends AppCompatActivity 
                               implements ImageAttachmentListener


// Callback function

@Override
public void image_attachment(int from, String filename, Bitmap file) {
    this.bitmap=file;
    this.file_name=filename;
    iv_attachment.setImageBitmap(file);

    String path =  Environment.getExternalStorageDirectory() + File.separator + "ImageAttach" + File.separator;
    
    //Store the selected image into your desired location

    imageutils.createImage(file,filename,path,false);

}

In AndroidManifest.xml

Specify the needed permission. If you don't, permission requests fail silently. That's an Android thing.

For more information, check out my detailed guide here : http://droidmentor.com/pick-image-from-gallery-or-camera/

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].