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

Native Geocoder seems not be installed, but is is

$
0
0

@HonzsSedlomn wrote:

I just can’t figure out why I’m getting this error

[15:33:17]  console.warn: Native: tried calling NativeGeocoder.reverseGeocode, but the NativeGeocoder plugin is not 
            installed. 
[15:33:17]  console.warn: Install the NativeGeocoder plugin: 'ionic cordova plugin add cordova-plugin-nativegeocoder' 
[15:33:17]  console.error: plugin_not_installed 

I’ve already installer NativeGeocoder as well as Geolocation, but it still doesn’t work. I did everything that is in the official NativeGeocoder documentation. NativeGeocoder is registered in ionic cordova plugin ls as well as in the package.json.

Any ideas?

Posts: 1

Participants: 1

Read full topic


Will Ionic4 with AngularJS contain the same UI Components like Ionic3?

$
0
0

@razaviv wrote:

Will Ionic4 with AngularJS contain the same UI Components like Ionic3?
And also, with the same or even better performances?
What is the release date?

Thanks

Posts: 3

Participants: 3

Read full topic

How to force HTML input file chooser to give the original file name in Ionic(Android)?

$
0
0

@setu1421 wrote:

I am using HTML input for choosing file in my Ionic3/Angular application. I am using below code:

// in .html file

<input #fileUpload type="file" name="myfile"(change)="onFileChoose($event)"/>

// in .ts file

onFileChoose($event): void {
    this.fileChooser.getFileInfo($event).then((result) => {
      this.fileName = result.fileName;
      this.fileData = this.sanitizeFileData(result.fileData);
      this.fileSize = result.fileSize;
      this.fileType = result.fileType;
    }, (error) => {
      this.helperProvider.createAlert('Alert', 'File is corrupted.');
    });
  }

 getFileInfo(event: Event): Promise<any> {

    let target = event && event.target;
    let files: Array<File> = target && target['files'];

    console.log(files[0].type);
    console.log(files[0].name);

    return new Promise((resolve, reject) => {
      if (files && files.length) {
        files = Array.from(files);
        let fileName = files[0].name;
        let fileSize = files[0].size;
        let fileType = files[0].type;
        let fileReader = new FileReader();

        fileReader.onload = () => resolve({
          fileData: fileReader.result,
          fileName: fileName,
          fileSize: fileSize,
          fileType: fileType
        });

        fileReader.onerror = error => reject(error);

        fileReader.onabort = error => reject(error);

        fileReader.readAsDataURL(files[0])
      }
    });
  }

This is working fine in iOS and Browser. Both, in android and browser, i could get the original name, size and type of the file. But the problem occurs in Android.

Scenario-1(Android): When i choose an image file using the file chooser, i could get the original file name, size and type of the file.

Scenario-2(Android): When i choose a file other than image file like .pdf,.doc etc, i could not get the original file name and the type of the file. Suppose, i have choosen a file name “sample.pdf”, but after i chose the file, i get the file name as a random number like 45675 and most importantly the file type, i got is empty.

Then, i researched in stackoverflow and saw these links (link1 and link2). It may be a security issue for android.

There is an ionic-native/file-chooser library but it is only for android platform.

Is there any way to force android to give the original file name?

Posts: 1

Participants: 1

Read full topic

Providing automated login credentials in Pre-launch test of Google play console

$
0
0

@karx wrote:

I recently uploaded my first app on google play. I started exploring the google play console and came across the Pre-launch tests.

We need to provide android resource name for the text-field for login, password and button for Sign-In button to make it work.

Any idea on how I could get this android resource names, or attach them to my elements.

Posts: 1

Participants: 1

Read full topic

Problem to buid android project

$
0
0

@Jos1234 wrote:

Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details

publishNonDefault is deprecated and has no effect anymore. All variants are now published.
Checking the license for package Android SDK Platform 26 in C:\Tools\Android\android-sdk\licenses
Warning: License for package Android SDK Platform 26 not accepted.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':CordovaLib'.
> You have not accepted the license agreements of the following SDK components:
  [Android SDK Platform 26].
  Before building your project, you need to accept the license agreements and complete the installation of the missing components using t
