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

0
votes
0answers
31 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?
4
votes
0answers
64 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 ...
4
votes
2answers
166 views

Does Google Play allow an account to log in to the same game on 2 devices?

I'm developing an online Android game with Unity. I want all Google Play accounts to have only one session logged in at a time. Do I need to write my own code to disconnect an existing session on ...
0
votes
0answers
53 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 ...
0
votes
1answer
423 views

Unity: why game app on Android takes up much more memory than Unity Profiler reports?

We are profiling a game app on Android 4.4.2 device via Unity’s ADB profiling. We have set up ADB profiling following the official guide: http://docs.unity3d.com/Manual/Profiler.html The ADB ...
2
votes
1answer
88 views

Screen not rendering after restarting game

Game works fine on the initial launch on Android, but after that restarting game does not render the graphics on the screen properly. It is a copy of the question Sprites not being rendered on ...
-4
votes
1answer
55 views
0
votes
1answer
31 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
40 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
43 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
39 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
37 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
47 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
42 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 / ...
19
votes
3answers
6k views

Play videos with LibGDX

Is there a way to play videos with LibGDX? I want to put a video as my splash screen in Android, but I dont want to use the Android SDK, because I am using LibGDX and I am almost finished :/
2
votes
0answers
35 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
75 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
18 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
28 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 ...
1
vote
1answer
71 views

How can I calculate when a spesific amount of time has passed [closed]

I am trying to get something to happen, when a spesific amount of time has passed(in my case it is in secounds). I have tried using this method: long elapsed = ...
2
votes
1answer
52 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 ...
0
votes
0answers
24 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
30 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 ...
1
vote
1answer
53 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 ...
18
votes
5answers
2k views

How to compress game frame by frame animation to a minimum on disk

I developing a game like Age of empire (buildings on map) and for every building I have a sprite sheet for its animation. I am using frame by frame animation to animate the building ( not aware of any ...
1
vote
0answers
56 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 ...
2
votes
1answer
98 views

In Unity, on an Android device, CaptureScreenshot writing to Phone, but persistentdatapath linking to the external card

I'm using CaptureScreentshot() to get an image. But when I try to access it on an Android device it's giving me: Could not find file "/storage/emulated/0/Android/data/appname/screenshot.png" When I ...
2
votes
0answers
93 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 ...
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 = ...
1
vote
2answers
73 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 ...
2
votes
1answer
56 views

How can I fix my audio? (prioritize)

When two audio's are played at the same time... the sound is cancelling out. How do I fix this weird phenomenon? I have some code where there is audio on button click and audio in ten second ...
1
vote
0answers
32 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: ...
0
votes
0answers
38 views

Two sounds played simultaneously cancel out? [duplicate]

When two audio's are played at the same time...the sound is canceling out. How do I fix this weird phenomenon? I have some code where there is audio on button click and audio in ten second intervals ...
3
votes
1answer
58 views

Setting 4 different enemy spawn zones off screen

This is my first game, so I really appreciate all the help. I want to create four enemy spawn zones for enemies and this areas are off screen. The enemies are coming from left, right, up and down, ...
0
votes
2answers
96 views

Connect phone to computer? [closed]

In order to test out my game, I need to use my real life device. The problem is, android studio isn't recognizing my device plugged in: The problem: My device isn't getting detected in android studio ...
4
votes
1answer
79 views

Multiple inputs for Google Cardboard on iOS and Android?

So far I am having a problem with having only a singular input mechanism (the magnetic trigger) for Google Cardboard games. Are there any other options to augment this in order to have at least two ...
0
votes
1answer
611 views

Camera Rolling when Implementing Pitch and Yaw

I am implementing a camera in opengl for an android game and am having problems getting the pitch/yaw/roll of the camera correct. I have read many tutorials on quaternions and have implemented a basic ...
2
votes
1answer
79 views

Calculate average velocity of the object before the game start

I have a game object (player), and with device screen width and average FPS, I'm able to calculate exact velocity for the player to reach whole screen from left to right in a specified time (fx. for 1 ...
-1
votes
1answer
24 views

Change Andengine Text By clicking and typing a new text like native android EditText

I have a board in my game, with a name. I want to edit it on a button click (not by text.setText("text") method ) i want the user to enter a text and set it there. I couldnt find, how to change the ...
1
vote
0answers
42 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 ...
0
votes
1answer
63 views

Game speed on different devices isn't same

I have an app, in which I have constant int speed = 5; On each update, the game object (player) is moving 5px ahead. Problem is, that I can't handle that on different devices - older devices is having ...
1
vote
1answer
42 views

Calculating delta time

I'm trying to calculate deltaTime, but it's not correct. What's wrong in my code? //declared outside private long timeSinceStart = System.nanoTime() / 1000; private long oldTimeSinceStart = 0; ...
1
vote
2answers
121 views

Simple way to detect collision between two bitmaps on android surface view

I'm looking for a standard way to detect collision between two bitmaps inside a surface view. I tried the intersect method with two rectangles, but it doesn't log. practiseA = new Rect(500, 500, ...
0
votes
0answers
33 views

Android onResume called after screen turned off, starting the app running even while screen is off

I'm building a simple 2D game and I am getting strange results and calls the the onResume method when I turn off the phone screen while in the game. So I have two questions: 1. How is the pause ...
1
vote
1answer
3k views

How do I put a game on miniclip or addinctinggames?

I finished making a java game recently, and I would like to put it on a website such as Miniclip.com or AddictingGames. How would I do this? I have one more question. I know these sites could run ...
3
votes
0answers
69 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 ...
0
votes
0answers
13 views

Android App Update not automatically installed on devices

I published my app update yesterday and users can manually update it on Google Play, but it should be installed automatically. Does this have anything to do with my certificate? I receive a warning ...
1
vote
2answers
84 views

How can I exclude my enemies from spawning in certain zones generated at random?

I have a code where I randomly generate enemy spawn position, but I want to exclude some areas since it's colliding with some sprites it shouldn't collide with. This is the code where I generate the ...
2
votes
1answer
35 views

Draw lines in game scene [closed]

I want to do game for Android that allows draw lines. These lines should be physic object at the same time. I am good at Unity3D and I tried in Unity3D. But it is not supported. What engine should I ...
0
votes
0answers
86 views

Setting Up A Visual Studio 2015 Android C++ Project To Utilise The SFML Library And compile On An Android Device

So in Visual Studio I have installed the cross platform tools to set up a C++ project for Android and iOS such as the Android SDK, NDK and the corresponding USB drivers required to debug the program ...