Can't show BLOB from php myadmin in UIImageView - android

We are using some images in our app from our database. We are putting them to BLOB via encoding to base64, and then getting by decoding. The problem is, that all images we are putting from android app, we are getting normally to android app, but NULL to iPhone app. However, all images we are putting from iPhone app, getting from DB normally for both: iPhone and android app. Maybe it's not same library of Base64? Why this is happening? Any idea?

Changing library of Base64 solve my problem! If somebody have the same problem, get library of Base64 from here

Related

URL encoder not working

I came across a weird situation. I am trying to a develop a android app which send the user entered data to the web server. I used HttpURLConnection and wrote code. It worked a few days. Now when I try to use that app it doesn't send the data if it contains spaces in between. Also if Genymotion emulator is used then it works fine even though spaces are given. I am not getting an idea of what the problem is. What should i do now??
you simply can't write a space directly in an url.
You have to encode it via %20 ... look here In a URL, should spaces be encoded using %20 or +?

Loading images from tablet local files with JSON

This is my first post here and I've got a big problem concerning the access of local file addresses on tablets.
I'd like to load image files in a game by using AJAX to get a JSON file containing URLs of images. My problem is that I dont know if it is possible to get local file addresses directly from the tablet folders using JSON.
Seems like I should use an URL that looks like this "storage/sdcard0/myImage.png." but I'm not sure that it's actually calling the file. Is it ?
I'm using Construct 2 because I'm not a coder, so I'm quite limited as for raw JavaScript programming. Please try not to flood me with code :D
I believe you can, URI can be used for urls and local filepaths:
URI | Android Developer

Phonegap json size limit

Does anyone know what the size limit is of a JSON file in PhoneGap 3.0?
I access an external JSON file to populate a carousel gallery. When the JSON file was like 20KB size everything worked perfect but when I tested with 200KB the app began to lag really bad and if I use a bigger file like 500KB, the app gives an alert than it's unable to access the file. I tried to access the file from the server and from direct file in the app... same result.
So did anyone experience a similar problem or does someone know if there is a better solution to this?
Maybe SQLite ? Or how about using MySQL on the server and only exporting the JSON for the necessary query?
This discussion might help you. What they are saying is to
break the data up into chunks
load each in, and save off to SQLite
Hope this is what you looking for. Cheers!

Extracting image from html in Android

I am able to parse html content using HTMLCleaner & able to populate in list view. But extracting image I ma facing problem. while I am able to get images from any web server, i am not able to get same from my local Apache http server.
I want to know the reason & possible solution.
Thanks in advance.
It seems like the phone (emulator?) doesn't have access to your local server.
Use the browser in the phone/emulator and try to access your server just to make sure if it's this problem.
If you have access, print the url and make sure everything is alright.

How do you Upload a raw image using AJAX?

I am currently getting a base64 encoded image from a mobile device's camera using PhoneGap, I would like to upload the image to a server to then store. Not sure what the right approach is?
As expected, if I try to include the base64 string as a parameter I get the Error 414 (Request-URI Too Large)
Even if you use POST the server accepting the POST will need to be capable of decoding the base64 parameter. Luckily the PhoneGap API provides a better way to do this with FileTransfer.
You need to get the file handle to the image instead of the base64 encoding. Using the file handle resolves the issue of getting a JavaScript out of memory error. This also removes any cross-site scripting issues since PhoneGap is using native code to perform the post instead of using the browser. Hope that helps.
I agree with Chuck you are better off using the FileTransfer object. Large Base64 strings will cause out of memory errors in your app. Zac has a good tutorial on the subject:
http://zacvineyard.com/blog/2011/03/25/upload-a-file-to-a-remote-server-with-phonegap/
Why not use HTTP POST instead of HTTP GET?

Categories

Resources