dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.03k stars 1.73k forks source link

indexdb Creation Issues In MAUI Blazor (Android) #12016

Closed mALIk-sHAHId closed 1 year ago

mALIk-sHAHId commented 1 year ago

Description

Unable to create Indexd Inside MAUI Blazor App on Android Platform. My Indexdb Db working Fine in windows But In Android, It is not Creating Indexdb

Here is the Code

 // windowwindow.indexedDB = window.indexedDB || window.mozIndexedDB || window.webkitIndexedDB || window.msIndexedDB;  
            var request, db;    

            // Code for declare database and check browser capibility  
            if (!window.indexedDB) {  
                console.log("Your Browser does not support IndexedDB");  
            }  
            else {  
                request = window.indexedDB.open("testDBFinal", 25);  
                request.onerror = function (event) {  
                    console.log("Error opening DB", event);  
                }  
                request.onupgradeneeded = function (event) {  
                    console.log("Upgrading");  
                    db = event.target.result;  
                    var objectStore = db.createObjectStore("students", { keyPath: "rollNo", autoIncrement: true });  

                }  
                request.onsuccess = function (event) {  
                    console.log("Success opening DB");  
                    db = event.target.result;  

                }  
            }  

Version with bug

7.0 (current)

Last version that worked well

7.0 Release Candidate 2

Affected platforms

Android

Affected platform versions

Android 12

mALIk-sHAHId commented 1 year ago

Please delete this It's working fine