Android :: Modified Snake Example - Display A Few Tiles On The Screen

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.

Android :: modified Snake example - display a few tiles on the screen


Android :: Map Not Displaying , Just Tiles Only / Need To Display

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

Android :: MapView Doesn't Display Tiles - Debugging Strategies / What's Actual Problem?

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

Android :: Debugging Sample App Snake

Jun 10, 2009

I am using the android 1.5 and have compiled and run the Snake sample application on the Emulator, using Eclipse to launch it.When I try to debug it using the Eclipse environment I get the error:"Launch error: Failed to connect to remote VM. Connection refused."I do have the AndroidManifest.xml debuggable=true set and i went into the emulator and set Dev Tools > Development Settings> and checked "Wait for debugger", and added the snake app to the Debug App.So not sure what else to do to get it to work.I also turned off my firewall just in case too.

View 2 Replies View Related

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 View Related

Android :: Put Together Tiles In Sdk And Use As Background

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

Games :: Free Preview Of A 3D Implementation Of Classic Snake

May 22, 2010

I just published a free preview of a 3D implementation of the classic snake game. It works smoothly enough on Milestone, please let me know how it works on other phone. You can download it searching for Snake3D.

View 1 Replies View Related

Android :: MapView - Tiles Not Loading With Debug API Key

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

Motorola Droid :: Snake - Press Up Arrow - Application Stoped Unexpectedly

Dec 3, 2009

I load up the app Snake and when it loads, it says, "Pasued: Press Up To Resume." I can't figure it out for the life of me. Then it will read, "Sorry! The application Snake (process com.example.android.snake) has stoped unexpectedly. Please try again.

I try again. Repeat.

View 4 Replies View Related

Android :: Google Maps Application - Tiles Not Loading

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

Android :: Possible To Determine Coordinates Of Tiles Visible In A MapView?

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

Android : Using Modified Frameworks

Aug 25, 2010

I've been using the ActivityGroup class in my project for some time now but today I encountered a bug in the framework (http:// code.google.com/p/android/issues/detail?id=10083) that's preventing me from using the destroyActivity method. The fix for the bug is simple and I'm wondering if its safe to just fix the bug and copy the ActivityGroup (and dependent classes) into my project and use it locally instead of from the Android frameworks?In general, would modifying Android frameworks and using them locally in a project break future compatibility or backfire in other ways?

View 4 Replies View Related

Android :: 2.2.1 FRG83D - Existing Map Tiles Are Unnecessarily Reloaded When Panning?

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

Android :: Droid App Google Maps Showing Grey Tiles And Not Map / What To Do?

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

Android :: Modified ACTION_VIEW Intent?

Jul 15, 2010

I execute the following code:

CODE:....................

Which opens the image viewer activity but I don't want to see the navigation arrows as well as the items in the menu. I only want the zoom controls. Is it possible to have it like that ?

View 2 Replies View Related

Android :: Last Time Contact Was Modified

Jun 9, 2010

is there a way to find out the last time a contact was modified?I can't seem to find a variable for it. The reason I'm asking is because I'd like to do a sync of the contacts to my web server and I don't feel like checking for each contact with a HTTP request if it needs updating.So I was thinking to check the date of the last update to the date of the last sync.

View 1 Replies View Related

General :: Android APK Being Disabled As System Modified

Aug 5, 2012

Downloaded worldpay.apk available from their site. I have a rooted sanei n10 and updated ICS os. Anytime I try and open app it says ' the operating system of this device has been modified. Due to credit card security measures this app has been disabled' or a message very similar to this. I know some people had similar issue with barclaycard pingit but the fix for that doesn't work in this case. Ie install superSU, uninstall superuser, install hide my root. Hide my root always fails to hide su binary and says there is no su app to hide.

View 1 Replies View Related

Android :: Modified Checkbox State To Be Selected But View Unchanged?

Mar 1, 2010

In my android app, I have a preferenceScreen with some checkboxes defined in a xml file and a class that implements "SharedPreferences.OnSharedPreferenceChangeListener". What I want to do is to select a checkbox and all the others to be selected as well. In the above listener I am able to modify the other checkboxes's state to selected, but my view remains unchanged. What should/could I do to achieve this ?

View 1 Replies View Related

KitKat 4.4 :: Nexus 5 - Change Power Menu And Tiles

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

Motorola Droid X :: MusicMod / Modified Default Music Android Player

Jul 23, 2010

This is by far the most awesome, modified default music Android player, created by Eliot Stocker. This is version 1.6, which is an older version, but his newest that supports Eclair 2.1 (all the newer ones require Froyo).

View 10 Replies View Related

General :: How To Know If Current ROM Is Not Modified

Oct 4, 2013

