use of de.schildbach.wallet.ui.InputParser.StreamInputParser in project bitcoin-wallet by bitcoin-wallet.
the class SendCoinsFragment method initStateFromIntentUri.
private void initStateFromIntentUri(final String mimeType, final Uri bitcoinUri) {
try {
final InputStream is = contentResolver.openInputStream(bitcoinUri);
new StreamInputParser(mimeType, is) {
@Override
protected void handlePaymentIntent(final PaymentIntent paymentIntent) {
updateStateFrom(paymentIntent);
}
@Override
protected void error(final int messageResId, final Object... messageArgs) {
dialog(activity, activityDismissListener, 0, messageResId, messageArgs);
}
}.parse();
} catch (final FileNotFoundException x) {
throw new RuntimeException(x);
}
}
Aggregations