I have found wrapper class for managing contacts, but I am constantly getting that application has stopped unexpectedly. I am trying to get some good and working code to start building open source library for managing contacts that would be simple enough for general use.
Code was found on www(dot).higherpass(dot)com/Android/Tutorials/Working-With-Android-Contacts/
Idea is to make working example of using this, I just cannot succeed in this.
Here is the test project:
http://filebin.ca/uzpgaq/HelloAndroid.zip
If you get an application has stopped unexpectedly error, a stack trace of the Exception that was thrown should pe printed to log. Use logcat in Eclipse or for example the aLogcat app.
Then search for messages with your app's name. In Eclipse you can also create a filter to see only the messages of your app.
If you found the stack trace, see if it gives you a hint where the error could be.
If not, post it here and maybe we can help you then.
I've used this wrapper class successfully in my project, both for SDK < 1.6 and SDK > 2.0 - from the same site and article.
All I can say is that it can work great - you just need to check your usage of it. Post a stack trace and it will be much easier to answer.
Related
I have a Processing sketch that works fine on my computer.
I'm now trying to get it running on my Android tablet using Processing Android mode. But I'm getting a lot of compiler errors saying "cannot find symbol".
I'm using some Processing libraries I've created using https://github.com/processing/processing-library-template .
These libraries don't actually access system resources or call the Processing library themselves. Or any other external Java except Java.util. They're just manipulating data-structures.
However it seems Android mode has a problem with them.
Googling around it seems that a lot of Processing libraries don't work with Android Mode, but I can't find anything explicit : should I simply assume that external libraries can't work at all with Android mode? Or are there specific things that won't work? Or should I be looking for a specific bug somewhere in my code?
Update : Further details. I believe Processing Android mode targets Android 2.3.3. I'm using Processing 2.21. The libraries I'm talking about are my own.
From a related Git Issue page , a comment by omerjerk
The master branch of this repository is not buildable with the master
branch of processing. processing has moved ahead and we haven't
updated this repository yet. Why are you really building the Android
mode yourself ? If you want to run your processing sketches on your
phone, then just download processing 2.2.1 from the main website, open
the IDE and from there, download the Android mode. In case, if you
really want to build Android mode from source, apply this pull request
- #98 .
See if this helps
This is not really a programming question but more of a debuging question.
I have an app that works fine, however, it is a bit unreliable when we try to resume the app.
What happens is, if we background/ minimize it, and than try to resume the app by clicking the app's icon. It sometimes crashes and it sometimes doesn't. It is unreliable that we can not trace what is the issue and why it occurs.
Any possible solution or places we can start tracing for the issue, please advise me :)
Cheers
Not a programming question but it is a development question. It is extremely inconsistent didn't know how to even find the stack-trace
How I solved it was wrapped everything with a bunch of try catch and print the error stacktrace to the screen(or email the developer), finally found out the error was with one of the 3rd party LocationService library I was using.
Note: Location Service is not very reliable, please be caution in how you want to use that feature Android Devs!
I'm using Quercus/PHP on AppEngine. When I run a simple script with file_get_contents($url); I get an error:
java.lang.NoClassDefFoundError: java.net.Socket is a restricted class.
Please see the Google App Engine developer's guide for more details.
I've googled and although I find that other's have run into the same error, but the cause seems the vary. What do you think is cousing this error for me?
I'm using the latest AppEngine Java SDK, and the latest Quercus.
olivierlemasle is right, but here is the solution that I found after some more searching; in the comments section, user "Phil" recommend:
import java.net.URL;
define('URLFetchServiceFactory', new Java('com.google.appengine.api.urlfetch.URLFetchServiceFactory'));
$data = URLFetchServiceFactory->getURLFetchService()->fetch(new URL($url))->getContent();
Tested, and it worked!
When using Google AppEngine/Java, you don't really have access to a complete JVM: your applications run in a restricted sandbox. See documentation here :
https://developers.google.com/appengine/docs/java/runtime?hl=en#The_Sandbox
According to this documentation, you cannot open a socket in this sandbox. That's why it's written that "java.net.Socket is a restricted class".
App Engine support for java.net.Socket is starting to roll out on 1.7.2 with trusted tester submissions being taken now.
There will be some limitations but it should support a majority of uses.
Sign ups are here:
https://docs.google.com/a/google.com/spreadsheet/viewform?formkey=dF9QR3pnQ2pNa0dqalViSTZoenVkcHc6MQ#gid=0
It's been popular so only a fraction will be enabled.
According to the homepage of your api (http://quercus.caucho.com/) it can use hibernate. Quick googling gave back this for me: GWT and Hibernate - NoClassDefFoundError when using Hibernate
It says hibernate will not work with google app engine. Maybe this is the answer.
My app is crashing randomly and I dont know why.
I saw that there are apps that when there is a force close, you can choose between force close and report.
How can I add it to my application?
Thank you
Ron
I think the best approach in your case is to have the crashes reported automatically in the background as soon as one occurs.
This is achievable through integrating a product like Instabug.
It offers you a plenty of details regarding every crash including the crash stack trace, all network/console logs, an environment snapshot, and visual reproduction steps.
For full disclosure, I work at Instabug. I'm glad to help if you have any questions.
That will be shown to users automatically when your app is delivered via Android market. Although personally, I ACRA because it gives you more information and you can use it regardless of whether the app is distributed via market or not e.g. for beta testing.
http://code.google.com/p/acra/
My favorite is BugSense. Good user interface, good report details, open source client library or use with ACRA.
http://bugsense.com/
I think that comes automatically when you've uploaded your app to the market.
If one of your users decide to report it instead of choosing force close you should get a report in your admin panel (https://market.android.com/publish/Home) Next to the price of the app in question you should find a link called something like error(X) where X is the number of different error reports sent to you.
You could also look into this:
http://code.google.com/p/android-remote-stacktrace/
It's something you can add to your app that makes it sent the stack trace to your server. I find this one use full sometimes!
//André
Although the question is a little old, I guess it’s useful to refresh the information. ACRA is good, but I would also recommend you to try Crashlytics. It has a very simple interface. Thanks to the simplicity, you can easily install and use this tool. It allows not only making ordinary crash reports but also catching NDK crashes.
Here is a comprehensive review of different helpful bug and crash reporting tools for those who are curious in details: http://cases.azoft.com/report-bugs-effectively-mobile-app-testing-tools/
I'm trying to develop an application using Google's maps and I can't get this application to work. I have done all what is described in the tutorial of the "MapView" sample code, including getting a map key associated to the MD5 signature of my "debug.keystore" file but the emulator definitively says that the application has stopped unexpectedly.
This error message appears when I try to process the setContentView line of code.
The only point where I am not sure of doing what must be done is about the signature of my application : as far as I have understood the signing process of an application, in debug mode, there is nothing to do. Is it correct?
I develop in Java using the Netbeans IDE.
Thanks for the time you will spend trying to help me.
First off, I'd recommend you very much to switch to Eclipse where the official Android plugin is available which will actually give you the LogCat (that's phone-side console) and you will always know what's wrong when something doesn't work. I'm not so sure that the plugin for NetBeans works equally well.
Secondly, regarding your crash, it has nothing to do with the API Key (if the key was wrong, you would see an empty map). Two things here from the top of my mind:
the Android version you need is the
"Google APIs", not vanilla "Android"
you didn't mention that Map library in the Manifest
So make sure that the library used with your project is "Google APIs" (of desired version, I'd stick with 2.1 or 2.2) and that there's this line in the Manifest file
<application ...>
...
<uses-library android:name="com.google.android.maps" />
</application>
Other than that, would be awesome to see some stack trace to be 100% sure.