Questions tagged [android]

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

351 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
8
votes
2answers
1k views

Libgdx black rectangles problem

I'm working on a game for Android using Android Studio with LibGDX in Java. I recently found a weird problem when closing and reopening the game. When I first open the game, it works fine. If I click ...
7
votes
3answers
2k views

Counting multiple touches using Cocos2dx 3.2

I'm trying to count the number of active touches in screen in order to perform an an action in case that there are two touches: ...
6
votes
1answer
468 views

On Android, How can I avoid FPS drops during sensor listener setup/tear down?

When I open my Android app after 5 or 10 seconds it sets up the sensor listener, during which I see clear stuttering and the FPS drops for a second to 40 instead of 60. Is there a way to avoid this? ...
6
votes
2answers
672 views

Android libGDX FreeTypeFontGenerator exception

I am working on a libGDX project for Android. Since I added the following code, running the game on my Android phone produces an exception: ...
5
votes
1answer
311 views

Interpolating between positions unfeasible at 30 frames per second?

I am working on a 3D platformer in Unity and I am targeting Android devices. The game consists of a lot of objects smoothly interpolating from the bottom of the screen to the top. This whole time I'...
5
votes
2answers
381 views

Weird shader behavior on different devices

I'm trying to combine an ordinary shader with a Single Distance Field shader (for fonts and scalable icons) into one shader program. The idea is simple - if uv.x is less than 1.0, it is drawn as ...
5
votes
1answer
1k views

How to delete Google Play Services?

I want to delete Google Play Services in the Google Play Developer Console, but I can't. Here is what I did: I published my game to Google Play without Google Play Services. I decided that I want ...
5
votes
1answer
2k views

Unity Capture And Display Live Camera Feed

