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
27 views

How to reset an incremental achievement in Googles Android API?

For example the achievement is "Pass 5 levels in a row without failing" It's incremental and has five steps. If a user hits an obstacle, this achievements score should obviously be resetted to 0. ...
3
votes
1answer
408 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 ...
0
votes
0answers
130 views

Create Scoreboard using LibGDX table layout

I am trying to create a card game, which will contain following features. It will be a 6 player game. Each player contain set of cards, where each card contain some specific value After every round a ...
0
votes
0answers
24 views

LibGDX How to use Viewport correctly?

guys! I divided the screen into two parts using Viewport and now the game does not work correctly. The control buttons do not work all. If you click in some part of the screen (not on the control) -...
0
votes
1answer
80 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
0answers
31 views

How to handle touch when keyboard is open in unity?

I am trying to make a chat based game in Android using Unity. When my TouchScreenKeyboard is open and I try to click on submit button, it only closes keyboard and ...
0
votes
0answers
23 views

How can I change gradle version for api 27?

I get this error message: ...
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....
0
votes
0answers
307 views

Cannot build Android IL2CPP for Unity

Everything used to run fine until about 4-5 months ago. This week I've been stuck on this issue. I cannot even build empty apps. Here are the steps I've made: Create blank Unity project. Switch to ...
0
votes
0answers
121 views

Share screenshot in Android chooser from Unity 2D

I am trying to share a screenshot of my game on social media. I want to use the in-built Android share options. This fantastic blog gives instructions on how to do this, however it does not work. ...
0
votes
0answers
26 views

Firebase Cloud Messaging in Unity Android App

I'm trying to achieve the following behaviour for push notifications using Firebase Cloud Messaging for Unity in an Android app: If the app is in the foreground, handle it directly in the app (access ...
2
votes
2answers
200 views

How do Idle games progress while not active? [closed]

A hallmark of many idle games is the ability to still progress (or at least regain resources) while the game isn't active. The device can even be off. Initially I figured they just calculated ...
0
votes
0answers
52 views

How do I make my 3d cube move left and right with buttons in Unity with RigidBody.AddForce?

How do I make my 3d cube move left and right with buttons in Unity with RigidBody.AddForce()? I can't figure out how to do this in Unity! I'm trying to make my game ...
0
votes
1answer
2k views

Unity Build Failed - Duplicate Class

I'm here struggling for hours to build my game (android) and 'Execution failed for task : checkReleaseDuplicateClasses' ...
0
votes
0answers
19 views

How to debug shaders running on Android 4.x devices?

I have tried some of the existing inspectors such as RenderDoc and gapid, but none of them can be used with Android 4.x. Latest version of gapid requires Android 6.0 and RenderDoc requires Android 5.0....
8
votes
4answers
5k views

Mechanics to keep mobs and environment alive without using tons of memory?

I'm working on a server for a little mobile MMORPG. This consists mainly of two important features: mobs and environment resources like trees, rocks etc. The world is randomly generated and each time ...
0
votes
1answer
414 views

