- clone the master branch
- run npm install
- run cordova plugins install
Contains the location picker and select-contacts plugins.
1.dependencies:
- Make sure that package @ngui/map is installed ( for the maps component)
- Make sure cordova-plugin-contacts-phonenumbers is installed via cordova plugin add cordova-plugin-contacts-phonenumbers [https://github.com/dbaq/cordova-plugin-contacts-phone-numbers](link to plugin github) 2.Copying code:
- From the app.module.ts file .. copy over the lines marked with /** COPY THIS */
- From the app.scss file , copy over css marked with /** COPY THIS */
- Copy the select-contacts and the location-picker folders into the destiantion , keeping the same hirarchy
-
the location picker is invoked declaratively from a button , link etc via the navPush attribut. In this repo , you will find the example in the home component: <button ion-button [navPush]="pushPage" [navParams]="params">select location. YOU MUST IMPORT THE locationPickerPageComponent in the page from where you are goign to invoke this.
-
when the locaiton picker is invoked and a location is selected , the location picker pushes the select contacts component , passing the selected address to it. once the contacts are selected and the continue button is clicked , the confirm() function in the component collects the address and selected contacts for passing on. This function has been stubbed for now.
the contacts page will not work in the browser and will fail, please test it with emulation or a real device.
- ionic native photos - https://ionicframework.com/docs/native/photo-library/ . follow installation steps in the page
- copy the select-photos folder and add component class to app.module.
- The getPhotos function returns an array of photo blobs .. These can be directly uploaded using formData.
- The photos will not show up in the latest webview (Wk) .. when testing ensure that the app has the older webview .
- copy contents of components folder
- install ionic native geolocation , follow steps mentioned
- add this config in xml
<edit-config file="*-Info.plist" mode="merge" target="NSLocationWhenInUseUsageDescription"> <string>To get your location </string> </edit-config>