Android Moodstocks image recognition error - android

Hello everybody I'm using Moodstrocks API in my application where it has an image recognition. When I followed the example here and ran the app, I'm getting error code 2 which is Invalid use of library. I don't know why I'm getting this error I already imported the libraries and followed the tutorial well. Do you know what could be the mistake I did in here? Your help will truly be appreciated. Thanks.

Disclaimer: I work at Moodstocks.
Most of the time, the "invalid use of the library" error comes from the fact that you are trying to perform operations on a Scanner object that has not been opened, or that has already been closed. Bear in mind that the Scanner must remain opened all along the use of the Moodstocks SDK.
So I guess you should check that the open method has worked as expected, and that the Activity holding the Scanner is not prematurely destroyed.
If that doesn't solve the issue, please contact us directly at support#moodstocks.com, we'll be happy to help you.

Related

Can you catch a JNI error in a 3rd party library before a hard crash?

We are working on an Android app. We are using the Chilkat library to handle the email communication and it works well. Although, there may be a "issue" involving some JNI communication. From internet research and discussing with Chilkat, the problem may involve how EMOJI's are processed in messages.
Periodically, we get an error that hard crashes the app and it comes from the library call. It is a single line call that sometimes crashes depending on something within the message itself. Our call is...
tmpstr=email.getHtmlBody();
The hard crash error we get is:
JNI DETECTED ERROR IN APPLICATION: input is not valid Modified UTF-8: illegal start byte 0xf0
Again, doing some internet searches on this message... this apparently is a more common issue than anyone wants but still needs to be addressed. Chilkat is working on a fix but in the meantime, we need to continue with the app.
What I am trying to figure out if there is a way that we can catch the error and prevent the app from crashing... maybe just flagging this message and continuing with the next message?
Seeing how I have never tried to catch an error from a 3rd party library, I am not sure where to go with this.
Any suggestions or examples that might help would be greatly appreciated.
Well, depending on error, you can always try to "fix" it. Working with legacy code is always hard and all you can do here are some hacks.
You can do few things here:
try to catch signals
make sure your app doesn't exit your JVM
Take a look here: http://jnicookbook.owsiak.org/recipe-No-015/ and here: http://jnicookbook.owsiak.org/recipe-No-016/
Maybe you will find some solution based on these samples.

kivy import android doesnt work

I'm building a small project for my android phone using kivy. I am trying to get the android back key to do a make Toast saying 'press back again to exit', and then exit when the back key is pressed twice. I checked online and saw a tutorial on how to do this. I had to useimport android
but the problem is that it just doesn't work on my phone. Not on kivy launcher when i tested it. I even compiled to an android apk using buildozer, but it still doesn't work. Please im still very new to kivy and android api. Help me get this right. Or if there is another way to do this i also appreciate it. Please include an example in your response.
Hello guys I finally found the problem. The import android actually works.
The problem was that I used it wrongly . I was trying to do a makeToast like dis 'android.makeToast'. Evidently dat was wrong. Found out there was another way to do it with pyjnius.
Thanks so ooo much for your assistance

Xamarin Forms Android Error Message Regarding Support Package and other packages

I am a complete newbie who has just about started android app. development using Xamarin Forms and VS2012. Only about 20-21 days of exposure I have got. I am trying to learn along the way through writing an imaginary practice app. But there are some errors I am getting. You can see them in the picture.
http://imagebin.ca/v/29PeHoLhwW1i
Can someone direct me what exactly it is saying and what I need to do in order to rectify them?Is there something wrong with the installation/environment or like some update? Or is it something else? What's with the "unzipping failed" message?
Some one kindly help me out here please. Facing great deal of difficulty in tackling this.
Many Thanks in advance.
As the error message says (see the third error message ), you need to install the "Android Support Repository" from the Android SDK manager.
The errors are telling you that Xamarin is looking for the support library, but that it cannot find the support library and thus the build failed.
#Tanis.7x and #Jason.
Just an update I want to post:
I went about reproducing this scenario: creating a new project, do some primary simple code, add 1,2 layouts et all. When I build the new project, these 9 errors don't appear. This is strange to me. Because: this is exactly what had happened to my main work also. These errors were not there. Something, somewhere happened along the line, due to which they started appearing suddenly; out of the blue. I remember, I had updated Xamarin version, also just added some packages like JSON.Net and it is only after that this error list appeared. Not before that, if I remember correctly. Which is weird to me. If you try to recreate by creating a brand new project these 9 errors won't appear. I tried recreating this twice; no errors.
Yes, I'm manually downloading the zip file. Hopefully this makes the compiler happy. I'll keep posted about the updates.
Thanks All!

What is an Airbrake Notifier in android?

I have come accross code for AirBrakeNotifier in an app. However, Before that i should know what it does. All i have come to know is that it tracks error. I could not find a documentation on it. Can anyone please tell? Thanks
It refers to this library
https://github.com/airbrake/airbrake-android
The original owner now works on https://bugsnag.com/ which may be another tool to track errors in your android application. If you have an API Key, we should be able to find the account as we may already have errors for your app.
Ben from Airbrake.

Android OpenCV Setup

I am trying to setup eclipse for making a computer vision application for android platform using OpenCV. But i am continuously getting error:
"The application testOpenCV (process.edu.stanford.android) has stopped unexpectedly. Please try again."
while simulating the application.
I followed may tutorials for this but couldn't get it running correct.
The quoted error was when i followed the steps given on
http://www.stanford.edu/~zxwang/android_opencv.html
Please help me as i am failed to figure out the problem.
Would be nice if you give a little more information. The error "The application testOpenCV (process.edu.stanford.android) has stopped unexpectedly. Please try again." is what you always get when you try and run an app that has errors, and doesn't provide any information of these errors at all. There is a thing called logcat in Eclipse which give more detailed information about your errors.
However I suggest you rebuild everything from scratch and follow the tutorial from this site:
http://opencv.itseez.com/doc/tutorials/introduction/android_binary_package/android_binary_package.html
It also comes with some samples which you can use and if you want, 2 of these samples use C/C++ code by using JNI calls.
There is a good tutorial where you can find the steps to setup OpenCV with Eclipse. Also if you want tutorials to setup openCV on different OS click on the above link

Categories

Resources