Unity app crashes when using unmodified custom Android manifest (didn't find class “UnityPlayerActivity”)

Note: I find/replaced my actual company name with 'companyname' below for anonymity, it's not the actual package name I am using. I have Unity 2018.4.11f1 LTS and the platform I'm having issues with ...
1
vote
1answer
907 views

using #if UNITY_EDITOR && !UNITY_ANDROID greys out the code

I'm trying to exclude part of my code when building(android) but keeping it while in the editor for testing purposes. Using #if UNITY_EDITOR only will result in ...
0
votes
0answers
35 views

How can I plug a Unity application into native Android and native iOS?

There are a lot of questions about running native Android and iOS code in Unity. I am trying to run Unity inside of native Android and native iOS apps. My problem is that I have two native apps, and ...
-1
votes
1answer
35 views

How do I implement a banner ad from MoPub in my Android Unity app?

I am new with Unity and everything and I have made a simple game. I wanted to put a MoPub banner ad on the game and I read this on their site. But I was wondering where should I put that code from the ...
0
votes
1answer
18 views

apk is fine, but when building aab for google play submission google play services dont start when i download it

So I have a game on app store, I added Google play services Now when I do an apk build and test it works great really happy with it. But when I then tick the box for aab ( this is what Google store ...
1
vote
1answer
112 views

SpriteBatch.Draw has Padding on Monogame.Android

I am using Monogame to create a small Android game. I am trying to draw a sprite to the Android screen but it seems to have a padding of some pixels. The same game works fine on desktop. How can I ...
1
vote
1answer
149 views

Load large quantities of data in Unity3D

I'm building an Android app using Unity3D where users can visualize data immersively. The data is immutable and stored using a MySQL database hosted on cPanel. When the user clicks a button in the ...
3
votes
2answers
104 views

Erase save file when the game gets force closed Unity C#

Im making an old school arcade for android where you have to get the highest score between levels. At each level you can save the progress. If you die and have 0 lives left your save file gets deleted....
2
votes
1answer
406 views

Navigating to android app settings > permission from unity

I am trying to rout from my unity application to android app settings permissions. till now I achieved to rout to app settings, But i want to take 1 step more to go inside permission i mean App ...
3
votes
2answers
2k views

How to get android permission call back in unity

I am using unity run time permission system and when i ask for specific permission at run time using this: Permission.RequestUserPermission("android.permission.WRITE_EXTERNAL_STORAGE"); then ...
0
votes
1answer
35 views

Can Mobile Games use Fragments instead of SurfaceViews?

All the tutorials of mobile games for android (such as this one), use the to display game objects. Most other applications tend to use an ...
0
votes
1answer
46 views

Does a thread in a mobile game serve the same purpose as a view model in a mobile application?

I'm trying to confirm up my understanding of the coding differences and similarities between mobile game design and mobile app design for Android devices using Java/Kotlin. ~~ ~~ ~~ In mobile app ...
0
votes
1answer
634 views

IAP consumable stuck with reason DuplicateTransaction

I've implemented Unity IAP. I have succesfully implemented it before and all went well. Now at the moment, everything goes well except for 1 consumable. When I try to purchase it, i get the ...
0
votes
1answer
213 views

Script Component not Being detected by Vuforia's Default Trackable Event Handler Script

I have a Script Component named Start inside a GameObject named StartSpawn and I am trying ...
0
votes
0answers
77 views

How to create a fog for baclgro6 which works on mobile devices?

There is a forum entry, which explains how to create a high based volumetric fog, using soft particles ( How can I create a height-based volumetric fog? ). Unfortunately it doesn't work on mobile ...
-1
votes
0answers
33 views

How can I convert Input.gyro.attitude into a float? [duplicate]

I am working on a VR project with a 360 video in it. I am trying to set the start rotation of the video to the same rotation as my phones. How can I convert ...
0
votes
1answer
565 views

Set the start orientation of the gyroscope to initial phone orientation

I am making a mobile VR project in Unity, and I have a 360-degree video that starts playing where I can look around using a VR headset. I am trying to set the start rotation of the video to the same ...
0
votes
1answer
139 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 ...
1
vote
0answers
272 views

Serverless Multiplayer

I wanted to make a game with a "serverless" mobile multiplayer game. The idea was to have devices connect to each other automatically when they are within range. There would be no global game state ...
2
votes
1answer
5k 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
votes
1answer
22 views

unity android sdk error

i am using unity 18.x. i downloaded the android sdk itself and the android studio also but they are not working,unity is not detecting the android sdk. if anyone succceed in exporting the apk ...
0
votes
1answer
50 views

Selling Android game with using Google Play Games

I'm making an Android Game that using Google Play Games for authentication, and storing user data to cloud. Originally I planned this game as free, and put some in-app-purchasement stuffs in it, but ...
5
votes
1answer
244 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
0answers
65 views

CopperCube game engine Android export failed

I am using CopperCube 6.0.2 to develop my game. I am able to export my game to exe and webgl format, but when I try to export it to .apk format it says: aapt tool .exe missing error I downloaded ...
0
votes
1answer
22 views

How can I provide a csv file to a player on mobile?

It seems many people do this with regards to game data so they recommend userprefs, but I just want the user to have the file in the end, whether this is the Files app on iOS or choosing a folder to ...
0
votes
1answer
99 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 ...
0
votes
0answers
66 views

Is there a way to reference Unity UI object inside native code?

Let's say we have a scene in Unity with canvas and InputField on it. Is there a way i can reference my InputField inside native plugin? Maybe i can pass it from Unity?
1
vote
1answer
1k views

Show/hide soft-keyboard on demand

I'm writing simple chat-app using Unity. The problem with Unity's default implementation of soft-keyboard visibility is that it hides itself when i'm clicking outside of keyboard panel. What i want is ...
2
votes
1answer
2k views

Gradle Build Error Unity 2019.1.6

I found out that unity has deprecated the internal build system and has defaulted to gradle. I've not built with the gradle build system before, and now after upgrading to unity 2019.1 full version, I ...
0
votes
0answers
67 views

Optimizing large number of ModelRenderable cubes with ARCore?

I am creating an ARCore Android app that involves rendering up to thousands of cubes, of course using a Node and ModelRenderable object for each. Understandably, I'm unable to do that without running ...
0
votes
1answer
72 views

Libgdx - accelerating string displaying

My renderBoard is slow and it's because of font.draw function. I read that I should use stringBuilder instead of string, but it didn't help at all. I suppose I'm using it wrong. Could you guide me to ...
0
votes
1answer
665 views

“Unfortunately game has stopped” error on Android device

In Unity 2018.4.3f1, I am able to build my APK successfully, but when I try to launch it on my mobile device, it shows: "Unfortunately game has stopped". I don't know the problem is. Here are the ...
0
votes
1answer
282 views

How do I debug Azure Spatial Anchors with Unity on an Android device?

I've been building an AR app that's already been a pain to debug, because instant preview refuses to work over wifi and usb debugging causes the phone camera to not display on the phone itself. Now I'...
1
vote
1answer
441 views

How to set up Azure Spatial Anchors with Unity Android project?

I'm building an AR app in which I wish to use Microsoft's Azure and it's web service Spatial Anchors. I cannot seem to get the sample demo, which I downloaded from https://github.com/Azure/azure-...

1 2
3
4 5
45