I want to display the video using the device camera on specific part of the screen on iOS, android and Editor. I was able to find the WebCamTexture which display the camera video on the Quad (3D ...
5
votes
1answer
155 views

transfer 3d model processing from Xna to Android?

I developed an XNA scenario in a desktop application and I need to make the same scenario in an Android app so I need to process data on the desktop computer and just display it in Android app using ...
5
votes
1answer
1k views

LibGDX: Is it necessary to set a stage as an input processor when creating a touchpad?

I mean, I've been searching it, they always use set a stage as an input processor after they had added the Touchpadto the Stage ...
5
votes
1answer
445 views

How to clip or mask entity in android/andengine?

I want to implement masking with sprite in Andengine. I want same functionality as in ios class called SKCropNode which works like an masking node! Is there any workaround like this in andengine/...
5
votes
1answer
1k views

libGDX using Stage and Actor produces different camera angles on desktop and Android Phone

libGDX using Stage and Actor produces different camera angles on desktop and Android Phone. Here are pictures demonstrating the problem: http://brandonyuh.minus.com/mFpdTSgN17VUq On the desktop ...
5
votes
1answer
181 views

Fixing the size?

My app isn't compatible with all screen sizes. When testing on a small size, my textview overlaps with my button. So, as suggested on the Android Documentation, and many stack overflow pages, I ...
4
votes
0answers
83 views

Is the C or the Android code a problem?

Starting to write a game, it'll have a C server, and at the very least an Android client. However I have run into an issue where I can't seem to get them to connect. I have thrown debug logging into ...
4
votes
0answers
78 views

How to test Google Play Multiplayer locally

I'm building a simple HTML5 game and I need to implement multiplayer without sharing the game on Google Play. I'm using CocoonJS's multiplayer api. How can I test Google Play Multiplayer locally? Do ...
4
votes
1answer
250 views

LibGdx animation sequence

In my game the character movement animations work fine but now I'm trying to do a sequence of programmatic animations, for an enemy character, and it's proving to be a pain. I'm just doing it on ...
4
votes
1answer
192 views

android - How Do I Replace A Scene in Cocos2D

I am using Cocos2D for Android: I have two scenes MainScene and LogoScene. I want to show a Splash screen on ...
4
votes
2answers
2k views

Libgdx Scene2D Table background not showing up

I am using Libgdx's Scene2D API to build my UI and everything has been working as expected until now. I created a Skin and a ...
4
votes
0answers
703 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 ...
4
votes
1answer
633 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 ...
4
votes
0answers
1k 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 ...
4
votes
1answer
473 views

Scene2d Stage Actor setup issues

I am creating a game using libgdx. In the same each level has a class. I have stage as a member variable of the class. To this stage, I add actors. Inside the levels class, I have attaced the input ...
3
votes
0answers
314 views

How to Invite Facebook Users to a Unity Game for Android

I am currently using the following code to let the player invite other players to my multiplayer game: FB.AppRequest("Test Message", callback: this.HandleResult); ...
3
votes
0answers
348 views

What is causing a SIGSEGV in mono_class_vtable_full in Unity for Android?

I'm a developer of a mobile game, and we have Crashlytics in our game. For the latest release for Android, we are having crash reports with the following stack trace, for a number of players: ...
3
votes
1answer
121 views

How to find the ideal path done inside a given shape in LibGDX?

I'm trying to make an android/libgdx game in which for every level you have a different shape as a png, and you have to drag your finger inside the shape and try to be as close as the ideal path ...
3
votes
0answers
129 views

How can I fix this shadow slicing the mesh on Android?

I have a golf ball in my Unity game for Android, which is an icosphere (imported from blender) with a baked normal map. There are 18 tracks located in one level around the (0, 0) coordinate, rotated ...
3
votes
0answers
219 views

Android LibGDX 1.9.6 Augmented Reality captured images are black

Using LibGDX for an AR application and capturing image and merging lines and texts on LibGDX with image with this code. ...
3
votes
0answers
253 views

Android game crashes when attempting to start wifi hotspots

I have two methods that will try to start the WiFi hotspot on the android device so that others can connect and play the game.the problem is both method have problems and don't work. the first method: ...
3
votes
1answer
1k views

Resize Label automatically with the text content in LibGDX?

In LibGDX, I want to add some long text content to several Labels. I'm creating those labels in a loop, and the text content is different in each iteration. I want the ...
3
votes
0answers
509 views

Build includes sprite packer atlas and its original textures

I use Unity's Sprite Packer, it's working great. However, when I looked at the build report (in the Editor.log) it turns out that the build often includes the generated atlas texture and its original ...
3
votes
0answers
2k views

Speech recognition in Unity 5 for Android

I've been working on a game in which the player have to say particular words to perform various tasks. For example, if the player says "boat", a boat pops up in the game. The game I'm building is ...
3
votes
0answers
411 views

Making use of the Android GPU debugging tools

I tried following the manual to install the Android GPU debugging tools for android Studio 2.0. Unfortunately it has not been very successful. I have been following the instructions of the official ...
3
votes
0answers
186 views

How to implement app indexing plugin, by using Prime31 UnityPlayerActivity?

I am implementing the App indexing plugin, using Prime 31 UnityPlayerActivity which is implemented by overriding Androinds onCreate, onStop methods etc, but when I use this keyword in onCreate method ...
3
votes
0answers
513 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 ...
3
votes
0answers
60 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 ...
3
votes
0answers
1k 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 ...
3
votes
0answers
168 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 ...
3
votes
1answer
470 views

Cannot draw around the screen after zooming out with LibGDX projection coordinate

I've just started developing game in android using LibGDX. I've follow some samples and now my simple game can draw path when user move their finger around the screen. now problems appear when i add ...
3
votes
1answer
2k 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: ...
3
votes
1answer
607 views

How do I set up the microphone for an Android device in Unity?

I'm developing a simple android app that needs to use the microphone. I'm able to load my app on my Android phone using developer mode, but I do not understand how to enable the mic. How can I enable ...
2
votes
0answers
17 views

Building multiple android apps via script does not trigger Resolving Android Dependencies

I have a Unity Project which builds a number of smartphone android apps Anytime I need to build an app I have a script (SetupApp) that move a bunch of assets in the Resources folder and changes the ...
2
votes
0answers
209 views

How can I use an inherited Activity in C#?

I am using Unity. I want to set the status bar to be permanent in opaque black. I set Start in Full Screen Mode in the Player Settings to ...
2
votes
0answers
23 views

What is the right way to implement a loading screen in cocos2d-js?

We have two scenes that are loaded with heavy computation; a map screen and a puzzle screen. When we change the scene from A to B, the app gets stuck on scene A for a while before it renders scene B. ...
2
votes
0answers
408 views

How do I edit a Unity InputField by clicking on Android UI Button?

I have been stuck on this problem for a long time and not sure what I need to do. Would appreciate any help. I am building an Android app using Unity. In my app I ...
2
votes
0answers
32 views

My unity game fails to open in my mobile

I'm new to Unity, and want to make a android game. I made a very simple scene: A sphere A cube (floor) A simple script that moves the sphere by touch. I tried it with unity remote and it works fine....
2
votes
0answers
268 views

How to add AdMob to Libgdx in 2018?

I found this article here: https://github.com/libgdx/libgdx/wiki/Admob-in-libgdx But it's from September 2017, and since then Android and Android Studio have been updated. How can I add AdMob to my ...
2
votes
0answers
4k views

Play Protect Doesn't recognize this app's developer

I am a game developer. This message is displayed when installing my game. what is this? and how to solve this problem?
2
votes
0answers
398 views

Error: Cannot create FMOD::Sound instance for resource sharedassets0.resource when splitting application binary in Unity

I'm trying to publish an Unity app to the PlayStore. Since the size of the app is over the limit of 100MB, I need to split the binary. So I selected the option Split Application Binary in Unity. ...
2
votes
0answers
180 views

Bilinear filtering by sampling corners of a texel

I'm trying to do bilinear filtering in texels to get the convoluted value of a 3x3 block. Implemented as below: offsetx = 1/width offsety = 1/height Fragment ...
2
votes
0answers
125 views

Fixed timestep periodical “lags”

I have fixed timestep code in my main thread, it looks like this: ...

1
2 3 4 5
8