I stumbled upon this site today and found it quite intriguing.. Some of these apps have really stunning display of data, especially the norton mobile utilities. I want to graphically represent the information in my android application. I have researched a lot about graph librarioes available for android and have used chartdroid and achartengine, but still am not satisfied with the end result.
Which is the best charting library for android available for free?
They are probably using custom views overrinding the onDraw method to plot lines, shapes and paths using the canvas or the surface of the view.
Have a look http://mindtherobot.com/blog/272/android-custom-ui-making-a-vintage-thermometer/
Related
I am working on an app for Android and iOS that needs to display a generic map of the United States (not a Google map, just state borderlines, no more detail needed or wanted). Each state needs to be tappable/highlight-able and the map needs to be easy to resize across the different screen sizes available to Android/iOS.
I've found that my best bet for rendering the map on Android is to use Canvas and on iOS is to use CoreGraphics and CoreAnimations.
I've found state borderline coordinate data on a site called Global Administrative Areas . The sites offer files that can be edited with Gqis.
This brings me to my questions:
Can you use Gqis to produce code that is usable by Canvas on Android and CoreGraphics on iOS?
Does anyone have a better idea on how to approach rendering the interactive generic map?
(edit) Am I on the right track with Canvas and CoreGraphics?
After doing more research, I've found that Gqis, or Qgis as it's called now, does not provide an SDK to interact with geopackage data. I've found two solutions:
a paid solution - use ArcGIS's Spatial Database, Android SDK, and iOS SDK to handle the data from the geopackage.
a free solution - use Qgis to create a Spatial Database that can then be used with the free GeoPackage SDKs provided by the National Geospatial-Intelligence Agency (Android SDK) (iOS SDK) to handle the data from the geopackage.
Lastly, Canvas and CoreGraphics seem to be a good way to handle the actual rendering of the map.
I'm writing an app which allows the user to change the colour of countries on the world map by tapping on them. At the moment I'm struggling to find the apt way to store and display the map, allowing it to be partly coloured at the same time.
On of the solutions I had in mind was to use an SVG and a third-party library, but as far as I know none of them provides the necessary callback to modify the image once it's drawn.
I am merely at the beginning of understanding of what Canvas is, but even now it is clear to me that drawing such a complex object as a world map on Canvas is way too hard. It will probably take ages to load as well.
I have not implemented any of the mentioned things yet. I assume there is a better way that most developers use, so I'd like to find out what it is.
After more than a year I have finally found a working solution.
Google Map's Android API Utils provide a great means of applying various overlays to Google Map views and fragments as well as changing their individual components.
I went with a geojson layer upon the map and updated the fill colour of certain features.
I'm in need of a recommendation of a free AR library that will allow me to display location indicators (2D views) on top of a camera overlay (you probably know what I mean).
So far I've tried using this iOS library, but it seems to be out of shape since I did not get good results -> somehow the views got displaced and I did not grasp the math behind it.
I'm also in need of an Android version, but that can wait, so I'd like an iOS recommendation.
I've used BeyondAR on Android a couple of times and It works:
https://github.com/BeyondAR/beyondar
You just need to have the coordinates of the object to show and the image.
I am an android development beginner with some experience in other object oriented languages like java, python, c#. So I have created various games before in Java, using buffers and graphics to draw lines and stuff. How do I do that stuff in android? I looked at some online guides, and they all seem to create a class to extend a View object, and the class will overrule the onDraw method, where they can cause the Canvas or something to draw a line.
But what if you want to draw a line based on user input? That method wouldn't work then would it?
For example, what is the simplest code for which I could draw a circle where the user touches the screen?
Also, i was wondering what books people would reccomend for beginners, especially one that includes stuff on graphics? I user the developer site for android, but I feel a book would also help a lot to understand android? Any suggestoins?
Thank you for your time, I greatly appreciate it!
There you go, this book is definitely what you need to read: http://www.amazon.com/Pro-Android-Media-Developing-Smartphones/dp/1430232676
what is the simplest code for which I could draw a circle where the user touches the screen?
Either use SurfaceView to draw or create a custom View handling onDraw() and onTouch()
Here is a suggestion ... load the API Demos app into Eclipse and explore the Graphics demo source code. There are a large number of graphics demos.
To load the API Demos app, in Eclipse click File > New > Other > Android Sample Project.
Then select your build target such as Android 4.2.
Then from the list of sample apps select the API Demos app.
And finally click Finish.
There are over 300 demos in the app, so it can be difficult to navigate. You want to look in the Graphics section.
"Android 2D Graphics with Canvas API" by Yevgen Karpenko is pretty good for beginners.
It explains basic concepts like coordinate systems and transformations, shows how to work with text and use different graphics primitives (lines, paths, circles, etc.). It also shows how to use multiple threads in graphics apps.
Below is the link for eBook version on Amazon.
http://www.amazon.com/Android-Graphics-Canvas-API-ebook/dp/B00DKIAVK8/ref=sr_1_8?s=books&ie=UTF8&qid=1374420538&sr=1-8&keywords=android+2d
I want to draw a line graph that updates in real time, similar to the graph we see in the Windows Task Manager when we want to take a look at CPU and memory usage over time.
Is there already a library designed for Android that will allow me to do this easily? Or will I have to write my own? (And if I do have to do this, how would I bring up some sort of canvas on an Android activity?)
I don't know of a library designed for this and my guess is you would have to draw it yourself.
This example in the API Demos project uses the built in sensors to draw a running graph on the canvas, looks like what your are trying to recreate, but replace the sensor input with a data feed or something.
Please have a look at AChartEngine. We use it in many Android projects and it's brilliant. It's free, it's still under development (new features) and the author is very helpfull.
http://www.achartengine.org/
Have you looked at http://www.artfulbits.com/products/android/aicharts.aspx? The library is rather large but it may work for you