GithubHelp home page GithubHelp logo

fabian7593 / magicalcamera Goto Github PK

View Code? Open in Web Editor NEW
337.0 17.0 90.0 45.47 MB

A library to take picture easy, transform your data in different format and save photos in your device

License: Apache License 2.0

Java 99.94% HTML 0.06%
camera facial-recognition photos camera-api camera-image bitmap picture picture-gallery exif exif-interface

magicalcamera's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

magicalcamera's Issues

Fatal Exception: java.lang.OutOfMemoryError

Hi,

i use your MagicalCamera to take several photo to send (encoded 64) to a server.

Sometime i got this error:

Fatal Exception: java.lang.OutOfMemoryError
at android.graphics.BitmapFactory.nativeDecodeStream(BitmapFactory.java)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:623)
at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:378)
at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:417)
at com.frosquivel.magicalcamera.Functionallities.ActionPicture.onTakePhotoResult(ActionPicture.java:183)
at com.frosquivel.magicalcamera.Functionallities.ActionPicture.resultPhoto(ActionPicture.java:203)
at com.frosquivel.magicalcamera.MagicalCamera.resultPhoto(MagicalCamera.java:206)

This is other crash information:

Platform: android

Date: 2017-09-26T08:42:00Z

OS Version: 4.2.2

Device: Galaxy S2 Plus

RAM Free: 35.6%

Disk Free: 62.8%

I have this params set

private int RESIZE_PHOTO_PIXELS_PERCENTAGE = 20;

Can you help me?

I belive you must add this function destroyPhoto:

if(bitmap!=null)
{
bitmap.recycle();
bitmap=null;
}

and we call this on onDestroy(), like magicalCamera.destroyPhoto();

Thanks in advances.

[bug-android 8] java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference

Hi
When i use this library in android 8.0. It show this error
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference
at com.frosquivel.magicalcamera.Utilities.PictureUtils.resizePhoto(PictureUtils.java:44)
at com.frosquivel.magicalcamera.Functionallities.ActionPicture.onTakePhotoResult(ActionPicture.java:184)
at com.frosquivel.magicalcamera.Functionallities.ActionPicture.resultPhoto(ActionPicture.java:203)
at com.frosquivel.magicalcamera.MagicalCamera.resultPhoto(MagicalCamera.java:206)
at com.anphuocthai.vn.activitys.customer.ListImageAlreadyCheckInActivity.onActivityResult(ListImageAlreadyCheckInActivity.java:387)
at android.app.Activity.dispatchActivityResult(Activity.java:7556)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4487)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4534)
at android.app.ActivityThread.-wrap20(Unknown Source)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1752)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6944)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
Please fix this error, for better library

Doc states MagicalCamera.SELECT_PHOTO instead MagicalCameraObject.SELECT_PHOTO

Greetings

Documentation indicates that the code for the intentes (both camera and gallery) are a constant in MagicalCamera, but is not. It should be MagicalCameraObject instead.

This is very important cause I thought I had to use my own code and then MagicalCamera would magically do everything else, however, didnt workd untill I found ActionPicture class

public void resultPhoto(int requestCode, int resultCode, Intent data) {
        if (resultCode == Activity.RESULT_OK) {
            if (requestCode == MagicalCameraObject.SELECT_PHOTO) {
                this.actionPictureObject.setMyPhoto(onSelectFromGalleryResult(data));
            } else if (requestCode == MagicalCameraObject.TAKE_PHOTO) {
                this.actionPictureObject.setMyPhoto(onTakePhotoResult());
            }
        }
    }

Hope to help.

Duplicate pictures

Hi. All works when I take a picture and I save it in my custom directory. The problem is that it also save it in DCIM directory with full quality.
I'm testing in Android 7.0.
Thanks.

android.support error after add Library gradle and sync

The following classes could not be instantiated:
- android.support.v7.widget.AppCompatImageView (Open Class, Show Exception, Clear Cache)
- android.support.design.widget.FloatingActionButton (Open Class, Show Exception, Clear Cache)
- android.support.v7.widget.AppCompatTextView (Open Class, Show Exception, Clear Cache)

Hello
There is some errors in xml after gradle sync with library v1

Crash while picking image from google photos (saved on cloud)

