谁能解释一下UriMatcher(Android SDK)?

发布于 2024-08-24 15:52:45 字数 171 浏览 3 评论 0原文

我的任务是设计我的 Web 服务客户端代码以使用 Android SDK 中的实用程序类 UriMatcher。不幸的是,开发指南中的示例与我的想法无关。我知道我遗漏了一些功能的基本要点,可能还遗漏了有关 Uri 本身的一些基本要点。如果您可以将其绑定到一些可通过 HTTP POST 请求访问的 Web API,那就太理想了。

I have been tasked with designing my web services client code to use the utility class UriMatcher in the Android SDK. Unfortunately, the example in the Dev Guide does not relate to anything in my mind. I know I am missing some fundamental points to the functionality and possibly about Uri itself. If you can tie it to some web APIs that are accessible with HTTP POST request, that would be ideal.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

み零 2024-08-31 15:52:45

UriMatcher 是一个方便的类,它允许使用模式匹配进行多对一映射。它以列表式表示简化了设计沟通。数字分配允许插入、删除和重新排列模式而不影响匹配。当在 switch 语句中使用匹配作为“case”值时,这特别有用 - 处理逻辑不必更改。

UriMatcher is a convenience class that allows a many-to-one mapping by using pattern matching. It simplifies the design communication in a list-style representation. The numeric assignment allows one to insert, remove and rearrange patterns without effecting the match. This is especially useful when the match is used in a switch statement as the 'case' value -- the handling logic does not have to change.

雪化雨蝶 2024-08-31 15:52:45

我的任务是设计我的
Web 服务客户端代码使用
实用程序类 UriMatcher 中
Android SDK。

UriMatcher 和 Web 服务客户端的关系就像扫雪机和奶酪刨丝器一样。 UriMatcher 用于实现 ContentProvider,仅此而已。

I have been tasked with designing my
web services client code to use the
utility class UriMatcher in the
Android SDK.

UriMatcher and a Web services client are as related as a snowplow and a cheese grater. UriMatcher is used in implementing a ContentProvider, and little else.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文