Android :: Better Way To Generate Tiles
Mar 15, 2010
I'll start by saying that I'm REALLY new to OpenGL ES (I started yesterday =), but I do have some Java and other languages experience. I've looked a lot of tutorials, of course Nehe's ones and my work is mainly based on that. As a test, I started creating a "tile generator" in order to create a small Zelda-like game (just moving a dude in a textured square would be awesome So far, I have achieved a working tile generator, I define a char map[][] array to store which tile is on :Code...
View 2 Replies
Apr 4, 2010
In a feeble attempt to learn some Android development am I stuck at graphics. My aim here is pretty simple:Take n small images and build a random image, larger than the screen with possibility to scroll around.Have an animated object move around on it.I have looked at the SDK examples, Lunar Lander especially but there are a few things I utterly fail to wrap my head around. I've got a birds view plan (which in my head seems reasonably sane):How do I merge the tiles into one large image?t each onDraw redraw the background of the previous spot of the moving object, and the moving object at its new location
The problem is the hands on things. I load the small images with "Bitmap img1 = BitmapFactory.decodeResource (res, R.drawable.img1)", but then what? Should I make a canvas and draw the images on it with "canvas.drawBitmap (img1, x, y, null);"? If so how to get a Drawable/Bitmap from that?I'm totally lost here, and would really appreciate some hands on help (I would of course be grateful for general hints as well, but I'm primarily trying to understand the Graphics objects).
View 1 Replies
View Related
Apr 13, 2009
I tried to display map in emulator. But its showing just tiles only. I am attaching the screenshot and the log message is like this.
04-13 22:30:06.934: INFO/ActivityManager(48): Start proc org.me.map for activity org.me.map/.MapAct: pid=615 uid=10022 gids={3003} 04-13 22:30:06.944: DEBUG/dalvikvm(607): VM cleaning up 04-13 22:30:06.954: DEBUG/dalvikvm(607): LinearAlloc 0x0 used 541500 of 4194304 (12%) 04-13 22:30:06.976: ERROR/dalvikvm(607): pthread_setspecific failed, err=22 04-13 22:30:07.425: INFO/System.out(615): #### #### Setting locale to en_US 04-13 22:30:07.466: WARN/Maps_Persistence(615): Couldn't find file: /data/data/org.me.map/files/DATA_Preferences 04-13 22:30:07.545: INFO/jdwp(615): received file descriptor 27 from ADB 04-13 22:30:07.645: WARN/Maps_Persistence(615): Couldn't find file: /data/data/org.me.map/files/DATA_Tiles 04-13 22:30:07.675: WARN/Maps(615): Couldn't restore map info, data == null 04-13 22:30:07.995: INFO/MapActivity(615): Handling network change notification:CONNECTED 04-13 22:30:08.015: ERROR/MapActivity(615): Couldn't get connection factory client 04-13 22:30:08.194: INFO/ActivityManager(48): Displayed activity org.me.map/.MapAct: 1400 ms
Please tell whats wrong with this, My source code is very simple, I ididnt try anything special,
public class MapAct extends MapActivity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); } @Override protected boolean isRouteDisplayed() { // TODO Auto-generated method stub return false; } }
View 9 Replies
View Related
Jan 30, 2010
I am having some issues getting tiles to load into my MapView in android development. I have searched and looked at similar problems on here but with no luck so far.
I have looked at the instructions here and have got hold of my debug API key. I have entered this into my MapView.
I have checked that my emulator and my debug device have got an internet connection.
I have move my Internet permission tag in my manifest file to be before the application tag.
I don't know what else to check.
I am also unsure of the best way to develop this. It seems that I can't debug with a properly signed app as the debug keystore needs the same password - android. This would imply that each time I go to do a release build I have to change the key - which seems very fragile!
Is there any way of developing and releasing builds with my own generated maps API key?
Some code for you to look at:
Main.xml:
CODE:.......................
AndroidManifest.xml:
CODE:.........................
View 1 Replies
View Related
Jun 29, 2009
For some reason I cannot get my first maps application to work. I have gone though the full process of getting the MD5 fingerprint for the debug.keystore, registered for the key on the website, put it into the xml file. Even had changed my computer's locale to US English. I also signed the application with my private key and pushed it via ADB to the emulator. All attempts so far resulted only in the grey Google Maps background with the tiles not loading. JAVA_HOME environment variable points to my JDK file. Not sure what else I can do. Even upgraded from SDK 1.1 to 1.5. No improvement. I am really stuck here. I am running WIN XP, Eclipse ganymede, SDK 1.5 r2, with the latest ADT. Here is my class file code: package com.mellagio.maps; import com.google.android.maps.MapActivity; import com.google.android.maps.MapController; import com.google.android.maps.MapView; import android.app.Activity; import android.os.
View 8 Replies
View Related
Jul 6, 2010
I am using a gutted version of the Snake Android sample. Pretty much I am using the TileView class verbatim and am only trying to display a few tiles on the screen. Instead of the SnakeView class I am using a GameView class in which I only included the code I thought necessary to display a tile on the screen.
Here is the class
CODE:...............
Now what is happening is that when the updateWalls() method is called, the tiles are placed within the View and comes up like this:
Now when I uncomment out the updateCellularArray() method and comment out the updateWalls() the program force closes and throws a NullPointerException. After some debugging I figured out that when the updateCellular array method is called, the mTileGrid array in the TileView class is not initialized, but it is when updateWalls() is called. I am completely baffled as to why this is happening. It doesn't matter if i replace the for loop with a simple setTile(GREEN_STAR, 3, 3); it still force closes.
Here is the TileView class I am using (again this is the same one in the Snake sample that comes with the Android SDK):
CODE:.......
simplified GameView class
Alright after modifying the updateCellularArray() method to the following:
CODE:........
It finally placed the tile where I wanted it to...
I'm starting to wonder if it has something to do with the RefreshHandler. Possibly when the RedrawHandler's sleep method is called in the update method of the GameView class. I'm not quite sure how it works so I am going to try playing around with it and see what I can come up with.
View 1 Replies
View Related
May 18, 2010
Is it possible to determine the coordinates of the tiles that are visible in a MapView, relative to the first tile in the upper left corner of the entire map (including the invisible part)? I can't seem to find a way to get the tile coordinates.
View 1 Replies
View Related
Nov 23, 2010
The Maps API always had its issues... since updating my Nexus One to 2.2.1 FRG83D earlier today, I see a problem more serious than anything prior. This applies to both Google Maps and (any) app that uses the Maps API (that I have tested). It's pretty obvious and simple, and cannot be remedied by rebooting the device: When panning the map view (no zooming that would trigger a complete re-load), map tiles that were already loaded, are cleared and reloaded. This can occur multiple times until the map view settles down. Looks pretty wild.
View 5 Replies
View Related
Apr 14, 2010
I followed this guide here perfectly and have gone through it again but when I run the program on my google avd the page loads but only Grey tiles appear and it doesn't show a map which it should.
Does anyone have any ideas?
View 5 Replies
View Related
Jul 10, 2010
There are a number of posts (both here & elsewhere) about why a MapView might not be displaying tile info (personally, I've liked http://stackoverflow.com/questions/1809507/android-hello-mapview-tutorial-map-tiles-do-not-load, but there are other good ones, too).
My question is slightly different: I'm not getting tile info to show up (on my handset or in the emulator), and I'm looking for advice on what to try in order to debug this problem. As far as I can tell I've correctly located my debug.keystore, and used the Java JDK keytool to get the signature from it, which I then plugged into the Google web page, and then plugged THAT key back into my XML file. The app runs ok, it just doesn't display any tiles.
I was hoping that if I did something wrong here I'd see an error message in, say, logcat (or an exception that Eclipse might catch) that would confirm that this is the source of the error.
So here's my question - what would y'all recommend someone try in order to figure out what the actual problem is?
View 1 Replies
View Related
Nov 1, 2013
I just bought my nexus 5 and its pretty awesome but i was wondering if i could change a couple of questions...
Do you know the menu which appears when you press the lock button(i think its called power menu), is there a way of changing what icons appear there?
Can the tiles also in quick settings panel be changed?
Finally, if you press the middle button you see the google logo to laung google search, can that be changed to show other apps?
View 3 Replies
View Related
Jul 20, 2012
I'm trying to create an app to plot our mountain bike trails on a Google map. I've got the Google map part working. However, once I try to plot a couple of geopoints and connect them it does displays the geopoints and connects them, but the Google map stops displaying. Only grey tiles show. Here is my code before I plot the points which works. import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Paint.Style;
import android.graphics.Point;
import android.os.Bundle;
[Code]....
Then I change my code to this to plot and connect a couple of geopoint and it turns map tiles grey.
import java.util.List;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
[Code]....
View 1 Replies
View Related
Nov 16, 2012
I just got this samsung galaxy s relay 4g. I've gone and disabled the really nasty stuff. But i'm left with one real remaining problem.
most programs that have a single icon widget, end up taking up 2 tiles vertically. some 2x1's end up taking up 2x2. Here's some examples:
The task killer icon, and juice plotter should be taking up one tile, and they're taking up two.
The battery status icon is taking up four tiles, and should only take up two.
So how do I address this?
I suppose the next question, is it sane to try to get the vanilla launcher on here? Or should I just wait for a full cyanogen release for it?
View 3 Replies
View Related
Oct 11, 2010
What's the easiest way to generate and read QR Codes in an android application?
View 8 Replies
View Related
Mar 3, 2014
I have created an app for notification. in that i need to create a unique id for each notification. how to create a unique id in android?
View 2 Replies
View Related
Aug 12, 2009
Hi,Can anyone tell me which tool is used to generate Stub in Android and is it possible to use JAX-RPC concept to call the web service in android.If is it possible please provide me some code with example.
View 2 Replies
View Related
Jun 29, 2010
I am new in this Field!I have this Message and Key also i want HMAC MD5 using this two so how it is possible if possible then give some example or sample code of this.The Given link display the overall functionality i want such kind of code.Please help me.
Messgae = POSTuserMon,28Jun201010:18:33GMT7FF4471B-13C0-5A9F-BB7B-7309F1AB7F08
key = d6fc3a4a06ed55d24fecde188aaa9161
Link = http://hash.online-convert.com/md5-generator.
View 2 Replies
View Related
Nov 22, 2010
I know how to do it between 0 and 100, but I can I set the floor?
View 4 Replies
View Related
Jun 30, 2010
I am new android developer. I am writing an application to receive data from barcode scanner. I am able to receive data from barcode scanner via bluetooth connection. If user open notepad or other application, I want to display the data to the application, so I want to generate key events on foreground application. I am trying to find a way but I can't find. Anyone please tell me how to do?
View 2 Replies
View Related
Mar 6, 2010
I want to generate a Listview that has some dividers between some of the entries, like it can be seen in some of the property sections. See the example below. I try to generate a List that consists of some textviews followed by one of the fancy dividers explaining the next part of the list and then again some text views. How can this be done? I thought about creating different views to add to the list? Is this the way to go?
View 4 Replies
View Related
Aug 29, 2010
I wish to generate a QR image so people can scan to visit my Android market. However, I need to specify a search param like: market://search?q=MyStringHere
View 3 Replies
View Related
Sep 9, 2010
I want to generate a low battery alert programmatically, same as that will be generated when battery is low..can any one post a sample code how to do it..am aware of ACTION_BATTERY_LOW. but how to use it..? i want to generate a low battery alert even though battery is not low.
View 1 Replies
View Related
Nov 20, 2010
I am getting a parsing error and I do not know why (I am new to programing). Because of this error, R.java disappears and I end up having more errors. Hopefully someone can help me out. Here is where the error comes from: list.xml. Code...
View 2 Replies
View Related
Apr 30, 2010
Is there any tool in eclipse to generate build.xml for my android project. I couldn't get solution to write build.xml. Is it possible to generate APK file and install it on emulator using ANT.
View 2 Replies
View Related
Sep 24, 2010
Does someone know how to generate a javadoc for an android project? I found searching the net this info http://www.androidjavadoc.com/?p=63 , but i don't understand where can i find the file "droiddoc.mk": "All javadoc stuff is concentrated in the ROOT/build/core/droiddoc.mk".
View 3 Replies
View Related
Jul 5, 2010
I have an existing android project, which I want to view it as a class diagram or in any uml representation Could anyone please give me a free tool to generate them.
View 3 Replies
View Related
May 13, 2010
Is it possible to generate android styled javadocs for my android project (like http://developer.android.com/reference/java/lang/String.html, instead of http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html) Is it something regarding using of some custom doclet instead of standard doclet? If yes, then which one I have to use?
View 1 Replies
View Related
Jul 28, 2010
may i know is there any way to generate external log file?
View 1 Replies
View Related
Sep 6, 2010
I have a an array of objects and would like to be able to randomly choose one from the list when a button is pressed. How would you do that in Android?
View 3 Replies
View Related
Oct 1, 2010
I have an Java class with a static final method getAll:
CODE:..............
Now I want to hand in null as a value for the where statemant so that it will just be ignored later on in the code. Anyway in the testcase for this method I have: Vector<Category> categories = Category.getAll(context, null);
Which then in turn gives me a NoSuchMethodError. I don't know exactly why it does that. The only thing I could imagine is that the null I hand in would not match the signature of the above method. But how can I overcome this? I already thought of overloading. But this would just end in rewriting most of the code. At least when I do it, how I think.
This is the stack trace I get:
CODE:.......................
View 2 Replies
View Related