<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Firebase DB Connection in Integration, Extension &amp; APIs</title>
    <link>https://community.qlik.com/t5/Integration-Extension-APIs/Firebase-DB-Connection/m-p/1677904#M12364</link>
    <description>&lt;P&gt;Hi,&lt;BR /&gt;I am trying to build an extension that sends data from its input fields to firebase db.&lt;BR /&gt;First i created a simple web app which seems to work fine, but when i integrated it to qliksense it doesnt send data to db instead it gives error "firebase not defined" in the console.&lt;BR /&gt;I dont understand what the problem is...&lt;BR /&gt;does qlik sense require some seprate connection to firebase db?&lt;BR /&gt;if yes then how?&lt;BR /&gt;&lt;BR /&gt;This is my code:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;div qv-extension style="height: 100%; position: relative; overflow: auto;" class="ng-scope"&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;lt;!-- The core Firebase JS SDK is always required and must be listed first --&amp;gt;&lt;BR /&gt;&amp;lt;script src="&lt;A target="_blank" rel="noopener"&gt;https://www.gstatic.com/firebasejs/7.8.2/firebase-app.js"&amp;gt;&amp;lt;/script&lt;/A&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;lt;!--use this one for database--&amp;gt;&lt;BR /&gt;&amp;lt;script src="&lt;A target="_blank" rel="noopener"&gt;https://www.gstatic.com/firebasejs/7.7.0/firebase-database.js"&amp;gt;&amp;lt;/script&lt;/A&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;!-- TODO: Add SDKs for Firebase products that you want to use&lt;BR /&gt;&lt;A href="https://firebase.google.com/docs/web/setup#available-libraries" target="_blank" rel="noopener"&gt;https://firebase.google.com/docs/web/setup#available-libraries&lt;/A&gt; --&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;script&amp;gt;&lt;BR /&gt;// Your web app's Firebase configuration&lt;BR /&gt;var firebaseConfig = {&lt;BR /&gt;apiKey: "AIzaSyA2Jv7TFnIoLu032LJVaYNkU9Bw3VFCWpw",&lt;BR /&gt;authDomain: "test-82f1f.firebaseapp.com",&lt;BR /&gt;databaseURL: "&lt;A href="https://test-82f1f.firebaseio.com" target="_blank" rel="noopener"&gt;https://test-82f1f.firebaseio.com&lt;/A&gt;",&lt;BR /&gt;projectId: "test-82f1f",&lt;BR /&gt;storageBucket: "test-82f1f.appspot.com",&lt;BR /&gt;messagingSenderId: "858992366066",&lt;BR /&gt;appId: "1:858992366066:web:cd4d98dba75327d1cddb6b"&lt;BR /&gt;};&lt;BR /&gt;// Initialize Firebase&lt;BR /&gt;firebase.initializeApp(firebaseConfig);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;function sendData() {&lt;BR /&gt;firebase.database().ref("User").set({&lt;/P&gt;&lt;P&gt;name: document.getElementById('namefield').value,&lt;BR /&gt;age: document.getElementById('agefield').value&lt;/P&gt;&lt;P&gt;});&lt;BR /&gt;getData();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;function getData() {&lt;BR /&gt;firebase.database().ref('/').once('value', function(snapshot){&lt;BR /&gt;snapshot.forEach(function(childSnapshot){&lt;BR /&gt;var childKey = childSnapshot.key;&lt;BR /&gt;var childData = childSnapshot.val();&lt;BR /&gt;document.getElementById("data").innerHTML = "&amp;lt;p&amp;gt;&amp;lt;h3&amp;gt; Name : &amp;lt;/h3&amp;gt;&amp;lt;h5&amp;gt;" + childData['name'] + "&amp;lt;/h5&amp;gt;&amp;lt;/p&amp;gt; &amp;lt;br&amp;gt; &amp;lt;p&amp;gt; &amp;lt;h3&amp;gt; Age : &amp;lt;/h3&amp;gt;&amp;lt;h5&amp;gt;" + childData['age'] + "&amp;lt;/h5&amp;gt;&amp;lt;/p&amp;gt;";&lt;BR /&gt;})&lt;BR /&gt;})&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;input type="text" placeholder = "Value1" id = "namefield"&amp;gt;&lt;BR /&gt;&amp;lt;br&amp;gt;&lt;BR /&gt;&amp;lt;input type="text" placeholder = "Value2" id = "agefield"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;button onclick="sendData()"&amp;gt;&lt;BR /&gt;Submit&lt;BR /&gt;&amp;lt;/button&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;p id = "data"&amp;gt;&amp;lt;/p&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;P.S: i didnt made any changes in js file of extension.&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 03:12:09 GMT</pubDate>
    <dc:creator>abdulrahman</dc:creator>
    <dc:date>2024-11-16T03:12:09Z</dc:date>
    <item>
      <title>Firebase DB Connection</title>
      <link>https://community.qlik.com/t5/Integration-Extension-APIs/Firebase-DB-Connection/m-p/1677904#M12364</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I am trying to build an extension that sends data from its input fields to firebase db.&lt;BR /&gt;First i created a simple web app which seems to work fine, but when i integrated it to qliksense it doesnt send data to db instead it gives error "firebase not defined" in the console.&lt;BR /&gt;I dont understand what the problem is...&lt;BR /&gt;does qlik sense require some seprate connection to firebase db?&lt;BR /&gt;if yes then how?&lt;BR /&gt;&lt;BR /&gt;This is my code:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&amp;lt;div qv-extension style="height: 100%; position: relative; overflow: auto;" class="ng-scope"&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;lt;!-- The core Firebase JS SDK is always required and must be listed first --&amp;gt;&lt;BR /&gt;&amp;lt;script src="&lt;A target="_blank" rel="noopener"&gt;https://www.gstatic.com/firebasejs/7.8.2/firebase-app.js"&amp;gt;&amp;lt;/script&lt;/A&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;lt;!--use this one for database--&amp;gt;&lt;BR /&gt;&amp;lt;script src="&lt;A target="_blank" rel="noopener"&gt;https://www.gstatic.com/firebasejs/7.7.0/firebase-database.js"&amp;gt;&amp;lt;/script&lt;/A&gt;&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;!-- TODO: Add SDKs for Firebase products that you want to use&lt;BR /&gt;&lt;A href="https://firebase.google.com/docs/web/setup#available-libraries" target="_blank" rel="noopener"&gt;https://firebase.google.com/docs/web/setup#available-libraries&lt;/A&gt; --&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;script&amp;gt;&lt;BR /&gt;// Your web app's Firebase configuration&lt;BR /&gt;var firebaseConfig = {&lt;BR /&gt;apiKey: "AIzaSyA2Jv7TFnIoLu032LJVaYNkU9Bw3VFCWpw",&lt;BR /&gt;authDomain: "test-82f1f.firebaseapp.com",&lt;BR /&gt;databaseURL: "&lt;A href="https://test-82f1f.firebaseio.com" target="_blank" rel="noopener"&gt;https://test-82f1f.firebaseio.com&lt;/A&gt;",&lt;BR /&gt;projectId: "test-82f1f",&lt;BR /&gt;storageBucket: "test-82f1f.appspot.com",&lt;BR /&gt;messagingSenderId: "858992366066",&lt;BR /&gt;appId: "1:858992366066:web:cd4d98dba75327d1cddb6b"&lt;BR /&gt;};&lt;BR /&gt;// Initialize Firebase&lt;BR /&gt;firebase.initializeApp(firebaseConfig);&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;function sendData() {&lt;BR /&gt;firebase.database().ref("User").set({&lt;/P&gt;&lt;P&gt;name: document.getElementById('namefield').value,&lt;BR /&gt;age: document.getElementById('agefield').value&lt;/P&gt;&lt;P&gt;});&lt;BR /&gt;getData();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;function getData() {&lt;BR /&gt;firebase.database().ref('/').once('value', function(snapshot){&lt;BR /&gt;snapshot.forEach(function(childSnapshot){&lt;BR /&gt;var childKey = childSnapshot.key;&lt;BR /&gt;var childData = childSnapshot.val();&lt;BR /&gt;document.getElementById("data").innerHTML = "&amp;lt;p&amp;gt;&amp;lt;h3&amp;gt; Name : &amp;lt;/h3&amp;gt;&amp;lt;h5&amp;gt;" + childData['name'] + "&amp;lt;/h5&amp;gt;&amp;lt;/p&amp;gt; &amp;lt;br&amp;gt; &amp;lt;p&amp;gt; &amp;lt;h3&amp;gt; Age : &amp;lt;/h3&amp;gt;&amp;lt;h5&amp;gt;" + childData['age'] + "&amp;lt;/h5&amp;gt;&amp;lt;/p&amp;gt;";&lt;BR /&gt;})&lt;BR /&gt;})&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&amp;lt;/script&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;input type="text" placeholder = "Value1" id = "namefield"&amp;gt;&lt;BR /&gt;&amp;lt;br&amp;gt;&lt;BR /&gt;&amp;lt;input type="text" placeholder = "Value2" id = "agefield"&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;button onclick="sendData()"&amp;gt;&lt;BR /&gt;Submit&lt;BR /&gt;&amp;lt;/button&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;lt;p id = "data"&amp;gt;&amp;lt;/p&amp;gt;&lt;BR /&gt;&lt;BR /&gt;&amp;lt;/div&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;P.S: i didnt made any changes in js file of extension.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:12:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Integration-Extension-APIs/Firebase-DB-Connection/m-p/1677904#M12364</guid>
      <dc:creator>abdulrahman</dc:creator>
      <dc:date>2024-11-16T03:12:09Z</dc:date>
    </item>
  </channel>
</rss>

