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

4
votes
1answer
586 views

Cross-platform C++/OpenGL ES development (iOS/Android) [closed]

I already have reasonable experience with C++ and OpenGL, and I have recently decided to try out mobile game development. After successfully creating a simple OpenGL ES Android app using Java, I ...
0
votes
1answer
60 views

How to Create levels in game in libgdx [closed]

I am create trying to create a Android game using Libgdx. I want to Create levels in game . So what i do. Which classes i need to use and how to create them explained. Plz help.Also i want to add ...
3
votes
1answer
57 views

Libgdx - GLSL shader which uses mod doesn't seem to work properly on android

Through trial and error I've managed to come up with a scanline-ish shader I'm satisfied with. On my desktop testbed it looks like this: Basically, every 2nd(vertical) pixel is darkened. However, ...
18
votes
3answers
2k views

Saving player's progress in a Unity game

I am making a game using the Unity game engine. I want to save the player's progress including level, experience points, chosen character, etc. Presently I am using playerprefs but I want to know ...
3
votes
1answer
291 views

Why is my game freezing?

Ok here is what I have done. I have made a simple test game where you move a character around. I built it and installed the app onto 2 different devices (as it will be a multiplayer game later). ...
-1
votes
1answer
103 views

How would I implement a realistic stock market?

I'm making a corporation simulator, and it contains stocks. In the game you can buy and sell stocks, but I can't implement a realistic change in the price for them. How do I make them change up/down ...
-2
votes
1answer
52 views

how to set in vector float x y coordinates [closed]

i am use eclipse java android i am try to projectile trajectory in my game like angry birds example here ...
0
votes
0answers
58 views

How to pass a java string variable from android activity to unity3d C# script variable?

Require some help to pass custom autogenerated text from android activity to unity3d activity being started.
0
votes
1answer
53 views

My game has messed up layouts!

Earlier, I asked this question: Landscape mode for game? Where I had a directory for each and every layout, but the layout in the layout-land directory wasn't showing up when positioning my layout in ...
0
votes
0answers
69 views

Google Play Games, Inbox Freezing

I am developing a game that uses Google Play Games and turn-based multiplayer. I have the latest Google Play Games 3.5.17 on my Android 5.0 phone. The problem I have is that, after a while of using ...
0
votes
0answers
145 views

Update the Android Gallery after take a screenshot from android device using unity3d

Currently we are working on "Update the Android Gallery after take a screenshot Here follows our issues: The problem is that we are having a button,when we click on the button the photo gets saved in ...
3
votes
1answer
81 views

My game is not shown in Play Market New Releases

I've published my app for like an 36 hours ago. It is possible to find it with exact search query ("Village Keeper") and it is available via the direct link. Thing is I can't find it in "New ...
1
vote
0answers
33 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 ...
0
votes
0answers
92 views

Landscape mode for game?

TL;DR: I have made 8 new layouts for each activity layout, but they are not showing up. For example, I have a layout-land directory with a layout, but that layout doesn't show up when I turn my phone ...
0
votes
0answers
83 views

SDL touch input on Android (3D camera rotations)

I have a question regarding rotating a 3D camera on an Android device using SDL for touch inputs. The desired effect should be when the user touches and moves their finger on the screen the camera ...
1
vote
0answers
67 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 ...
0
votes
1answer
50 views

Google Games Services Display Orientation

I'm developing a game using LibGDX and I'm using BaseGameUtils to implement Play Games Services in it. It's working very well. But my game is in landscape mode, so when I call leaderboard or ...
0
votes
1answer
80 views

Libgdx - when / how to save data

I'm making a simple 2D game in libgdx, and now I'm at the point where I have to save data. I already have a mechanism to save the data itself. The problem is that I don't know when/where the procedure ...
0
votes
0answers
28 views

Andengine: Put a Sprite between 2 Parallax-Layers

