creswick / StreamingQR

Apache License 2.0
2 stars 0 forks source link

integrate with zxing to do better intent generation on the receiver #44

Closed creswick closed 10 years ago

creswick commented 10 years ago

Imported from trac #44.

We should put the data into an intent if we can, and zxing does this already in many cases.

Reported by: @creswick

creswick commented 10 years ago

We should still generate intents that the receiving application can decode it.

Support for a few common notebooks (Keep, etc) would make for a good demo, at least.

donpdonp commented 10 years ago

a commit is in ticket-44 that checks for plain/text and puts the data into EXTRA_TEXT which should be picked up by regular editors. I've tested it with Keep.

creswick commented 10 years ago

On the transmitter, I'd like to send the subject (Intent.EXTRA_SUBJECT) across the qr stream, and decode it on the far side.

I think this can be handled in MainActivity on the transmitter side, and perhaps we should provide a parameter to the ReceiveFragment so that it can decode a Job and generate an Intent (rather than specifying that logic in DecodeThread).

There is also a point in MainActivity where strings are compared with == instead of .equals(...) -- that should be changed, or it may eventually fail. (It probably works now because of string externalization, and the use of constants).

creswick commented 10 years ago

Mime type:

If EXTRA_SUBJECT exists:

If only EXTRA_TEXT exists:

We could imagine adding more custom mime types for things with CC, TO, etc.. for email formats if we wanted.

donpdonp commented 10 years ago

the new mime type and json encoding are implemented in the receiver and sender. ready for review.

creswick commented 10 years ago

Looks good - merged with master.