Search code examples
javaandroidcrashacra

What is ACRA for standard Java?


There is a very good crash reporting thing for Android called ACRA (http://code.google.com/p/acra/). Are there any similar libraries for standard (as opposed to mobile) Java?


Solution

  • I've never run across one. But I have used ACRA before. The way that it uploads its data to google spreadsheet is pretty straight forward. You can just create a form on your G-Docs with whatever columns you want and then in your code create an HTTP request out of the base URL + parameters

    Here is how you can build the url string to upload to a form:

    String url = "https://spreadsheets.google.com/formResponse?formkey="+ YOUR_KEY+
                             "&entry.0.single="+URLEncoder.encode(val1)+
                             "&entry.1.single="+URLEncoder.encode(val2)+
                             "&entry.2.single="+URLEncoder.encode(val3)+
                             "&entry.3.single="+URLEncoder.encode(val4);
    myReq.sendPost(url, "");
    

    In this example myReq is an HttpRequest object. Unfortunately I can't find the page where I picked this up from. But if you search around for things like "input to google form pro grammatically" or similar you can probably find a few people posting more about it. You can add more or fewer columns if you like just keep the "entry.#" portion of the url incremental.