It it possible in AndEngine to put a Sprite between two layers of Parallax-Background, without the Sprite moving together with the Parallax-Background? Like: First Parallax Sprite (will be above ...
0
votes
0answers
9 views

What is vector<E> how to use in android java [duplicate]

I making game i want use vector into velocity,position and rotation. But i don't know how to wark vector so please help. Thank you
0
votes
1answer
45 views

cannot implement GLSurfaceView.RENDERMODE_WHEN_DIRTY

I'm trying simply to display an openGL surface when I click the screen using GLSurfaceView.RENDERMODE_WHEN_DIRTY mode but the surface does not display when I click it , why ? my Activity : public ...
2
votes
0answers
51 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 ...
8
votes
1answer
133 views

Will an optional device type specific permission hide my game in the Play Store for those types of devices?

I have heard in many places that if my app uses a permission not applicable to a certain device, it will not show up in the play store for that device. Now, in my code, I am playing audio. I mute that ...
2
votes
2answers
78 views

On Android, why would you handle expansion files yourself instead of using Google Play?

Why aren't all Android games using Google Play's ability to serve their expansion files? Why some are handling it themselves inside their apps?
0
votes
0answers
35 views

Touch and Collisions not working together in AndEngine when i set a custom Physics Handler

I have a set of custom sprites which implement a custom physics handler. The aim is to allow the user to move them by touch, then upon release they should act like a spring is connecting them to the ...
0
votes
1answer
136 views

How do i set gravity towards a point in the centre in AndEngine with Box2D?

I have a scene and i can set gravity in the PhysicsWorld like this.mPhysicsWorld = new PhysicsWorld(new Vector2(0, -SensorManager.GRAVITY_EARTH),false); but i would like all bodies to gravitate to ...
0
votes
0answers
46 views

Is it possible to use a Unity 3d Model with libGDX?

Can I use a 3d model like https://www.assetstore.unity3d.com/en/#!/content/36951 in a libGDX 3d game?
0
votes
0answers
73 views

How can integrate a decibel meter into my Push To Talk (PTT) game?

I have am building a Push To Talk (PTT) game and I need to integrate a decibel meter into it so that I can measure and save the decibel level and identify the peaks (spikes) and add them together. I ...
-4
votes
1answer
85 views

Can we port any game written in C++ with SDL to Android platform or we would need to change some codes too? [closed]

Just wanted to lean a cross-platform library!! Since SDL library supports iOS too..
0
votes
1answer
41 views

Speed from delta time not correct

My game object isn't moving in correct speed calculated from deltaTime bellow. It should reach half of the screen in one second, on any device. Devices: tablet A7600-F - deltaTime = 0.03355443; ...
-1
votes
1answer
45 views

Movement calculation from delta time

I'm trying to calculate object speed from delta time, to get object reaching the same distance in same time on all devices. What I did: while(running) float timeSinceStart = System.nanoTime(); ...
0
votes
1answer
57 views

SDL2 and density-independent pixel

I'm currently using SDL2 on Android and that's my first experience with that library (to be honest, mainly chosen because I'd like to learn it). What is puzzling me is how to deal with different ...
0
votes
1answer
40 views

Using deltaTime

I got deltaTime calculated as 2.7855414E8 on my tablet. How do I get speed for specific device, calibred by deltaTime? For example, if I need object with moving speed, which is about reaching half ...
1
vote
0answers
42 views

The new android studio? [closed]

I got the new android studio, and I noticed one thing when creating a new activity. The layout that corresponds with the java for the activity is made twice, once as a content: This new layout ...
1
vote
1answer
76 views

Different screen sizes? (landscape)

I want to make a separate landscape layout for each size of my original layout I have activity_main.xml. I have adapted it to be able to fit multiple screen sizes: Now, I want to create a ...
1
vote
1answer
54 views

Calculate speed of object for specific device

I have an object - player - which is moving X px ahead each update (updates based on device FPS). From my results, to get average same player speed on all devices, is to do calculation screenWidth / ...
2
votes
0answers
56 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. ...
1
vote
1answer
112 views

Different screen sizes?

I have looked through all of the android docs and many stack overflow questions, and I have a question on supporting multiple screen sizes. If I have some drawables, I know I need to put them in ...
0
votes
0answers
21 views

AndEngine Font garbled on engine.setScene

I load a font as a member of my main activity with the intent of using the font in two different scenes on the same activity. The two scenes are also members of the mainActivity. public class ...
1
vote
1answer
38 views

Binding tiles with Rect

I'm having trouble binding tiles with Rect. I've successfully bound other objects (such as the player, trees etc) in my game with rectangles but I'm unable to do the same with the tiles and I don't ...
0
votes
0answers
25 views

Layout is different?

I know that layouts can look different on different screen sizes, but I didn't take that into account when I made this layout. So, it is designed for normal screen size, by default, and my phone ...
-3
votes
1answer
37 views

What's the best way to animate games in Android? [closed]

I read up in the android forums different ways to animate, the "drawable" frame-by-frame animation with surface view and the animation using the Movie class and image view. Which one should I ...
2
votes
1answer
83 views

Comparing the images

I have a drawable, which I want to compare to. I created a drawable object with it, and when I log it with toString, I get: android.graphics.drawable.BitmapDrawable@41f95548 I am randomly selecting ...
1
vote
1answer
140 views

Is it possible to use Android Libraries in LIBGDX?

I want to make an android application game that uses both android API like Location, even Google Maps API and also use Libgdx framework as well. Is this possible? I noticed there's an Android and a ...
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
1answer
27 views

Device model detection and comparation doesn't work

I need to detect device model, and if it is Galaxy Ace GT-S5830i, print it out. But it never print's it (it doesn't get through condition). My code: public String mDeviceModel = ...
2
votes
0answers
147 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 ...
0
votes
1answer
52 views

Prevent button layout changing after one is removed?

I have a layout with four buttons in it. I end up removing one of the buttons using: View v = (View) findViewById(R.id.ViewId); ((ViewManager) v.getParent()).removeView(v); The ...
1
vote
2answers
122 views

Swap buttons in layout

Say I have 4 buttons. I want to have button 2 always swap out with another button, randomly. So, when the user taps button 2, it should swap with another button (randomly). Now, button 2 is at the ...
1
vote
0answers
41 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: ...