Giter Club home page Giter Club logo

advancedandroid_emojify's People

Contributors

ngamolsky avatar sudkul avatar

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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

advancedandroid_emojify's Issues

source code outdated

I'm asking for permission to update this source code. Can I submit a pull request?

Manifest merger failed

Manifest merger failed : Attribute meta-data#android.support.VERSION@value value=(25.4.0) from [com.android.support:appcompat-v7:25.4.0] AndroidManifest.xml:28:13-35 is also present at [com.android.support:support-v4:26.1.0] AndroidManifest.xml:28:13-35 value=(26.1.0). Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:26:9-28:38 to override.

Is Anyone else having this error?

App force closes after clicking "GO" button

Here is the stack trace

05-08 21:23:03.619 6885-6885/com.example.android.emojify E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.android.emojify, PID: 6885
java.lang.IllegalStateException: Could not execute method for android:onClick
at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:289)
at android.view.View.performClick(View.java:4652)
at android.view.View$PerformClick.run(View.java:19318)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:146)
at android.app.ActivityThread.main(ActivityThread.java:5641)
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:1288)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1104)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:284)
at android.view.View.performClick(View.java:4652) 
at android.view.View$PerformClick.run(View.java:19318) 
at android.os.Handler.handleCallback(Handler.java:733) 
at android.os.Handler.dispatchMessage(Handler.java:95) 
at android.os.Looper.loop(Looper.java:146) 
at android.app.ActivityThread.main(ActivityThread.java:5641) 
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:1288) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1104) 
at dalvik.system.NativeStart.main(Native Method) 
Caused by: java.lang.IllegalArgumentException: Failed to find configured root that contains /storage/emulated/0/Android/data/com.example.android.emojify/cache/JPEG_2017508_212303_-791874679.jpg
at android.support.v4.content.FileProvider$SimplePathStrategy.getUriForFile(FileProvider.java:678)
at android.support.v4.content.FileProvider.getUriForFile(FileProvider.java:377)
at com.example.android.emojify.MainActivity.launchCamera(MainActivity.java:108)
at com.example.android.emojify.MainActivity.emojifyMe(MainActivity.java:69)
at java.lang.reflect.Method.invokeNative(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:515) 
at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:284) 
at android.view.View.performClick(View.java:4652) 
at android.view.View$PerformClick.run(View.java:19318) 
at android.os.Handler.handleCallback(Handler.java:733) 
at android.os.Handler.dispatchMessage(Handler.java:95) 
at android.os.Looper.loop(Looper.java:146) 
at android.app.ActivityThread.main(ActivityThread.java:5641) 
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:1288) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1104) 
at dalvik.system.NativeStart.main(Native Method) 

FileUriExposedException Exercice 2

Hello, I'm having a crash due to a FileUriExposedException on the 2nd Exercice (https://github.com/udacity/AdvancedAndroid_Emojify/tree/TLIB.02-Solution-DetectFaces)
my device is a Honor 5C.

   Caused by: android.os.FileUriExposedException:
 file:///storage/9016-4EF8/Android/data/com.example.android.emojify/cache/JPEG_20170707_121204_1635028525.jpg 
exposed beyond app through ClipData.Item.
at android.os.StrictMode.onFileUriExposed(StrictMode.java:1816)

...

at com.example.android.emojify.MainActivity.launchCamera(MainActivity.java:151)
at com.example.android.emojify.MainActivity.emojifyMe(MainActivity.java:93)
at java.lang.reflect.Method.invoke(Native Method) 
at android.support.v7.app.AppCompatViewInflater$DeclaredOnClickListener.onClick(AppCompatViewInflater.java:288) 
at android.view.View.performClick(View.java:5646)

Is anyone else having this problem ?

aproblem when import TLIB_00 StarteingCode

Error:Failed to crunch file G:\course Android developer\AdvancedAndroid_Emojify\AdvancedAndroid_Emojify-TLIB.00-StartingCode\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\25.2.0\res\drawable-xxhdpi-v4\abc_text_select_handle_middle_mtrl_light.png into G:\course Android developer\AdvancedAndroid_Emojify\AdvancedAndroid_Emojify-TLIB.00-StartingCode\app\build\intermediates\res\merged\debug\drawable-xxhdpi-v4\abc_text_select_handle_middle_mtrl_light.png

