advancedandroid_emojify's People
Forkers
radsen shashvati16 maximbravo weihsinchen dahu3291 dilipkumar4813 emad2411 flumiie hazemhabib edwin9870 adnanul mintra-ruensuk omicic sergejsbogdanovs nadin-a abdrrahmenz megavak vlavlamel massaohigaskino alitabet nicokurogane esidem dougouk ehbraheem lauriewu1 ujwal2910 kokoafantchao andyokesokun toluwanio nagyist maha97 niceboyrahul osamatheeb evgansoft himakiran huy-coursework tuonbondol eamedina87 chenzhuo914 rhcu ashish411 wolfblac1725 mbahgojol pmalland nishantdesigns miriban polash dlintin purbohadi brocy antoniocappiello mura75 sauradip karabulut1989 saipraneshm alancowap joelreeves aidenak rajtheinnovator ipaddr derohimat cmoney667 barbietunnie smilelyj ahass abhisheksingapore ireolaniyan cheeryguo morshed-islam manvelmk carlosgilsaenz shawn-ma-mel hossamhamdy94 gohilchirag irmantascivilis razacoderepo huyttq-fsofter artem-p f1dz ekosp shakir-fattani yi904835116 sspatil94 sloshyd marcomene ivzb lixw1021 pieeet techieeupload akashlakhera kgliashenko kaiser1997 poojithaanche jeffbarge kgundula ed828a ggguille bogdanorzea atckersten taikonavtadvancedandroid_emojify's Issues
source code outdated
I'm asking for permission to update this source code. Can I submit a pull request?
App crashes after clicking GO button
Android 5.1
Huawei IIS
Issue caused by BitmapUtils.createTempImageFile method.
App does not work on Pre-Lolipop devices. Error regarding permissions.
I run this code on API 23 and it worked fine. However in API 19, the moment i clicked save button, my gallery app crashed (not the Emojify). On checking the logcat, it shows an error Permission Denial.
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?
Context in the static method
Is it OK to use a Context in the static method?
Save Image and share image functions are not working. i got error
Crash of application if emojiBitmap is null at this line
Before to call addBitmapToFace method, verify if emojiBitmap variable is not null.
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)
The error display right after clone.
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
Could not initialize class com.android.sdklib.repository.AndroidSdkHandler
When Importing this 5 years old code to 2021 Android Studio. I request owners of this course to update this code or any one else. I have tried many updated codes that several people has updated but nothing worked
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"
I have found a dead link at Advanced Android App Development course > Lesson 3: Libraries > 14. Exercise: Detect Faces Intro
Steps to reproduce the issue
- Open https://classroom.udacity.com/nanodegrees/nd801/parts/ec45ffe9-2c4e-4b8d-ad76-d80c5905d926/modules/2ad3410b-6505-418c-9b74-2d4f67880313/lessons/240ea66a-cf72-48bf-8df8-d5ff353a6d47/concepts/1d024e2d-92b6-4028-be45-005efd72049d in a browser.
- Check all the checkboxes of exercise.
- The dialog shows up with a link to solution code on GitHub.
- Click the link.
- 404 shows up.
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 ?
FACE NOT DETECTED
Testing on Nexus
Face is not getting detected.
Always detects 0 faces
Tested on Samsung S5 and Samsung S7
probability tresholds?
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)
could you please update the project so it can run in 2019 android Studio ?
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
Crashing when i take a picture in Left Landscape mode, right after clicking OK
When i take the picture in Left Landscape mode it works, but if i click OK while still in Landscape Mode It Crashes.
I've found that taking the picture in Left Landscape Mode and then flipping the phone to portrait before clicking OK, works fine, displays the Emoji overlaping
No face detected even in landscape mode ?
Hello i have been trying to fix this but no luck please help , i even download the develop branch still no face detected.
Face detection is soo slow, is there way to make it fast?
Thank you
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.
No faces detected in any orientation on Samsung Galaxy Note 8
Tried all orientation portrait, left landscape, right landscape, 180 degree portrait.
Commit: TLIB.02-Solution-DetectFaces
Wrong link for Diff code for Exercise.01
Problem: compares branches starter code with exercise.01
solution: compare branches exercise.01 with exercise.01 solution
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
Works only when the picture is captured in left landscape mode
It does not detect the faces when a pictured is captured in any orientation except left landscape mode
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.