host4ideas / image-comparator-app

Repository for an image comparator app using: Ionic, Capacitor and OpenCV js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Your First Ionic App: Photo Gallery (Ionic Vue and Capacitor)

Get started with Ionic by building a photo gallery app that runs on iOS, Android, and the web - with just one codebase. This is the complete project referenced in the "Your First App: Vue" guide. Follow along to create a complete CRUD (create-read-update-delete) experience.

Powered by Ionic Vue (web app) and Capacitor (native app runtime).

How It Works

After the user navigates to Tab 2 (Photos), they can tap/click on the camera button to open up the device's camera. After taking or selecting a photo, it's stored permanently into the device's filesystem. When the user reopens the app at a later time, the photo images are loaded from the filesystem and displayed again in the gallery. The user can tap on a photo to be presented with the option to remove the photo.

Feature Overview

Project Structure

  • Tab2 (Photos) (src/views/Tab2.vue): Photo Gallery UI and basic logic.
  • usePhotoGallery Hook (src/composables/usePhotoGallery.ts): Logic encapsulating Capacitor APIs, including Camera, Filesystem, and Preferences.

How to Run

Note: It's highly recommended to follow along with the tutorial guide, which goes into more depth, but this is the fastest way to run the app.

  1. Install Ionic if needed: npm install -g @ionic/cli.
  2. Clone this repository.
  3. In a terminal, change directory into the repo: cd photo-gallery-capacitor-vue.
  4. Install all packages: npm install.
  5. Run on the web: ionic serve.
  6. Run on iOS or Android: See here.

How to build

  1. Add android if needed: ionic capacitor add android or ionic capacitor add ios.
  2. With each change Ionic apps must be built into web assets: ionic capacitor copy android or ionic capacitor copy ios.
  3. With each change Ionic apps must be built into web assets: ionic capacitor build android or ionic capacitor build ios.

If you have Android Studio installed, step 2 will open it up to debug your app.

About

Repository for an image comparator app using: Ionic, Capacitor and OpenCV js

License:MIT License


Languages

Language:Vue 57.0%Language:JavaScript 22.4%Language:CSS 8.4%Language:TypeScript 4.6%Language:Swift 3.7%Language:Java 1.6%Language:Ruby 1.2%Language:HTML 1.0%