Here is the stacktrace

Process: com.frosquivel.examplemagicalcamera, PID: 15830 java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { dat=content://com.google.android.apps.photos.contentprovider/0/1/mediakey:/AF1QipOTHiNpPGT68W__NicJcUXV205tCyCXoYObDFDe/ORIGINAL/NONE/614175862 flg=0x1 clip={text/uri-list U:content://com.google.android.apps.photos.contentprovider/0/1/mediakey%3A%2FAF1QipOTHiNpPGT68W__NicJcUXV205tCyCXoYObDFDe/ORIGINAL/NONE/614175862} }} to activity {com.frosquivel.examplemagicalcamera/com.frosquivel.examplemagicalcamera.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference at android.app.ActivityThread.deliverResults(ActivityThread.java:3720) at android.app.ActivityThread.handleSendResult(ActivityThread.java:3763) at android.app.ActivityThread.access$1400(ActivityThread.java:154) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1403) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5443) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference at com.frosquivel.magicalcamera.MagicalCamera.resizePhoto(MagicalCamera.java:322) at com.frosquivel.magicalcamera.MagicalCamera.onSelectFromGalleryResult(MagicalCamera.java:215) at com.frosquivel.magicalcamera.MagicalCamera.resultPhoto(MagicalCamera.java:185) at com.frosquivel.examplemagicalcamera.MainActivity.onActivityResult(MainActivity.java:71) at android.app.Activity.dispatchActivityResult(Activity.java:6470) at android.app.ActivityThread.deliverResults(ActivityThread.java:3716) at android.app.ActivityThread.handleSendResult(ActivityThread.java:3763) at android.app.ActivityThread.access$1400(ActivityThread.java:154) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1403) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5443) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)

Permissions in fragments [REQUEST]

Greetings

Usually fragments will modularized blocks of logic. Taking a picture is a block of logic by itself. If it is, gallery or camera, getting the result, updating the UI, saving the photo locally and cloud, etc.

Dialog for permissions using the library method are displaying if are requested from a fragment:

permissionGranted.checkCameraPermission();
permissionGranted.checkReadExternalPermission();
permissionGranted.checkWriteExternalPermission();

The problem is onRequestPermissionsResult is never called in the fragment, but it does in the Activity.

Initially I thought this could be due some sort of device error, so try with others, including emulator and the behaviour was the same. This seems to be not mentioned in the official docs but I found a clue searching in StackOverflow.

It seems that asking permissions from a fragment is different than from an Activity.

Permissions feature is great, thanks for it, but if you could add a fragment version for the permissions it would help us a lot to write more robust code. Thanks.

Path Gallery

my gallery path is set wrong. can you help me?

INSTALL_FAILED_CONFLICTING_PROVIDER

i haven't encountered the error when i am using the library in two projects. I can only install either one application on testing devices and got this error when i try to install second application to same testing device. Both applications install successfully if i remove this library on either one project.
How do i solve this?

path cant be a boolean

How path can be String if savePhotoInMemoryDevice return boolean?

String path = magicalCamera.savePhotoInMemoryDevice(magicalCamera.getMyPhoto(),"myPhotoName","myDirectoryName", MagicalCamera.JPEG, true)

public boolean savePhotoInMemoryDevice

Change default storage directory

Using magicalCamera.savePhotoInMemoryDevice(magicalCamera?.getPhoto(),"foto",this.externalCacheDir.toString(), MagicalCamera.JPEG, true);
is saving in:

/storage/emulated/0/Pictures/storage/emulated/0/Android/data/com.package.example/cache/foto_20170419155537.jpeg

Is there a way to avoid saving the photo in the gallery path (/storage/emulated/0/Pictures/storage)...?
By the way I'm using kotlin

Rotate picture

Yes I can rotate the picture.
But according to what? When I take a picture with the phone vertically the photo is turned 90 ° in the ImageView,
have you planned something on this subject?

Multidex Problem

Greetings

I have a multidex warning after upgrading to 3.0 but got fix by using the transitive property indicated for version 1.0.

compile('com.frosquivel:magicalcamera:3.0@aar') {
        transitive = false;
}

Not a problem, just leaving this here incase anyone else run on the same issue.

NullPointerException name

java.lang.RuntimeException: Unable to resume activity {com.frosquivel.examplemagicalcamera/com.frosquivel.examplemagicalcamera.MainActivity}: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=0, result=-1, data=null} to activity {com.frosquivel.examplemagicalcamera/com.frosquivel.examplemagicalcamera.MainActivity}: java.lang.NullPointerException: name == null at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2790) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2819) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2254) at android.app.ActivityThread.access$800(ActivityThread.java:141) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1212) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5052) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609) at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=0, result=-1, data=null} to activity {com.frosquivel.examplemagicalcamera/com.frosquivel.examplemagicalcamera.MainActivity}: java.lang.NullPointerException: name == null at android.app.ActivityThread.deliverResults(ActivityThread.java:3367) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2777) at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2819)  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2254)  at android.app.ActivityThread.access$800(ActivityThread.java:141)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1212)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:136)  at android.app.ActivityThread.main(ActivityThread.java:5052)  at java.lang.reflect.Method.invokeNative(Native Method)  at java.lang.reflect.Method.invoke(Method.java:515)  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)  at dalvik.system.NativeStart.main(Native Method)  Caused by: java.lang.NullPointerException: name == null at java.io.File.<init>(File.java:150) at java.io.File.<init>(File.java:124) at com.frosquivel.magicalcamera.MagicalCamera.getPhotoFileUri(MagicalCamera.java:349) at com.frosquivel.magicalcamera.MagicalCamera.onTakePhotoResult(MagicalCamera.java:229) at com.frosquivel.magicalcamera.MagicalCamera.resultPhoto(MagicalCamera.java:191) at com.frosquivel.examplemagicalcamera.MainActivity.onActivityResult(MainActivity.java:81) at android.app.Activity.dispatchActivityResult(Activity.java:5437) at android.app.ActivityThread.deliverResults(ActivityThread.java:3363) at android.app.ActivityThread.performResumeActivity(ActivityThread.java:2777) 

