Android is an operating system for mobile devices developed and maintained by Google, Inc. This tag should contain specific programming questions about Android.

learn more… | top users | synonyms

9
votes
0answers
286 views

Load ads in splash screen?

I have some ads that take a very long time to load. I was wondering it it is possible to have them load while the use was in the splash screen. I have looked at this answer: ...
4
votes
0answers
51 views

Google Play Services and COPPA Compliance

I hesitated to ask this question here, since i'm not sure there is a definitive answer (but there can be, maybe i missed it). I'm implementing Google Play Services for a game on Android target at all ...
4
votes
0answers
113 views

Is there a way to determine Android physical screen size?

We're currently porting our games to Android, and would like to be able to release a universal build for tablets and phones. Is there a way to determine the actual screen size or DPI in order to ...
4
votes
0answers
78 views

OpenGL: Frame partially jumps back and forth

I'm working on a project with SDL and OpenGL. The game works great on Windows, Linux, OS X and iOS. However, the Android version is showing a problem on my phone in particular. I have tested another ...
2
votes
0answers
42 views

Libgdx - multiple images in a group, best practices - also overdraw question

I am trying to right a card game, that will have an image in the middle, a coloured border and potentially a symbol in the top left. I am using libgdx and a stage/scene2d. The image will change ...
2
votes
0answers
50 views

Fixed timestep periodical “lags”

I have fixed timestep code in my main thread, it looks like this: float oldTimeSinceStart = 0; float accumulatedTime = 0; float maxDeltaTime = 0.1f; // 10 FPS float fixedTime = 0.016f; // 60 FPS ...
2
votes
0answers
50 views

Sprite animation in Android view

I'm looking for a way to have different sprite animations in individual Android views. I try to use LibGDX and AndEngine but most I could find was how to get an Activity with the sprite animation. ...
2
votes
0answers
138 views

unity lag while moving a sprite

I'm trying to build a 2D game for android and after I finished developing the game I noticed that there was lag present when moving objects around. I tested it on a phone much more powerful than my ...
2
votes
0answers
36 views

libGDX AppWarp integration problem

I have tried to use up AppWarp's old SuperJumper as a sample to create an up to date project from it with Gradle. Maybe it is good for learning. So, I have downloaded project from ...
2
votes
0answers
49 views

Improving Position Sync Bandwidth Usage in a Multiplayer Game

