The Future of Card Magic is Digital
You’ve just performed the perfect classic card trick: a spectator selects a card, keeps it secret, and you’re ready for the big reveal. But instead of fumbling through your deck, you pull out your phone, launch your QR code app, and hand it to them. “Scan this,” you say. “Yesterday, I had a strange feeling… that your card would be chosen.” They scan the code, open the dedicated webpage that pops up, and there it is: their chosen card, staring back at them from the screen. Forget the deck—the future of impossible prediction is now woven into the digital world.
As readers of my posts will know, I have been exploring creating my own Android apps using AI and Cordova.
Apache Cordova is a genius system that lets me build full mobile apps for any platform—whether it’s Android or iOS—without having to learn complex native languages. It simply wraps up basic web files (HTML, CSS, and JavaScript) and turns them into an installable app that can access the phone’s native features like the camera or GPS using special bridges called plugins.
The best part? I don’t need to know HTML, CSS, or JavaScript at a deep level. The AI does all the heavy lifting. My process is now simplified to just a few steps: first, I install the Cordova tools. Then, I give a conversational prompt to the AI, such as: “Create the code for a simple one-page app with a blue background and a button that, when clicked, opens the camera.” The AI generates the required web files, I drop them into the Cordova project folder, and then I use a single command like cordova build android. The AI does the coding; I just handle the assembly and deployment. It’s app creation without the coding headache.
For this app I wanted a QR code that would open a page on my website and reveal the card they selected. I wanted it to work with any card selected. Otherwise it is trivial. Have a web page that says “Queen of Diamonds” and force the “Queen of Diamonds”. I wanted more flexibility.
I started with just an app to generate a QR code that opens a browser to a web page. I told the AI that I wanted a setup page that let me change the web page address to anything I needed. Here is the actual prompt I entered in:
Using cordova, can you create an android app that has a setup page that takes a url, and then displays the qr code for that address.
The AI system I use then created all of the files and gave me detailed instructions on how to take them and build the project on my desktop and once built how to deploy it to my phone.

Above is the app that the AI created. The gear icon opens the setup:

Now I do have my own web site and understand how to create web pages and server-side code. So next I asked for three things.
- A card reveal page that read a file on my site that had the card information
- A server side program that the QR page could send the name of the selected card to
- To modify the QR code app so that I could secretly and easily code the selected card to send.
The reveal page: reveal.html

This was entirely created by the AI. I just had to save the file and upload it to my server. When it opens it reads a file on my server that has the card name.
The server-side code: upload.php
This is behind the scenes. The QR code app simply calls this url passing the name of the selected card. This page then writes the name of the card into the file that reveal.html reads.
QR code: where it all happens
I asked the AI to modify the QR code by adding an invisible grid on top of the QR code. If visible it would look like:

There are two steps to encoding a card, first encode the suit by touching one of the four corners of the QR code. Then encode the value by touching the correct value. When the value is encoded the app sends the information to the web server and voila the spectator can scan the code to see the web page.
Conclusión
What I like about developing these for my own use is that I can tweak them over time. As I use an App, I can quickly make changes to make the app more useful. In this case I actually reused some features from another app I had AI develop. This app reveals a chosen card in a Sketchpad app. I plan on write a post on that app soon.
If you are interested in writing your own personal apps feel free to reach out to me.
