Hi
I have Data is stored in local storage/local database and
1.Direct navigation (menu / button / link) → data fetches fine.
2. Create a URL and Pass this URL in QRCode and want to fetch Data → no data.Found
When i Replace Local Storage to Database and doing same logic so Data is fetch but my Requirement is fetch data from Local Storage
Thanks
Md Mansur
Hi Mansur,
Direct navigation (menu/button/link) → keeps you inside the same session/context, so your app can read local storage / local DB.
QR Code URL navigation → opens the app in a new browser tab / new app instance (depending on whether it’s Web or Mobile).
That means it’s treated like a fresh session.
If your data is only in local storage (client-side), the new app instance may not have it available yet.
I want to fetch data from local storage on this screen so what is the ways to fetch data instead of database
Hi @Md Mansur,
Workarounds
Include data in the URL / QR code parameters
When generating the QR code, include the needed data (or at least a key / token) in the URL. When the new instance opens, parse the URL, and then fetch from local store or server as needed.
Synchronize local storage on app startup / resume
When the app instance starts (launched via QR or URL), check if the needed data exists in local storage; if not, fetch from a server or fallback and write to local storage. Then the rest of the screens can use it.
Hello @Md Mansur
Local Storage in apps only works inside the app. When you navigate by menu or button, it stays in the app, so the data shows fine. But when you open a screen using a QR code URL, it opens in the browser, and browser local storage is different from the app’s local storage. That’s why no data appears.
If you want QR navigation to work, use deep linking inside the app or save the data in the server DB