tp note
This commit is contained in:
7
TD1/.idea/TD1.iml
generated
7
TD1/.idea/TD1.iml
generated
@ -1,9 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="android" name="Android">
|
||||
<configuration />
|
||||
</facet>
|
||||
</component>
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="jdk" jdkName="Android API 33, extension level 3 Platform" jdkType="Android SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
14
TD1/package-lock.json
generated
14
TD1/package-lock.json
generated
@ -11,6 +11,7 @@
|
||||
"devDependencies": {
|
||||
"cordova-android": "^10.1.2",
|
||||
"cordova-plugin-camera": "^6.0.0",
|
||||
"cordova-plugin-dialogs": "^2.0.2",
|
||||
"cordova-plugin-geolocation": "^4.1.0",
|
||||
"cordova-plugin-network-information": "^3.0.0"
|
||||
}
|
||||
@ -281,6 +282,19 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/cordova-plugin-dialogs": {
|
||||
"version": "2.0.2",
|
||||
"resolved": "https://registry.npmjs.org/cordova-plugin-dialogs/-/cordova-plugin-dialogs-2.0.2.tgz",
|
||||
"integrity": "sha512-FUHI6eEVeoz2VkxbF0P56QlUQLGzXcvw3i4xuXyM9gEct6Y+FA3Xzgl2pJTZcTg5wRqLWzN08kgNoHPkom15pw==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"cordovaDependencies": {
|
||||
"3.0.0": {
|
||||
"cordova": ">100"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/cordova-plugin-geolocation": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/cordova-plugin-geolocation/-/cordova-plugin-geolocation-4.1.0.tgz",
|
||||
|
@ -15,6 +15,7 @@
|
||||
"devDependencies": {
|
||||
"cordova-android": "^10.1.2",
|
||||
"cordova-plugin-camera": "^6.0.0",
|
||||
"cordova-plugin-dialogs": "^2.0.2",
|
||||
"cordova-plugin-geolocation": "^4.1.0",
|
||||
"cordova-plugin-network-information": "^3.0.0"
|
||||
},
|
||||
@ -23,11 +24,14 @@
|
||||
"android"
|
||||
],
|
||||
"plugins": {
|
||||
"cordova-plugin-geolocation": {},
|
||||
"cordova-plugin-geolocation": {
|
||||
"GPS_REQUIRED": "true"
|
||||
},
|
||||
"cordova-plugin-camera": {
|
||||
"ANDROIDX_CORE_VERSION": "1.6.+"
|
||||
},
|
||||
"cordova-plugin-network-information": {}
|
||||
"cordova-plugin-network-information": {},
|
||||
"cordova-plugin-dialogs": {}
|
||||
}
|
||||
}
|
||||
}
|
@ -112,13 +112,15 @@ h1 {
|
||||
#aj {
|
||||
width: 50%;
|
||||
margin-bottom: 15px;
|
||||
|
||||
}
|
||||
|
||||
#imgToReplace {
|
||||
margin-top: 20px;
|
||||
width: 50%;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.btn {
|
||||
margin: 5px 0;
|
||||
}
|
||||
}
|
||||
|
@ -49,8 +49,9 @@
|
||||
<button class="btn btn-primary mx-auto d-block" id="takePicture">Camera</button>
|
||||
<button class="btn btn-secondary mx-auto d-block" id="getPosition">Position</button>
|
||||
<button class="btn btn-info mx-auto d-block" id="getCon">Est connecté ?</button>
|
||||
<button class="btn btn-danger mx-auto d-block" id="getNotif">Notif</button>
|
||||
<div class="camera">
|
||||
<img src="" alt=" " class="mx-auto d-block" id="imgToReplace">
|
||||
<img src="" alt=" " class="mx-auto d-block imgh" id="imgToReplace">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -47,12 +47,17 @@ function onDeviceReady() {
|
||||
});
|
||||
|
||||
document.addEventListener("offline", decoNet, false);
|
||||
|
||||
document.getElementById("getNotif").addEventListener("click", (e) => {
|
||||
sendnotif();
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function sucessCallbackImage(imageData) {
|
||||
//alert("Zipp is best princess !");
|
||||
var image = document.getElementById('imgToReplace') ;
|
||||
image.style.display = "block";
|
||||
image.src = "data:image/jpeg;base64," + imageData;
|
||||
|
||||
}
|
||||
@ -100,3 +105,14 @@ function decoNet() {
|
||||
btn.classList.add("btn-danger");
|
||||
}
|
||||
|
||||
function sendnotif() {
|
||||
navigator.notification.alert(
|
||||
"Applejack is best pony !",
|
||||
alertDismissed, // callback
|
||||
);
|
||||
}
|
||||
|
||||
function alertDismissed() {
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user