This is the class i use to sync position between clients in a multiplayer top-down 2D shooter game: [System.Serializable] public class MovementUpdateClass { public int MessageTime ...
2
votes
0answers
62 views

Record voice and Comparison prefab audio in unity

I am android programmer that i Comparison Entrance voice with ready voice(prefab voice) for example when you say hello >>>>>to analyze>>>>>if your voice == prefab voice >>>>>you listen hello(play ...
2
votes
0answers
48 views

Restore IAP in Android using Prime 31

can someone please guide me how to restore purchases in android using prime 31. What my basic understating is to get the list skus which player has purchased after he logs in with his account and ...
2
votes
0answers
58 views

Spawning enemies in four different positions with a fixed trajectory in android game

This is my first android game, I appreciate all the help. I want to define 4 spawning zones starting from out of the screen (left, right, up and down). Enemies coming from this areas have a fixed ...
2
votes
0answers
35 views

Android native database organization

I am developing an Android native game, but I have problems with Data Storage. For a better comprehension think it like as i am developing Clash of Clans, but with Native Andorid. Now imagine I have ...
2
votes
0answers
97 views

LibGDX on Android TV

Anybody wrote games for Android TV using LibGDX? What is the mapping of the remote control? Can we use the game controller with LibGDX? Thanks!
2
votes
0answers
386 views

Libgdx performance on old devices

I'm developing a game in Java for Android, using LibGDX. I'm using Nexus 5 to test my game most of the time and it works great (Minimum FPS it gets is 57 out of 60). Recently I ran my game in Galaxy ...
2
votes
0answers
169 views

LibGDX Android Textures reload other textures, and transparent images get black backgrounds [Pictures]

I have very strange problems with my LibGDX Game in Android - The problem is that sometimes the textures get black backgrounds when they should be transparent, and sometimes when I remove the texture, ...
2
votes
0answers
191 views

error in post a screen shot of game scores with Android Intent in LIbgdx game

I want to post a screen shot of my game on social apps. I have developed this game using Libgdx framework. I have created an interface in Core class. Here is its Intent share specific code. ...
2
votes
0answers
162 views

LibgGDX drawing two seperate Textures in FrameBuffer

So I am trying to combine multiple TextureRegions in to one by using a FrameBuffer. This works extremely well when the TextureRegions originate from the same Texture object/file but as soon as I try ...
2
votes
0answers
527 views

How do I check user's unlocked achievement and leaderboard scores via GPG plugin

I need to load user's achievement and their scores from leaderboard in my game. But the Social.LoadScore() and Social.LoadAchievements() both returns a 0 size array in callback. When I checked the ...
2
votes
0answers
1k views

In Unity on Android, how can I rotate an object with the accelerometer?

I'm making a game where you control a platform with balls falling on it, and you have to balance the balls and prevent them from falling off. I'm currently using a mouse to control it with this code: ...
2
votes
0answers
554 views

Access Android Camera.Parameters from Unity

I would like to access the android defined class Camera.Parameters.getHorizontalViewAngle() from a Unity3D c# script but my java skills are limited. Can anybody offer any help? I have this code: ...
2
votes
0answers
361 views

Camera - View matrix in Android + openGLES 2

I am trying to use the touch screen on the tablet to control my camera movements and generate the view matrix accordingly. I get the x and y coordinates of the screen and after doing some sanity ...
2
votes
0answers
831 views

3 Button Multi-touch for Android

OK, my multi-touch system was somewhat convoluted, but was working perfectly OK until I tried to run my game on my Nexus 10 which is running Jellybean. Crashing all over the place! So I removed my ...
2
votes
0answers
1k views

AndEngine Making Chase Camera Follow Player

I am playing around with the AndEngine Race Game example. I am trying to make the camera follow the car as the player moves around. The Tile Map is larger than the player's screen but the camera ...
1
vote
0answers
15 views

How to know when Android OpenGL Context has been preserved?

I am implementing a pause menu for my game in Android. If the activity pauses and then resume, It lose the OpenGl context. However if you use setPreserveEGLContextOnPause(true) it MAY preserve the ...
1
vote
0answers
46 views

Libgdx stops all sounds when there are lots of sounds

I'm making a 2D game for Android using Android Studio with Libgdx in Java. I have a class, called SoundPlayer, which holds an ArrayMap. The key is the name of the sound file and the value is the sound ...
1
vote
0answers
38 views

libGDX text doesn't appear in TextField

A game I'm working on has libgdx's TextField. They work fine in every instance I've used them, however on a play tester's phone he says no typed text appears in the box until enter or space is ...
1
vote
0answers
41 views

UnityWebRequest and/or HttpWebRequest give 403 on Android with PUT

I am trying to post an image captured through my game to Facebook through their SDK, and as it requires a URI, I wrote a simple AWS Lambda function to take a byte array and upload it to an AWS bucket. ...
1
vote
0answers
18 views

Behvior of Ninepatch when smaller then unstrechable area?

I create a healthbar from a Ninepatch background and "fill" texture. However, it starts overlapping it's patches when it gets very small. Is there anything I can do about this? Is there a way to ...
1
vote
0answers
48 views

how to temporarily turn off/on multisampling for an OpenGL ES 2.0 render context in Android?

In my OpenGL ES 2.0 Android app, I render to an EGL surface with >= 2 samples; I obtain this surface by passing: EGL14.EGL_SAMPLES, 2 as part of the attribute_list argument for egl.eglChooseconfig() ...
1
vote
0answers
42 views

Game layout is messed up?

After trying to add a banner ad to my game, the rest of my games content has moved up! I have the following XML code: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout ...
1
vote
0answers
78 views

Unexpected behaviour after adding animator and Unity editor crash

I have realy strange problem which accured after adding animator(I suppose) to prefab Object. Situations looks like follow: I had object which have only sprite renderer, collider2D and script ...
1
vote
0answers
23 views

LibGDX: ActorGestureListener after change position

I have this code to get pan touch inside an Image and it works fine, but when I uncomment this line img.setPosition(100, 100); it doesn't work anymore, why? Texture tex = new ...
1
vote
0answers
45 views

Image Buttons Have Low Resolution Quality

I'm using Synfig Animator to draw my animations for my android game I'm also using Android Studio to write the code for it, However. On testing, the images that i'm using looks very bad and unfocused ...
1
vote
0answers
54 views

How can I change the name of my game in Google Play?

I have just released my first app game called 'paperplane', now the problem is that there are hunderds of paperplane apps so I dediced the change the name to 'neonplane'. I was not able to change the ...
1
vote
0answers
26 views

Two devices calling the same servlet, one receives the intended response, the other receives null, but call is definetly made with valid parameters

I'm developing a multiplayer card game (this context only involves 2 players). One player invites other players. Once the game initiator sends all the invites, he goes to a "WaitingRoom" activity, ...
1
vote
0answers
32 views

OpenGL ES 2.0: Highly variable time spent in GLES20.glDrawArrays(). How to find the cause?

How can I debug why the time take to issue exactly the same GL commands to render a frame, especially the call to GLES20.glDrawArrays(), is highly variable even when there is no garbage collection and ...
1
vote
0answers
66 views

My Game Renders Awful In Android Build

I'm working on a 3D Sniper game and have finished the project. When I test it on Windows (7). It's All Fine, not even a bug. But when I take the app into android (Bluestacks App Player), my buttons ...
1
vote
0answers
59 views

Game is responding very slowly?

I have a very simple app which removes buttons and re-adds buttons to certain layouts when a button is clicked. The problem is, this process is taking a very long time. My question is: How can I make ...
1
vote
0answers
39 views

How can I move my button?

I am new to animations in android. I was wondering, is there a way to keep a button moving around the screen, bouncing off the walls, until it gets clicked? I was thinking to do something like this: ...
1
vote
0answers
50 views

How can I detect sprite collisions out of screen?

I am creating an Android game using andEngine library. I have enemies coming from out of the screen into the screen. I already know how to detect collisions, but is there any method I can use to ...
1
vote
0answers
21 views

Android Game Development. Type Usage for Entity Positions

I've recently started developing on Android and have made some basic apps. I now wish to start development on a game project. I have intermediate skill in Java and will be developing with that ...
1
vote
0answers
133 views

Streaming 3d model --> unity android

I want to include a feature in my game that allows me to host raw 3d models (.fbx/ .obj/ etc., not AssetBundles) on a server. The game should download these files, save them to the device and load ...
1
vote
0answers
151 views

My app has no client ID?

So I'm using the Unreal Engine 4 to make a mobile game. I'm currently trying to set up the Google Play services so I can do Leaderboards, Acheivements and In-App Purchases but I'm struggling with the ...
1
vote
0answers
224 views

Implement Candy Crush like level graph

I want to implement road-map like level graph where in you can see what level are you and your friends are on. Just like we see in Candy Crush Saga.For people who have not seen Candy Crush Saga, ...
1
vote
0answers
278 views

Snow fall animation android

I already got snow fall effect from here the main activity for the snowfall public class SnowFallActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { ...
1
vote
0answers
27 views

Error rendering map android

I'm trying to read this text file and render the corresponding tiles on the screen. The code for reading the map is as follows: private void loadMap(InputStream is) throws IOException { ...
1
vote
0answers
111 views

How do I draw multiple irregular polygons with OpenGL ES?

In this post I was asking how to program a map of a Risk-like game. Now that the map is pretty coded, both client and server-side, I'd like to finally draw the map. I'll try to keep least broad as ...
1
vote
0answers
37 views

Drag and Flick Objects to any position (Unity3D)

In unity, I have several boxes in one cluster. I want the user to be able to move any of these boxes to any position that they desire in the app, and have it stay there until they move it again. Also, ...