Is there a way to keep json_encode() from returning null for a string that contains an invalid (non-UTF-8) character?
It can be a pain in the ass to debug in a complex system. It would be much more fitting to actually see the invalid character, or at least have it omitted. As it stands, json_encode() will silently drop the entire string.
I’m working on an application that displays someone else’s database of images. The images they have are all vector graphics and can be converted to any format, however keeping them in a vector format is good because users will probably want to zoom in closely.
The question is, is there a built-in way to display a vector graphic in Android? The format doesn’t matter – we can convert. The current format we’re considering is PDF, but given that there’s no native PDF support, I’d have to do something pretty complex just to get it working (for example, integrating poppler into my app via the NDK). The alternative is to just convert the vector graphics into a simpler format (JPG, GIF) but I’d rather avoid that.
Is there any free single-signon mechanism for Android that gracefully works with non-webapps? Say, something along the lines of…
You launch my app and use it until it makes a request from the app server that requires authentication. It responds to that request with a random token that the server will associate with you for a short time.
The app presents you with a username field, a password field, and a submit button.
You enter your username and password. The app then forwards your username and hashed password, along with the token generated by the app server, to the login service.