0

現在、Android 用の pkpass ライブラリに取り組んでいます。1点解らない点があります。AppleのPassKit Web Service Referenceには、自動更新のためにデバイスを登録する方法が指定されています。これは iOS デバイスでのみ動作するようです。

ただし、何らかの方法で自動更新に登録できる Android 用のアプリがいくつかあります。ウォレットパス | たとえば、 PassbookPass2U Wallet for Passbookです。

PassSource の APIを使用してデモ pkpass ファイルを作成しました。Web サイトでファイルを更新すると、それらのアプリは何らかの方法で通知され、ユーザーに通知が表示されます。

これは私が作成しようとしている動作ですが、どのパラメーターを使用してどの URL を呼び出すかは一生わかりません。

次の値の可能なすべての組み合わせを試しました。

POST request to: webServiceURL/version/devices/deviceLibraryIdentifier/registrations/passTypeIdentifier/serialNumber

Parameters

webServiceURL
The URL to your web service, as specified in the pass.
version
The protocol version—currently, v1.
deviceLibraryIdentifier
A unique identifier that is used to identify and authenticate this device in future requests.
passTypeIdentifier
The pass’s type, as specified in the pass.
serialNumber
The pass’s serial number, as specified in the pass.
Header

The Authorization header is supplied; its value is the word ApplePass, followed by a space, followed by the pass’s     authorization token as specified in the pass.

Payload

The POST payload is a JSON dictionary containing a single key and value:

pushToken
The push token that the server can use to send push notifications to this device.

アップルのドキュメントで指定されているとおりです。

また、 Walletpasses のドキュメントPass2U のドキュメントも勉強しました。

助けていただければ幸いです。

ありがとう!

4

0 に答える 0