Android - evaluate device performance in app/game - java

I just started using libgdx to develop android games and i'm currently developing a game which would adjust the quantity and/or quality of the enemies/animations/drops/etc shown in the screen, depending on how many the device supports.
Some devices may be faster and support a greater amount of enemies, but others may begin to lag and i wanted to prevent that by disabling some options of the game, without any user interaction.
But i'm facing a problem: i don't know how to evaluate the device RAM, GPU, etc. and even if i did, i don't know how many enemies i can have given the device specifications.
Is there any way to estimate how many enemies/animations/drops/etc i can have for a device?

Related

Get the number of "tap" on a locked smartwatch screen

I'm doing a school project as a team, but none of us have never developed or even worn smartwatches.
We want to get the number of "tap" on a smartwatch's locked screen but we don't find out if that's possible.
Do you know a way to get the number of "tap" on a locked smartwatch screen?
If this is not possible, can we display a constant notification and retrieve the number of "tap" on this notification?
I'm using a Moto 360 with Android 6.0.1 and Android Wear 1.4.0.
Thank you in advance.
I would advise everyone on the team get a chance to the use watch just to understand the user experience. Watches are very battery limited devices and will always try to go into low power mode as often as possible.
Do you know a way to get the number of "tap" on a locked smartwatch screen?
Tapping normally wakes up watch, either from full screen off or lower power ambient mode. If you want to capture taps/button press you can create a watch app which when active will receive taps/button presses. I'm not quite sure if watch face can capture taps, and if it did it my guess would be after the watch face is fully on, but that would be another place to look.
If this is not possible, can we display a constant notification and retrieve the number of "tap" on this notification?
Custom watch face can allow display of custom content. Alternatively as a watch app you can show what you want.
Additional Comments
The Moto 360 came out in 2014 and was one of first Android Wear watches available. The latest code samples & codelabs from Google are for Wear OS 2.0. You can look back in the commit history for old versions of samples which may be more compatible with Android Wear 1.4
Also from this Android Wear Notice May 2015 always on apps became possible so that might work for your project/use case.

Would multiple touches at a fast speed and at the same time crash an android app?

For my android app, I want to make a simple game which would be either 2 player or 4 player. The game requires that all the players compete against each other in real time. If 2 players are present, 3 touches at around the same time, if 4 players 6 touches at the same time. Would this much load crash the app?
This wont crash the application.
The touch information captured will be limited to the ability of the phones hardware just like keyboard strokes. On PC if it's under stress then the main machine can retrieve the stokes from registers after few times. I have an old phone that when in stress if typing shows nothing and after it loads its resources it retrieves touch information and shows the information on screen.
You didn't mention if its on the same phone screen, Then you must have specify the portion of screen for each individual but thats not a good idea as it's small. So the option is make it network based.
In that case just don't call a value before the value is present.
And you will be fine to experiment and be succeed.

Find users near your position

I'm looking for a way to find users in a certain radius of your position.
The reason I need this is because I want to know how many people there are in an area.
A possible way I found is to activate the bluetooth and find active devices around.
I want to know if there are other solutions, API, possibilities to do this.
There was talk of peer to peer wifi connections, but not sure the status. Would give you some more distance than bluetooth. There is also a library
Can Android do peer-to-peer ad-hoc networking?
there is also a library from qualcomm
https://developer.qualcomm.com/develop/mobile-technologies/peer-peer-alljoyn/faq
Your best bet would probably be with searching for bluetooth devices.
Most phones have a class 2 bluetooth radio which is generally rated at a range of 10 m, but it can very greatly on the environment (for example, you would notice significant packet loss transmitting through even a small amount of water, such as in a person.) On the other side of the coin, the radio could detect devices up to 100 m away if there were nothing but air between the two devices.
The main problem with this is that you would have to require bluetooth to be active, which a lot of users might not have by default.

Android flash vs Java

I've been thinkin about games on android and was thinking - isn't it EASIER to make a game in flash than in android using Java with android SDK ? I've only experience with Flash/AS3 and it's quite easy to create user interface, animations, layout and to write scripts.
As of Flash CS3 there are motion detection objects, so we can create really interactive games.
However I've not seen any flash game related for a phone( I mean with orientation and so ). Is there something I am missing like flash too slow on a android enabled phone?
This applies to applications too. I would like to hear opinions about Flash vs Android :)
you can create game in flash and adobe air will convert it in apk. adobeAir is version where you can create any game and just 2 or 3 step that convert it in apk.so you can publish it or play it in your android phone
Flash is not supported on Android 2.1 and lower, and some manufacturers no longer provide software updates for their older devices. I think Flash will also probably be slower (which may not be an issue if your game isn't very computation/graphics heavy) and consume more battery. It also doesn't take advantage of multi-core processors right now, but that may change in the future.
On the other hand, if you write your game in Java for Android, you will be limited to one platform.
As a compromise, you could try something like Haxe, which allows you to compile your code into flash, Java and C++, among others.

How to get power usage for an app?

I have a program collecting wifi, acceleration, scan bluetooth and sometimes communicate with server. Does anybody know how to get power usage(voltage, current and power) of each component and the power usage of overall system?
There is no API for this in the Android SDK.
You can purchase a Qualcomm MDP device with the Trepn power profiler. This costs 1,000 USD, last I looked.
You can also try PowerTutor. I have not experimented with this yet but plan to in the coming months.
Or, you can examine the output from the Settings battery screen, if your app is showing up there.

Categories

Resources