Quantcast
Channel: Ionic Forum - Latest topics
Viewing all 70896 articles
Browse latest View live

'Push' and 'Firebase Analytics' plugin conflict

$
0
0

@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:

  1. Create some ionic-angular project
ionic start someProjectName super --type=ionic-angular
  1. 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
  1. 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
  1. Add the android platform
ionic cordova platform add android
  1. Create a firebase project and put the google-services.json inside platforms/android/app

  2. 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

Read full topic


Menu width in a split pane

$
0
0

@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, and you have to do that :

.my-custom-menu {
  min-width: 300px !important;
  max-width: 300px !important;
}

So I’m a little bit confused … ?

Posts: 1

Participants: 1

Read full topic

How to pass subscription counter to header of AlertController

$
0
0

@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

Read full topic

Ionic Angular countries flags doesn't show up

$
0
0

@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

Read full topic

App file size is big after production build

$
0
0

@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 with ionic 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.1

Have anyone experienced the same issue.
Thanks in advance.

Posts: 1

Participants: 1

Read full topic

Ion-item-option does not expand to full width after swiping beyond threshold (bounces back)

$
0
0

@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

Read full topic

Ionic 4 + angular 8 test failure

$
0
0

@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.

Posts: 1

Participants: 1

Read full topic

Which way user can log in to Linksys wifi Extender?


child component passed from parent not working in ngFor

$
0
0

@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

Read full topic

Two column at two end in gird

$
0
0

@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 works

In 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

Read full topic

Which plugin/approach to use for recording and playing video's on Android and iOS

$
0
0

@vasanthb wrote:

Hi All, My app has a requirement to capture and play the video. I have been trying it with cordova-plugin-media-capture plugin. Since modern phones have capabilities to record HD and 4k video’s on mobile. I need to control the quality of video. So in video option I have given the quality as 0. I have below problems because of that.

  1. Some phones are considering the quality parameter and saving the video in .3gp format. But .3gp format is not playable on iOS. I want video recorded on Android to play on iOS and vice versa.

  2. Some phones are not considering the quality parameter and video is saved in .mp4 format. Video with this format will be bulkier and take lot of time to upload and also it needs lot of data.

I need to resolve both of this problem.I must be able to record in a format that is playable on both Android and iOS also I must be able to control the quality of video. Converting the format or changing the video quality on server is not acceptable solution in my case. I even checked cordova-plugin-video-capture-plus, but no help. Since it is a common problem, many might have faced it. Kindly help me out with your answers.

Posts: 1

Participants: 1

Read full topic

Enjoy a Meaningful Life with 3 BHK Apartment Ace Divino

$
0
0

@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 skyline

Amenities 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

Read full topic

Background fetch not simulating automatically

$
0
0

@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

Read full topic

Ionic 4 inappbrowser https proxy issue

$
0
0

@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: NO

2020-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

Read full topic

Webpack prevents offline mode from working correctly on browsers

$
0
0

@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

Read full topic


How to detect browser platform and mobile browser in Ionic 4 project?

$
0
0

@pragz wrote:

Hi, I want to call a function in mobile browser or desktop( ionic 4 cordova browser platform) and not in a cordova android/ios. I tried using platform but no luck, unable to identify desktop and mobile browser. Not sure what I am missing here.

Posts: 1

Participants: 1

Read full topic

OTP Auto detect is not working

$
0
0

@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

Read full topic

Getting gap_init prompts when using Crosswalk xWalkView

$
0
0

@krishnanspace wrote:

So I have a project where we are using Crosswalk. In this project in the index.html the line
<script> cordova.js</script> was commented.

So everything was working fine without any problems. Now due to some new requirements I need to use the cordova.js file.

On uncommenting it, building and running the android app , I get the following JS prompt as soon as the app starts.

After a lot of debugging I found out that using the Crosswalk library causes this issue. Removing the code for Crosswalk would also remove these prompts.

These are the prompts. It seems that some people on this forum have faced this issue but no one has found an conclusive solution for this.

gap_init:3
gap:[null,“CoreAndroid”,“messageChannel”,“CoreAndroid1311606310”]
gap:[null,“CoreAndroid”,“show”,“CoreAndroid1311606311”]
gap:[null,“Device”,“getDeviceInfo”,“Device1311606312”]

What would be causing this? Thanks!

Posts: 1

Participants: 1

Read full topic

Node-modules and Cordova installation is failed in ionic 4

$
0
0

@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

Read full topic

Ionic Appflow Deploy Live Updates - 404 Error After App reload

$
0
0

@absar wrote:

I am getting 404 Error cordova.js ect. after App reloaded to apply new changes from production channel.

Below are the code I used for: Here download and extract works but when it reloadApp called it gives white screen after app re-launch and in console I see 404 errors.

Let me know if I am missing anything, before update app works well.

await Deploy.configure({ channel: ‘production’});

const update = await Deploy.checkForUpdate();

console.log(update);

if (update.available) {

  await Deploy.downloadUpdate((progress) => {

    this.progress = progress;

    console.log(progress);

  })

  await Deploy.extractUpdate((progress) => {

    this.progress = progress;

    console.log(progress);

  })

  await Deploy.reloadApp();

}

Posts: 1

Participants: 1

Read full topic

Viewing all 70896 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>