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
1
vote
1answer
1k views

Using AdMob with Games that use Open GLES

Can anyone help me integrating Admob to my game. I've used the badlogic framework by MarioZencher ... and My game is like the SuperJumper. I am unable to use AdMob after a lot of my attempts. I am new ...
0
votes
1answer
751 views

How do I implement swipe-to-throw in Andengine?

I have a ball sprite and I apply physics to it when the user swipes on it. I'd like the ball to start moving in the direction of the swipe, similarly to how Paper Toss works. How can I do this?
1
vote
1answer
1k views

Change game from portrait to landscape dynamically

I have multiple classes that implement Screen. I want to, say, have the Main Menu screen portrait, then the Play Screen ...
0
votes
0answers
43 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 ...
2
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: ...
-1
votes
1answer
21 views

Unity Build Failed - Duplicate Class

I'm here struggling for hours to build my game (android) and 'Execution failed for task : checkReleaseDuplicateClasses' ...
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
0answers
12 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....
12
votes
8answers
8k views

Converting a 2D curve into points for data storage

I’ve created an algorithm which converts any curve i.e. path into minimum number of points so that I can save it into a file or database. The method is simple: it moves three points in equal steps ...
0
votes
1answer
20 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 ...
3
votes
2answers
91 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....
0
votes
1answer
28 views

using #if UNITY_EDITOR && !UNITY_ANDROID greys out the code. (UNITY)

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 this code getting build, but using #...
0
votes
0answers
21 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 ...
0
votes
1answer
15 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
81 views

How to get collision area within a circle in libgdx

I have a ball inside of a multi-colored circle, the ball will hit the inner area of the circle like this bellow circle image And the Circle will be rotated clockwise or anti-clockwise based on user ...
0
votes
1answer
45 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 ...
1
vote
1answer
58 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 ...
0
votes
0answers
15 views

vector image is pixelates in game view

I imported a .PNG file at 1920 X 1080 resolution but it is pixelated in game view. I also tried as a .SVG file but it also gives same result. How can I fix it?
0
votes
2answers
54 views
1
vote
1answer
72 views

Textures in build duplicated, despite they're packed into atlases

I have a simple SpriteAtlas: "UIAtlas" which is located in the Resources folder. It points to a folder "UIAtlas" which contains ...
0
votes
1answer
9 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 ...
0
votes
0answers
98 views

How to encode captured RGBA frames with H.264/H.265 (NV Codec SDK/AMD AMF)?

I have a desktop application that captures the content of the screen. The result are DirectX 11 2D textures with RGBA8 format. My goal is to stream that captured content to a mobile device with ...
0
votes
1answer
73 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 ...
0
votes
0answers
16 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
1answer
871 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 ...
2
votes
1answer
9k views

libgdx setOrigin and setPosition not working as expected? [closed]

I create a camera: camera = new OrthographicCamera(5.0f, 5.0f * h/w); Create a sprite: ...
0
votes
1answer
33 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
2answers
81 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 ...
2
votes
0answers
24 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 ...
0
votes
1answer
33 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
37 views

OpenGL ES, object intersection artifacts

I was developing a C++ implementation of OpenGL for Android and I noticed those weird artifacts that formed between 2 intersecting objects (or triangles) : [Here are the artifacts on Android] The ...
0
votes
1answer
1k views

Adding Google IAP License Key into Unity Games

I have added Google Play Services and AdMob successfully into my app. But I want an in-app purchase button that lets you remove the adverts. (I have the button already but not the billing). Google ...
0
votes
1answer
37 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 ...
12
votes
3answers
42k views

Number of Impressions on Admob for Revenue [closed]

Just curious for a rough estimate; how many impressions would it take to make 300 dollars, a day, in ad revenue?
0
votes
1answer
250 views

AndroidManifest file was deleted by accident

I deleted the AndroidManifest file of my project which was located in Assets\Plugins\Android , so I tried creating new project and copying the Assets and everything but it seems that something is ...
0
votes
0answers
19 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 ...
2
votes
2answers
3k views

Transparency in GLSurfaceView

I'm new in game development. I have a view using GLSurfaceview and call in MainActivity. I want to make transparent that view. ...
0
votes
1answer
71 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 ...
-1
votes
0answers
30 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 ...
3
votes
2answers
3k views

How do I combine the Android UI buttons with libGDX?

I want to combine the Android UI with libGDX. I want to have half of my screen drawing an animated sprite with the libGDX engine, and the other half of the screen drawing Android UI buttons. How do ...
5
votes
1answer
128 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'...
2
votes
1answer
10k views

How to do offline notifications for Android in Unity3d

I am making a game for Android with Unity3d. I've been looking for a solution to this on the web for a little, but I couldn't find anything suitable: I want to make my game have offline notifications....
1
vote
3answers
145 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 ...
0
votes
2answers
1k views
2
votes
2answers
317 views

draw two models changing the MVP matrix (android opengl)

I'm newbie with opengl2 in android, and I'm making an app in which I'm testing some things. Now I was trying to duplicate a sphere object with a texture, so I thought it was enough to change my MVP ...
4
votes
2answers
1k 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
480 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
1k 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 ...
3
votes
1answer
148 views

How do you support different VR platforms?

I created an Android app for Gear VR in Java (using the GearVR framework) that I now want to port to Unity, so it can also be used for Microsoft's semi-new Mixed Reality headsets (for Windows; not ...
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 ...