Permission Problem After Marshmallow

Hello,
Thanks for great library.
I got a problem about permissions.. If user has no permissions on Camera and Storage, MagicalCamera itself cannot handle it and "return mapPermissions?.get(permission)!!" returns NullPointerException. (Tried on both Java and Kotlin)


 private fun isActivePermission(permission: String): Boolean {
        // This map is return in method onRequestPermissionsResult for view what permissions are actives
        if (android.os.Build.VERSION.SDK_INT >= 23) {
            if (mapPermissions != null) {
                if (mapPermissions!!.size > 0) {
                    // Obtain the code of camera permissions
                     return mapPermissions?.get(permission)!!
                } else {
                    return true
                }
            } else {
                return true
            }
        } else {
            return true
        }
    }

I could not solve the problem, please help me.
Thank you

Can't take a picture on Android 6.0 or higher

I can't open the camera and take a pic using magicalcamera. The code magicalCamera.takePhoto(); doesn't work on the following devices:

  • ZTE BLADE A510. Android 6.0;
  • LG X power. Android 6.0;
  • Xiaomi Redmi 4X. Android 7.0.

Saying "the code doesn't work" I mean it literally doesn't do anything. No crashes, no errors, no any reaction.

BUT it works perfectly on Oysters Pacific E. Android 6.0...I can't find the difference...

I'm using 5.0.2 version

Photos are always in landscape

Greetings

I have being using this since a while now, and it is great. However, today I notice, always photos are stored in landscape orientation, what if the user take a photo in portrait orientation.

I thought this could be just my phone, so I try it with another, and same problem in both (Samsung galaxy note neo 3 and Sony xperia).

java.lang.NullPointerException in Fragment

Hi guys!
Tell me how to catch the result of a photo in a Fragment?
I have a parent activity for navigation drawer menu and several fragments, but a photo is required in one fragment

I am getting following error, please help how to sort it.

11-14 14:25:06.498: E/AndroidRuntime(7487): java.lang.UnsatisfiedLinkError: Couldn't load MagicSDK from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.seu.magiccamera-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.seu.magiccamera-1, /vendor/lib, /system/lib]]]: findLibrary returned null

Android 9.0 pie Api=28

