Comments (3)
When I use your code:
barcode.setFormat( PKBarcodeFormat.PKBarcodeFormatQR );
barcode.setMessage( "ABCDEFG" );
barcode.setMessageEncoding( Charset.forName( "utf-8" ) );
In pass.json file,I get the string:
..., "barcode":{"format":"PKBarcodeFormatQR","message":"ABCDEFG","messageEncoding":{"registered":true}}, ...
PassBook can't read pkpass file created with this string.
After update code, I'm using:
//barcode
barcode.setFormat( PKBarcodeFormat.PKBarcodeFormatQR );
barcode.setMessage( "ABCDEFG" );
barcode.setMessageEncoding( "UTF-8" );
And in pass.json file, I get the string:
...,"barcode":{"format":"PKBarcodeFormatQR","message":"ABCDEFG","messageEncoding":"UTF-8"},...
PassBook load pkpass file and read successful.
Is this help?
from jpasskit.
Hmm... Strange. This exact code is working fine when I execute it.
Which exact version of jPasskit are you using?
Changing it from java.nio.charset.Charset to a string is not an option as I want to use as many common java classes as possible.
from jpasskit.
Looks like Jackson isn't serializing the Charset class correctly.
I've tried to fix it by filtering all fields except the name attribute.
from jpasskit.
Related Issues (20)
- DepShield Deprecation Notice
- AppleWWDRCA.cer is expired, what certificate now? HOT 4
- Jackson needs to be updated to 2.15
- Missing release of jpasskit-parent on Maven Central HOT 3
- Using .p8 certificate HOT 4
- Dropping Java 8 support HOT 3
- Switch to gradle HOT 1
- FileNotFoundException in rest.ssl.keystore.path HOT 1
- I have a pkpass that doesn't open HOT 5
- `de.brendamour.jpasskit.signing.PKSigningUtil` is deprecated HOT 5
- Foreground color does not work if background image is set HOT 5
- How to add a QR code? HOT 1
- Create multiple passes at once HOT 4
- PKPassTemplateFolder - unable to load template path from .jar file HOT 1
- About PKPass and pass.json HOT 8
- Check if passes created already or not HOT 1
- Is it possible to set a message when using PKSendPushNotificationUtil.java HOT 2
- (Question) about sending push notification HOT 1
- known vulnerabilities in org.bouncycastle/[email protected] HOT 3
- Add warning when generating PKField with currencyCode HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jpasskit.