top of page

Privacy Policy

A legal disclaimer

The explanations and information provided on this page are only general and high-level explanations and information on how to write your own document of a Privacy Policy. You should not rely on this article as legal advice or as recommendations regarding what you should actually do, because we cannot know in advance what are the specific privacy policies you wish to establish between your business and your customers and visitors. We recommend that you seek legal advice to help you understand and to assist you in the creation of your own Privacy Policy.

Privacy Policy - the basics

Having said that, a privacy policy is a statement that discloses some or all of the ways a website collects, uses, discloses, processes, and manages the data of its visitors and customers. It usually also includes a statement regarding the website’s commitment to protecting its visitors’ or customers’ privacy, and an explanation about the different mechanisms the website is implementing in order to protect privacy. 

 

Different jurisdictions have different legal obligations of what must be included in a Privacy Policy. You are responsible to make sure you are following the relevant legislation to your activities and location.

What to include in the Privacy Policy

Generally speaking, a Privacy Policy often addresses these types of issues: the types of information the website is collecting and the manner in which it collects the data; an explanation about why is the website collecting these types of information; what are the website’s practices on sharing the information with third parties; ways in which your visitors and customers can exercise their rights according to the relevant privacy legislation; the specific practices regarding minors’ data collection; and much, much more. 


To learn more about this, check out our article “Creating a Privacy Policy”.

bottom of page
/** * Mitko Health — native bridge helpers * * Paste this file's contents into a Wix "Custom Code" embed (loaded on all * pages, in the Body - end section) OR into the specific HTML embed on the * bariatric tracker / document upload pages. * * These functions check whether the page is running inside the Mitko Health * iOS app (Capacitor). If so, they use native camera / file / share sheet * APIs. If the same page is opened in a normal browser (desktop or mobile * Safari outside the app), they silently fall back to standard web behavior. * No page needs two versions — call these functions everywhere and they * do the right thing based on context. */ window.MitkoBridge = (function () { const isNativeApp = () => typeof window.Capacitor !== 'undefined' && window.Capacitor.isNativePlatform && window.Capacitor.isNativePlatform(); /** * Take or choose a photo. * Returns a Promise resolving to a base64 data URL string. * Use case: incision-site check photos, meal photos for bariatric tracker. * * source: 'camera' | 'photos' | 'prompt' (prompt shows both options) */ async function takePhoto(source = 'prompt') { if (isNativeApp()) { const { Camera, CameraResultType, CameraSource } = window.Capacitor.Plugins; const sourceMap = { camera: CameraSource.Camera, photos: CameraSource.Photos, prompt: CameraSource.Prompt }; const photo = await Camera.getPhoto({ quality: 80, resultType: CameraResultType.DataUrl, source: sourceMap[source] || CameraSource.Prompt, allowEditing: false }); return photo.dataUrl; } // Browser fallback: standard file input with capture attribute return new Promise((resolve, reject) => { const input = document.createElement('input'); input.type = 'file'; input.accept = 'image/*'; if (source === 'camera') input.capture = 'environment'; input.onchange = () => { const file = input.files && input.files[0]; if (!file) return reject(new Error('No file selected')); const reader = new FileReader(); reader.onload = () => resolve(reader.result); reader.onerror = reject; reader.readAsDataURL(file); }; input.click(); }); } /** * Write a file (e.g. a filled PFML PDF) to a temporary cache location just * long enough to hand it to the share sheet, and return its path. This is * NOT permanent storage — it uses the Cache directory (not visible in the * Files app, and iOS may clear it automatically). Nothing is retained * after the user shares or dismisses the share sheet. * data: base64 string (no data: prefix) * fileName: e.g. 'PFML-Application.pdf' */ async function saveFile(data, fileName) { if (isNativeApp()) { const { Filesystem, Directory } = window.Capacitor.Plugins; const result = await Filesystem.writeFile({ path: fileName, data: data, directory: Directory.Cache }); return result.uri; } // Browser fallback: trigger a normal download const link = document.createElement('a'); link.href = `data:application/pdf;base64,${data}`; link.download = fileName; document.body.appendChild(link); link.click(); document.body.removeChild(link); return null; } /** * Open the native share sheet (Messages, Mail, AirDrop, Drive, etc.) * for a file already saved via saveFile(), or for a plain text/link share. */ async function shareFile({ title, text, url, filePath }) { if (isNativeApp()) { const { Share } = window.Capacitor.Plugins; await Share.share({ title: title || 'Mitko Health', text: text || '', url: filePath || url || '', dialogTitle: title || 'Share' }); return; } // Browser fallback: use Web Share API if available, else no-op if (navigator.share) { await navigator.share({ title, text, url }); } else { console.warn('Sharing is not supported in this browser. Use the download link instead.'); } } /** * Delete a file previously written by saveFile(). Call this right after * shareFile() completes so nothing lingers in the app's cache. */ async function deleteTempFile(fileName) { if (!isNativeApp()) return; const { Filesystem, Directory } = window.Capacitor.Plugins; try { await Filesystem.deleteFile({ path: fileName, directory: Directory.Cache }); } catch (err) { // Already gone or never existed — fine to ignore. } } return { isNativeApp, takePhoto, saveFile, shareFile, deleteTempFile }; })();