he Android Studio SDK Manager.
  Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/
export-licenses.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 56s
(node:8608) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':CordovaLib'.
> You have not accepted the license agreements of the following SDK components:
  [Android SDK Platform 26].
  Before building your project, you need to accept the license agreements and complete the installation of the missing components using t
he Android Studio SDK Manager.
  Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/
export-licenses.html

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 56s
    at ChildProcess.whenDone (C:\Users\Jos\Documents\IONIC\helloWorld\platforms\android\cordova\node_modules\cordova-common\src\superspaw
n.js:169:23)
    at emitTwo (events.js:126:13)
    at ChildProcess.emit (events.js:214:7)
    at maybeClose (internal/child_process.js:925:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
(node:8608) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async fu
nction without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:8608) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not han
dled will terminate the Node.js process with a non-zero exit code.

Please someone can help me

Posts: 1

Participants: 1

Read full topic

Request Was denied for security

$
0
0

@srajabhoj wrote:

HI,

Like most developers I am also facing “Request Was denied for security” whenever I am trying to use HTTPS links.

Tried approches
Added pem file in network security config.
Added wildcard entries in config.xml

Everthing is just not working for me can someone please help he?

Posts: 1

Participants: 1

Read full topic

How ionic apps connect realtime to eachother?

$
0
0

@rsa wrote:

is there any possibel way to connecting two or more ionic apps to each other? for example realtime or true time negotistion medis or information (directly end to end)sharing?

Posts: 1

Participants: 1

Read full topic

Cordova-plugin-googleplus missing issue

$
0
0

@steveredstorm wrote:

On Ionic 3 if I use cordova-plugin-googleplus plugin and run the app through DevApp on the ios or android will it work or Ionic has to support that plugin first?

I get this when I run:
console.warn: Native: tried calling GooglePlus.login, but the GooglePlus plugin is not installed.
console.warn: Install the GooglePlus plugin: ‘ionic cordova plugin add cordova-plugin-googleplus’

Also I get this on SplashScreen too:
console.warn: Native: tried calling SplashScreen.show, but the SplashScreen plugin is not installed.
console.warn: Install the SplashScreen plugin: ‘ionic cordova plugin add cordova-plugin-splashscreen’

But of course all plugins are installed and available

When u run it with ionic cordova run browser then u will get this:
Error: exec proxy not found for :: GooglePlus :: login
Anyone good at this?

Posts: 1

Participants: 1

Read full topic


Error: Unable to merge dex in deploying to android

$
0
0

@xixiao wrote:

Hi all,

I have googled around and tried “ionic cordova clean; ionic cordova build”, but no success.

Ionic info