After sending my tablet to a maintenance service I need to verify if the current ROM is not modified and injected malware.How to do it?Anyway to check the checksum of something like that?

View 5 Replies View Related

Google Maps Displays Grey Tiles When Drawing Geopoints

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

General :: Samsung S Relay - Single Icon Widgets Take Up Two Tiles?

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

General :: Modified APK Uninstalled Automatically

Sep 30, 2013

I modified the resources for a Google app - Keep. Resigning the APK doesn't work, because it breaks access to Google Drive API, but just replacing resources.arsc in the device (I have root access - CM10.1) with rebuilt one worked. The result works fine, however after day or so Keep is uninstalled from device automatically. I guess that's because the signature of resources.arsc is obviously broken. But is there a way to avoid this automatic uninstall?

View 4 Replies View Related

Motorola CLIQ :: Most Apps Don't Work - Snake - Doesn't Work Says Its Paused

Dec 8, 2009

I'm trying to determine whether or not my phone is defective, or if this is a current problem with the Cliq.

Of the apps I've downloaded, only a few of them have worked. Of those few that work, some don't work right. Has anyone had problems with these apps crashing on them, or just not working correctly?

- Nice Battery (see description at bottom of: My Ultimate CLIQ settings (so far))
- WeatherBug (kept showing the wrong location, crashed when trying to change location)
- Snake - doesn't work just says its "paused"
- RingDroid - crashes when I select the "Facebook Pop" button
- Layar - screen is rotated 90 degrees at all times

There have been others, but usually I just uninstall them right after discovering it doesn't work right.

View 3 Replies View Related

HTC EVO 4G :: Intermittent Sound With Modified Boot Animation

Jul 24, 2010

I installed a boot animation per the instructions here (http://androidforums.com/tips-tricks-evo-4g/109120-how-install-new-boot-animation-without-root.html. I left the "Droid" mp3 in the localdata folder, and did not alter the config file. I'm using Pseudoram's boot file from [Collection] Custom Boot Animations and Splash Screens - xda-developers.It plays the sound sometimes, and sometimes not. Anyone know why?

View 3 Replies View Related

General :: Update Software To 4.2 - Not Possible Because Device Is Modified

Dec 4, 2013

I am trying to update my phone's software up to 4.2 but it says "not possible because the device is modified" is it normal or is it my phone? GT-S5310

View 2 Replies View Related

Games :: Possible To Play Games Like Odell Lake / Snake Byte

Mar 10, 2010

Anyone know if it is at all possible to play games like odell lake, snake byte and oregon trail on my droid? Used to play these in grade school. Trying to play them again.

View 5 Replies View Related

HTC Hero :: Sync Modified Back Update To Outlook?

Oct 6, 2009

Hero newbie here. I'm currently a Blackberry user (the Pearl, smallest BB made, had it for 2 years), and have decided I want a larger screen and better browsing capability. I use the Blackberry "BIS" service, which means that I don't have wireless sync w/my company's exchange server - I sync contacts/calendar/notes via bluetooth with Outlook on my PC, and get email OTA of course. So I've been thinking about the Blackberry Storm2 to get a larger screen, etc., but when I saw the news today that the Hero is coming to Verizon I did a double-take. I've done some research and the interface and user customization available on the Hero look just great, best I've seen to date.My biggest concern is how it will work for managing my Outlook email/contacts/calendar/notes, and multiple gmail accounts. So what I'm curious about...
1. I have four gmail email accounts - I assume I can set up all four on the Hero, correct? What is the max number of email accounts I can set up on the Hero?
2. I can not sync my Outlook calendar/contacts to Google due to company security issues, so I can't use the Hero's Google wireless sync capability. Will the Hero Sync app allow me to sync Contacts/Calendar/Notes from Outlook to the Hero via USB?
3. If I modify a contact, calendar event, or outlook note on the Hero will Hero Sync the modified back the update to Outlook?
4. If I receive an Outlook meeting invite on my BB, it automatically appears on my BB calendar, meeting reminders appear, etc. Does the Hero have the ability to automatically add new meetings to my Hero calendar when meeting invite emails arrive on the phone?
5. Any issues w/setting up a work email account (Exchange) on the Hero? (I do have IMAP access to my work email account.)
6. The BB provides an individual email folder for each account, as well as an aggregate email folder that displays all messages received from all email accounts in date order. Does the Hero also offer a way to view all emails received from all accounts in a single folder?

View 10 Replies View Related

Motorola Droid :: Install A Modified Theme Musicgoogle.apk

Jul 4, 2010

I was trying to install a modified theme musicgoogle.apk. The stock musicgoogle.apk is now gone from my phone. I backed up the stock apk first of course, but I cannot install it, or the modified theme apk.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved