Комментарии:
can you please tell me how to send txt file
Ответитьhello , could you make videos upload multi-images to server.
ОтветитьIt's not working now
ОтветитьHey bro, great video...can we send some text along with this as well..and how(php changes and android changes)?
Ответитьtask.execute is not showing in my library? please help
ОтветитьOlá, estou realizando uma atividade na qual preciso que o app faça a captura de 3 imagens, e envie para o banco, essas imagens precisam ir como String ( ou seja, converter a imagem em base64), o problema é que a resolução está saindo que nem do minecraft U-u'
fiz o seguinte :
Converto em Array de bytes
public byte[] convertImageViewToByteArray(Bitmap image) {
ByteArrayOutputStream stream = new ByteArrayOutputStream();
image.compress(Bitmap.CompressFormat.JPEG, 100, stream);
return stream.toByteArray()
}
e quando vou salvar a imagem armazeno assim :
img3.setImageBitmap(bitmap2);
Bitmap bit3 = Bitmap.createScaledBitmap(bitmap2, 800, 700, false);
byte[] byteArray3 = convertImageViewToByteArray(bit3);
encodedImage = Base64.encodeToString(byteArray3, Base64.DEFAULT);
imagem.setTerceiraFoto(encodedImage);
How can I upload pdf not image? Is it possible?. Thank you.
ОтветитьHi Oum, if I want to add text in paragraph form to upload along with an image (same as in video), what should I do to do it?
Ответитьplease make a tutorial how to save the image into the database
Ответитьwhat is look like on the mysql database?
Ответитьwhy when taking photos from the camera the result is reversed ?
ОтветитьHi, when I take a photo and press the send button, and after show the load bar, say error while uploading, but when I check in my folder upload the picture is there, what can i do? thanks
Ответитьhi am reciveing this erro when i try to upload an image.and the camera isnt working its just runnung the catch exception
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.zulu.upcamera, PID: 4740
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=22131, result=-1, data=Intent { dat=content://media/external/images/media/35 }} to activity {com.example.zulu.upcamera/com.example.zulu.upcamera.MainActivity}: java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media/35 from pid=4740, uid=10075 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
at android.app.ActivityThread.deliverResults(ActivityThread.java:4089)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4132)
at android.app.ActivityThread.-wrap20(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1533)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Caused by: java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/images/media/35 from pid=4740, uid=10075 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
at android.os.Parcel.readException(Parcel.java:1684)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
at android.content.ContentProviderProxy.query(ContentProviderNative.java:421)
at android.content.ContentResolver.query(ContentResolver.java:532)
at android.content.ContentResolver.query(ContentResolver.java:474)
at com.kosalgeek.android.photoutil.RealPathUtil.getDataColumn(RealPathUtil.java:131)
at com.kosalgeek.android.photoutil.RealPathUtil.getRealPathFromURI_API19(RealPathUtil.java:67)
at com.kosalgeek.android.photoutil.GalleryPhoto.getPath(GalleryPhoto.java:49)
at com.example.zulu.upcamera.MainActivity.onActivityResult(MainActivity.java:112)
at android.app.Activity.dispatchActivityResult(Activity.java:6932)
at android.app.ActivityThread.deliverResults(ActivityThread.java:4085)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:4132)
at android.app.ActivityThread.-wrap20(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1533)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6119)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Thank you so musch! Your tutorials helped me a lot on my final paper for college!
Ответитьsubcribe me develovers
its very helpful
Could not find class 'anCould not find class 'android.graphics.drawable.RippleDrawable', referenced from method android.support.v7.widget.AppCompatImageHelper.hasOverlappingRendering
droid.graphics.drawable.RippleDrawable', referenced from method android.support.v7.widget.AppCompatImageHelper.hasOverlappingRendering
What's this error?. Someone please help me.
Hi sir, i followed your code but it always be "error while uploading" (using linux server) and no error message on my android monitor. Any solution?
Ответитьcan you tell me ,chat back up like a whatsapp. need options:- backup to google drive,account, include video... cane you tell me the source code?
Ответитьupload from gallery size resolution 2560*1920, why cannot ? please help . thanks
ОтветитьIt is not uploading Image, when i debug it, it is saying size is zero..
postData.put("image",encodedImage); // postData size=0;
saving my day Sir ... Gratitude
ОтветитьThank you very much
ОтветитьHi Oum Saokosal... Will you try creating Upload Video to server? :P that would be great!! Thanks in advance!
ОтветитьThe code is the same as part1 which has not including the upload part? Please have double check, thanks!
ОтветитьThank you Oum! it helped me a lot.
But there's 1 problem though... In some devices I cannot upload a captured image. :( how do I fix it for all devices??
Can i Upload File of any type with this ?
ОтветитьHello!! I have an Apache Tomcat server and I'm implementing this code. I get the message that everything was successful but when I go to the folder is empty.
I do not get any exceptions, nor any error messages, I do not know what else I could do, because I have already reviewed every detail and I'm doing the same as you.
thank you for this, i am trying to build an app that users can watch video from it, i want to be able to upload videos from my gallery to users to watch. will this video perform the same function for my app?
ОтветитьHi Sir, i have tried this code every thing is working fine except when i try to upload the image to server its giving an exception of " can not connect to server " please guide me why is so happening and what should i do for proper execution
ОтветитьThank you Oum.Your video just help me solved my most headache problem for my app
Ответитьhi oum. i am getting EACCES permission denied error when debugging on my Huawei P9 Lite phone.
ОтветитьI am getting this error when i added GenAsync.jar file--Error:Unexpected lock protocol found in lock file. Expected 3, found 0.
Ответитьwhere i find complete code
Ответитьhello teacher. with your lib i use a API 23 it not error. but it not work. teacher can you help to guide to solution this ?
Ответитьhow to Upload Image Using PHP MySQL and Display Images in ListView in Android?
Ответитьsir, i have a question that it finish everything and when i open the upload folder i can see a pic.jpeg but no content.why it happen?
ОтветитьSir, code is working fine for uploading images upto size 200 kb but when i upload image that is having size more than 200 kb it gives me error. what should I do??
ОтветитьI can't upload image to server. actually already copy paste upload.php from your video. And i want to ask, how to delete image if user delete picture from device, it can be automatic deleted to from server. Please explain. Thanks.
ОтветитьMy app is not working it is showing server error what should i do??
ОтветитьHi, thank you for this tutorial.
i like it so much.
But one more question, how to retrieve them in my application, maybe in a gridview or a listview?
thank you so much.
The result base64 code cant be decoded as the original image, there is a problem with the base64, or a reason of why it can't be decoded
In the log monitor send the bad base-64 error
Anyway it is a excellent tutorial
upload an image to a server automatically when wifi or another network available.I know I have to use Picasa but how can I use it please help me out.
ОтветитьHello Sir,
Awesome tutorial, thank you..
How can i, retrieve the image from data base? please help me.
How can i rename the images base on the inputed text on the textfield before uploading it to the database server
ОтветитьBecause the images are stored on the server horizontally?
ОтветитьHello Sir,
Awesome tutorial, thank you...
Would you update please, PhotoUtil libs, It can not run no Nougat 7.1
Error output :
android.os.FileUriExposedException: file:///storage/emulated/0/Pictures/JPEG_20170228_202422_1345978128.jpg exposed beyond app through ClipData.Item.getUri()
Attempt to invoke virtual method 'boolean android.graphics.Bitmap.compress(android.graphics.Bitmap$CompressFormat, int, java.io.OutputStream)' on a null object reference
at com.kosalgeek.android.photoutil.ImageBase64.encode(ImageBase64.java:15)
Help me out
thanks in advance
four method don't accept EachExceptionsHandler in fragment
Ответить