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.

Filter by
Sorted by
Tagged with
0
votes
1answer
30 views

How Do I Separate Dragging My Finger On Joystick And Swiping?

I am currently making a 2D top-down view shooter game for Android, where the game is played horizontally. On the left side of the screen, you can touch anywhere to spawn in a joystick and aim by ...
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 ...
1
vote
1answer
400 views

Is attribution sufficient for CC BY-SA 3.0-licenced music in a commercial mobile game?

I am in the process of developing a mobile game that I intend to sell on Google Play. I want to include a music licensed as: Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0) If I attribute the ...
1
vote
0answers
618 views

Drawing game app: How to use vector graphics instead of bitmap in Android?

I have a problem concerning the concept of using vector graphics instead of bitmaps in order to draw on canvas. Usually to draw on canvas we set a bitmap to that canvas and we start drawing pixels on ...
-3
votes
1answer
126 views

Getting the message get is playing is not allowed to play from a monobehaviour constructor

So I suddenly started getting this error when building apks http://imgur.com/a/Y5BWf most of the times unity ends up building a half sized apk that wont even run on mobile. Also at the end of the ...
2
votes
2answers
6k views

Set-up Android SDK path to make Android remote work in Unity

I am using the Unity 2019.1.12. If I go to Edit > Preferences... > External Tools it says that the Android SDK Tools Installed with Unity (recommended). Now I downloaded the Unity Remote 5 to my ...
1
vote
1answer
47 views

How can I obtain the file size of a Unity build at runtime?

I'm wondering if it is possible to obtain the filesize of a game's build at runtime. Searching this topic only yields results for reducing the build size, which is not at all what I'm looking for.
0
votes
2answers
254 views

How to check if a specific instance of a prefab is pressed?

This one is hard to explain, so I'll show the code first - ...
0
votes
0answers
30 views

Framerate drop from 160 to 56-59 when upgrading Unity to 2020

I just updated to Unity 2020.2 from Unity 2019.4. I use Ubuntu 2020.10. Everything is super fast but the framerate is less than 60 FPS, precisely between 56 and 59 FPS, for all my Android project. ...
0
votes
0answers
95 views

Android - Canvas.drawBitmap gives an awful performance

I am using SurfaceView for my game and I am loading all of the bitmaps that are the right size for the screen (pre-scaled in mipmap folder) into a class when the game starts. And I am drawing the ...
0
votes
1answer
1k views

What is a good approach to dynamically change actor Position?

