capacitor-community / privacy-screen

⚡️ Capacitor plugin that protects your app from displaying a screenshot in Recents screen/App Switcher.
MIT License
87 stars 23 forks source link

Android App Is not working on simulator #41

Closed sumitappt closed 2 years ago

sumitappt commented 2 years ago

When I install the app on the simulator it's not working image

I configured the capacitor.config.json

{ "plugins": { "PrivacyScreen": { "enable": true } } } Does any one know how to resolve this

robingenz commented 2 years ago

Hi @sumitappt, thank you for your request. Is this problem related to the Privacy Screen plugin? So the app works in the emulator when you don't use the plugin?

sumitappt commented 2 years ago

Hi @robingenz Yes the problem is related to the Privacy Screen plugin And when I don't use the plugin app does work on the emulator

robingenz commented 2 years ago

Okey, please provide a Minimal, Reproducible Example (see How to create a Minimal, Reproducible Example) so i can debug it.

sumitappt commented 2 years ago

@robingenz Here is my capacitor.config.json

{
    "appId": "com.************.staging",
    "appName": "app****",
    "bundledWebRuntime": false,
    "npmClient": "npm",
    "webDir": "www",
    "plugins": {
        "SplashScreen": {
            "launchShowDuration": 1000,
            "androidScaleType": "CENTER_CROP",
            "launchAutoHide": true
        },
        "PrivacyScreen": {
            "enable": true
        }
    },
    "PushNotifications": {
        "presentationOptions": [
            "badge",
            "sound",
            "alert"
        ]
    },
    "cordova": {}
}