cli packages: (/Users/xixiao/projects/dublearn/node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 2.1.4
    Cordova Platforms  : android 7.0.0
    Ionic Framework    : ionic-angular 3.5.3

System:

    Android SDK Tools : 26.1.1
    Node              : v9.9.0
    npm               : 5.6.0
    OS                : macOS High Sierra

Environment Variables:

    ANDROID_HOME : /Users/xixiao/Library/Android/sdk

Misc:

    backend : pro

deploy to android

Running app-scripts build: --platform android --target cordova
[23:36:06]  build dev started ...
[23:36:06]  clean started ...
[23:36:06]  clean finished in 12 ms
[23:36:06]  copy started ...
[23:36:06]  transpile started ...
[23:36:11]  transpile finished in 4.44 s
[23:36:11]  preprocess started ...
[23:36:11]  deeplinks started ...
[23:36:11]  deeplinks finished in 145 ms
[23:36:11]  preprocess finished in 146 ms
[23:36:11]  webpack started ...
[23:36:11]  copy finished in 4.83 s
[23:36:23]  webpack finished in 12.13 s
[23:36:23]  sass started ...
[23:36:24]  sass finished in 1.44 s
[23:36:24]  postprocess started ...
[23:36:24]  removed unused font files
[23:36:24]  postprocess finished in 23 ms
[23:36:24]  lint started ...
[23:36:24]  build dev finished in 18.30 s
> cordova run android
cordova-android-support-gradle-release.before-prepare: No custom version found in config.xml - using plugin default
Android Studio project detected

cordova-android-support-gradle-release.after-prepare: No custom version found in config.xml - using plugin default
ANDROID_HOME=/Users/xixiao/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_162.jdk/Contents/Home
studio
Subproject Path: CordovaLib
Subproject Path: app
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
+-----------------------------------------------------------------

| cordova-android-support-gradle-release: 27.+

+-----------------------------------------------------------------

Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.

null
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.

	at build_5v5s05ej96ko7wx1m8sd0cmqd.run(/Users/xixiao/projects/dublearn/platforms/android/app/build.gradle:146)

org.xwalk:xwalk_core_library:23+

:CordovaLib:preBuild
 UP-TO-DATE
:CordovaLib:preDebugBuild
 UP-TO-DATE
:CordovaLib:compileDebugAidl
 UP-TO-DATE
:CordovaLib:compileDebugRenderscript
 UP-TO-DATE
:CordovaLib:checkDebugManifest
 UP-TO-DATE
:CordovaLib:generateDebugBuildConfig
 UP-TO-DATE
:CordovaLib:prepareLintJar
UP-TO-DATE

:CordovaLib:generateDebugResValues
 UP-TO-DATE
:CordovaLib:generateDebugResources
 UP-TO-DATE

:CordovaLib:packageDebugResources
UP-TO-DATE
:CordovaLib:platformAttrExtractor
UP-TO-DATE
:CordovaLib:processDebugManifest
 UP-TO-DATE
:CordovaLib:processDebugResources

UP-TO-DATE
:CordovaLib:generateDebugSources
 UP-TO-DATE
:CordovaLib:javaPreCompileDebug

UP-TO-DATE
:CordovaLib:compileDebugJavaWithJavac
 UP-TO-DATE
:CordovaLib:processDebugJavaRes

NO-SOURCE
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug
 UP-TO-DATE
:app:cdvCreateAssetManifest

:app:preBuild

:app:preArm64DebugBuild
 UP-TO-DATE
:app:compileArm64DebugAidl
 UP-TO-DATE
:CordovaLib:packageDebugRenderscript NO-SOURCE
:app:compileArm64DebugRenderscript
 UP-TO-DATE
:app:checkArm64DebugManifest UP-TO-DATE
:app:generateArm64DebugBuildConfig UP-TO-DATE
:app:prepareLintJar UP-TO-DATE
:CordovaLib:mergeDebugShaders UP-TO-DATE
:CordovaLib:compileDebugShaders UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets UP-TO-DATE
:app:mergeArm64DebugShaders
 UP-TO-DATE
:app:compileArm64DebugShaders UP-TO-DATE
:app:generateArm64DebugAssets UP-TO-DATE
:app:mergeArm64DebugAssets
 UP-TO-DATE
:app:createXwalkCommandLineFileArm64Debug
:app:generateArm64DebugResValues

:app:generateArm64DebugResources
:app:mergeArm64DebugResources

:app:createArm64DebugCompatibleScreenManifests UP-TO-DATE
:app:processArm64DebugManifest
 UP-TO-DATE
:app:splitsDiscoveryTaskArm64Debug
UP-TO-DATE
:app:processArm64DebugResources
[23:36:31]  lint finished in 6.51 s

:app:generateArm64DebugSources
:app:javaPreCompileArm64Debug
 UP-TO-DATE
:app:compileArm64DebugJavaWithJavac
 UP-TO-DATE
:app:compileArm64DebugNdk NO-SOURCE
:app:compileArm64DebugSources UP-TO-DATE
:app:transformClassesWithStackFramesFixerForArm64Debug
 UP-TO-DATE
:app:transformClassesWithDesugarForArm64Debug
 UP-TO-DATE

:app:transformClassesWithDexBuilderForArm64Debug

UP-TO-DATE
:app:transformDexArchiveWithExternalLibsDexMergerForArm64Debug
 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForArm64Debug'.
> java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or
--debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 6s

39 actionable tasks: 6 executed, 33 up-to-date
(node:25356) UnhandledPromiseRejectionWarning: Error: /Users/xixiao/projects/dublearn/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForArm64Debug'.
> java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 6s
    at ChildProcess.whenDone (/Users/xixiao/projects/dublearn/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
    at ChildProcess.emit (events.js:180:13)
    at maybeClose (internal/child_process.js:936:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5)
(node:25356) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:25356) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Posts: 2

Participants: 1

Read full topic

Why ion-scroll in v3.9.2 has no bouncing, but v.1 is?

$
0
0

@nkhuynh wrote:

Hello guys,

I’m working Ionic v3.9.2 to make a list thumbnails to able to scrolling and boucing (in first or last thumbnail) with ion-scroll by using scrollX=“true”. I notice that the boucing effect is available in version 1 Ionic, but the current one version is not. Also, there are a lot of events API in version 1. Why latest version is unavailable?

Any help is much appreciated. Thank you!

Posts: 1

Participants: 1

Read full topic

Angular 4 displays multiple results after a function is performed

$
0
0

@maxvortex wrote:

I’m a noob and I’m stuck in a problem, I’ve searched everywhere but I couldn’t exactly find a proper solution for it. Have a look at my code

getmyfriends() {
let allfriends;
var friendsuid = [];
this.firefriends.child(firebase.auth().currentUser.uid).on('value', (snapshot) => {
  allfriends = snapshot.val();
  this.myfriends = [];
  for (var i in allfriends){
    friendsuid.push(allfriends[i].uid);
}
  this.userservice.getallusers().then((users) => {
    this.myfriends = [];
    for (var j in friendsuid)
      for (var key in users) {
        if (friendsuid[j] === users[key].uid) {
          this.myfriends.push(users[key]);
        }
      }
    this.events.publish('friends');
  }).catch((err) => {
    alert(err);
  })

})
}

^this is the code from my provider file.

ionViewWillEnter(){
this.requestservice.getmyrequests();
this.requestservice.getmyfriends();
this.myfriends = [];
this.events.subscribe(‘gotrequests’, () => {
this.myrequests = [];
this.myrequests = this.requestservice.userdetails;
})
this.events.subscribe(‘friends’, () => {
this.myfriends = [];
this.myfriends = this.requestservice.myfriends;
})
}

^This code is from my component

When I use ngFor in my html, it works fine the first time. But when I delete a user or add another user, my result gets duplicated and when I refresh the page, the extra duplicate results disappear… How can I fix it? I don’t want to display duplicates. I’m using realtime firebase.
Do I need to unsubscribe ? If yes, then how should I do that. Please explain in detail. Thank you!

Posts: 2

Participants: 2

Read full topic

Issues data binding to a method with an *ngFor variable as a parameter

$
0
0

@Podum wrote:

The console will continue logging data. The getAvatar method is being called over and over. Is there an alternative to the code I have below?

users.ts

...
  getAvatar(mediaId) {
    let mediaQuery = "?parent=" + mediaId;
    this.wpService.getMedia(mediaQuery).then((mediaData) => {
      //console.log(mediaData[0].source_url);
      return mediaData[0].source_url;
    });
  }
...

users.html

...
    <ion-item *ngFor="let aPerson of persons">
      <ion-avatar item-start>
        <img src="{{getAvatar(aPerson.id)}}">
      </ion-avatar>
...

Posts: 5

Participants: 2

Read full topic

White screen after run android

$
0
0

@jmill123 wrote:

Hello Fellas,
I’ve created an app. Below is what I did :

  • I need it for Android SDK 16 (Android 4.1.1). BUT when I did ionic cordova platform add android it forces intall android 7.0.0. I tried ionic cordova platform add android@4.1.1 with no success. Therefore, I changed 7.0.0 by 4.1.1 in packages.json. In config.xml, minSdkVersion, maxSdkVersion, targetSdkVersion are ALL set to 16.

  • The manipulation above got my app to be deployed via ionic cordova run android But with this, I got Connection to server was unsuccessful to “www/assets/index.html

  • To solve that, I used in config.xml. But now when I run the app, it gets stuck on a white screen. No GUI appears. I tried setting preferences as suggested here but it did not change anything,

I need my app to be compatible with API 16 at least

Posts: 4

Participants: 2

Read full topic

Ionic Firebase AngularFire2 User roles and database

$
0
0

@benmcm1994 wrote:

Hi guys,

I’m currently developing an app that requires two user types, lets say Leaders and Employees. I’d like to make use of Firebase authentication and Firestore. I have Firebase authentication working but I can’t seem to map the userID Firebase authentication generates to my User collection in my database.

I’d like to have the user sign up with Email and password, then for the userID, the email and some other details to be saved to the User collection in the database.

I currently have this in my auth provider:

export class AuthProvider {
  
  user: Observable<firebase.User>;
  userID = firebase.auth().currentUser.uid;

  constructor(private afAuth: AngularFireAuth) {
    this.user = afAuth.authState;
  }

  registerUser(email: string, password: string) {
    this.afAuth
      .auth
      .createUserWithEmailAndPassword(email, password)
      .then(user => {
        firebase.firestore().collection('users').doc(this.userID).set(user);
        console.log('Success, user created', user);
      })
      .catch(err => {
        console.log('Something went wrong:',err.message);
      });    
  }

They are getting added but I can’t get the “uid” to add to the collection in the database due to the “uid” being null. I believe I have to get the “uid” when the user is created but I’m unsure how.

If anyone could help and also point me in the direction of good tutorials involving Ionic and Firebase/Firestore it would be appreciated.

Thanks.

Posts: 2

Participants: 2

Read full topic

How to get marker instance when using addMarkerCluster

$
0
0

@Jamesionic wrote:

I am using addMarkerCluster to add markers on the map, but how I can get marker instance if I want to set some of them invisible?

thanks.

this.mainMap.addMarkerCluster({
markers: clusterMarkers,
icons: [
{ min: 10, max: 50, url: “./assets/icon/m1.png” },
{ min: 51, max: 200, url: “./assets/icon/m2.png” },
{ min: 201, max: 1000, url: “./assets/icon/m3.png” },
{ min: 1001, max: 10000, url: “./assets/icon/m4.png” },
{ min: 10001, max: 100000, url: “./assets/icon/m3.png” }

                ]
            }).then(markerCluster => {
             });

clusterMarkers = [{
position: { lat: xxx, lng: xxx},

            title: '',
            icon: markerIcon
        },......]

Posts: 2

Participants: 1

Read full topic


Use of generic Angular components on Ionic

$
0
0

@Coelho wrote:

Hi,

I’m looking for a “select” component that supports largte datasets and custom autocomplet features. I’ve found one at https://github.com/ng-select/ng-select.

My question is, can I use components like this, from the “Angular + Bootstrap” world on Ionic apps ?

Thank you

Posts: 1

Participants: 1

Read full topic

Loading of Logged In Page with previous login page processing

$
0
0

@lado wrote:

Hello,

Each time with opening of app, user checking code in home.ts loads this.navCtrl.setRoot(LoggedinPage);, to keep user logged in.

Before LoggedinPage is loaded, the login form of home.ts appears for a moment. How to avoid this.

I’ve tried <div *ngIf="isLoggedIn; else loginTemplate"> in home.html but same result

Posts: 1

Participants: 1

Read full topic

Prevent Zoom In on Progressive Web Apps

$
0
0

@Podum wrote:

When I view my progressive web app on my device I noticed that I can zoom in by using both my thumbs to swipe outwards. Is there any way to prevent this?

Posts: 1

Participants: 1

Read full topic

How to upload Multiple images

Access device browser history by ionic app

$
0
0

@manjulaucsc wrote:

Hi guys,

I need to create mobile app that can access mobile device browser history urls is there any plugins in ionic cordova pluging to do that or can we do that from ionic cordova

Posts: 1

Participants: 1

Read full topic

Viewing all 71080 articles
Browse latest View live


Latest Images

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