I wanted to plot a stock historical graph based on google finance in my android app .
The problem is I can't find the api for just the stock chart alone and I must try to find another ways to do it.
I thought of a way but don't know what whether it works
the steps are as follows..
1) get the details from csv file
2) read the csv file
3) plot the graph using the information of the csv file.(WHICH I DON'T KNOW HOW TO DO IT)!
so if my steps above works , I would only want to know how to plot the graph.
Use Charting Libraries like JFreeCharts, JOpenChart (google for more)
They include samples on how to use them...
Or You could use Google's Charting API's
Neither JFreeCharts nor JOpenChart has not been ported to Android (as far as I know) and will not work on an android as-is, not will any other awt/swing based api due to differences in their respective Canvases etc. You could try porting one yourself but its not as trivial as it sounds and you probably won't be happy with the results.
I suggest using a library written from the ground up for Android which has support for the kind of plot you need. I recommend AndroidPlot but there are others out there as well.
Related
I spent several hours looking for simple solution and still haven't found one.
MapBox style editor uses this simple feature. That you can hover and click over map, and it shows small popup stating all terrain classes you enabled in your map.
Question, how to do it in Android version of MapBox given I have installed my style. Now I want click on any place in the map and get the same popup stating, for example, that this is building, woods, background here. Or other place would satte, that this is major road.
This IS doable as MapBox studio itself shows. i can't believe it uses some API not available for anyone, as this is one API no map provider gives, while still able correctly draw terrain. What so complex to add this API?
And NO I am not interested in address. I am interested exactly on terrain, for simple task - distinguiosh water from non-water, road from non-road, building, from non-building, don't care where it is by address, so reverse geolocation does not work. Or simpler - I need SIMPLER geolocation, than address.
Your questions kind of confusing but I'll try and help. If I'm reading correctly, you are trying to create an Android app that uses an API similar to Mapbox Studio that allows the user to select/distinguish the difference between objects on the map such as buildings, water, forest, etc.
If this is the case, then first you must understand that Mapbox Studio is using OpenStreetMap data to distinguish between objects. These objects are stored in a database with tags. It's tough to explain so i'll just leave a brief reading wiki page that might help.
To my knowledge, there isn't any API's specific to Android that will give you the kind of information you're looking for. However, if I was in your dilemma I'd take a look at the Overpass API as it's a complex query tool that allows you to send coordinates to it and it will return all the tags (such as building or water) at that location within a JSON object. From there you can parse and use the data in your app. It is very powerful so I suggest reading up on how to use it and test using a website called Overpass Turbo, that's if you decide to use it.
Nevertheless, I hope this helps and I understood your question correctly.
I'm using MuPDF to open and edit PDFs in my android application, but I need of some way to get the current page in a bitmap format.
I've been reading the code, but I've not succeed. Someone can help me?
We have a similar feature in our Android customizable magazine app, using muPDF: we generate page thumbnails in bitmap format.
This app is open source and available on Github. You can see there how we implemented this feature.
The MuPDF API is a C level one. It's certainly capable of doing what you want - see apps/mudraw.c for code that does this, or even doc/render.c.
In the example android viewer, we needed to be able to do some things from java. So, we wrapped up a small fraction of the API with jni and exposed that (see android/jni/mupdf.c). This does just enough for what we need, and nothing more.
If you want to get access to parts of the API that aren't exposed, (and it sounds to me like you do) then you'll have to wrap up that for yourself.
In an ideal world, we'd have it set up so that there was a direct mapping from java classes down to the underlying MuPDF API, but we haven't had the time/need to do that yet. If anyone out there is interested in doing such a thing, do get in touch...
In my app, I have the following information which I want to display in the form of a graph.
Weight of a person.
Body temperature.
Date.
Now in my case, I want weight and body temperature on the y-axis parallel to each other and Date on the x-axis. So can anyone tell me which is the best android graph tool to do this? If possible with an example.
Regards
Anshuman
I have done quiet a research on this.If you are looking for drawing pie,histograms, bar or line graphs with 3D look I beliver ther is not such library available.You can use aichart for some 2D charts.Or final solution is you can start using the google Chart APIS , they are very good but they all are in web view and you need to have internet available on the phone/emulator.
There is a google group for achartengine, lots of good code is floating around there you can join it.
But I am afraid you will not get the 3D charting anywhere else.
if you thought of using the Adobe Flex (using AIR 3.1 or higher) you may get tremendous fullfillment of the requirement you are having in your head.You may get tempted to use it at once,but teh programming is in AS(Action Script)
have a look at the linked video, you will get teh idea of what I am talking about, but sadly you have to code in Action Script and not in Andorid PL.
Could anyone please advise me what would be the best way to display the performance of a particular stock in an android app. I would be interested to know if any one has used any particular libraries.
I use a yahoo finance CSV parser to fetch the stock info.
Thanks.
I don't know of any good libraries specifically dealing with stock information, but I am assuming you are interested in charting? There are a bunch of options for producing charts for Android apps:
Graphview - A custom View for creating graphs in Android
Flot - A jQuery library for creating graphs. There are one or two good tutorials for Android.
AChartEngine - Another charting library for Android
aiCharts seems pretty polished, and has a free financial demo app you can download from the market, but you need to buy a license to use it. Also at the time I am writing this, their website (www.artfulbits.com) is down.
I am a bit stuck with an idea of offline maps in android application.
I want to use Open Street Maps. But how can I redesign their styles and then use in my project? By the way, the resource, I am looking for, has to be free..
Are there any good tutorials about this? I am new to this, so would be thankful for any helpful information.
Here are the basics:
Raster tiles are awful. To my mind, this approach of mobile mapping is very old-fashioned and has no advantages (unless your plan is to make a very bad-looking application).
The other thing is vector tiles. All the data is saved in much more efficient way and can be displayed very beautifully.
And the solutions (nominees) are:
Mapsforge - thanks to #dkiselev
OSMAnd app - thanks to #dkiselev
Mapbox GL (the android version has no releases now, but they are working really hard on it). If you really like mapbox, you can think about
Mapbox Android SDK, which uses raster tiles, but I believe, that
switching to Mapbox GL will not be that hard, when the GL lib will be released.
AirBNB AirMapView - open source and has release version
Urban Labs Sputnik Demo - also interesting solution, but I didn't use it.
Mapzen Open - open source android app, that uses all the best from everywhere. - winner!
And by the way, mapbox gl actully allows rendering your own mapping data (from your own provider). There is a closed issue on github about that, opened by me couple of days ago, and very good answer by one of the project developers.
If you don't care about using your own data source and want to rapidly implement custom (not google/apple) maps into your project - there are dozens of solutions for you as well. You could think of Mapbox, Scobbler, GetYourMap or, again, just google it to find more. There is actually a great article on OSM website about most popular libraries and apps for android ever developed.
Finally, I wish you good luck with your mapping project. And never forget:
if you can't find something doesn't mean it really doesn't exist
- probably you've just been searching not enough.
Offline raster tiles cache
If you need to show your map offline with custom style, you may use any kind of OSM renders. http://wiki.openstreetmap.org/wiki/Rendering
For the case of several cities, I would recommend you http://wiki.openstreetmap.org/wiki/AlaCarte or http://wiki.openstreetmap.org/wiki/TileMill
Create your own style, and export map tiles to sqlite db archive.
After that, you will need to create your own TileProvider for OSMDroid library. This answer could help you How to use MOBAC created OSMDroid SQLite tile source file offline?
Offline vector tiles.
Getyourmap
If you need more than just rendering with custom style, you may use:
https://getyourmap.com/ it's OSM vector renderer. But there would be some problems with accessing raw data to create routing and searching.
OSMAnd
And maybe the hardest but the best way, is to use OSMAnd. It's open-source, there are lots of capabilities, but it's an application, not a component or library.
So if you want to create a stand alone app. you will need to cut off features which you don't need.
Mapsforge
https://github.com/saintbyte/mapsforge It's opensource so it would be possible to add routing and searching. Style, as I know may be customized, but I haven't try it.