package.json

  "name": "app******",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "https://ionicframework.com/",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ionic build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e",
    "android": "ionic build && npx cap sync android && npx cap open android",
    "ios": "ionic build && npx cap sync ios && npx cap open ios"
  },
  "private": true,
  "dependencies": {
    "@angular/common": "~12.2.4",
    "@angular/core": "~12.2.4",
    "@angular/forms": "~12.2.4",
    "@angular/platform-browser": "~12.2.4",
    "@angular/platform-browser-dynamic": "~12.2.4",
    "@angular/router": "~12.2.4",
    "@capacitor-community/firebase-analytics": "^1.0.0",
    "@capacitor-community/firebase-crashlytics": "^1.1.0",
    "@capacitor-community/privacy-screen": "^2.1.1",
    "@capacitor/android": "3.2.2",
    "@capacitor/app": "^1.0.3",
    "@capacitor/browser": "^1.0.7",
    "@capacitor/camera": "^1.2.2",
    "@capacitor/clipboard": "^1.0.3",
    "@capacitor/core": "^3.2.2",
    "@capacitor/device": "^1.0.3",
    "@capacitor/haptics": "^1.0.3",
    "@capacitor/ios": "^3.2.2",
    "@capacitor/keyboard": "^1.0.3",
    "@capacitor/local-notifications": "^1.0.5",
    "@capacitor/push-notifications": "^1.0.4",
    "@capacitor/share": "^1.0.4",
    "@capacitor/splash-screen": "^1.1.2",
    "@capacitor/status-bar": "^1.0.3",
    "@ionic-native/action-sheet": "^5.36.0",
    "@ionic-native/app-version": "^5.36.0",
    "@ionic-native/chooser": "^5.36.0",
    "@ionic-native/core": "^5.36.0",
    "@ionic-native/diagnostic": "^5.36.0",
    "@ionic-native/facebook": "^5.36.0",
    "@ionic-native/file": "^5.36.0",
    "@ionic-native/fingerprint-aio": "^5.36.0",
    "@ionic-native/in-app-browser": "^5.36.0",
    "@ionic-native/market": "^5.36.0",
    "@ionic-native/open-native-settings": "^5.36.0",
    "@ionic-native/preview-any-file": "^5.36.0",
    "@ionic-native/secure-storage-echo": "^5.36.0",
    "@ionic-native/splash-screen": "^5.36.0",
    "@ionic-native/status-bar": "^5.36.0",
    "@ionic/angular": "^5.7.0",
    "@ionic/storage": "^2.3.1",
    "@ng-idle/core": "^11.0.3",
    "@ng-idle/keepalive": "^11.0.3",
    "@ng-select/ng-select": "^7.2.0",
    "capacitor-native-settings": "^0.1.0",
    "cordova-open-native-settings": "^1.5.5",
    "cordova-plugin-actionsheet": "^2.3.3",
    "cordova-plugin-androidx": "^3.0.0",
    "cordova-plugin-androidx-adapter": "^1.1.3",
    "cordova-plugin-app-version": "^0.1.12",
    "cordova-plugin-chooser": "^1.3.2",
    "cordova-plugin-facebook-connect": "^3.2.0",
    "cordova-plugin-file": "^6.0.2",
    "cordova-plugin-fingerprint-aio": "^4.0.2",
    "cordova-plugin-inappbrowser": "^5.0.0",
    "cordova-plugin-iroot": "^3.1.0",
    "cordova-plugin-market": "^1.2.0",
    "cordova-plugin-preview-any-file": "^0.2.9",
    "cordova-plugin-secure-storage-echo": "^5.1.1",
    "cordova-plugin-tracking-transparency": "^1.0.4",
    "cordova-sqlite-storage": "^6.0.0",
    "cordova.plugins.diagnostic": "^6.0.3",
    "ionic-selectable": "^4.9.0",
    "luxon": "^2.0.2",
    "rxjs": "~6.5.5",
    "tslib": "^2.3.1",
    "zone.js": "~0.11.4"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~12.2.4",
    "@angular-eslint/builder": "12.3.1",
    "@angular-eslint/eslint-plugin": "12.3.1",
    "@angular-eslint/eslint-plugin-template": "12.3.1",
    "@angular-eslint/schematics": "12.3.1",
    "@angular-eslint/template-parser": "12.3.1",
    "@angular/cli": "12.2.7",
    "@angular/compiler": "~12.2.4",
    "@angular/compiler-cli": "~12.2.4",
    "@angular/language-service": "~12.2.4",
    "@capacitor/cli": "^3.2.2",
    "@ionic/angular-toolkit": "^4.0.0",
    "@ionic/lab": "3.2.10",
    "@types/jasmine": "~3.9.0",
    "@types/jasminewd2": "~2.0.10",
    "@types/luxon": "^2.0.3",
    "@types/node": "^16.7.13",
    "@typescript-eslint/eslint-plugin": "4.31.0",
    "@typescript-eslint/parser": "4.31.0",
    "compare-versions": "^3.6.0",
    "eslint": "^7.32.0",
    "eslint-plugin-import": "2.24.2",
    "eslint-plugin-jsdoc": "36.1.0",
    "eslint-plugin-prefer-arrow": "1.2.3",
    "jasmine-core": "~3.9.0",
    "jasmine-spec-reporter": "~7.0.0",
    "karma": "~6.3.4",
    "karma-chrome-launcher": "~3.1.0",
    "karma-coverage-istanbul-reporter": "~3.0.3",
    "karma-jasmine": "~4.0.1",
    "karma-jasmine-html-reporter": "^1.7.0",
    "protractor": "~7.0.0",
    "ts-node": "~10.2.1",
    "typescript": "^4.3.5"
  },
  "description": "An Ionic project"
}

I just made changes to these two files

robingenz commented 2 years ago

Please provide a GitHub repo with an app as a minimal, reproducible example. With this information, I could not reproduce the issue. Also feel free to check out my working demo app: https://github.com/robingenz/capacitor-plugin-demo

sumitappt commented 2 years ago

@robingenz I check the working demo app and it also doesn't work on the BrowserStack

robingenz commented 2 years ago

Okay, can you give me instructions how to reproduce it the easiest way?

github-actions[bot] commented 2 years ago

It looks like there hasn't been a reply in 30 days, so I'm closing this issue.