i add MagicalCamera to my project and it doesnt work, is there any problem whit api 28? or is there something extra to do?

App close in android 7 and higher

Hello. I get the following error when take a photo, I am using 5.0.5 version

java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=0, result=-1, data=null} to activity {com.proyectosandroid.siti.magicalcamera/com.proyectosandroid.siti.magicalcamera.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference at android.app.ActivityThread.deliverResults(ActivityThread.java:4339) at android.app.ActivityThread.handleSendResult(ActivityThread.java:4382) at android.app.ActivityThread.-wrap19(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1654) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:251) at android.app.ActivityThread.main(ActivityThread.java:6563) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference at com.frosquivel.magicalcamera.Utilities.PictureUtils.resizePhoto(PictureUtils.java:43) at com.frosquivel.magicalcamera.Functionallities.ActionPicture.onTakePhotoResult(ActionPicture.java:184) at com.frosquivel.magicalcamera.Functionallities.ActionPicture.resultPhoto(ActionPicture.java:203) at com.frosquivel.magicalcamera.MagicalCamera.resultPhoto(MagicalCamera.java:206) at com.proyectosandroid.siti.magicalcamera.MainActivity.onActivityResult(MainActivity.java:83) at android.app.Activity.dispatchActivityResult(Activity.java:7235) at android.app.ActivityThread.deliverResults(ActivityThread.java:4335)

NullPointerException 'int android.graphics.Bitmap.getWidth()' on a null object reference

Hi. I get the following crash when taking pictures. But doesn't happen every time.
java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference at android.app.ActivityThread.deliverResults(ActivityThread.java:3720) at android.app.ActivityThread.handleSendResult(ActivityThread.java:3763) at android.app.ActivityThread.-wrap16(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1403) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:5443) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference at com.frosquivel.magicalcamera.Utilities.PictureUtils.resizePhoto(PictureUtils.java:43) at com.frosquivel.magicalcamera.Functionallities.ActionPicture.onTakePhotoResult(ActionPicture.java:221) at com.frosquivel.magicalcamera.Functionallities.ActionPicture.resultPhoto(ActionPicture.java:240) at com.frosquivel.magicalcamera.MagicalCamera.resultPhoto(MagicalCamera.java:163) at ar.com.nabla.sistemalecturas.fragment.UnidadFragment.onActivityResult(UnidadFragment.java:1167) at android.support.v4.app.FragmentActivity.onActivityResult(FragmentActivity.java:164) at ar.com.nabla.sistemalecturas.activity.UnidadActivity.onActivityResult(UnidadActivity.java:162) at android.app.Activity.dispatchActivityResult(Activity.java:6442) at android.app.ActivityThread.deliverResults(ActivityThread.java:3716) ... 9 more

way to take multi photo

This isn't issue but i dont know where to ask question ?=)

Is this possible to take multi picture. Right now,
magicalCamera.takeFragmentPhoto(this);
open app and take one picture and than show preview screen. I dont want preview screen and want to tahe multi picture at over and over

By the way, thanks for your project =)

Bug Report: Options in TODO List not working on MagicalCamera

Expected behavior

Options in TODO List should work when clicked on.

Actual behavior

Options in TODO List not responding.

How to reproduce

• Download magical camera from play store here,
• launch the app,
• click on the more option button at the top right hand corner,
• select TODO list,
• The app will open the page in browser, chrome or firefox with the latest update is required
• Select any of TO DO, IN PROCESS or Do. All of the actions are not working.

• Operating system: Android Version 7.0
• Device used: Tecno Boom J8
• App Version: 5.0.5

Recording Of The Bug

https://youtu.be/ohwYItdzzDc



Posted on Utopian.io - Rewarding Open Source Contributors

FileUriExposedException in Fragment

Hi, i am get this error :
android.os.FileUriExposedException: file://com.frosquivel.magicalcamera.Provider.PhotoProvider/storage/emulated/0/Android/data/com.example.smr.scc1/files/Pictures/MagicalCamera/MagicalCamera exposed beyond app through ClipData.Item.getUri()

I am using 'com.frosquivel:magicalcamera:6.0.0'
I really apreciate your help...

No Image on Android 11

When taking picture using magical camera 6.0.0 on Android 11 no photo is returned in activity result.

Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)

