Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .devrev/repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deployable: true
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Global code owner
* @dhananjayj-dev
142 changes: 142 additions & 0 deletions example/css/index.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
/* General Styles */
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
background-color: #F2F2F7;
margin: 0;
padding: 20px;
}

/* Header */
.header {
display: flex;
align-items: center;
padding: 10px;
background-color: #f5f5f5;
border-bottom: 1px solid #ddd;
margin: -20px -20px 20px -20px;
}

#backButton {
background: none;
border: none;
font-size: 24px;
cursor: pointer;
padding: 10px;
color: #333;
position: absolute;
left: 20px;
}

.header h1 {
flex: 1;
text-align: center;
margin: 0;
font-size: 20px;
}

/* Sections */
.section {
margin-top: 20px;
padding: 10px;
background: #fff;
border-radius: 10px;
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Section Titles */
h2 {
font-size: 14px;
text-transform: uppercase;
color: gray;
margin-bottom: 5px;
}

/* Lists */
ul {
list-style: none;
padding: 0;
}
li {
padding: 10px;
margin: 5px 0;
border-radius: 8px;
transition: background-color 0.2s ease;
}

/* Hover effect */
li:hover {
background-color: #f0f0f0;
}

/* Click/active feedback */
li:active {
background-color: #d0d0d0;
}

.status-list li,
.feature-list li {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 0;
font-size: 16px;
border-bottom: 1px solid #ddd;
color: black;
cursor: pointer;
}

/* Feature List */
.feature-list a {
text-decoration: none;
color: black;
font-size: 16px;
}

/* Circular Checkbox */
.circular-checkbox {
width: 20px;
height: 20px;
border-radius: 50%;
border: 2px solid grey;
display: inline-block;
text-align: center;
line-height: 20px;
font-size: 14px;
font-weight: bold;
cursor: pointer;
}

.checked {
background-color: blue;
border-color: blue;
color: white;
}

/* Input Fields */
.input-group input {
width: 80%;
padding: 10px;
margin: 5px 0;
border: 1px solid #ddd;
border-radius: 5px;
font-size: 14px;
}

/* Action Items */
.action-item {
color: white;
text-align: center;
padding: 10px;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
}

/* Large Scrollable List Items */
.card {
background-color: #fff;
border-radius: 10px;
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
margin-bottom: 10px;
padding: 15px;
}
27 changes: 27 additions & 0 deletions example/delayedScreen.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="initial-scale=1, width=device-width, viewport-fit=cover">
<title>Delayed Screen</title>
<link rel="stylesheet" href="css/index.css">
</head>
<body>
<div class="header">
<button id="backButton" class="back-button">&larr;</button>
<h1>Delayed Screen</h1>
</div>
<div class="section">
<p>This screen opened after a 2 seconds delay</p>
</div>

<script>
document.addEventListener('deviceready', function() {
if (cordova.platformId === 'android') {
DevRev.setInScreenTransitioning(false);
}
});
</script>
<script src="js/app.js"></script>
</body>
</html>
23 changes: 23 additions & 0 deletions example/identification.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Identification</title>
<link rel="stylesheet" href="css/index.css">
</head>
<body>
<div class="header">
<button id="backButton" class="back-button">&larr;</button>
<h1>Identification</h1>
</div>

<div class="section">
<ul id="featureList" class="feature-list"></ul>
</div>

<script src="cordova.js"></script>
<script src="js/feature.js"></script>
<script src="js/app.js"></script>
</body>
</html>
26 changes: 26 additions & 0 deletions example/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *; img-src 'self' data: content:;">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Security-Policy" content="default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *">
<link rel="stylesheet" href="css/index.css">
<title>DevRevSDK Sample</title>
</head>
<body>
<div class="header">
<button id="backButton" class="back-button">&larr;</button>
<h1>DevRev SDK Sample</h1>
</div>

<div class="section">
<ul id="featureList" class="feature-list"></ul>
</div>

<script src="cordova.js"></script>
<script src="js/feature.js"></script>
<script src="js/app.js"></script>
</body>
</html>
36 changes: 36 additions & 0 deletions example/js/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
document.addEventListener('DOMContentLoaded', function() {
const backButton = document.getElementById('backButton');
if (backButton) {
backButton.addEventListener('click', function() {
window.history.back();
});
}
});

// Cordova Device Ready Event
document.addEventListener('deviceready', function() {
const deviceReadyElement = document.getElementById('deviceready');
deviceReadyElement?.classList.add('ready');

deviceReadyElement?.classList.add('configuring');
DevRev.configure('<APPID>', function() {
console.log('DevRev SDK configured successfully.');
deviceReadyElement?.classList.remove('configuring');
deviceReadyElement?.classList.add('configured');
}, function(error) {
console.error('Failed to configure DevRev SDK:', error);
deviceReadyElement?.classList.remove('configuring');
deviceReadyElement?.classList.add('error');
});

cordova.plugins.firebase.messaging.requestPermission();

cordova.plugins.firebase.messaging.getToken().then(function(token) {
console.log('Got device token: ', token);
});
cordova.plugins.firebase.messaging.onTokenRefresh(function(refreshedToken) {
console.log('Refreshed FCM token:', refreshedToken);
});

console.log('Running cordova-' + cordova.platformId + '@' + cordova.version);
}, false);
Loading