This project was generated with Angular CLI version 16.0.0.
Run ng serve for a dev server. Navigate to http://localhost:4200/. The application will automatically reload if you change any of the source files.
Run ng generate component component-name to generate a new component. You can also use ng generate directive|pipe|service|class|guard|interface|enum|module.
Run ng build to build the project. The build artifacts will be stored in the dist/ directory.
Run ng test to execute the unit tests via Karma.
Run ng e2e to execute the end-to-end tests via a platform of your choice. To use this command, you need to first add a package that implements end-to-end testing capabilities.
To get more help on the Angular CLI use ng help or go check out the Angular CLI Overview and Command Reference page.
Follow these steps to generate a signed APK for your Angular + Capacitor project.
- Build Angular App Run the following command to build your Angular project:
npm run build - install capasitor packs
npm install @capacitor/android@^7.4.4 @capacitor/cli@^7.4.4 @capacitor/core@^7.4.4 @capacitor/geolocation@^7.0.0 @capacitor/local-notifications@^7.0.4 @capacitor/status-bar@^7.0.4 - npx cap init and change dist path in capacitor.config.ts (only first time)
- Add Android Platform (Only Once) Add the Android platform to your project:
npx cap add android(Skip this step if Android platform is already added to avoid overwriting changes.) - Copy Web Assets to Capacitor Copy the web assets to Capacitor:
npx cap copyandnpx cap sync android - Copy Again After Adding Platform Copy assets specifically for Android:
npx cap copy android - Open Android Project in Android Studio Open the Android project:
npx cap open android - (Optional) Build Unsigned Release APK via Command Line Navigate to the Android folder:
cd android - Run Gradle to assemble the release APK:
gradlew cleanthengradlew assembleRelease - This generates
app-release-unsigned.apkat:cd D:\salah-time-board\android\app\build\outputs\apk\releasegenerate key for the first timekeytool -genkey -v -keystore my-release-key.keystore -alias my-key-alias -keyalg RSA -keysize 2048 -validity 10000set password : 543@Fareed - Sign the APK Sign the unsigned APK using Generate APK :
apksigner sign --ks "D:\salah-time-board\my-release-key.keystore" --out "D:\salah-time-board\android\app\build\outputs\apk\release\salahtime-signed.apk" "D:\salah-time-board\android\app\build\outputs\apk\release\app-release-unsigned.apk" - Verify the APK :
apksigner verify --verbose "D:\salah-time-board\android\app\build\outputs\apk\release\salahtime-signed.apk"