I never go with that but in application on store some devices gettings this error when asking permission.

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
at com.frosquivel.magicalcamera.MagicalPermissions.executeRequestPermission(MagicalPermissions.java:126)
at com.frosquivel.magicalcamera.MagicalPermissions.requestPermissions(MagicalPermissions.java:78)
at com.frosquivel.magicalcamera.MagicalPermissions.askPermissions(MagicalPermissions.java:61)
at com.ardroid.allaboutus.ui.fragments.profile.ProfileMainFragment.askPermission(ProfileMainFragment.java:236)
at com.ardroid.allaboutus.ui.fragments.profile.ProfileMainFragment.getUserImage(ProfileMainFragment.java:218)
at com.ardroid.allaboutus.ui.fragments.profile.ProfileMainFragment_ViewBinding$1.doClick(ProfileMainFragment_ViewBinding.java:44)
at butterknife.internal.DebouncingOnClickListener.onClick(DebouncingOnClickListener.java:22)
at android.view.View.performClick(View.java:6261)
at android.view.View$PerformClick.run(View.java:23748)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6776)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1496)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1386)

NullPointerException - Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference

Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'int android.graphics.Bitmap.getWidth()' on a null object reference
at com.frosquivel.magicalcamera.Utilities.PictureUtils.resizePhoto(PictureUtils.java:43)
at com.frosquivel.magicalcamera.Functionallities.ActionPicture.onTakePhotoResult(ActionPicture.java:184)
at com.frosquivel.magicalcamera.Functionallities.ActionPicture.resultPhoto(ActionPicture.java:203)
at com.frosquivel.magicalcamera.MagicalCamera.resultPhoto(MagicalCamera.java:206)
at com.example.luis.myapplication.views.SubsectorActivity.onActivityResult(SubsectorActivity.java:1451)
at android.app.Activity.dispatchActivityResult(Activity.java:6442)
at android.app.ActivityThread.deliverResults(ActivityThread.java:3716)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:3763)
at android.app.ActivityThread.-wrap16(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1403)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5443)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:728)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)

Error in activityonresult and Path or Bitmap is null

When i take a photo with Magical Camera i get a problem, if i use magicalCamera.resultPhoto(requestCode, resultCode, data);
in activityonresult in fragment the app crashes, but when i use it in Activity is ok but
magicalCamera.getPhoto()
returns a null Bitmap
or this one
String path = magicalCamera.savePhotoInMemoryDevice(magicalCamera.getPhoto(),"myPhotoName","myDirectoryName", MagicalCamera.JPEG, true);
returns a null String
Could you help me with this problem?
Or teach me how to use this library with fragments?

Samsung devices with rotated images

I've tested the sample app with old samsung galaxy s2 lite and galaxy j5. Both had the same problem, the picture from back camera was rotated to left, and the one from front camera was rotated to right.
Some pictures from album had the same behavior. Any ideia how can I solve this issue?

how to use with proguard

when I want to make a release with proguard it give me an error
how to exclude it from proguard

OutOfMemoryError

Then I take a photo, I get this error:

FATAL EXCEPTION: main
Process: com.timal.bookreminder, PID: 9243
java.lang.OutOfMemoryError: Failed to allocate a 48000012 byte allocation with 16777216 free bytes and 27MB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:843)
at android.graphics.Bitmap.createBitmap(Bitmap.java:820)
at android.graphics.Bitmap.createBitmap(Bitmap.java:751)
at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:627)
at com.frosquivel.magicalcamera.Utilities.PictureUtils.resizePhoto(PictureUtils.java:49)
at com.frosquivel.magicalcamera.Functionallities.ActionPicture.onTakePhotoResult(ActionPicture.java:221)
at com.frosquivel.magicalcamera.Functionallities.ActionPicture.resultPhoto(ActionPicture.java:240)
at com.frosquivel.magicalcamera.MagicalCamera.resultPhoto(MagicalCamera.java:163)
at com.timal.bookreminder.TwoFragment.onActivityResult(TwoFragment.java:183)
at android.support.v4.app.FragmentActivity.onActivityResult(FragmentActivity.java:164)
at android.app.Activity.dispatchActivityResult(Activity.java:6508)
at android.app.ActivityThread.deliverResults(ActivityThread.java:3702)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:3749)
at android.app.ActivityThread.access$1400(ActivityThread.java:153)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1400)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5441)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:738)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:628)

