Android 开发笔记——introduction
Application Fundamentals
一 How an Android app exists within the system
1. 每一个APP都有一个独立的 linux ID
2. 每个APP独立运行。
条件:1.系统设置了APP权限
2.每个进程拥有独立的虚拟机(VM)
3.如何获取其他APP的数据
方法1:使用同一linux ID
方法2:获得访问权限
二 App Components
1.Activities
An activity represents a single screen with a user interface.
2.Services
A service is a component that runs in the background to perform long-running operations or to perform work for remote processes. A service does not provide a user interface.
3. Content provider
A content provider manages a shared set of app data. You can store the data in the file system, an SQLite database, on the web, or any other persistent storage location your app can access. Through the content provider, other apps can query or even modify the data (if the content provider allows it).
4. Broadcast receiver
A broadcast receiver is a component that responds to system-wide broadcast announcements.
_________________________________分割线——————————————————————
重要的句子
1.A unique aspect of the Android system design is that any app can start another app’s component
2., to activate a component in another app, you must deliver a message to the system that specifies your intent to start a particular component. The system then activates the component for you.
Device Compatibility
1.为不同的设备提供良好的交互
To facilitate your effort toward that goal, Android provides a dynamic app framework in which you can provide configuration-specific app resources in static files (such as different XML layouts for different screen sizes). Android then loads the appropriate resources based on the current device configuration.
2.Compatibility(兼容性)
一. Device features
Not every device supports every feature, so you may need to control your app's availability to devices based on your app's required features.
a.种类
(1)device compatibility
(2)app compatibility
b.不兼容情况(设备和APP可以互相嫌弃)
In order for you to manage your app’s availability based on device features, Android defines feature IDs for any hardware or software feature that may not be available on all devices.
Google Play Store compares the features your app requires to the features available on each user's device to determine whether your app is compatible with each device. If the device does not provide all the features your app requires, the user cannot install your app.
如何声明“嫌弃”
If necessary, you can prevent users from installing your app when their devices don't provide a given feature by declaring it with a <uses-feature> element in your app's manifest file.
二. Platform version
三. Screen configuration
a.种类
(1)the physical size of the screen
Four generalized sizes(广义大小): small, normal, large, and xlarge
(2)(the physical density of the pixels(像素密度) on the screen, known as DPI)
several generalized densities(广义密度): mdpi (medium), hdpi (hdpi), xhdpi (extra high), xxhdpi (extra-extra high), and others.
your app is compatible with all screen sizes and densities, because the system makes the appropriate adjustments to your UI layout and image resources as necessary for each screen.
一 How an Android app exists within the system
1. 每一个APP都有一个独立的 linux ID
2. 每个APP独立运行。
条件:1.系统设置了APP权限
2.每个进程拥有独立的虚拟机(VM)
3.如何获取其他APP的数据
方法1:使用同一linux ID
方法2:获得访问权限
二 App Components
1.Activities
An activity represents a single screen with a user interface.
2.Services
A service is a component that runs in the background to perform long-running operations or to perform work for remote processes. A service does not provide a user interface.
3. Content provider
A content provider manages a shared set of app data. You can store the data in the file system, an SQLite database, on the web, or any other persistent storage location your app can access. Through the content provider, other apps can query or even modify the data (if the content provider allows it).
4. Broadcast receiver
A broadcast receiver is a component that responds to system-wide broadcast announcements.
_________________________________分割线——————————————————————
重要的句子
1.A unique aspect of the Android system design is that any app can start another app’s component
2., to activate a component in another app, you must deliver a message to the system that specifies your intent to start a particular component. The system then activates the component for you.
Device Compatibility
1.为不同的设备提供良好的交互
To facilitate your effort toward that goal, Android provides a dynamic app framework in which you can provide configuration-specific app resources in static files (such as different XML layouts for different screen sizes). Android then loads the appropriate resources based on the current device configuration.
2.Compatibility(兼容性)
一. Device features
Not every device supports every feature, so you may need to control your app's availability to devices based on your app's required features.
a.种类
(1)device compatibility
(2)app compatibility
b.不兼容情况(设备和APP可以互相嫌弃)
In order for you to manage your app’s availability based on device features, Android defines feature IDs for any hardware or software feature that may not be available on all devices.
Google Play Store compares the features your app requires to the features available on each user's device to determine whether your app is compatible with each device. If the device does not provide all the features your app requires, the user cannot install your app.
如何声明“嫌弃”
If necessary, you can prevent users from installing your app when their devices don't provide a given feature by declaring it with a <uses-feature> element in your app's manifest file.
二. Platform version
三. Screen configuration
a.种类
(1)the physical size of the screen
Four generalized sizes(广义大小): small, normal, large, and xlarge
(2)(the physical density of the pixels(像素密度) on the screen, known as DPI)
several generalized densities(广义密度): mdpi (medium), hdpi (hdpi), xhdpi (extra high), xxhdpi (extra-extra high), and others.
your app is compatible with all screen sizes and densities, because the system makes the appropriate adjustments to your UI layout and image resources as necessary for each screen.
还没人赞这篇日记