{"id":3543,"url":"https://github.com/fabian7593/MagicalCamera","last_synced_at":"2025-07-31T13:30:57.777Z","repository":{"id":180038508,"uuid":"59313103","full_name":"fabian7593/MagicalCamera","owner":"fabian7593","description":"A library to take picture easy, transform your data in different format and save photos in your device","archived":false,"fork":false,"pushed_at":"2019-02-27T05:46:19.000Z","size":46560,"stargazers_count":338,"open_issues_count":8,"forks_count":90,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-08-15T00:20:06.089Z","etag":null,"topics":["android","android-library","bitmap","camera","camera-api","camera-image","exif","exif-interface","facial-recognition","photos","picture","picture-gallery","select-pictures"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fabian7593.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-05-20T17:24:39.000Z","updated_at":"2024-07-29T19:28:54.000Z","dependencies_parsed_at":"2024-01-07T22:01:17.060Z","dependency_job_id":null,"html_url":"https://github.com/fabian7593/MagicalCamera","commit_stats":null,"previous_names":["fabian7593/magicalcamera"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabian7593%2FMagicalCamera","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabian7593%2FMagicalCamera/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabian7593%2FMagicalCamera/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fabian7593%2FMagicalCamera/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fabian7593","download_url":"https://codeload.github.com/fabian7593/MagicalCamera/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228248557,"owners_count":17891447,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","android-library","bitmap","camera","camera-api","camera-image","exif","exif-interface","facial-recognition","photos","picture","picture-gallery","select-pictures"],"created_at":"2024-01-05T20:16:44.467Z","updated_at":"2024-12-05T06:31:39.505Z","avatar_url":"https://github.com/fabian7593.png","language":"Java","readme":"[![alt tag](https://raw.githubusercontent.com/fabian7593/MagicalCamera/master/Images/cameraHighQ.png)](https://github.com/fabian7593/MagicalCamera)\n\nA Magic library to take photos and select pictures in Android. In a simple way and if you need it also save the pictures in device, and facial recognition, get the real uri path or the photo or obtain the private information of the picture.\n\u003cbr\u003e\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-MagicalCamera-green.svg?style=true)](https://android-arsenal.com/details/1/3623)\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/a64cbf5369e14c3d98f8722c4ad3fad7)](https://www.codacy.com/app/fabian7593/MagicalCamera?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=fabian7593/MagicalCamera\u0026amp;utm_campaign=Badge_Grade)\n[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)\n\n\u003cbr\u003e\n\n\u003ca href='https://play.google.com/store/apps/details?id=com.frosquivel.magicalcameraapp'\u003e\u003cimg alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/images/generic/en_badge_web_generic.png' height='80'/\u003e\u003c/a\u003e\n\u003cbr\u003e\n\n# Contents\n\n### Features\n- - -\n- [Features MagicalCamera](#features-magicalcamera)\n- [Other Features](#other-features)\n\n### Buy me a Coffee (Donate)\n- [Donate](#donate)\n\n### How to Start\n- - -\n- [Getting Started](#getting-started)\n  - [Download Sources](#download-sources)\n- [Setup](#setup)\n  - [Add dependecies](#add-dependecies)\n- [How To use](#how-to-use)\n  - [Import library](#import-library)\n  - [Extends Application Class](#extends-application-class)\n  \n### Photo Features and permissions\n- - -\n- [Permissions on real time](#permissions-on-real-time)\n- [Photo](#photo)\n  - [Declare variable to resize photo](#declare-variable-to-resize-photo)\n  - [Instance Class MagicalCamera](#instance-class-magicalcamera)\n  - [Activities Methods](#activities-methods)\n  - [Fragments Methods](#fragments-methods)\n  - [Override the event onActivityResult](#override-the-event-onactivityresult)\n  - [Save Photo in Memory Devices](#save-photo-in-memory-devices)\n  - [Get Uri path](#get-uri-path)\n  - [Types of Formats for save photos](#types-of-formats-for-save-photos)\n  \n  - [Resize photo in real time](#resize-photo-in-real-time)\n  - [Conversion Methods](#conversion-methods)\n  - [Rotate picture](#rotate-picture)\n  - [Facial Recognition](#facial-recognition)\n  - [Private information Photo](#private-information-photo)\n  \n### Footer Docs\n- - -\n- [Footer Document](#footer-document)\n  - [Internal documentation](#internal-documentation)\n  - [Preview of Example](#preview-of-example)\n  - [Application that use MagicalCamera](#application-that-use-magicalcamera)\n  - [Suggestions](#suggestions)\n- [Credits and contributors](#credits-and-contributors) \n  - [Contributors are welcome](#contributors-are-welcome)\n- [Video Explanation](#video) \n- [Apache License](#license) \n  \n\u003cbr\u003e\u003cbr\u003e\n\n## Features MagicalCamera.\n* **Take picture** with camera device.\n* **Select pictures in gallery** device (read in devices). \n* **Write the pictures** that you taken in device, in your own directory.\n* Return the **path of your photo** in device. (This issue is solved for [@arthursz](https://github.com/arthursz))\n* **RealTime Permissions** Magical camera offers a simple integration of realtime permissions. (This functionallity is created by [@cutiko](https://github.com/cutiko))\n\n* Working in **android 6.0** (We have a class to request the user permission).\n* Create yours **standards of name of pictures**, or use our standard, like \"photoname_YYYYmmddHHmmss\"\n* Posibility of shown the **private info photography**, like latitude, longitude, ISO or others with Exif Class.\n* Posibility of **rotate picture** when it's required.\n* Select the **quality of the photo** with a percentage, when 1 is the worst and 100 is the better.\n* Obtain the LandMark and return a bitmap with a **facial recognition** that you need.\n* **Return the Bitmap**Photo if you need to save this in internal DB of your application.\n* **Convert your bitmap** in array bytes or string64, if you need to send by Json or XML.\n* **Type of photo formats:** PNG, JPEG and WEBP.\n\n#### Other Features\n* A library completely OpenSource.\n* Use best practice in POO\n* Minimun SDK 14+ API.\n* Support library\n* Compile with Gradle\n* License Under Apache 2.0\n* The easiest possible integration\n* Integrate in less than 5 minutes\n* Quick and simple API\n* A good Internal Documentation\n\n\u003cbr\u003e\n\u003cbr\u003e\n\n### Donate\n\n[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=L25MKCRPR7TWY)\n\n\u003cbr\u003e\n\u003cbr\u003e\u003cbr\u003e\n\n## Getting Started\n\n### Download Sources\nuse git (sourcetree or others)\nRemember Download the example for understand better the process\n\n```bash\ngit clone https://github.com/fabian7593/MagicalCamera.git\n```\n\nDownload from [Here](https://github.com/fabian7593/MagicalCamera/zipball/master)\n\nAnother type download by Bintray from    [ ![Download](https://api.bintray.com/packages/fabian7593/maven/MagicalCamera/images/download.svg) ](https://bintray.com/fabian7593/maven/MagicalCamera/_latestVersion)\n\n \u003cbr\u003e\n \n## Setup\n#### Add dependecies\nIf you need to take photo or select picture, this is your solution.\nThis library give a magical solution for take a picture,write and red in device, return your uri real path and obtain yhe private info of the photo and facial recognition, you only need to download this and integrate this in your project, maybe downloading it or import in your gradle, like this.\n\n```bash\nrepositories {\n    jcenter()\n}\n\ndependencies {\n    compile 'com.frosquivel:magicalcamera:6.0.0'\n}\n```\n\nIf you have any problem with this dependence, because the library override any styles, colors or others, please change the last line for this code:\n\n```bash\n compile('com.frosquivel:magicalcamera:6.0.0@aar') {\n        transitive = false;\n    }\n```\n \n\u003cbr\u003e\n\n## How To use\n\u003cbr\u003e\n\n### Import library\nYou need to import the library\n```bash\nimport com.frosquivel.magicalcamera.MagicalCamera;\nimport com.frosquivel.magicalcamera.Functionallities.PermissionGranted;\n\n//and maybe you need in some ocations\nimport com.frosquivel.magicalcamera.Objects.MagicalCameraObject;\n```\n\u003cbr\u003e\n\n### Extends Application Class\nYou need to extends MagicalCamera application\n\n```bash\npublic class MyApplicationClass extends MagicalCameraApplication {\n    @Override\n    public void onCreate() {\n        super.onCreate();\n    }\n    \n    //IF YOU NEED MULTIDEX, SET HERE, NOT ON APPLICATION TAG ON MANIFEAST, LIKE THIS\n    @Override\n    protected void attachBaseContext(Context base) {\n      super.attachBaseContext(base);\n      MultiDex.install(this);\n    }\n}\n\n```\n\nOn manifest, change the name, for the name of your Application class, like this:\n\n```bash\n  \u003capplication\n        android:name=\".MyApplicationClass\"\u003e\n```\n\n\n### Permissions on real time\nWith the MagicalPermissions class you can ask for permissions in a Activity or in an Fragment. This class will take care of validating the device API level, what permissions the user haven't granted yet, ask for thoose permissions, deliver the result and together with MagicalCamera will take the photo or select it from the gallery.\n\nRequesting permissions on real time to the user is a 2 part process. First permissions most be requested, then the result is delivered. So you need a field variable to later call it again on the permissions result:\n\n```\nprivate MagicalPermissions magicalPermissions;\n```\n\nMagicalPermissions constructor accept two params, the first is the Activity or Fragment and the second is a String array of the permissions you **need** `String[]`. MagicalPermissions use the Activity or Fragment to later deliver the result of the permission, and the array to ask for thoose permissions.\n\n```\nmagicalPermissions = new MagicalPermissions(this, permissions);\n```\n\nInside MagicalPermissions it will be solved if the API level of the device requiere to ask permissions or not. If permissions must be asked to the user then MagicalPermissions will validate which permissions are already granted and only asked for the needed. **This is why is very important you only ask for the permissions you need, taking the photo or selecting it will only happen if every permission you have asked is granted**. \n\n - By example, if you only need to take the photo then:\n\n```\nString[] permissions = new String[] {\n                Manifest.permission.CAMERA\n        };\nmagicalPermissions = new MagicalPermissions(this, permissions);\n```\n\n- MagicalCamera take care of saving the photo commonly you will need:\n\n```\nString[] permissions = new String[] {\n            Manifest.permission.CAMERA,\n            Manifest.permission.READ_EXTERNAL_STORAGE,\n            Manifest.permission.WRITE_EXTERNAL_STORAGE\n    };\nmagicalPermissions = new MagicalPermissions(this, permissions);\n```\n\n - Or maybe you want to use more potential of MagicalCamera and also ask for location related info, then you need:\n\n```\nString[] permissions = new String[] {\n            Manifest.permission.CAMERA,\n            Manifest.permission.READ_EXTERNAL_STORAGE,\n            Manifest.permission.WRITE_EXTERNAL_STORAGE,\n            Manifest.permission.ACCESS_COARSE_LOCATION,\n            Manifest.permission.ACCESS_FINE_LOCATION\n    };\nmagicalPermissions = new MagicalPermissions(this, permissions);\n```\n\nYou can also ask for other permissions in other places of your app, even unrelated to MagicalCamera using MagicalPermissions separatedly. So if getting location information is not requiered for the photo, but is a plus, you should consider separating thoose permissions from the absolutely needed to your feature. MagicalPermissions use a `Runnable` to do whatever you want after checking the permissions. When is used along with MagicalCamera you don't have to be aware of that, is automatic, but in this case we are considering asking for other permissions:\n\n```\nString[] location = new String[] {\n            Manifest.permission.ACCESS_COARSE_LOCATION,\n            Manifest.permission.ACCESS_FINE_LOCATION\n    };\nlocationPermissions = new MagicalPermissions(this, location);\n\n\nRunnable runnable = new Runnable() {\n    @Override\n    public void run() {\n        //TODO location permissions are granted code here your feature\n        Toast.makeText(context, \"Thanks for granting location permissions\", Toast.LENGTH_LONG).show();\n    }\n};\nlocationPermissions.askPermissions(runnable);\n```\n\nThen the second part of the process come into play: receiving the permissions result. You have to **always override** the `onRequestPermissionsResult` method in the Activity or Fragment. Inside of it, call your instance of MagicalPermissions and give it the result to the `permissionResult()` method (this is why must be a field). The `permissionResult()` method is a `Map\u003cString, Boolean\u003e` in case you need to know what happened and do something about it:\n\n```\n@Override\npublic void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {\n    Map\u003cString, Boolean\u003e map = magicalPermissions.permissionResult(requestCode, permissions, grantResults);\n    for (String permission : map.keySet()) {\n        Log.d(\"PERMISSIONS\", permission + \" was: \" + map.get(permission));\n    }\n    //Following the example you could also\n    //locationPermissions(requestCode, permissions, grantResults);\n}\n```\n\n\u003cbr\u003e\n\n# Photo\n\n### Declare variable to resize photo \n**( with pixels percentage )**\nYou need to declare and constant or a simple int variable for the quality of the photo, while greater be, greater be the quality, and otherwise, worst be the quality, like this\n```bash\n//The pixel percentage is declare like an percentage of 100, if your value is 50, the photo will have the middle quality of your camera. \n// this value could be only 1 to 100.\nprivate int RESIZE_PHOTO_PIXELS_PERCENTAGE = 80;\n```\n\n\u003cbr\u003e\n\n### Instance Class MagicalCamera\n###### *YOU NEED TO INSTANCE THIS, AFTER THAT PERMISSION GRANTED INSTANCE.*\nYou need to instance the MagicalCamera Class, like this:\nThe fisrt param is the current Activity, and the second the resize percentage photo, and the third param is the Permission Granted\n```bash\n MagicalCamera magicalCamera = new MagicalCamera(this,RESIZE_PHOTO_PIXELS_PERCENTAGE, magicalPermissions);\n \n```\n\n\u003cbr\u003e\n\n### Activities Methods\nYou need to call the methods for take or select pictures in activities that this form:\n\n```bash\n//take photo\nmagicalCamera.takePhoto();\n\n//select picture\nmagicalCamera.selectedPicture(\"my_header_name\");\n```\n\n\u003cbr\u003e\n\n### Fragments Methods\nYou need to call these methods for take or select pictures in fragments:\n\n```bash\n//take photo\nmagicalCamera.takeFragmentPhoto(FragmentSample.this);\n \n //select picture\nmagicalCamera.selectedFragmentPicture(FragmentSample.this, \"My Header Example\");\n```\n\u003cbr\u003e\nAs you can see MagicalCamera is working together MagicalPermissions so you don't need to pass a `Runnable` the camera or photo selection will be triggered once permissions are solved.\n\u003cbr\u003e\n\n### Override the event onActivityResult\n**Remember**, you **need to override** the method onActivityResult in your activity or fragment like this\n```bash\n @Override\n    public void onActivityResult(int requestCode, int resultCode, Intent data) {\n        super.onActivityResult(requestCode, resultCode, data);\n        //CALL THIS METHOD EVER\n        magicalCamera.resultPhoto(requestCode, resultCode, data);\n        \n        //this is for rotate picture in this method\n        //magicalCamera.resultPhoto(requestCode, resultCode, data, MagicalCamera.ORIENTATION_ROTATE_180);\n        \n        //with this form you obtain the bitmap (in this example set this bitmap in image view)\n        imageView.setImageBitmap(magicalCamera.getPhoto());\n        \n        //if you need save your bitmap in device use this method and return the path if you need this\n        //You need to send, the bitmap picture, the photo name, the directory name, the picture type, and autoincrement photo name if           //you need this send true, else you have the posibility or realize your standard name for your pictures.\n        String path = magicalCamera.savePhotoInMemoryDevice(magicalCamera.getPhoto(),\"myPhotoName\",\"myDirectoryName\", MagicalCamera.JPEG, true);\n\n       if(path != null){\n           Toast.makeText(MainActivity.this, \"The photo is save in device, please check this path: \" + path, Toast.LENGTH_SHORT).show();\n       }else{\n           Toast.makeText(MainActivity.this, \"Sorry your photo dont write in devide, please contact with fabian7593@gmail and say this error\", Toast.LENGTH_SHORT).show();\n       }\n    }\n```\n\n\u003cbr\u003e\n\n### Get Uri path\nYou only could use\n```bash\nmagicalCamera.getRealPath()\n```\n\n### Save Photo in Memory Devices\nThis method save your bitmap in internal memory device or if the internal memory is full this library save in sdcard (if you have anything)\nThis method have a lot of params that you can need to use the library:\n* **Bitmap:** This is the bitmap that you need to save in memory device.\n* **PhotoName:** The name of the photo\n* **DirectoryName:** The name of directory that you need to save the image\n* **Format:** the format of the photo, maybe png, jpeg or webp. Depends of that you need.\n* **AutoIncrementNameByDate:** This variable save the photo with the photo name and the current date and hour. (Only if is true).\n\nFor example: myTestMagicalCameraPhoto_20160520131344 -\u003e This is the year 2016, month 5, day 20, hour 13, minute 13 and second 44.\n\nThe method:\n```bash\n public String savePhotoInMemoryDevice(Bitmap bitmap, String photoName, String directoryName,\n Bitmap.CompressFormat format, boolean autoIncrementNameByDate)\n```\n\nExample:\n```bash\n String path = magicalCamera.savePhotoInMemoryDevice(magicalCamera.getPhoto(), \"myTestPhotoName\", MagicalCamera.JPEG, true);\n```\n\u003cbr\u003e\n\n### Types of Formats for save photos\nYou have any type of formats for save the pictures and the bitmaps.\nYou can use, the static variables of the library MagicalCamera.\n```bash\n Bitmap.CompressFormat jpeg = MagicalCamera.JPEG;\n Bitmap.CompressFormat png = MagicalCamera.PNG;\n Bitmap.CompressFormat webp = MagicalCamera.WEBP;\n```\n\n\u003cbr\u003e\n\n### Resize photo in real time\nYou can resize the photo in any moment with this:\n```bash\n   magicalCamera.setResizePhoto(newResizeInteger);\n```\n\n\u003cbr\u003e\n\n### Conversion Methods\nThe library have any methods to convert the bitmap in other formats that you need.\nAll of this methods are public statics, I mean that you dont have to instance the library for usage this.\nYou need to call the class * ConvertSimpleImage * And the respective params.\n* **bitmapToBytes:** Convert the bitmap to array bytes, only need the bitmap param and the compress format, return array bytes.\n* **bytesToBitmap:** Convert the array bytes to bitmap, only need the array bytes in param, return bitmap.\n* **bytesToStringBase64:** Convert the array bytes to String base 64, only need the array bytes format in param, return String.\n* **stringBase64ToBytes:** Convert string to array bytes, only need the String in param, return array bytes.\n\nExample:\n```bash\n  //convert the bitmap to bytes\n  byte[] bytesArray =  ConvertSimpleImage.bitmapToBytes(magicalCamera.getPhoto(), MagicalCamera.PNG);\n  \n   //convert the bytes to string 64, with this form is easly to send by web service or store data in DB\n   String imageBase64 = ConvertSimpleImage.bytesToStringBase64(bytesArray);\n\n   //if you need to revert the process\n   byte[] anotherArrayBytes = ConvertSimpleImage.stringBase64ToBytes(imageBase64);\n\n  //again deserialize the image\n  Bitmap myImageAgain = ConvertSimpleImage.bytesToBitmap(anotherArrayBytes);\n```\n\n\u003cbr\u003e\n\n### Rotate picture\nYou have the posibility of rotate picture because some devices have the camera in landscape, and the picture is shown upside down.\nIf you need to rotate image use in event onActivityResult the method with the last param:\n```bash\n  magicalCamera.resultPhoto(requestCode, resultCode, data, MagicalCamera.ORIENTATION_ROTATE_180);\n``` \nor if you rotate manually in another part of code use method:\n```bash\n//rotate any image\nBitmap myImage = magicalCamera.rotatePicture(magicalCamera.getPhoto(),  MagicalCamera.ORIENTATION_ROTATE_90);\n\n//rotate the getPhoto in magicalCamera Object\nBitmap myImage = magicalCamera.rotatePicture(MagicalCamera.ORIENTATION_ROTATE_NORMAL);\n``` \n\nYou have this posibillities of rotate image:\n```bash\nMagicalCamera.ORIENTATION_ROTATE_NORMAL\nMagicalCamera.ORIENTATION_ROTATE_90\nMagicalCamera.ORIENTATION_ROTATE_180\nMagicalCamera.ORIENTATION_ROTATE_270\n``` \n\u003cbr\u003e\n\n### Facial Recognition:\n\nThis is a method to return your bitmap (magicalCamera.getPhoto()) like another bitmap with a square draws arround the face of the photo, with the posibillity of modify the color and the stroke of the square. And this is not all, you have the posibility of call the List\u003cLandmark\u003e of the photo with facial recognitions, for save data of all faces, for example the distance between eyes, the nose position and mounth position, all of this is important information for facials recognitions.\n\nYou need to write for example:\n```bash\nif(magicalCamera != null){\n    if(magicalCamera.getPhoto() != null){\n         //this comment line is the strok 5 and color red for default\n         //imageView.setImageBitmap(magicalCamera.faceDetector());\n         //you can the posibility of send the square color and the respective stroke\n         imageView.setImageBitmap(magicalCamera.faceDetector(50, Color.GREEN));\n\n         List\u003cLandmark\u003e listMark = magicalCamera.getListLandMarkPhoto();\n     }else{\n         Toast.makeText(MainActivity.this,\n                 \"Your image is null, please select or take one\",\n                 Toast.LENGTH_SHORT).show();\n     }\n }else{\n     Toast.makeText(MainActivity.this,\n             \"Please initialized magical camera, maybe in static context for use in all activity\",\n             Toast.LENGTH_SHORT).show();\n }\n```\n\nThe photo and bitmap converted is like to:\n\u003cbr\u003e\n\n![alt tag](https://raw.githubusercontent.com/fabian7593/MagicalCamera/master/Images/faceDetection2.png)\n\n\n### Private information Photo:\nThis method show you the private information photo if the photo is saved in device or not... \nFor view all information the device need to activate GPS locations (and maybe internet), else not show all information :(.\n\nYou need to write this code for example:\n```bash\n //verify if the bitmap of image have data\n if(magicalCamera.getPhoto()!=null) {\n   //verify if this photo is save in device, and if has private information to show and return true if have information, or false is not\n   if(magicalCamera.initImageInformation()) {\n\n         StringBuilder builderInformation = new StringBuilder();\n\n         if (notNullNotFill(magicalCamera.getPrivateInformation().getLatitude() + \"\"))\n             builderInformation.append(\"Latitude: \" + magicalCamera.getPrivateInformation().getLatitude() + \"\\n\");\n\n         if (notNullNotFill(magicalCamera.getPrivateInformation().getLatitudeReference()))\n             builderInformation.append(\"Latitude Reference: \" + magicalCamera.getPrivateInformation().getLatitudeReference() + \"\\n\");\n\n         if (notNullNotFill(magicalCamera.getPrivateInformation().getLongitude() + \"\"))\n             builderInformation.append(\"Longitude: \" + magicalCamera.getPrivateInformation().getLongitude() + \"\\n\");\n\n         if (notNullNotFill(magicalCamera.getPrivateInformation().getLongitudeReference()))\n             builderInformation.append(\"Longitude Reference: \" + magicalCamera.getPrivateInformation().getLongitudeReference() + \"\\n\");\n\n         if (notNullNotFill(magicalCamera.getPrivateInformation().getDateTimeTakePhoto()))\n             builderInformation.append(\"Date time to photo: \" + magicalCamera.getPrivateInformation().getDateTimeTakePhoto() + \"\\n\");\n\n         if (notNullNotFill(magicalCamera.getPrivateInformation().getDateStamp()))\n             builderInformation.append(\"Date stamp to photo: \" + magicalCamera.getPrivateInformation().getDateStamp() + \"\\n\");\n\n         if (notNullNotFill(magicalCamera.getPrivateInformation().getIso()))\n             builderInformation.append(\"ISO: \" + magicalCamera.getPrivateInformation().getIso() + \"\\n\");\n\n         if (notNullNotFill(magicalCamera.getPrivateInformation().getOrientation()))\n             builderInformation.append(\"Orientation photo: \" + magicalCamera.getPrivateInformation().getOrientation() + \"\\n\");\n\n         if (notNullNotFill(magicalCamera.getPrivateInformation().getImageLength()))\n             builderInformation.append(\"Image lenght: \" + magicalCamera.getPrivateInformation().getImageLength() + \"\\n\");\n\n         if (notNullNotFill(magicalCamera.getPrivateInformation().getImageWidth()))\n             builderInformation.append(\"Image Width: \" + magicalCamera.getPrivateInformation().getImageWidth() + \"\\n\");\n\n         if (notNullNotFill(magicalCamera.getPrivateInformation().getModelDevice()))\n             builderInformation.append(\"Model Device: \" + magicalCamera.getPrivateInformation().getModelDevice() + \"\\n\");\n\n         if (notNullNotFill(magicalCamera.getPrivateInformation().getMakeCompany()))\n             builderInformation.append(\"Make company: \" + magicalCamera.getPrivateInformation().getMakeCompany() + \"\\n\");\n\n         new MaterialDialog.Builder(MainActivity.this)\n                 .title(\"See photo information\")\n                 .content(builderInformation.toString())\n                 .positiveText(\"ok\")\n                 .show();\n   }else{\n   Toast.makeText(MainActivity.this,\n           \"This photo donte have ifnormation, remember, for obtain the info you need to save the picture in device before\",\n           Toast.LENGTH_SHORT).show();\n   }\n }else{\n   Toast.makeText(MainActivity.this,\n           \"You dont have data to show because the photo is null (your photo isn't in memory device)\",\n           Toast.LENGTH_SHORT).show();\n }\n \n \n \n and the method that I use in the example is for validate not null or empty\n    private boolean notNullNotFill(String validate){\n        if(validate != null){\n            if(!validate.trim().equals(\"\")){\n                return true;\n            }else{\n                return false;\n            }\n        }else{\n            return false;\n        }\n    }\n```\n\nSee the example of this infomartion return:\n\u003cbr\u003e\n\n![alt tag](https://raw.githubusercontent.com/fabian7593/MagicalCamera/master/Images/information2.png)\n\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n\n# Footer Document\n\n## Internal documentation\nAll the code has a internal documentation for more explanation of this example.\n\n\u003cbr\u003e\u003cbr\u003e\n\n## Preview of Example\n\u003cbr\u003e\n\n![alt tag](https://raw.githubusercontent.com/fabian7593/MagicalCamera/master/Images/magicalcamera.gif)\n\n\u003cbr\u003e\u003cbr\u003e\n\n## Application that use MagicalCamera\nUTNCources\u003cbr\u003e\nExampleMagicalCamera\n\nFeel free to contact me to add yours apps to this list.\n\n\u003cbr\u003e\u003cbr\u003e\n\n## Suggestions\nMagicalCamera was created to make Android Devoloper's life easy. If you have any feedback please let us know in the issues by creating an issue with this format:\n \n - Write what your feedback is about and add the next \"tag\" including the square brackets [FEEDBACK]\n\nSuggestions about how to improve the library or new features are welcome. Thanks for choosing us.\n\u003cbr\u003e\u003cbr\u003e\n\n## Credits and Contributors\n\n**Author**\n### [Fabián Rosales - Frosquivel Developer](https://github.com/fabian7593) : \nA magical camera author, I do the take camera, select photo, rotate picture, convert bitmap, facial recognition, save picture, get information and others...\n\n[![alt tag](https://raw.githubusercontent.com/fabian7593/CountryAPI/master/Files/imgsReadme/github-logo.png)](https://github.com/fabian7593)\n[![alt tag](https://raw.githubusercontent.com/fabian7593/CountryAPI/master/Files/imgsReadme/facebook.png)](https://www.facebook.com/fabian.rosales.509)\n[![alt tag](https://raw.githubusercontent.com/fabian7593/CountryAPI/master/Files/imgsReadme/linkedin.png)](https://www.linkedin.com/in/fabian-rosales-esquivel-698893106/)\n[![alt tag](https://raw.githubusercontent.com/fabian7593/CountryAPI/master/Files/imgsReadme/youtube.png)](https://www.youtube.com/channel/UCJnvvHb_vwMwbnZWplkHIfw)\n\n\u003cbr\u003e\n\n**Contributors**\n### [Erick Navarro](https://github.com/cutiko)\n**MagicalCamera Contributor (Cutiko)**\nErick Add a best usage of google play library, and he develop the better usage of permissions, and an excellent code refactor for permission class and other components.\n\n### [Arthur Zettler](https://github.com/arthursz)\n**MagicalCamera Contributor (arthursz)**\nArthur create the return path of the image saved like a String.\n\n\u003cbr\u003e\u003cbr\u003e\n\n## Contributors are welcome\nThe goal for MagicalCamera is to allow Android Developers care about what is important, feautures not getting worry about something that should be trivial such as taking a picture. We look forward to make this a great library to make image capture process simple and painless. There are amny features and other issues waiting. If you would like to contribute please reach to us, or maybe be bold! Getting a surprise pull request is very gratifying.\n\n\u003cbr\u003e\u003cbr\u003e\n\n## Video\n## You can see the video explication here (in spanish) This video is for MagicalCamera version 1.0\nhttps://www.youtube.com/watch?v=U-JxaFZDSn4\n\n\u003cbr\u003e\u003cbr\u003e\u003cbr\u003e\n\n# License\nCopyright 2016 Fabian Rosales\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\u003cbr\u003e\u003cbr\u003e\n\n","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick\u0026hosted_button_id=L25MKCRPR7TWY"],"categories":["Libraries"],"sub_categories":["GUI"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabian7593%2FMagicalCamera","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffabian7593%2FMagicalCamera","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffabian7593%2FMagicalCamera/lists"}