android

Android MediaPlayer background playback

Created by: MediaPlayer mp = new MediaPlayer(); mp.setDataSource(FILENAME); mp.prepare(); Launched: mp.start Plays even whe ... lready running mp Question: how do I resume control of an already running mp in a newly opened Activity (after onDestroy ())?

The apk app doesn't install on your phone

Created the app in android studio, compiles, the connected phone accepts it, everything works. But if I transfer the apk file ... the apk file, it doesn't install "app not installed". What needs to be changed in the program itself or where to install it?

The apk file doesn't install on android

I built the application and transferred the file app-debug.apk to the device. When trying to install this file, it writes: ... tImplementation 'androidx.test.ext:junit:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' }

Android-Code Optimization

Hello! I display a background that will scroll slowly (as in Parallax Scrolling), the size of the scrollable image is 16k+ by ... p and made drawing without anti-aliasing, FPS increased from 3 to 14 on Chinese devices. But optimization is still required.

Change the text in Spinner when entering text from EditText

In the parent layout, I have a Spinner and an EditText. You need to make sure that when you enter text in EditText, the spinn ... changes the text to the one you are entering. What and where do I need to register for the implementation of such a feature?

Android studio doesn't see the genymotion device

Hello. Installed genymotion for android studio. But when you run the compilation, the virtual device does not appear in the list.

Menu button in android

Hello everyone. On a Nexus 5 smartphone, when you open some applications, another button is drawn to the right of the standar ... o implement it in the rest? I don't think I've ever seen anything like it. Usually the menu button is hung in the ActionBar.

Back arrow | Kotlin | Android

I have 2 activities. After switching from the first to the second, I want to display a back arrow in the AppBarLayout, which ... tivity. How do I do this? P. s: I need this because the back button toggles my menu, which is located in the activity itself.

Timer in the Android app

How do I make a timer in an android app? Simple to use java.util.Timer?

Determine the screen orientation

Please tell me (the answer is yes or no), whether it is possible to determine the orientation of the screen when it rotates, ... nfigurationChanged(Configuration newConfig) { Toast.makeText(this, getScreenOrientation(), Toast.LENGTH_SHORT).show(); }

How to make a mobile application in CSS, HTML, JS?

How to make a mobile application in CSS, HTML, JS? What programs are there? But there is no need for Kotlin, Flutter, React, but just these 3 languages can be done somehow?

How do I get the Device ID transmitted to the android market?

Questions about android. How do I get the Device ID transmitted to the android market? Here is a program showing the correc ... oid/DeviceInfo. One java file: http://pastebin.com/HBdMb0jZ See where the Account and Market ID are displayed, from line 77.

Where is the round app icon displayed in the backstack?

Where is the round icon (the Google icon in the picture) in Android Studio? I uploaded a custom icon in my app via Image Asset. Everywhere except this place, my icons are displayed, and here is a standard one with the head of an android.

Android resource linking failed error

According to the book Head First Android, I make a program, it gives an error, when you click on the error, it shows t ... R.id.color); String beerType = String.valueOf(color.getSelectedItem()); brands.setText(beerType); } }

Tell us how to create a messenger for Android-an application and a server part

I would like to create my own messenger as a practice. I looked at various articles, but they all suggested using Firebase ... y advice from experienced users P.S. some people advised to use Hasura GraphQL Engine, it turns out without the server part?

Specify the path to the folder

The user must specify the path to the file folder via the visual file manager. I found the following code. But this is not a ... e == RESULT_OK) { Uri uri = data.getData(); Toast.makeText(this, uri+"", Toast.LENGTH_SHORT).show(); } }

How can I access the camera's flashlight/flash in Android if the flashlight is not attached to this camera?

In the standard Camera app on your phone, you can turn on the flash/flashlight. However, when I try to do this in my app usin ... flash is turned on separately from the camera. Is there any other way to access this flashlight? Not via Camera or Camera2.

HttpURLConnection Request to the 1c web service with a login from android

I made a request to the 1c web service, it has an authorization window, how do I send my username and password along with th ... ection.setReadTimeout(1000); httpURLConnection.setConnectTimeout(1000); httpURLConnection.connect();

Upload an image from the server with authorization

I need to download images from the server and display them in my ListView. The code that loads the image: public class Downl ... y performed, and after it, the images are already loaded. If you use this code, then images are not loaded. What should I do?