Source code analysis of Binder native layer: sm's receiving and processing of data

We start with the main function of servicemanager main and binder & loop //\frameworks\native\cmds\servicemanager\service_manager.c int main() { struct binder_state *bs; bs = binder_open(128*1024); if (!bs) { ALOGE("failed to open binder driver\n"); return -1; } ...

Posted by x_maras on Sun, 02 Feb 2020 09:46:08 -0800

Basic usage of notification

notice Notification is a special function of Android system. When an application needs to send a reminder to users, it can be realized by notification. Most Android users like this function. Even IOS has added similar functions after version 5.0 1. You need a notification manager to manage notifications. You can call Content' ...

Posted by stbalaji2u on Sun, 26 Jan 2020 09:59:40 -0800

Android video seamless switching, using MediaPlayer and TextureView

Requirement description For example, when advertising is played, each video lasts for 15 seconds. When switching between videos, machines with poor performance may have a black screen for a period of time, and the experience is not good. Next, we need to solve the problem of black screen. Solution Two surfaceView modes are ...

Posted by josephicon on Thu, 02 Jan 2020 08:26:59 -0800

Android Studio learn to write English dictation app (music player) I

Recently, I fell in love with Android APP. I read some data and wrote while learning. It's just a hobby to pass the time. The tool is Android studio 3.0.1. In order to be lazy, I'm going to write a dictation APP for my children. The idea is to download the audio resource package from APP to SD card at that time. The APP plays an ...

Posted by gerardg on Thu, 19 Dec 2019 09:05:50 -0800

Audio playing one

I. simple audio playing [project preparation] ① a video file, the location of the video file ----- > create a new folder under res row ----- > put the video in the row folder ② generally speaking, audio playback does not need to stay in the interface all the time, so audio playback should be placed in the service, even if the inter ...

Posted by Stressed on Mon, 02 Dec 2019 10:33:27 -0800

Android implementation of music player [source code + Notes] - MediaPlayer

Design sketch: Before writing the code, I'll tell you a pit. When I implement this function, I encountered a pit when importing raw file, and I can't find this folder. If you also encounter this situation, please refer to a blog I wrote before to solve the problem: https://blog.csdn.net/qq_27494201/arti ...

Posted by maga2307 on Mon, 21 Oct 2019 11:41:12 -0700

android's manipulation of files under asset and raw

android's manipulation of files under asset and raw There are two kinds of resources in Android, one is compilable resource file under res. This resource file system automatically generates the ID of the resource file in R.Java, and the access is very simple. It only needs to call R.XXX.id. The secon ...

Posted by gmcalp on Mon, 07 Oct 2019 18:32:31 -0700

Android Media Player Replay Problem

Project needs to do a voice IM function, voice playback using MediaPlayer implementation, when a quick click on voice, an audio playback does not end, back and forth play, will reproduce the problem of repeat play, the following explains how to solve. private MediaPlayer mMediaPlayer; private File mLast ...

Posted by macastor on Sat, 05 Oct 2019 17:19:25 -0700

Android Music Play Mode Switching - External Play, Hearing, Earphone

Links to the original text: https://blog.csdn.net/u010936731/article/details/70599482/ Android Music Play Mode Switching - External Play, Hearing, Earphonehttps://blog.csdn.net/u010936731/article/details/70599482/ Scenario requirements In th ...

Posted by Jyotsna on Sat, 07 Sep 2019 05:03:51 -0700

Analysis of the Use of JNI in Android framework Layer

Reprint address: http://blog.csdn.net/yuanzeyao/article/details/42418977 JNI technology for many Java Developed friends believe that it is not unfamiliar, that is( Java native interface), the local call interface, has the following two main functions: 1. Calling C/C++ Layer Code in java Layer 2. C/C++ Layer Calls java Layer Code ...

Posted by dannau on Sat, 13 Jul 2019 11:31:24 -0700