Unable to use chart libraries in Android - android

Can any one please tell me how to create a bar-chart in Android?
After I did some searches on Google then I got the solution as, there are two approaches to achieve this concept.
Using
"Achartengine" or
"kiCharts" approach
As per the search every one is recommending to use "Achartengine approach" because it is fully open source, this is the official link to this approach that I found.
Then I downloaded that file from the above link and I imported it into Eclipse but its not supporting. When I am trying to run that project it's showing like the below images.
Even though if I try to do access or while clicking any options on the emulator (here shown in the second image) it's showing up the with same result as "sorry your app unexpectedly closed!. Please try again. Force Close"
I don't know whether I am going in a wright way or not.
Can any one please explain this concept by sending at least one example program done using the AChartEngine approach.
OR
Please at least send me the steps to create a BAR-CHART using the AChartEngine approach.
Thanks for your precious time!..

Related

Graphs/Charts in Android

I'm a beginner in android application development. I got a requirement where I have to show some statistics in the form of graphs/charts. I would like to if there is any API as such which would suffice this requirement in android. Else, I would like to the means the other best means that would make this easy. I referred other questions regarding this, but I'm unable to decide basing on them. Help needed as soon as possible.
This is good , easy to use and if You have problem PhilJay or someone else will help you on stack:
https://github.com/PhilJay/MPAndroidChart

Android chart library that's able to generate a PNG without showing the chart before that

Let's start with why do I want to do that:
The project my company's currently working in, involves the possibility to have one of our client's employee to go to the end of the world, with absolutely no way of having a connection to a mobile network, taking a portable printer with him, and print a report from his tablet. We currently have a working report already being printed this way, but they added a little detail that caused lots of trouble, which is the reason I'm here, I need to put 3 charts at the end of a Jasper report.
In a web application that would be extremely easy, since Jasper itself offer this functionallity, but since it's a mobile project, we tried using PDFReporter. This API generates a PDF from a .jrxml file, but it doesn't support every single feature from Jasper, and charts are one of them. Searching the web I've found that we could export a chart to a PNG and then add it to the report, which would work with PDFReporter.
Starting today by 8am I've spent my day searching and testing different chart-generating APIs, just to discover that, so far, 100% of the android APIs are meant to generate a chart directly on a view you specified on your activity, but that doesn't work for me at all.
I've also tested a few Java APIs, but got an issue there too, since most of them use java.awt resources to manipulate images, and that package is not included in android's SDK, nor is it supported (discovered that by adding JFreeChart to my project, which made my build take about 15 minutes and in the end fail with an OOM error).
So what I need help with is: is there an API I can use directly on a mobile project, with no connection whatsoever, that generates a pie chart as a PNG without having to render it on a view and just then fetching the Image?
I'd just like to make it clear that I'm NOT 100% sure about most of the things I've said above, except for the limitations of PDFReporter, those are confirmed, so please, any kind of help will be GREATLY appreciated, even a little "that's not how it works" will help.
Thanks in advance if you at least took your time reading it :)
I am not sure why you say "... generate a chart directly on a view you specified on your activity, but that doesn't work for me at all". Everything you see of your Android app is in some View anyway (in your case it would probably be an ImageView).
Do you just want to generate the chart as a PNG in memory and store it or manipulate it further? In that case, you could first generate it in a hidden ImageView using the API of your choice, then extract it using ImageView.getDrawable() for example. Assuming the API has no problem with the view being hidden. Maybe this helps

Beginning with OpenCV in Android

I want to create an application that detects walls from the image and paints it with color choosen by user . I looked it up and found out OpenCV is a way to go.
I downloaded the sdk and imported in AndroidStudio.
I am a complete beginner to OpenCV and i would appreciate if i could get just the hints where to start from .
I want to know what terms and methods to look forward(in the docs) in order to implement this particular task (detecting wall in image and fillcolor).
What would be the steps required to process and manipulate image for this operation ?
Thanks.
You can start with some tutorials. It is a best way to satrt with adn learn some basics and claasses and their usage.
Soem links are as follows-
first-
Second

How to do a Google Image Search in an android app

I'm developing an Android app that will do a Google Image Search and return the images to the user in a list. I've looked around on StackOverflow and have run into some problems. First off, I'm a total newbie programmer with only 4 months' worth of programming experience, so I appreciate you guys being patient with me.
I looked through Google Image Search API and I know it's being depreciated and will get shut down someday. Because of this, I don't want to use it. After extensive research on the topic, I don't want to use Bing or another image search service, and I don't want to do a "reverse image search. I just want to use a simple image search via string. I've used this app (https://github.com/tonytamsf/Android-Image-Search) to look at the code, but in all honesty, it's just not helping and it's confusing me more on how to exactly search for an image on Google. Plus, the app won't compile in Eclipse :(
I've also looked around at Google Developer APIs, and I'm not sure if I need to turn on an API key for myself? Still, a bit confused about that. I thought I needed to do a custom search engine, but just by looking at that, I don't think it's exactly what I'm looking for.
Can anyone point me to some resources for this? I would really appreciate it. Thank you!
Just a heads up, but what you're asking is pretty challenging and it sounds like you're just getting started. Here's what I can suggest though:
To get that demo code working in eclipse, I had to right-click the project, click properties, click Android, then check the box for the version of android installed. (I had android 19 installed, and the code was expecting 16, so it was giving up. Tell it to use what you have, which probably is 19). This worked for me after using the git plugin in eclipse to import the project. If you are importing a different way, you may have different issues. * Using git and importing the project is a good skill to have, so if that's unfamiliar territory, take the time to look at that.
Ok, that's the end of what I am sure of. The rest is an educated guess, but I'm sure others can correct me.
Next, if tinkering with that project isn't enough, getting real google image search working will take several skills, especially since the old API is gone. In total you'll need to know:
Java
Android programming
google cloud services
google custom search API
REST
some other libraries to glue the custom search to your app
It's a big chunk there. Currently, it seems the only way to use google's image search is to run a google app engine (you basically set up an online account for google to run a server for you. It does computation and sends messages back and forth for you. You only get a little bit for free each day and then if you want more you have to pay. This is one-way Google earns money. It's not something they let you run on your own computer anymore.). Then you make your android app talk to that server using your new login ID, and the server will take the search term and send back the answers to your android app.
You can get the app engine running and use it in chrome without dealing with android to save yourself time, then add the android part later in the future. Good luck!

Example project for android-screenshot-library

I'm trying to make a simple eclipse project that only takes one screenshot using the android-screenshot-library. The thing is that the documentation is very very poor and I'm having a hard time understanding how to set up this very very simple project.
Anyone knowing about some example project in the web? or useful tutorial (step-by-step kind of thing).
Have look at this.
Android Screen Shot Library
Follow the tutorial here. It isn't about pictures and cameras, but it's simple enough to get you started. Then post code of what you have tried and ask and more pointed question: http://developer.android.com/training/basics/firstapp/index.html

Categories

Resources