Can't setup a virtual device to work with the webcam

Running 'emulator -webcam-list -avd [avd name]' (for any device, or without the device param) yields the following:
emulator: ERROR: cmd_camera_device_start_capturing: Device 'AndroidEmulatorVC0' is unable to save frame to the clipboard: 0

I'm on Windows 8.1 / Lenovo laptop with Lenovo EasyCamera. The driver is five years old but up-to-date according to the system. The webcam works with other programs. When changing the driver to USB Video Device, the above error message is gone, there is no message at all and a window pops up to select a 'capture source', with the EasyCamera as the only option.

Then running a virtual device and trying to open the camera app, using either of the two drivers results in a 'Can't connect to the camera' error message.

There is a 1GB sd card I setup with mksdcard, and correct readings are confirmed in config.ini and hardware-qemu.ini :
hw.sdCard.path points to the right sd card file path, and hw.sdCard=yes.
Also,
hw.camera.front = webcam0
hw.camera.back = emulated
I tried with 'none' instead of 'emulated', reversing the values for front and back, also setting both to 'webcam0' which I understand should not work anyway.
I also added the line 'hw.camera=yes' that I saw somewhere. Not sure if it has an effect.

There seem to be quite a few posts unanswered/unresolved on stackoverflow and other sites concerning a seemingly similar issue. I followed all the suggestions I came across and so far nothing works. Is there anything more I can do? Other than connecting a physical device which I already did but it's not ideal.

Dead link to solution code at "14: Exercise: Detect Faces Intro"

App does not work as expected, crashes after trying to save photo (API level 24)

After taking a photo from the app, the photo doesn't show up at the main screen; i.e., only the floating buttons appear after the camera app returns with a result. Then, after clicking the save button, the app crashes.

So, I decided to run the app in debug mode, and I saw that the problem was that after the result from the camera app comes back to MainActivity, the variable mTempPhotoPath no longer has the value that was assigned to it initially when the method launchCamera() was called, so, even if the result was positive, the function resamplePic() can't do anything because the image path it receives is now null.

As a possible fix, I just saved the value of mTempPhotoPath to the activity's Bundle, and retrieve it inside onCreate() if necessary. After that the app now works as expected.

Failed to ensure directory

My app is crashing after it returns from the camera with the warning
Failed to ensure directory: /storage/sdcard1/Android/data/com.example.android.emojify/cache
Any suggestion ?

Starting Code dosen't run correctly , When i capture an image its crash

application dosent show the image when i take it , it get crashed and return to main activity with this exception
FATAL EXCEPTION: main
Process: com.sec.android.app.camera, PID: 8066
java.lang.SecurityException: Permission Denial: opening provider android.support.v4.content.FileProvider from ProcessRecord{427c29a8 8066:com.sec.android.app.camera/u0a85} (pid=8066, uid=10085) that is not exported from uid 10205

i try to google it a lot of time but at end i failed to solve this problem , thanks in advance

GO Button not working after integrating ButterKnife

After integrating butterknife the GO button is not working. I tried everything but doesn't help. I am testing on Redmi 2S prime. It was working fine before integrating it with ButterKnife.
The only issue occured before integrating butterknife is that it does not emojify faces. Now after butterknife it is not doing anything at all. I even tried copy-pasting all code.

Gradle file does not build / sync with current Android Studio

The build.gradle file for app returns numerous warnings from Android Studio 3.1.2.

After following Android Studio's instructions for fixing critical errors, invalidating and clearing cache, Android Studio still does not properly import various packages (e.g. import android.support.v7.app.AppCompatActivity).

Full list of failed imports:
import android.support.design.widget.FloatingActionButton;
import android.support.v4.app.ActivityCompat;
import android.support.v4.content.ContextCompat;
import android.support.v4.content.FileProvider;
import android.support.v7.app.AppCompatActivity;

No faces detected

