[英]How do I get the generated domain name for local URL's for a Windows 8 app?
I have a Windows 8 app that downloads the online assets, unzips them into the LocalState
folder, and accesses that content when the user is offline. 我有一个Windows 8应用程序,该应用程序下载在线资产,将其解压缩到
LocalState
文件夹中,并在用户脱机时访问该内容。 I use a custom IUriStreamResolver
to provide the content. 我使用自定义
IUriStreamResolver
提供内容。 The local URL might look like this: 本地URL可能如下所示:
ms-local-stream://package-name_application-key/.../.../
The part I'm after is the application-key
. 我需要的部分是
application-key
。 While the package-name
is in the Package.appmanifest
, the application-key
is not. 当
package-name
位于Package.appmanifest
, application-key
不存在。 I've also verified the package-key
is not part of the LocalState
path. 我还验证了
package-key
不属于LocalState
路径。 I'm wanting to use WebView.BuildLocalStreamUri
and it requires the contentIdentifier
, this is documented as the concatenation of the package-name
and application-key
. 我想使用
WebView.BuildLocalStreamUri
,它需要contentIdentifier
,这被记录为package-name
和application-key
的串联。
I've done quite a bit of digging through the API's via the Object Browser, and of course I've pretty much exhausted Google and DuckDuckGo (love that search engine BTW), and they've not provided any fruit. 我已经通过对象浏览器对API进行了相当多的挖掘,当然我已经用尽了Google和DuckDuckGo(喜欢BTW的搜索引擎),并且他们没有提供任何成果。
Does anybody know how I can get at that key the app generates and uses for this? 有人知道我如何获得应用程序为此生成和使用的密钥吗?
Apparently it doesn't actually matter what the value is. 显然,什么值实际上并不重要。 It has no bearing on the URL that is formed.
它与所形成的URL没有关系。 I wanted to answer this for the next person trying to use this method.
我想回答下一个尝试使用此方法的人。 It just cannot be
null
or an empty string
. 它不能为
null
或空string
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.