TAILIEUCHUNG - Lập trình Androi part 25

Đến nay, trọng tâm của cuốn sách này đã được mở trực tiếp về hoạt động của người sử dụng từ launcher của thiết bị. Đây là trường hợp rõ ràng nhất cho việc hoạt động của bạn lên và hiển thị cho người dùng. Và, trong nhiều trường hợp, nó là cách chính người sử dụng sẽ bắt đầu sử dụng ứng dụng của bạn | Chapter Creating Intent Filters Up to now the focus of this book has been on activities opened directly by the user from the device s launcher. This is the most obvious case for getting your activity up and visible to the user. And in many cases it is the primary way the user will start using your application. However the Android system is based on many loosely coupled components. The things that you might accomplish in a desktop GUI via dialog boxes child windows and the like are mostly supposed to be independent activities. While one activity will be special in that it shows up in the launcher the other activities all need to be reached somehow. The somehow is via intents. An intent is basically a message that you pass to Android saying Yo I want to Yeah How specific the something is depends on the situation. Sometimes you know exactly what you want to do . open one of your other activities and sometimes you don t. In the abstract Android is all about intents and receivers of those intents. So now let s dive into intents so we can create more complex applications while simultaneously being good Android citizens. What s Your Intent When Sir Tim Berners-Lee cooked up the Hypertext Transfer Protocol HTTP he set up a system of verbs plus addresses in the form of URLs. The address indicates a resource such as a web page graphic or server-side program. The verb indicates what should be done GET to retrieve it POST to send form data to it for processing and so on. Intents are similar in that they represent an action plus context. There are more actions and more components to the context with Android intents than there are with HTTP verbs and resources but the concept is the same. Just as a web browser knows how to process a verb URL pair Android knows how to find activities or other application logic that will handle a given intent. 171 CHAPTER 17 Creating Intent Filters Pieces of Intents The two most important pieces of an intent are the action and .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.