(turn) talking about the cross-application communication mechanism of mobile operating system

Source: Internet
Author: User

[Core Tip] It's still a headache for developers to implement cross-application communication on IOS. How is this problem handled for IOS rivals? This paper discusses the cross-application communication mechanism of the main mobile operating system at present.

In the "Silos of application communication--ios" article, we have discussed the challenges of cross-app communication and content sharing on IOS. And until now, it's still a headache to want to achieve cross-app communication and content sharing on iOS, although we've been able to share it via Twitter, email, and SMS with the integrated sharing features of iOS, but this feature has not yet been opened to third-party developers, The user's choice is quite limited, and while using the URL scheme mechanism, developers can achieve a simple cross-application sharing, but on the one hand this mechanism can achieve limited functionality (opening an application interface, sending text messages, prompting the user to enter content, etc.), and through this mechanism to send information to third-party applications, The original application will be closed, can not guarantee the user's consistent operation, on the other hand, this is not an application of the standard features, many applications do not have a good support, so even if there are like Launch Center Pro, Draft so skillfully exploit and extend the URL Scheme, Third-party applications that are shared across applications, but are still largely limited in their versatility.

So how does this problem work for IOS rivals? "

Android's Intent mechanism

A typical Android application typically contains multiple components, the biggest feature of which is that the components are not tightly coupled to the application itself, as IOS does, and an application can open its own internal components or directly invoke the relevant components provided by other applications. By defining a file, an app can register its own components and the data it can handle to the system, which provides the foundation for Android's cross-app information and even the sharing of features-app Intent.

App Intent is a flexible set of data transfer and invocation methods, an application A can either call a specific application component directly or send a share request to the system. In the latter case, the system will filter out the components that can handle the request, based on the type of data sent, from the component information registered by all installed applications, presented to the user as a list, the user chooses the most appropriate application B according to their needs, and then the data is sent from app A to app B, processed in the background, or actually go to application B's corresponding functional component interface. Thanks to the Android multitasking feature, the original program A does not exit when invoking the external application's function module, and the user can easily return to the app state before sharing by returning the key.

Windows 8 (with Windows Phone 8?) ) The contract mechanism

For another mobile platform-Microsoft's Windows Phone, in the era of Windows phone 7, it is very similar to IOS, supporting only a limited number of shared channels built into the system. But as Windows Phone 8 is about to adopt the same system architecture as Windows 8 RT, we may be able to see trends in the future of the entire Windows platform from the system sharing mechanism of Windows 8, which is now complete.

In the "Metro" interface of Windows 8, when users swipe in from the right side of the screen (or move the mouse to the right corner of the screen), they will find their new features-the Charm sidebar. This sidebar contains several features that users often use: Back to Home page, settings, search, device, share, the sharing, search, device, settings, and so on are actually a broad cross-application sharing. For Windows 8, which uses the sandbox mechanism, like IOS, this feature is implemented through a mechanism called contract (so-called contract, which refers to a standard communication format between different "Metro" style apps in Windows, Applications that send requests and applications that receive requests can declare the type of data they send and receive separately to the system, and the data is delivered by the system based on the different scenarios and user choices. )

Specific to the cross-app sharing feature covered in this article, when an app A's Charm sharing feature is activated and wants to communicate with other apps, it creates a standard packet based on shared contract criteria (which can contain various data types such as text, links, pictures, files, etc.) and send it to the system , the system lists the applications that can handle the data based on the type of source data, and when the user selects a specific application B, the system passes the packet to application B for the corresponding data operation. In this process, there is no direct interaction between application A sending the request and application B that handles the request, and the ability to communicate across applications is achieved with the requirement of sandboxed security.

Chaos of IOS

In contrast, IOS has a clear flaw in this area, so that many developers in order to solve the user's needs, in their own application to embed the common application of sharing features (such as Evernote, Instapaper, Pocket, etc.), independent browser capabilities. The integration of Twitter from IOS 5 has made it clear that these tasks should be the work of the system. Although it is now confirmed that the upcoming release of IOS 6 next month will formally increase the integration of the Facebook service, but in the huge App Store app, only Apple alone can not really solve the user's limited choice of sharing, the operation experience is poor. The presence of a common sharing API will address many of the current user's use problems with IOS (no longer need to sign in to Evernote account separately in each separate reading app for sharing, no more hassle in adding bookmark scripts to Mobile Safari to send articles later read ...) And developers can liberate themselves from these trivial chores and focus on more creative ideas.

As shown in Windows 8, it is also possible to gracefully implement communication challenges across applications in a closed system. But will Apple provide a generic API? From the current beta version of IOS 6, the integration of system communication and sharing functionality remains Apple's leading first-party behavior. And given that Apple's published Mountain Lion, the Share menu feature of one of the so-called back-to-MAC features is not open to third-party apps, it's not optimistic about the prospect that Apple might loosen its grip on more closed iOS.

Of course, this is only a prediction, whether Apple will be at the end of the developers and users to surprise, please look forward to the September Apple new product launch.

Unless specifically stated, the Geek observation is the original report of the Geek Park, please indicate the author and the original link.

Original address: http://www.geekpark.net/read/view/163012

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.