I am developing an android app where I have two images named earth and sun. I want to rotate the earth around the sun depending upon the user's touch event. That means the user should rotate the earth image. How would I do this?
Find some resources (books, online tutorials, etc.) that will teach you about graphics programming on Android.
Take your first stab at writing the code for this project yourself.
If you get stuck, post a question that displays the code you have written, and describe the issue you are having with that code.
Related
I'd like to develop a simple game for children to let them learn their country in detail by playing a 2D game on the map of the country. Imagining to determine a start point somewhere on the map for example said "New York". The player will be asked some questions about this city, if the answers are correct, the small car staying in the boundaries of New York will move forward to Pennsylvania and so on. When the car moves to each city, that one should be coloured differently. I looked for "svg" files, some game development tools, Imagemap etc but nothing really came to me suitable for my purpose. My question may be unprofessional and im really sorry for that but hoping not to get minus points to be able to improve myself in programming by your help and really hoping for an advice.
Thank you very much.
At the moment, to make controlled (ie triggered by you) animations of SVGs on Android, you would probably need to use a WebView. The WebView would be displaying an SVG that you could control via javascript.
You should have no trouble finding tutorials on how to use a WebView.
As for the animation part, questions like the following would be a good starting point.
Create custom symbol on polyline using SVG path
animate image on SVG Path
Your Android app can invoke Javascript functions on your page using
webView.evaluateJavascript("runAnimation(1)");
Or you could have separate SVGs for each animation. Then load the appropriate one for the journey you want to animate.
An alternative to SVG animations if you have Adobe After Effects available, is to create animations with that. Then use AirBnB's Lottie library to play them.
This is the gist of my app idea:
When the user turns on the app, it calculates a position 100 ft in front of them, then overlays some kind of marker onto the camera, so that when the user looks at the position through the phone, they see the marker. Then they can walk towards the marker, which gets bigger (ie "closer") as they walk towards it.
The full idea for the app is more complicated than this, but I think that if I could create this, the rest would just be iterations.
What concepts of AR, mapping, images, Android API, hardware (and anything else I haven't thought of) does this bring to mind that I need to begin learning about? I have lots of programming experience, and some Android experience but next to no AR or vision experience.
Basically, I'm hoping you guys could give me a list of terms to Google so that I can begin forming concrete ideas of how to make this.
Isn't this a kind of 'Geo-Located" AR? To get search results matching what you are describing rather than methods that put the augmented content at a relative distance from the viewer, try searching "latitude", "longitude", "coordinates", "POI" etc., along with AR terms. I am currently looking into learning AWE.js because it offers true geo-located POIs (point(s) of interest) using coordinates.
I came across this (https://github.com/buildar/awe.js/issues/3) when trying to find for myself how to create geo-located POIs using AWE. For your purpose ("...calculates a position 100 ft in front of them, then overlays some kind of marker onto the camera...") you would need a way to leave the x and y axis as they are in the original 'geo_ar' demo (https://github.com/buildar/awe.js/tree/master/examples) - as relative to the user, not as lat/lon coordinates. However, for the user to be able to approach them, you would need to find a way to get them to initially appear as relative to the user (the default way), but then somehow be locked down. It normally wouldn't be necessary because in most apps geo-located POIs are placed near real physical places of some significance, so rather than the user having POIs appear near wherever he is, he goes to find them where they are. I don't know how locking down an initially-relative POI would be done - I am not a programmer, I just stalk programmers online. ;) Still, I hope that fills in some of your gaps to help you get started.
I believe there are games out there (though I haven't played them myself) that do this to spawn enemies like ghosts or zombies. They spawn a set distance away from you, but you have to run from them.
I am thinking of a project for my university the teachers liked it but I am not sure if its even possible.
I am trying to make an andriod app.
What I want to do is take a picture of a hand drawn logic circuit (having the AND, OR, NOT ... gates) recognize the gates, and make a circuit in the moblie and run it on all possible inputs
Example of logical circuit ( assume its hand drawn )
For this I will have to make a simulator on mobile, that I dont think is the hard part. The problem is how could recognize the gates from a picture.
I found out that theres a edge detection plugin in java but still I dont think its enought to recognize the gates. Please share any algorithm or any technique or tools that I can use to make this thing.
This is actually for my FYP, I cant find any good ideas and have to present this on thursday.
you will need to do some kind of object recognition the easiest way (conceptually) to identify gates is to simply do a correlation between the image and a bank of gates, or an "alphabet" You run the gate template over the entire image and look for the highest correlation, this means it matches the template closely and you likely found your gate of interest. here are a few interesting s0 posts
Simple text reader (OCR) in Matlab
MATLAB Optical character recognition - need help
On it's own this could be a daunting task, but you can simplify the problem by adding constraints.
For instance the user must draw on graph paper and they can only have one gate per grid. This ensures you won't have to check a large variety of sizes for each gate
If you use graph paper with colored lines (like blue) and the user is only allowed to use a non-blue pen/pencil, you MAY be able to easily remove the grid when processing the image by filtering out the blue channel, and still have a clean image to process with.
of course there are more advanced methods than correlation, but as I said before, conceptually, this model is very easy to understand. Hope that helps
edit
I just realized both my examples were in matlab, the important point here is the logic/process used, not the exact code.
I have a particular problem about image recognition on Android.
I am looking for some library able to recognize several objects from a photo. For instance, given a photo snapped by the user how can I count how many red circles and yellow triangles there are? Those shapes are just an example, since I want to recognize images which are pretty simple.
I have seen that there exists a good framework called Vuforia, which is designed for augmented reality. Do you think it is right for me? I am not an expert, so I ask you to help me.
check OpenCV for that, open source and works great on android
or
OpenCv
I'm trying to create an app that will tell a person what zone of a building they are in. I'm using bluetooth dongles to get an approximate location, as oppose to exact location, and show the user on a map whereabouts they are. I would like it just to highlight the zone they are in, instead of a specific location.
I can get my hands on a floor plan of the building I am using so I'm just wondering if there is an easy way to incorporate this into some kind of map with an existing API? I found a question here which states that they just use an overlay on the image to show a marker of where the person is. Would this be a bit easier?
This is for my final year project so I would like to have some sort of flashy map if possible but I'm not sure where to start looking or if it's possible.
I also found this question which gives a great variety of apps that implement and indoor map, but I don't think I can just take this small piece of functionality that I need out of them as they seem to be complete apps.
Any information would be a great help. Anyone with experience in this sort of thing please share your knowledge :)
It doesn't sound like it'd be too complicated to just write your own custom view for this. Draw the map image to the canvas. Then for the zone the user is in, draw another 'highlight' graphic on top of the map that you just drew.
If you're not sure how to do this, there's a rather basic guide on how to create your own drawable widgets which should point you in the right direction. There are plenty of examples on drawing images to the canvas, eg this one.