In my card game there are 2 players with each player having a hand(a ListArray of of Cards.In this case its ...
1
vote
2answers
633 views

Problem with animating in Android, using batcher.draw in LibGDX

I am having a problem with the last part of the GameRenderer class. I call batcher.draw() and receive this error: The method ...
0
votes
1answer
180 views

Graphic render speed in libgdx using many sprite sheets

I am currently working on a customizable Player-character for my top down view 2D pixel game. I am using libgdx and aiming for android devices as well as desktop applications. I am wondering about an ...
0
votes
1answer
98 views

Unity's Android Notification system works on my Xiaomi, but on a Huawei every notification has an “Unknown” status?

When my app starts I check whether there is a notification or not if there isn't I create one via SendNotification(...) if there is, I check their status: ...
0
votes
1answer
108 views

Persisting unlocked characters in Player Prefs

I am working on a character selection menu in Unity. If you have enough coins, you can buy your desired character. Once player buys one, that character must not be locked on game restart, the number ...
0
votes
0answers
21 views

How to integrate Firebase to Libgdx?

I have an android game built with libgdx and what I'd like to do is to add some kind of authentication so I can connect the game with user data to firebase database. I have some experience with ...
4
votes
3answers
7k views

Android multitouch: How to detect movement on non-primary pointer / finger?

How does one go about detecting a secondary/non-primary finger moving? There is: ACTION_DOWN and ACTION_UP to detect a primary finger pressing the screen / leaving the screen ACTION_POINTER_DOWN ...
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 ...
22
votes
4answers
11k 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 ...
0
votes
1answer
25 views

Why does Ads (Rewarded Video or Intersititals) in games skips when you press home and tap on games icon in Android?

I have stumbled upon an issue wherein Android when I play rewarded video or any interstitial and do following steps: In the middle of a video Ad I press the home button Resume back from background ...
0
votes
1answer
32 views

Start Position & Move Step Problem Swipe Motion Mobile Unity C#

i am currently trying left & right, up & down swipe motion in unity C#. I have done the scripting, it all working, but after i debug the script, the object's position suddenly changed to a ...
0
votes
1answer
39 views

Positioning ropes equidistantly on a landscape display

I would like to render 4 similar ropes in my game that are equidistant on a landscape mode display. How can I proceed? My screen is 1920*1080, at 420 dpi. Is there any way that I could link the ...
4
votes
1answer
7k views

Google Play 3rd Party Payment Allowed?

Does Google allow 3rd party payment solutions to be enabled in developers' apps (i.e., Paypal, carrier/SMS payment), especially in countries where Google Checkout isn't present? Or does this violate ...
1
vote
0answers
33 views

ADMOB: Why my match rate never increase?

I have a game deployed in the store, here are some app and admob metrics: It makes ~120k requests per day It have ~800 active devices in the last 30 days It have less than 1% match rate(~0.3%) Some ...
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'...
0
votes
2answers
2k views
1
vote
3answers
231 views

C# class works in Unity, but not in Android build

I am using Unity to program a simple Android game in C#. Right now, all the game does is to randomly load one of 196 flags upon startup (view: https://hastebin.com/suxonayoce.cs or code below). This ...
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 ...
0
votes
1answer
521 views

How to implement a Trail using Cocos2dx

I'd like to implement a trail (like the white circles in Angry Birds) that chase my sprite. I already used CCMotionStreak, but the trail texture is "stretched" instead. Anyone has an idea how to make ...
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
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 ...
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 ...
2
votes
2answers
2k views

Share Image on Android Application from Unity Game

I've captured screenshot in my game when player dies. I've following code to capture screen shot. ...
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: ...
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 ...
0
votes
1answer
1k views

resize images in libgdx

I know how to set Image width and height using pixel coords. Is there a way to set relative coords? I want to deal with multiple screens. For example i have 1920x1080 screen size. And i have relative ...
0
votes
1answer
142 views

Play games services leaderboard does not work all the time

I am trying to login into play services. I got it working. But there were duplicate game objects created. So I added do not destroy on load and now the play services work the first time I access it. ...
2
votes
1answer
2k views

Creating SurfaceView cause short screen blink

When I create SurfaceView for first time since app launch, the app screen blinks black for small time (about 1/4 second). It blinks over UI, so its really visible ...
0
votes
2answers
6k views

Put layout over Surfaceview

I have this problem: I'm trying to create new RelativeLayout over whole screen - which also contains SurfaceView in the middle - ...
0
votes
1answer
74 views

Libgdx, button onclick event crashes

I'm trying to create an android game using libgdx with a Titlescreen, you just press start and your game startes. However I'm having difficulty trying to get these buttons to work. The titlescreen ...
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? ...
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/...
1
vote
1answer
187 views

How to insert animation into table?

I'm having trouble inserting animation into my libGDX table cell. I have a class which holds 2 tables, one on the left and one on the right. First table is for labels/buttons/other stuff. Second table ...
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 ...
0
votes
1answer
549 views

How to know if mouse coordinates is delta or absolute on Window and Android in Unity?

I wrote sample application, that allows to "rotate" object by mouse. Rotation occured by rotating of camera object around central object and the code is following: ...
0
votes
3answers
2k views

How best to detect device performance capabilities and set quality setting accordingly when using Unity

I am developing a Mobile game for Android and iOS on Unity. Currently Im in the optimisation stage of development and trying to work out what is the best way to detect device capabilities, with the ...
0
votes
0answers
52 views

Internet Access is always set to required in unity android player settings

I am using unity 2019.4.2f1, I want to remove the internet access permission from the final android manifest file created by unity but, because this option is locked I am not able to remove the ...
0
votes
0answers
45 views

Input.GetKeyDown not working while Unity Remote is running?

I have this simple code: void Update() { if (Input.GetKeyDown(KeyCode.Escape)) { Debug.Log("Escape"); } } When I test it... In the ...
0
votes
1answer
199 views

Libgdx can't read .ttf file when running Android configuration

Firstly, I am aware that a similar question was asked some time ago that went unanswered. Currently, it has multiple upvotes but no answer. The error ...
0
votes
1answer
101 views

Multiple Bitmaps in Rectangle area

I am trying to build a card based game in which a card is added to player after every round. To win the match player has to remove all cards from his deck. However I have also drawn some additional ...

1
2 3 4 5
44