- 安卓没有main函数这一说,安卓有生命周期的概念,即处于Activity的不同生命周期状态,会进入与之对应的回调函数,执行相应的操作。
- 了解 Activity 生命周期: https://developer.android.google.cn/guide/components/activities/activity-lifecycle?hl=zh-cn
生命周期回调包括: onCreate()
onStart()
onResume()
onPause()
onStop()
onDestroy()
- GLSurfaceView
在Android开发中使用OpenGL,需要implement的接口:(三个回调函数)
-
onSurfaceCreated()
: 窗口创建 -
onSurfaceChanged()
: 窗口size发生变换 -
⭐
onDrawFrame()
: 渲染每一帧 -
Intent 和 Intent 过滤器: https://developer.android.google.cn/guide/components/intents-filters?hl=zh-cn
-
安卓按钮: https://developer.android.com/guide/topics/ui/controls/button?hl=zh-cn
-
安卓Bitmap: https://developer.android.com/reference/android/graphics/Bitmap
-
安卓NDK bitmap: https://developer.android.com/ndk/reference/group/bitmap
#include <bitmap.h>
int AndroidBitmap_lockPixels(
JNIEnv *env,
jobject jbitmap,
void **addrPtr
)
int AndroidBitmap_unlockPixels(
JNIEnv *env,
jobject jbitmap
)
- 安卓逆向工程: https://github.com/iBotPeaches/Apktool
- APKTool: https://apktool.org/
- 安卓SurfaceView: https://developer.android.com/reference/android/view/SurfaceView
- 数据和文件存储:https://developer.android.com/training/data-storage?hl=zh-cn
Android 日志
android.util.Log
- 安卓Log: https://developer.android.com/reference/android/util/Log
- Logcat: https://developer.android.com/studio/debug/am-logcat?hl=zh-cn
安卓Log的优先级排序:
- 错误 ERROR 6
- 警告 WARN 5
- 信息 INFO 4
- 调试 DEBUG 3
- 详细程度 Verbose 2