It is only on Android 6.0, on Android 4.4 work perfectly.

NoClassDefFoundError when using imageView.setImageBitmap(magicalCamera.faceDetector())

FATAL EXCEPTION: main
                                                                   Process: com.facedetection, PID: 25183
                                                                   java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/vision/face/FaceDetector$Builder;
                                                                       at com.frosquivel.magicalcamera.Functionallities.FaceRecognition.faceDetection(FaceRecognition.java:68)
                                                                       at com.frosquivel.magicalcamera.Functionallities.FaceRecognition.faceDetector(FaceRecognition.java:51)
                                                                       at com.frosquivel.magicalcamera.MagicalCamera.faceDetector(MagicalCamera.java:109)
                                                                       at com.facedetection.MagicBaby.onActivityResult(MagicBaby.java:73)
                                                                       at android.app.Activity.dispatchActivityResult(Activity.java:7137)
                                                                       at android.app.ActivityThread.deliverResults(ActivityThread.java:4921)
                                                                       at android.app.ActivityThread.handleSendResult(ActivityThread.java:4968)
                                                                       at android.app.ActivityThread.access$1600(ActivityThread.java:222)
                                                                       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1849)
                                                                       at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                       at android.os.Looper.loop(Looper.java:158)
                                                                       at android.app.ActivityThread.main(ActivityThread.java:7229)
                                                                       at java.lang.reflect.Method.invoke(Native Method)
                                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
                                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
                                                                    Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.vision.face.FaceDetector$Builder" on path: DexPathList[[zip file "/data/app/com.facedetection-1/base.apk"],nativeLibraryDirectories=[/data/app/com.facedetection-1/lib/arm64, /vendor/lib64, /system/lib64]]
                                                                       at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
                                                                       at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
                                                                       at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
                                                                       at com.frosquivel.magicalcamera.Functionallities.FaceRecognition.faceDetection(FaceRecognition.java:68) 
                                                                       at com.frosquivel.magicalcamera.Functionallities.FaceRecognition.faceDetector(FaceRecognition.java:51) 
                                                                       at com.frosquivel.magicalcamera.MagicalCamera.faceDetector(MagicalCamera.java:109) 
                                                                       at com.facedetection.MagicBaby.onActivityResult(MagicBaby.java:73) 
                                                                       at android.app.Activity.dispatchActivityResult(Activity.java:7137) 
                                                                       at android.app.ActivityThread.deliverResults(ActivityThread.java:4921) 
                                                                       at android.app.ActivityThread.handleSendResult(ActivityThread.java:4968) 
                                                                       at android.app.ActivityThread.access$1600(ActivityThread.java:222) 
                                                                       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1849) 
                                                                       at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                       at android.os.Looper.loop(Looper.java:158) 
                                                                       at android.app.ActivityThread.main(ActivityThread.java:7229) 
                                                                       at java.lang.reflect.Method.invoke(Native Method) 
                                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) 
                                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) 
                                                                   	Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.vision.face.FaceDetector$Builder
                                                                       at java.lang.Class.classForName(Native Method)
                                                                       at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
                                                                       at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
                                                                       at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
                                                                       		... 16 more
                                                                    Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available

I have all permissions in manifest and requested all permissions at runtime.

[Question] For Video

I am not using library but I have quick Question about that

Is it work for Video capturing or not?

Bug Report: Options in TODO List not working on MagicalCamera

Expected behavior

Options in TODO List should work when clicked on.

Actual behavior

Options in TODO List not responding.

How to reproduce

• Download magical camera from play store here,
• launch the app,
• click on the more option button at the top right hand corner,
• select TODO list,
• The app will open the page in browser, chrome or firefox with the latest update is required
• Select any of TO DO, IN PROCESS or Do. All of the actions are not working.

• Operating system: Android Version 7.0
• Device used: Tecno Boom J8
• App Version: 5.0.5

Recording Of The Bug

https://youtu.be/ohwYItdzzDc



Posted on Utopian.io - Rewarding Open Source Contributors

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.