教学文库网 - 权威文档分享云平台
您的当前位置:首页 > 精品文档 > 实用模板 >

基于安卓的聊天App的设计与实现毕业论文(17)

来源:网络收集 时间:2026-08-23
导读: There are separate methods for activating each type of component: The Manifest File Before the Android system can start an application component, the system must know that the component exists by rea

There are separate methods for activating each type of component: The Manifest File

Before the Android system can start an application component, the system must know that the component exists by reading the application's AndroidManifest.xml file (the \the root of the application project directory.

The manifest does a number of things in addition to declaring the application's components, such as:

Identify any user permissions the application requires, such as Internet access or read-access to the user's contacts.

Declare the minimum API Level required by the application, based on which APIs the application uses.

Declare hardware and software features used or required by the application, such as a camera, bluetooth services, or a multitouch screen.

API libraries the application needs to be linked against (other than the Android framework APIs), such as the Google Maps library.

Declaring component capabilities

- 40 -

安徽工程大学毕业设计(论文)

As discussed above, in Activating Components, you can use an Intent to start activities, services, and broadcast receivers. You can do so by explicitly naming the target component (using the component class name) in the intent. However, the real power of intents lies in the concept of intent actions. With intent actions, you simply describe the type of action you want to perform (and optionally, the data upon which you’d like to perform the action) and allow the system to find a component on the device that can perform the action and start it. If there are multiple components that can perform the action described by the intent, then the user selects which one to use.

The way the system identifies the components that can respond to an intent is by comparing the intent received to the intent filters provided in the manifest file of other applications on the device.

When you declare a component in your application's manifest, you can optionally include intent filters that declare the capabilities of the component so it can respond to intents from other applications. You can declare an intent filter for your component by adding an element as a child of the component's declaration element.

For example, an email application with an activity for composing a new email might declare an intent filter in its manifest entry to respond to \intents (in order to send email). An activity in your application can then create an intent with the “send” action (ACTION_SEND), which the system matches to the email application’s “send” activity and launches it when you invoke the intent with startActivity().

For more about creating intent filters, see the Intents and Intent Filters document. Declaring application requirements

There are a variety of devices powered by Android and not all of them provide the same features and capabilities. In order to prevent your application from being installed on devices that lack features needed by your application, it's important that you clearly define a profile for the types of devices your application supports by declaring device and software requirements in your manifest file. Most of these declarations are informational only and the system does not read them, but external services such as Google Play do read them in order to provide filtering for users when they search for applications from their device.

For example, if your application requires a camera and uses APIs introduced in Android 2.1 (API Level 7), you should declare these as requirements in your manifest file. That way, devices that do not have a camera and have an Android version lower than 2.1 cannot install your application from Google Play.

However, you can also declare that your application uses the camera, but does not require it. In that case, your application must perform a check at runtime to determine if the device has a camera and disable any features that use the camera if one is not available.

Here are some of the important device characteristics that you should consider as you design and develop your application:

Screen size and density

In order to categorize devices by their screen type, Android defines two characteristics for each device: screen size (the physical dimensions of the screen) and screen density (the physical density of the pixels on the screen, or dpi—dots per inch). To simplify all the different types of screen configurations, the Android system generalizes them into select groups that make them easier to target.

- 41 -

姚旭斌:安卓聊天室App的设计与实现

The screen sizes are: small, normal, large, and extra large. The screen densities are: low density, medium density, high density, and extra high density.

By default, your application is compatible with all screen sizes and densities, because the Android system makes the appropriate adjustments to your UI layout and image resources. However, you should create specialized layouts for certain screen sizes and provide specialized images for certain densities, using alternative layout resources, and by declaring in your manifest exactly which screen sizes your application supports with the element.

译文

什么是Android?

Android是一个用于移动设备的软件,包括操作系统,中间件和关键应用程序栈。 Android SDK 提供必要的工具和API在Android平台上开始使用Java编程语言开发应用

应用框架

通过提供一个开放的开发平台,为Android的开发人员提供了极其丰富和创新应用能力扩展。开发商考虑到设备的硬件优势,访问位置信息,后台服务,集报警,运行状态栏添加通知等。开发者具有完全访问核心应用程序架构,旨在简化组件重写应用。同样的机制允许组件被用户替换。

所有应用程序的背后,是一套服务和系统,包括:

一组丰富的可扩展的系统,可以用来建立一个应用程序,包括列表,网格,文本框,按钮,甚至可嵌入网页浏览器,提供内容访问数据,从其他应用程序(如通讯录)共享 …… 此处隐藏:6062字,全部文档内容请下载后查看。喜欢就下载吧 ……

基于安卓的聊天App的设计与实现毕业论文(17).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印
本文链接:https://www.jiaowen.net/wendang/519401.html(转载请注明文章来源)
Copyright © 2020-2025 教文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ:78024566 邮箱:78024566@qq.com
苏ICP备19068818号-2
Top
× 游客快捷下载通道(下载后可以自由复制和排版)
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能出现无法下载或内容有问题,请联系客服协助您处理。
× 常见问题(客服时间:周一到周五 9:30-18:00)