Hello,
In portrait mode it never detects a face, and in landscape mode it detect face in 1 out of every 5 photos...
plus it show the photo on it's side.
I'm using samsung galaxy s10+
I read all of the 6 issues related to face detection already and none of the solutions there helped me with this problem.

onActivityResult, resultCode is always == RESULT_CANCELED (0)

on LGE LG D802 device, the camera app doesn't seem to recognise Emojify's File Provider and thus no photo is captured and displayed, for a work around, this line in MainActivity.java solved the problem for me:

Uri photoURI = Uri.fromFile(photoFile);

instead of Uri photoURI = FileProvider.getUriForFile(...);

SOLVED - Rotation, share, save, delete

Please check my three latest Pull requests. I fixed rotation, share, save and delete problems. Now application works as supposed on latest custom rom, LineageOS 7.1.2 (Samsung Galaxy S3 d2att)

Doesn't work share photo with Gmail client on Api 24.

07-12 19:01:53.343 15696-15696/? W/Gmail: Error opening file to obtain size. java.io.FileNotFoundException: No such file or directory at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:144) at android.content.ContentProviderProxy.openTypedAssetFile(ContentProviderNative.java:692) at android.content.ContentResolver.openTypedAssetFileDescriptor(ContentResolver.java:1156) at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:993) at android.content.ContentResolver.openFileDescriptor(ContentResolver.java:846) at android.content.ContentResolver.openFileDescriptor(ContentResolver.java:800) at dln.a(SourceFile:212) at dln.a(SourceFile:202) at clj.a(SourceFile:1801) at clv.run(SourceFile:4) at clj.a(SourceFile:615) at clj.a(SourceFile:407) at clj.N(SourceFile:490) at clj.onCreate(SourceFile:181) at com.google.android.gm.ComposeActivityGmail.onCreate(SourceFile:39) at android.app.Activity.performCreate(Activity.java:6910) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2746) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2864) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1567) at android.os.Handler.dispatchMessage(Handler.java:105) at android.os.Looper.loop(Looper.java:156) at android.app.ActivityThread.main(ActivityThread.java:6531) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:941) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:831) 07-12 19:01:53.344 15696-15696/? W/Gmail: Error adding attachment - empty attachment

SOLVED: No faces found on image, solution by @aznxed

If faces are not detected, try this solution by @aznxed. The issue is that face are only detected when you take a picture in landscape mode which makes the usability of the app - and the code we learn - very limited, outright broken. This solution rotates the portrait images so that they are usable and face detection works as intended.

    Try this in addition to line 73 in BitmapUtils.java, tested in portrait mode on Google Pixel 2

    Matrix matrix = new Matrix();
    matrix.postRotate(-90);

    Bitmap bitmapOrg = BitmapFactory.decodeFile(imagePath);
    Bitmap scaledBitmap = Bitmap.createScaledBitmap(bitmapOrg, bitmapOrg.getWidth(), bitmapOrg.getHeight(), true);
    Bitmap rotatedBitmap = Bitmap.createBitmap(scaledBitmap, 0, 0, scaledBitmap.getWidth(), scaledBitmap.getHeight(), matrix, true);

    return rotatedBitmap;

Originally posted by @aznxed in #1 (comment)

After starter code, it wont sync or build (it fails)

Hello,
only the started code works, when I try to check it as the exercise 1 or further, it wont build/sync properly.
I get this error text in red:

Failed to crunch file D:\AdvancedAndroid_Emojify\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-base\10.2.0\res\drawable-xxhdpi-v4\common_google_signin_btn_icon_light_normal_background.9.png into D:\Study\P.Languages\AndroidAppDevelopment\AndroidStudioProjects\AdvancedAndroid_Emojify\app\build\intermediates\res\merged\debug\drawable-xxhdpi-v4\common_google_signin_btn_icon_light_normal_background.9.png

and when I try to update all the dependencies to the most updated version, it give errors as well and says that the BitmapUtils is asking for the older ones.

Application doesn't detect any face while Running last branch

Hello !
every time while testing the last branch the app show that doesn't detect any face
after debugging I discover that the SparseArray "faces " length was 0
I know exactly that there is training for lessons but I cloned the last branch
I think there is something missed

Thanks

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.