Search code examples
androidangulargoogle-playionic4capacitor

Is this a library import issue? Sorry Google Play Store, but my app does not intentionally access the microphone or camera


Technologies

  1. Ionic 4 with Angular and Capacitor
  2. Android APK to the Google Play Store
  3. macOS Mojave 10.14.6

BUG

Your APK or Android App Bundle is using permissions that require a privacy policy: (android.permission.CAMERA, android.permission.RECORD_AUDIO)..

is the error I am getting when trying to upload my TODO LIST to the Play Store. I did not code any Camera or Record_Audio features for this app. I am guessing that one of the prepackaged imports is responsible for this. Is this an import that I can simply remove? Maybe not. Any ideas?

Imports

app.module.ts

 1. import { NgModule } from '@angular/core';
 2. import { BrowserModule } from '@angular/platform-browser';
 3. import { RouterModule, RouteReuseStrategy, Routes } from '@angular/router';
 4. import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
 5. import { IonicStorageModule } from '@ionic/storage';
 6. import { AppComponent } from './app.component';
 7. import { AppRoutingModule } from './app-routing.module';

app.component.ts

1. import { Component } from '@angular/core';
2. import { Platform } from '@ionic/angular';
3. import { TodoService } from './services/todo.service';
4. import {Plugins} from '@capacitor/core';
5. const {SplashScreen, StatusBar} = Plugins;

todo.service.ts

 1. import { Injectable } from '@angular/core';
 2. import { Storage } from '@ionic/storage';
 3. import { Todo } from '../interfaces/todo';

home.module.ts

1. import { NgModule } from '@angular/core';
2. import { CommonModule } from '@angular/common';
3. import { IonicModule } from '@ionic/angular';
4. import { FormsModule } from '@angular/forms';
5. import { RouterModule } from '@angular/router';
6. import { HomePage } from './home.page';

home.page.ts

 1. import { Component, ViewChild } from '@angular/core';
 2. import { TodoService } from '../services/todo.service';
 3. import { AlertController, IonList } from '@ionic/angular';
 4. import { Router } from '@angular/router';

loli.module.ts

 1. import { NgModule } from '@angular/core';
 2. import { CommonModule } from '@angular/common';
 3. import { FormsModule } from '@angular/forms';
 4. import { Routes, RouterModule } from '@angular/router';
 5. import { IonicModule } from '@ionic/angular';
 6. import { LoliPage } from './loli.page';

loli.page.ts

 1. import { Component, OnInit } from '@angular/core';
 2. import { TodoService } from '../services/todo.service';
 3. import { ActivatedRoute, Router } from '@angular/router';
 4. import { Todo } from '../interfaces/todo';

Solution

  • Thanks to @nullptr.t and @Ahmad for the helpful comments. It was indeed an issue of code in the AndroidManifest.xml. I simply had to comment out the user permissions here!