Is it possible to embed URL in Apple passes in such a way that when scanned, they redirect to that URL? I want to POST information to an API when the barcode/QR code gets scanned.
I have replicated this requirement and I am succesfully able to embed an URL inside the barcode of an Apple Wallet Pass. Below are the steps I followed,
So all you have to do is just enter the url value as a string,
Encode exactly the text of the URL in the barcode: "https://www.passsource.com/info/". Include the protocol ("http://", here) to ensure it is recognized as a URL.
In my Java code, I am using a open source Java library to generate the Apple wallet pass which is Jpasskit. I have entered the set message with the url string value and encoded as below,
barcode.setMessage("https://www.passsource.com/info/");
barcode.setMessageEncoding(Charset.forName("utf-8"));
List<PKBarcode> barcodeList = new ArrayList<PKBarcode>();
barcodeList.add(barcode);
pass.setBarcodes(barcodeList);
After generating the Apple Pass, the bar code will be diplayed similar to the below image in the bottom of the pass
Scan the barcode using a qr code reader and it will display the message as below asking permission to open the URL in a browser,
Once you click "Open in Browser" option, it will neatly opened in the mobile browser sunch as chrome.
Related
I have QR code made by firebase dynamic link (short URL) which will redirect to the App Store/Play Store directly to download the app and read the deep link query parameters when launching the app for the first time. That works well as expected.
But, The situation is, if I scan the same QR code within the app, Simply I want just query parameters passed in the deep-link URL or long URL which contains all that I want.
Any inputs? Thanks in advance!
Actually I also experienced like your problem.
QR code reader can not parse query parameters passed in the deep-link long URL.
[Before]
http://xxx.page.link/?link=https://www.google.com/doodles/
But if you use url encoded parameter, QR code can read that long deep link.
[After]
http://xxx.page.link/?link=https%3A%2F%2Fwww.google.com%2Fdoodles%2F
Is it possible to make sure that (deep) links don't open a new browser window?
Use case would be e.g. QR Codes or NFC tags that contain some kind of identifier along with a URL/deep link URL.
e.g. www.example.com/mypwa/game=ID
The idea in this case would be that an asset linked to ID would become available in the app.
When you want to do that repeatedly, currently both Chrome on Android and Safari on iOS (as Standard Browser) open a new tab for each tapped NFC tag, confusing the user.
Is it possible for a PWA to check if it is already running in another tab, and if yes, take over the URL parameter (ID) and work with it ?
I'm looking for recommendations for an iOS barcode scanner app. Specifically for iPad which will support a custom URL callback to enable the app to be launched from a web browser.
Additionally, it needs to support and a custom search URL which will send the user back to the website once the barcode has been decoded into a URN (SKU).
I have discovered ZBar which is an excellent app, unfortunately it doesn't support custom URL callback and it's designed for the iPhone.
Another app pic2shop PRO seems to tick these boxes, but it's relatively expensive at £10.49 and the setup will require somewhere in the region of 200 installs.
I did a similar project using the free version of pic2shop . The thing is that the free version can read only these types of barcodes : UPC-A, UPC-E, EAN-13, EAN-8 , according to the documentation of the app.
Pic2shop is a free barcode scanner app available for iOS® and Android®. It reads UPC-A, UPC-E, EAN-13, EAN-8 and QR codes. The app also display comparison shopping results for UPC and EAN.
From my personal experience, I can say that it scans and decodes the barcode very fast and very accurate.
In my project the app is launched from a webpage, it works for both android and ios. In order to get it working you have to invoke the pic2shop app from a url and then set your callback address. You will find the decoded barcode data as a value to a parameter in the callback url. To help you more, you can get those values using this javascript function found here.
For example:
<input type=button OnClick="scan();" value="Scan Barcode">
<script>
function scan(){
window.location="pic2shop://scan?callback=http://yourwebsiteurl.com/index.html?barcode=ean"
}
</script>
As soon as the item is successfully scanned it will redirect you to the callback url with the actual barcode number as a value to a parameter. For example http://yourwebsiteurl.com/index.html?barcode=5123548745123. I already told you how to get the value of a url parameter with javascript.
PDF417.mobi Pro barcode scanner app supports that use case.
Note: I'm a developer on that project.
Basically, the app can be launched from any other app, including a web application, when url in the form: pdf417://scan?type=PDF417,UPCA&callback=myscheme://myaction is launched.
The app then scans the barcode, in multiple formats, (PDF417 and UPCA in this example), until the result is obtained.
Then, the app opens the URL myscheme://myaction. In your case, this can be your web service, http://www.somemyscanner.com/service.
Specifically, it will open the URL using format: http://www.somemyscanner.com/service?data=[data]&type=[type].
You can then use those parameters to implement your desired functionalities.
I tried the PDF417 app and it is EXTREMELY expensive (for an app - $28) and does not work. I bought it anyway because I am trying to solve the same issue and I can tell you it is not the solution for general barcode scanning.
It might work with pdf417 barcodes, but those are few and far between and I haven't been able to get it to work. I definately does not support any standard barcode formats. It also has no settings panel (in settings) and the tap target in the app that should be settings just take you to the company web site.
I am still testing other apps but haven't found any app that does what you ask, Red Laser used to but it no longer has that functionality.
Is it possible to create a browser extension which can change where the user is taken?
I.E. If the user puts in a certain prefix or symbol the browser will not attempt to go to the address supposedly determined by the rest of the string or search Google, etc. for the rest of the string?
E.G. YT:sdfs232 would resolve to http://www.youtube.com/watch?v=sdfs232. I'm not specifically looking to do that, it's just an example.
You don't need a new extension or Greasemonkey to do this. Firefox has had this capability for a long time.
Just use a bookmark keyword search.
For example, create a new bookmark:
Press CtrlShiftB to open the bookmark library.
Right-click wherever you want it, and select New Bookmark....
Fill in the Name: Youtube.
Fill in the Location: http://www.youtube.com/watch?v=%s
Note the %s.
Fill in the Keyword: YT.
Fill in the Description: Handy direct shortcut to a video ID.
Give it tags, if you wish.
Click the Add button.
Now you have a handy flexible shortcut.
Test this one by entering YT dQw4w9WgXcQ into the address bar.
See the article for more information.
What your looking for is called a URL Scheme. http, ftp, ssl are all URL Schemes and you can define your own on any platform you want.
This is possible, and is used quite a lot by for example by IPhone apps to launch another iphone app from a browser window when the user clicks on a link. Thats how the iphone jumps from safari to itunes app.
More details here including most common schemes http://en.wikipedia.org/wiki/URI_scheme
This link gives basic info on registering a scheme on windows
http://msdn.microsoft.com/en-us/library/ie/aa767914(v=vs.85).aspx
Ususally they are used to open a seperate application though rather than simply a differnt url, but you could do what you want with a plugin.
I can launch my app if I embed a url in an SMS and then the user clicks on the url from within the message app. I have this all working.
What I would like to be able to do however is send an MMS to the device which contains a number of image(s) and text filling the screen and when the user clicks on the url within the MMS my app is launched same as it is if clicked from within an SMS.
Is it possible to mock this up so I can see it working? i.e. how could I create an MMS containing a working active link to demo a proof of concept (I'm not talking about creating an MMS programatically on iOS, just how to create one containing my app's url to send to the device)?
Edit: This answer was written under the assumption that implementation details were required for the URL handling part. I'll leave the technical details here for future Googlers.
Here is a link to a forum thread which seems to indicate you can't send MMSes from the iPhone programmatically (I know you said you didn't want to know this anyway, but it's here for completeness). The suggestion is to use a message provider's MMS gateway directly (e.g http://www.smsglobal.com).
Instructions on how to get a hyperlink into an MMS are here. You can just write it in plain text, or use an anchor: <a href="myapp://"> Not 100% sure the iPhone will properly parse those anchor tags in an MMS though.
Read this article. The gist is that you add a "URL types" row to your Info.plist and set it to any valid protocol, say myapp, and then a user opens a link in an MMS to a myapp URL. Article excerpt:
myapp://
myapp://some/path/here
myapp://?foo=1&bar=2
myapp://some/path/here?foo=1&bar=2
The iPhone SDK, when launching the application in response to any of the URLs above, will send a message to the UIApplicationDelegate.
If you want to provide a custom handler, simply provide an implementation for the message in your delegate. For example:
- (BOOL)application:(UIApplication *)application handleOpenURL:(NSURL *)url
{
// Do something with the url here
}