@tajuddincse wrote:
Hi sir.
Is there any way to hide status bar? so that we can prevent scroll down to status bar or other settings.
Posts: 1
Participants: 1
@tajuddincse wrote:
Hi sir.
Is there any way to hide status bar? so that we can prevent scroll down to status bar or other settings.
Posts: 1
Participants: 1
@roy800227 wrote:
Hello everyone
this is my page
import { TestService } from '../../xxx' export class TestPage { public Num = this.testService.testNum constructor( public testService:TestService) { }
this is my service
@Injectable()
export class Test{ public testNum:number = '123' ... } @Injectable() export class TestService{ public testStr = 'aa' ... }
I can get the property TestStr but cannot get the property testNum.
For some reason i can’t merge them together.
Please tell me how to solve this problem.
Posts: 1
Participants: 1
@Harikag wrote:
Hi I have ionic row and two columns I need to display text in single line
<ion-row align-items-center style="margin-left: -7px;"> <ion-col size="7" size-lg offset="7" style="padding:0px;padding-left: 6px;"> <span style="color:#555;font-size: 1em;line-height: 15px;" class="fn-sz-sth"><b>New TAsk Allocated To You</b></span> </ion-col> <ion-col size="3" size-lg offset="3" style="padding:0px;padding-left: 6px;"> <p class="category-description" style="color:#555;font-size: 1rem !important;text-align: right;margin-top: 5px;" > Jan 9,2020,6.51 pm </p> </ion-col> </ion-row> ````Preformatted text` But the text is showing in two lines like New TAsk Allocated To you Jan 9,2020,6.51 pm But I need to get like below New TAsk Allocated... Jan 9,2020,6.51 pm So please help me.
Posts: 1
Participants: 1
@pedroDousseau wrote:
Hello,
I’m struggling on building an app that has two native plugins that uses google services.
It seems to be some gradle dependency conflict, I’m new to Ionic and to mobile development, it would be great if you guys could show me why this problem is happening.
I’m following the oficial documentation and completely lost on how to handle this type of error.Steps to reproduce it:
- Create some ionic-angular project
ionic start someProjectName super --type=ionic-angular
- Add the ‘Push’ native plugin to the project exactly like the documentation (https://ionicframework.com/docs/v3/native/push/)
ionic cordova plugin add phonegap-plugin-push npm install --save @ionic-native/push@4
- Add the ‘Firebase analytics’ native plugin to the project exactly like the documentation (https://ionicframework.com/docs/v3/native/firebase-analytics/)
ionic cordova plugin add cordova-plugin-firebase-analytics npm install --save @ionic-native/firebase-analytics@4
- Add the android platform
ionic cordova platform add android
Create a firebase project and put the google-services.json inside platforms/android/app
Try to build it for android
ionic cordova build android
Then, you will get this log:
[10:40:03] ionic-app-scripts 3.2.4 [10:40:03] build dev started ... [10:40:03] clean started ... [10:40:03] clean finished in 10 ms [10:40:03] copy started ... [10:40:05] deeplinks started ... [10:40:05] deeplinks finished in 115 ms [10:40:05] transpile started ... [10:40:18] transpile finished in 13.22 s [10:40:18] preprocess started ... [10:40:18] preprocess finished in 1 ms [10:40:18] webpack started ... [10:40:19] copy finished in 15.60 s [10:40:26] webpack finished in 8.32 s [10:40:26] sass started ... [10:40:30] sass finished in 3.29 s [10:40:30] postprocess started ... [10:40:30] postprocess finished in 38 ms [10:40:30] lint started ... [10:40:30] build dev finished in 27.01 s [10:40:37] lint finished in 7.72 s > cordova.cmd build android Checking Java JDK and Android SDK versions ANDROID_SDK_ROOT=undefined (recommended setting) ANDROID_HOME=D:\Users\ALUNOS\AppData\Local\Android\Sdk (DEPRECATED) > Task :wrapper BUILD SUCCESSFUL in 2s 1 actionable task: 1 executed Subproject Path: CordovaLib Subproject Path: app > Configure project :app registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection) registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection) > Task :app:preBuild UP-TO-DATE > Task :CordovaLib:preBuild UP-TO-DATE > Task :CordovaLib:preDebugBuild UP-TO-DATE > Task :CordovaLib:checkDebugManifest > Task :CordovaLib:processDebugManifest > Task :app:preDebugBuild FAILED Dependency resolved to an incompatible version: Dependency(fromArtifactVersion=ArtifactVersion(groupId=com.google.firebase, artifactId=firebase-messaging, version=17.0.0), toArtifact=Artifact(groupId=com.google.firebase, artifactId=firebase-iid), toArtifactVersionString=[16.0.0]) 3 actionable tasks: 3 executed FAILURE: Build failed with an exception. * What went wrong: Failed to capture fingerprint of input files for task ':app:preDebugBuild' property 'compileManifests' during up-to-date check. > In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[16.0. 0]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown. Dependency failing: com.google.firebase:firebase-messaging:17.0.0 -> com.google.firebase:firebase-iid@[16.0.0], but fire base-iid version was 19.0.0. The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art ifact with the issue. -- Project 'app' depends onto com.google.firebase:firebase-messaging@17.0.+ -- Project 'app' depends onto com.google.firebase:firebase-analytics@17.2.1 -- Project 'app' depends onto com.google.firebase:firebase-iid@19.0.0 -- Project 'app' depends onto com.google.firebase:firebase-analytics@17.2.+ -- Project 'app' depends onto com.google.android.gms:play-services-measurement-api@17.2.1 -- Project 'app' depends onto com.google.firebase:firebase-messaging@17.0.0 For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https:// github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b uild.gradle file. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 7s D:\Users\ALUNOS\Desktop\AT\Desenvolvimento\Apps\teste-analytics-2\someProjectName\platforms\android\gradlew: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception. * What went wrong: Failed to capture fingerprint of input files for task ':app:preDebugBuild' property 'compileManifests' during up-to-date check. > In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[16.0. 0]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown. Dependency failing: com.google.firebase:firebase-messaging:17.0.0 -> com.google.firebase:firebase-iid@[16.0.0], but fire base-iid version was 19.0.0. The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art ifact with the issue. -- Project 'app' depends onto com.google.firebase:firebase-messaging@17.0.+ -- Project 'app' depends onto com.google.firebase:firebase-analytics@17.2.1 -- Project 'app' depends onto com.google.firebase:firebase-iid@19.0.0 -- Project 'app' depends onto com.google.firebase:firebase-analytics@17.2.+ -- Project 'app' depends onto com.google.android.gms:play-services-measurement-api@17.2.1 -- Project 'app' depends onto com.google.firebase:firebase-messaging@17.0.0 For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https:// github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b uild.gradle file. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 7s [ERROR] An error occurred while running subprocess cordova. cordova.cmd build android exited with exit code 1. Re-running this command with the --verbose flag may provide more information.
Until adding the analytics plugin at step 3, you should be fine on building it, the problem is occuring when both plugins are installed.
Posts: 1
Participants: 1
@yodah wrote:
Hello,
In the doc : https://ionicframework.com/docs/api/menu#css-custom-properties there’s an example of a menu with a snippet to set its width :
.my-custom-menu { --width: 500px; }
But when the menu is in a split pane (like 99% of the time ?) it doesn’t work, how do I do ?? …
Posts: 1
Participants: 1
@inside wrote:
Hi all
I need to show on my alert header countdown.
this.countdown is countdown every second from 10 to 0.Here is my function
async idleAlert() { this.alertIdle = await this.alertController.create({ header: 'Countdown: ' + this.Counter, cssClass: 'customAlert', backdropDismiss: false, buttons: [ { text: 'Cancel, role: 'cancel', cssClass: 'alertBtnGrey', handler: () => { this.stopWatching(); this.authService.logout(); } }, { text: 'ok', cssClass: 'alertBtnSuccess', handler: () => { this.restartTimer(); } } ] }); await this.alertIdle.present(); }
Posts: 1
Participants: 1
@PolyNoa wrote:
Hey guys,
I want to display country flags, so i searched up and found flag-icon-css.
After i did all the installation steps, the country flags doesn’t show up at all.
Has anyone here ever used this library ? If yes, did this problem occured to you ?
Thank you.
Posts: 1
Participants: 1
@kaanerdogan wrote:
Hi everyone. I installed ionic 3 by typing
npm install -g ionic cordova
and i created new project by typing
ionic start helloWorld blank --type=ionic-angular
After ionic serve i got theese following errors.
And console log says:
Refused to apply style from 'http://localhost:8100/build/main.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled. (index):1
Failed to load resource: the server responded with a status of 404 (Not Found) (vendor.js):1
Failed to load resource: the server responded with a status of 404 (Not Found) (main.js):1
Ionic CLI: 5.4.13
Ionic Framework: ionic-angular 3.9.9
@ionic/app-script: 3.2.4Angular Core and Angular Compeiler CLI: 5.2.11
NodeJS: 12.4.1(LTS)
npm: 6.13.4
OS: Linux 5.0I found this article says just ctrl+s in any .ts file and let it build again.
Yes it is working for this serve time. But i get same error every time i serve.
Posts: 8
Participants: 3
@maid wrote:
Hello everyone. I have recently made a new Test Flight build and Compressed File Size is 50MB. I built the app with
ionic cordova build ios --prod --release
command. Important to note is that my previous builds are made withionic cordova prepare ios
command and file size is just 25MB. So production builds doubles application size instead of reducing it.Ionic CLI : 5.4.4
Ionic Framewor: @ionic/angular 4.5.0
@angular-devkit/build-angular : 0.13.8
@angular-devkit/schematics : 7.2.4
@angular/cli: 7.3.8
@ionic/angular-toolkit: 1.4.1Have anyone experienced the same issue.
Thanks in advance.
Posts: 1
Participants: 1
@Ali-modern wrote:
Question
Is there some way to have expandable item-option to go full width after expanding beyond the threshold (after threshold is when ionSwipe event is fired then)Problem demo
Expandable bounces back to the left after drag end when it’s expected to go off-screen to the right and replaced by the red delete button.
Desired behavior
Trash is expandable here. Dragging the item left after a certain point, it will continue going left and replaced by the red trash button.
Code
<ion-item-sliding @slideInOut *ngFor="let bagItem of bag.bagItemsList"> <!-- SLIDING OPTION FOR DELETE --> <ion-item-options side="start" (ionSwipe)="bag.remove(bagItem)"> <ion-item-option color="danger" (click)="bag.remove(bagItem)" expandable="true">DELETE</ion-item-option> </ion-item-options> <ion-item> <!-- CONTENT --> </ion-item> </ion-item-sliding>
Posts: 1
Participants: 1
@andysousa wrote:
I decided it would be a good idea to update to the latest ionic (4.11.x) and angular 8 (8.2.x). Overall, it wasn’t horrible as I was on Ionic 4 beta and Angular 6.
All good until I got to running my tests… ugh. I keep getting this error and I cannot for the life of my find out why.
TypeError: Cannot read property ‘subscribeWithPriority’ of undefined
error properties: Object({ ngDebugContext: DebugContext_({ view: Object({ def: Object({ factory: Function, nodeFlags: 33603585, rootNodeFlags: 33554433, nodeMatchedQueries: 0, flags: 0, nodes: [ Object({ nodeIndex: 0, parent: null, renderParent: null, bindingIndex: 0, outputIndex: 0, checkIndex: 0, flags: 33554433, childFlags: 49152, directChildFlags: 49152, childMatchedQueries: 0, matchedQueries: Object({ }), matchedQueryIds: 0, references: Object({ }), ngContentIndex: null, childCount: 1, bindings: [ ], bindingFlags: 0, outputs: [ ], element: Object({ ns: ‘’, name: ‘stm-root’, attrs: [ ], template: null, componentProvider: Object({ nodeIndex: 1, parent: , renderParent: , bindingIndex: 0, outputIndex: 0, checkIndex: 1, flags: 49152, childFlags: 0, directChildFlags: 0, childMatchedQueries: 0, matchedQueries: Object, matchedQueryIds: 0, references: Object, ngContentIndex: -1, childCount: 0, bindings: Array, bindingFlags: 0, outputs: Array, …
at
at new NavController (http://localhost:9876/karma_webpack/node_modules/@ionic/angular/dist/fesm5.js:1007:1)
at NavController_Factory (http://localhost:9876/karma_webpack/node_modules/@ionic/angular/dist/fesm5.js:1391:118)
at _callFactory (http://localhost:9876/karma_webpack/node_modules/@angular/core/fesm5/core.js:20296:1)
at _createProviderInstance (http://localhost:9876/karma_webpack/node_modules/@angular/core/fesm5/core.js:20254:1)
at resolveNgModuleDep (http://localhost:9876/karma_webpack/node_modules/@angular/core/fesm5/core.js:20229:1)
at createClass (http://localhost:9876/karma_webpack/node_modules/@angular/core/fesm5/core.js:20287:1)
at createProviderInstance (http://localhost:9876/karma_webpack/node_modules/@angular/core/fesm5/core.js:20251:1)
at resolveNgModuleDep (http://localhost:9876/karma_webpack/node_modules/@angular/core/fesm5/core.js:20215:1)
at NgModuleRef.push…/node_modules/@angular/core/fesm5/core.js.NgModuleRef.get (http://localhost:9876/karma_webpack/node_modules/@angular/core/fesm5/core.js:20905:1)
at resolveDep (http://localhost:9876/karma_webpack/node_modules/@angular/core/fesm5/core.js:21276:1)I am not even using subscribeWithPriority in Platform, but doing a little digging I found that it is now in the NavController.
How can’t i get this test to pass? I put the NavController as a provider in my spec.
UPDATE 1:
I just narrowed it down debugging the tests thats its my platform spy. Seems like the call in fesm5 in Ionic core is the culpritplatform.backButton.subscribeWithPriority(0, (/** * @return {?} */ function () { return _this.pop(); }));
platform is null with my spy
Posts: 1
Participants: 1
@ravibhoite22 wrote:
I am trying to load my custom component dynamically in my main page using custom accordion component
but it failed to load component inside component (child component)
CustomSimpleAccordionComponent.html:13 ERROR TypeError: templateRef.createEmbeddedView is not a function at ViewContainerRef_.createEmbeddedView (core.js:26963) at NgTemplateOutlet.ngOnChanges (common.js:5519) at checkAndUpdateDirectiveInline (core.js:27784) at checkAndUpdateNodeInline (core.js:38472) at checkAndUpdateNode (core.js:38411) at debugCheckAndUpdateNode (core.js:39433) at debugCheckDirectivesFn (core.js:39376) at Object.eval [as updateDirectives] (CustomSimpleAccordionComponent.html:13) at Object.debugUpdateDirectives [as updateDirectives] (core.js:39364) at checkAndUpdateView (core.js:38376)
main-page : parent page from where all component imported
this.pageItems = [{ "listItem": "Details", "component": "appApproval" }]; <div *ngFor="let item of pageItems"> <ng-container> <app-custom-simple-accordion [accordionLabel]="item.listItem" [itemTemplate]="item.component" > </app-custom-simple-accordion> </ng-container> </div> <ng-template #appApproval> <app-approval-flow> </app-approval-flow> </ng-template>
app-custom-simple-accordion component : which load child component, passed from parent component
<li fd-list-item class="accordion"> {{ accordionLabel }} <fd-list-action> <button fd-button [options]="'light'" (click)="toggleAccordion()" [glyph]="isExpand ? 'navigation-up-arrow' : 'navigation-down-arrow'" ></button> </fd-list-action> </li> <div *ngIf="isExpand" class="panel"> <ng-template [ngTemplateOutlet]="itemTemplate"></ng-template> </div>
Thanks
Posts: 1
Participants: 1
@OmDIonic wrote:
Hi
I am trying to put two columns at two end in in ion-grid but its not working as expected.
Tried all possible ways by taking reference from https://ionicframework.com/docs/layout/grid. But nothing worksIn first col I have large text and in second col i have just date when I tried using different options it shows date col under first col
What I am doing
<ion-grid> <ion-row > <ion-col size="6"> <div> <ion-label text-wrap> <h3>asdfjaskfdlhasfjaksdhfalkshfkjsahfkjashdfljkashdfjkhasdfjkhalsfjkasf this is large text</h3> </ion-label> </div> </ion-col> <ion-col size="1" class="ion-align-self-center"> <div> </div> </ion-col> <ion-col size="4" class="ion-align-self-center"> <div> 01/01/2020 </div> </ion-col> </ion-row> </ion-grid>
It should responsive in both orientation in landscape and in portrait but its not working.
can anybody tell me what can be best way to do this.?
Posts: 1
Participants: 1
@realestateadvisor wrote:
Ace Group objective is to provide a symbol of perfection & improved quality of living moderns. This Group has always meet with the expectations of the (users)clients and always provides them the utmost satisfaction. ACE Divino is a residential project by ACE Group in Noida Extension offering 2BHK & 3BHK Configuration flats with Study rooms. 3 BHK Apartment Ace Divino
Location Advantages:
• The ideal location of Ace Divino at Greater Noida West has great accessibility and offers basic and public amenities at short distances like educational and hospitals, eating joints, shopping centers, and many more.
• Located at Sector 1 , Greater Noida West
• Proposed Metro station nearby
• Close by is Gautam Buddha Balak Inter college
• Convenient access to major expressways.
• Surrounded by many residential projects.
• A great view of the skylineAmenities and Facilities:
• Swimming pool, Kids pool
• Gym , yoga and meditation hall
• Health club and spa, Restaurants
• Amphitheatre and skating rink, Club house with lounge
• Tennis, badminton and half basketball court
• Indoor games, Pool table
Posts: 1
Participants: 1
@parthifour123 wrote:
In my app, I have installed background fetch plugin that call every 15 mins or some more time interval and do some tasks.
In my app, I have configure this plugin and in promise of configure method, in this method I have scheduled local notification for current day.
Now when i tried to simulate background fetch manually from Xcode Debug menu, It will run this configure method and scheduled local notification for current day. But, when i put the device beside me and do other stuffs on that device, background fetch not simulating automatically at some time interval. Nothing happens and my local notification method won’t call.
Can any one please help me ASAP, what is the issue?We have tested both ionic-3 and ionic-4 latest
My testing device is iPad (iOS 13.3).
Below is my code for this issue :-=> This method is called from constructor
this.platform.ready().then(this.onDeviceReady.bind(this));=> After device ready, this method will call
onDeviceReady() {
this.backgroundMode.enable();this.backgroundMode.on('activate').subscribe(() => { console.log('bg mode active'); this.backgroundFetch.status().then(res => { console.log('status res', res); }).catch(err => { console.log('status err', err); }); }); const config: BackgroundFetchConfig = { stopOnTerminate: false }; this.backgroundFetch.configure(config).then(async () => { console.log('call bg fetch'); this.fetchNotificationData(); this.backgroundFetch.finish(); }).catch(e => console.log('Error initializing background fetch', e));
}
=> This is method for local notification, called from background fetch configure promise
fetchNotificationData() {
const arrDate = [
‘2020-01-09 04:30:00’,
‘2020-01-09 05:30:00’,
‘2020-01-09 06:30:00’,
‘2020-01-09 07:30:00’,
‘2020-01-09 08:30:00’,
‘2020-01-09 09:30:00’,
‘2020-01-09 10:30:00’,
‘2020-01-09 11:30:00’,
‘2020-01-09 12:30:00’,
‘2020-01-09 13:30:00’,
‘2020-01-09 14:30:00’,
‘2020-01-09 16:00:00’,
];
const arr: ILocalNotification[ ] = [ ];
let cnt = 0;arrDate.forEach(element => { cnt++; const dt = new Date(element.replace(' ', 'T')); arr.push({ id: cnt, title: 'MCNL', text: 'Het is tijd voor uw gezondheidsvragen!', trigger: { at: dt }, vibrate: true, wakeup: true, led: 'FF0000', foreground: true }); console.log('local notfication trigger date -', cnt, dt); }); console.log('arr', JSON.stringify(arr)); this.localNotifications.schedule(arr);
}
Posts: 1
Participants: 1
@Abinandhanan wrote:
I’m basically using Ionic 4 to build an IOS Application. I use the InAppBrowser to open a remote URL ( Private network only, uses proxy) to enter credentials, And I capture the token which is generated in a different URL. Redirection fails due to HTTPS Proxy.
The error received is,
WebFilterIsActive returning: NO2020-01-07 09:34:19.517631+0000 MyApp[89642:543584] CDVWebViewDelegate: Detected redirect when loadCount=0
2020-01-07 09:34:20.838758+0000 MyApp[89642:544500] HTTPS Proxy Connection [7] received status code 502
2020-01-07 09:34:20.850462+0000 MyApp[89642:544500] Task <735E1F20-B3F6-4694-B044-F0066861474D>.<0> HTTP load failed, 0/0 bytes (error code: 310 [4:-2096])
2020-01-07 09:34:20.850749+0000 MyApp[89642:544481] NSURLConnection finished with error - code 310
2020-01-07 09:34:20.853417+0000 MyApp[89642:543584] webView:didFailLoadWithError - 310: There was a problem communicating with the secure web proxy server (HTTPS).
Posts: 1
Participants: 1
@Chuuone wrote:
Hey,
I am currently developing a small application as a PoC (proof of concept) for a bigger project. What i am trying to do is build an app with offline mode, which once offline queues all requests and synchronizes them once the connection comes back. I have succesfully made my network manager to listen on network status changes. However, when i go offline webpack tries to load a chunk. Throwing an error below. So a chunk fails loading and somewhere along the line the code is missing definitions.
ChunkLoadError: "Loading chunk 74 failed. (error: http://localhost:8101/74.js)" Webpack 11 core-feeeff0d.js:63 Unhandled Promise rejection: Cstr is undefined ; Zone: <root> ; Task: Promise.then ; Value: TypeError: "Cstr is undefined" initializeComponent core-feeeff0d.js:1715 initializeComponent@http://localhost:8101/vendor.js:108740:18
This is problematic because i need the app to work offline on the browser. The error happens when running the project using command “ionic serve” as well as “ionic cordova run browser”. My current conclusion is that the app will never truly work offline on the browser so long as webpack tries to do its thing because at any point during offline status the app may ask the server for a chunk which just will never be succesful. With that in mind, i need to be able to load the whole app in one go on the browser in order for it to work correctly.
Any insight into the issue or solutions would be very welcome…
My “ionic info”
Ionic: Ionic CLI : 5.4.5 (/usr/local/lib/node_modules/ionic) Ionic Framework : @ionic/angular 4.11.7 @angular-devkit/build-angular : 0.801.3 @angular-devkit/schematics : 8.1.3 @angular/cli : 8.1.3 @ionic/angular-toolkit : 2.1.1 Cordova: Cordova CLI : 9.0.0 (cordova-lib@9.0.1) Cordova Platforms : browser 6.0.0 Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 6 other plugins) Utility: cordova-res : not installed native-run : 0.2.9 (update available: 0.3.0) System: NodeJS : v12.13.1 (/usr/bin/node) npm : 2.15.12 OS : Linux 5.0
Posts: 1
Participants: 1
@flycoders_sourav wrote:
I try to implement auto fill otp but am not get any success am using this below code
constructor(){ document.addEventListener('onSMSArrive', function(e){ var sms = e.data; alert("received sms "+JSON.stringify( sms ) ); if(sms.address=='HP-611773') //look for your message address { this.otp=sms.body.substr(0,4); this.stopSMS(); this.verify_otp(); } }); this.checkPermission(); }
checkPermission() { //alert('checkPermissionAndSend'); this.platform.ready().then(() => { this.androidPermissions.checkPermission(this.androidPermissions.PERMISSION.READ_SMS).then( success => { //if permission granted this.receiveSMS(); }, err =>{ this.androidPermissions.requestPermission(this.androidPermissions.PERMISSION.READ_SMS). then(success=>{ this.receiveSMS(); }, err=>{ alert("cancelled") }); }); this.androidPermissions.requestPermissions([this.androidPermissions.PERMISSION.READ_SMS]); }); } receiveSMS() { if(SMS) SMS.startWatch(function(){ alert('watching started'); }, function(){ alert('failed to start watching'); }); } stopSMS() { if(SMS) SMS.stopWatch(function(){ alert('watching stopped'); }, function(){ alert('failed to stop watching'); }); }
Please help me out am stuck on it since 3 days
Thanks in advance
Posts: 1
Participants: 1
@Rajasekhar123 wrote:
sudo npm i -g cordova trying this in mac terminal
npm WARN rollback Rolling back cordova-fetch@2.0.1 failed (this is probably harmless): EILSEQ: illegal byte sequence, rmdir ‘/usr/local/lib/node_modules/cordova/node_modules/cordova-fetch/node_modules/fs-extra’ npm ERR! code EILSEQ npm ERR! syscall rmdir npm ERR! path /usr/local/lib/node_modules/cordova/node_modules/.cordova-fetch.DELETE npm ERR! errno -92 npm ERR! EILSEQ: illegal byte sequence, rmdir ‘/usr/local/lib/node_modules/cordova/node_modules/.cordova-fetch.DELETE’
npm ERR! A complete log of this run can be found in: npm ERR! /Users/mac/.npm/_logs/2020-01-10T10_23_00_442Z-debug.log
npm install command tried visual studio in project location i am getting
npm ERR! code EILSEQ npm ERR! syscall rmdir npm ERR! path /Users/mac/Desktop/TranscendDesk/RajIonic/Cosmomo/node_modules/.staging/source-map-941bb91d npm ERR! errno -92 npm ERR! EILSEQ: illegal byte sequence, rmdir ‘/Users/mac/Desktop/TranscendDesk/RajIonic/Cosmomo/node_modules/.staging/source-map-941bb91d’
npm ERR! A complete log of this run can be found in: npm ERR! /Users/mac/.npm/_logs/2020-01-10T10_25_04_934Z-debug.log
Posts: 1
Participants: 1