Quantcast
Channel: Ionic Forum - Latest posts
Viewing all 228527 articles
Browse latest View live

Android app crashing - out of memory error

$
0
0

I need to list thousands of images .So i used virtual scroll, using virtual scroll app gets out of memory error and app has crashed after scrolling.


Geolocation is not working on android devices

$
0
0

Geolocation is not working on my android device, although it works on ios devices.
When I launch the app for the first time on my device, it asks me about the permissions on using geolocation but then it does go inside the function.
WHAT IS THE PROBLEM?

package.json:

{
  "name": "weather-app",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "https://ionicframework.com/",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/common": "~8.1.2",
    "@angular/core": "~8.1.2",
    "@angular/forms": "~8.1.2",
    "@angular/platform-browser": "~8.1.2",
    "@angular/platform-browser-dynamic": "~8.1.2",
    "@angular/router": "~8.1.2",
    "@ionic-native/android-permissions": "^5.19.1",
    "@ionic-native/core": "^5.0.0",
    "@ionic-native/geolocation": "^5.19.1",
    "@ionic-native/splash-screen": "^5.0.0",
    "@ionic-native/status-bar": "^5.0.0",
    "@ionic/angular": "^4.7.1",
    "cordova": "^9.0.0",
    "cordova-android": "8.1.0",
    "cordova-ios": "^5.1.1",
    "cordova-plugin-add-swift-support": "^2.0.2",
    "cordova-plugin-android-permissions": "^1.0.2",
    "cordova-res": "^0.8.1",
    "core-js": "^2.5.4",
    "rxjs": "^6.5.4",
    "tslib": "^1.9.0",
    "zone.js": "~0.9.1"
  },
  "devDependencies": {
    "@angular-devkit/architect": "~0.801.2",
    "@angular-devkit/build-angular": "~0.801.2",
    "@angular-devkit/core": "~8.1.2",
    "@angular-devkit/schematics": "~8.1.2",
    "@angular/cli": "~8.1.2",
    "@angular/compiler": "~8.1.2",
    "@angular/compiler-cli": "~8.1.2",
    "@angular/language-service": "~8.1.2",
    "@ionic/angular-toolkit": "^2.1.1",
    "@types/jasmine": "~3.3.8",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~8.9.4",
    "codelyzer": "^5.0.0",
    "cordova-plugin-device": "^2.0.3",
    "cordova-plugin-ionic-keyboard": "^2.2.0",
    "cordova-plugin-ionic-webview": "^4.1.3",
    "cordova-plugin-splashscreen": "^5.0.3",
    "cordova-plugin-statusbar": "^2.4.3",
    "cordova-plugin-whitelist": "^1.3.4",
    "eslint": "^6.8.0",
    "jasmine-core": "~3.4.0",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~4.1.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~2.0.1",
    "karma-jasmine-html-reporter": "^1.4.0",
    "protractor": "~5.4.0",
    "ts-node": "~7.0.0",
    "tslint": "^5.20.1",
    "tslint-config-mway": "^2.0.4",
    "typescript": "^3.4.5"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-whitelist": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {
        "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
      },
      "cordova-plugin-ionic-keyboard": {},
      "cordova-plugin-geolocation": {},
      "cordova-plugin-android-permissions": {}
    },
    "platforms": [
      "android",
      "ios"
    ]
  },
  "optionalDependencies": {
    "ios-deploy": "1.9.3"
  }
}

AndroidManifest file:

<?xml version='1.0' encoding='utf-8'?>
<manifest android:hardwareAccelerated="true" android:versionCode="1" android:versionName="0.0.1" package="io.ionic.starter" xmlns:android="http://schemas.android.com/apk/res/android">
    <supports-screens android:anyDensity="true" android:largeScreens="true" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="true" />
    <uses-permission android:name="android.permission.INTERNET" />
    <application android:hardwareAccelerated="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:networkSecurityConfig="@xml/network_security_config" android:supportsRtl="true" android:usesCleartextTraffic="true">
        <activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:theme="@android:style/Theme.DeviceDefault.NoActionBar" android:windowSoftInputMode="adjustResize">
            <intent-filter android:label="@string/launcher_name">
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
    <uses-feature android:name="android.hardware.location.gps" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
</manifest>

My function in the component.ts:

getGeoLocation() {
    this.geolocation.getCurrentPosition({ enableHighAccuracy: false }).then((resp) => {
      this.geoLatitude = resp.coords.latitude;
      this.geoLongitude = resp.coords.longitude;
      const city = {
        isActive: this.isActive,
        latitude: this.geoLatitude,
        longitude: this.geoLongitude
      };
    }).catch((error) => {
      console.log('Error getting location', error);
    });
  }

How to implement background service on my ionic 4 app?

$
0
0

I intend to use this module:

https://ionicframework.com/docs/native/background-mode

However, this module makes my app crash when I enable it. Is there any alternative way to implement background service? Thank you.

My device is Android 10 Sony Xperia 1.

info

Ionic:

   Ionic CLI                     : 5.4.13
   Ionic Framework               : @ionic/angular 4.11.7
   @angular-devkit/build-angular : 0.803.21
   @angular-devkit/schematics    : 8.1.3
   @angular/cli                  : 8.1.3
   @ionic/angular-toolkit        : 2.0.0

plugin list

com.unarin.cordova.beacon 3.8.1 "Proximity Beacon Plugin"
cordova-plugin-autostart 2.3.0 "Autostart"
cordova-plugin-background-mode 0.7.3 "BackgroundMode"
cordova-plugin-badge 0.8.8 "Badge"
cordova-plugin-ble-central 1.2.4 "BLE"
cordova-plugin-browsertab 0.2.0 "cordova-plugin-browsertab"
cordova-plugin-compat 1.2.0 "Compat"
cordova-plugin-device 2.0.3 "Device"
cordova-plugin-geolocation 4.0.2 "Geolocation"
cordova-plugin-googlemaps 2.6.2 "cordova-plugin-googlemaps"
cordova-plugin-inappbrowser 3.2.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 4.1.3 "cordova-plugin-ionic-webview"
cordova-plugin-local-notification 0.9.0-beta.2 "LocalNotification"
cordova-plugin-nativestorage 2.3.2 "NativeStorage"
cordova-plugin-splashscreen 5.0.3 "Splashscreen"
cordova-plugin-statusbar 2.4.3 "StatusBar"
cordova-plugin-whitelist 1.3.4 "Whitelist"
cordova.plugins.diagnostic 5.0.1 "Diagnostic"

Is there any free ionic supporting dicom image viewer is available?

$
0
0

Is there any free ionic supporting dicom image viewer is available ???

Cordova pluggins security issue on veracode scan

$
0
0

I Have developed an application using ionic 3 and i used “cordova-plugin-x-socialsharing” ,“cordova-plugin-local-notification” , my veracode result scan is pointing this plugins with vulnerabiulities , please is ionic doing something to help fix those security vulnerability issues and if you have any good suggestions on what i can do to fix this.

How to upload a file(image or video) to server in ionic

Firebase storage on Ionic 4

$
0
0

You can install firebase package in your project via npm and start using it. if you need more help about then message me and I will personally help you.

How to install Facebook SDK for App Ads in Ionic project?

$
0
0

Please can I have all the code you used, I have been looking a way to integrate Social media sharing into an ionic app. The one in Ioinc component is not reliable. And as a newbie in Ioinc I can’t see from you code a way to implement it


Reloading not working when deployed through a Node.js server

$
0
0

I have a project deployed as a website (not a PWA) through a node.js server. The website works as intended, but when reloaded on a particular page (let’s say lvh.me:3000/home), I get a error on the page “cannot get /home”.

The project works perfectly on ionic serve without any error on the browser console. But when the above issue arises, I get an error of “Refused to load the image ‘http://lvh.me:3000/favicon.ico’ because it violates the following Content Security Policy directive: “default-src ‘none’”. Note that ‘img-src’ was not explicitly set, so ‘default-src’ is used as a fallback.”

Any suggestion on how to resolve this?

Problem with ion-refresher

$
0
0

Good morning, I’m having a problem with the ionic component: ion-refresher

When I launch it, I mean I pull to resfresh on another page, they all work perfectly,

The problem occurs when I throw it on one that is in the ion-content of a tab, when launching said refresher all the others are blocked

CORS ISSUE - IONIC 5 Cordova 9 - web api PHP

$
0
0

Did you add headers in your PHP code?

CORS ISSUE - IONIC 5 Cordova 9 - web api PHP

$
0
0

Yes, see my headers:

// headers
header(“Access-Control-Allow-Origin: *”);
header(“Content-Type: application/json; charset=UTF-8”);
header(“Access-Control-Allow-Methods: DELETE”);
header(“Access-Control-Max-Age: 3600”);
header(“Access-Control-Allow-Headers: Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With”);

How to Print Base64 images through a bluetooth printer

$
0
0

hello test-nikko, Can i know how you are writing image to printer. Can you display a line of code if possible? Thanks in advance!

Custom header height issue in ionic 4

$
0
0

What have you tried? Post your code.

Google Analytics - which plugin?


Unable to Inspect for playstore downloaded apps

$
0
0

You cannot inspect apps that has been publish, must be in dev mode.

Google Analytics - which plugin?

$
0
0

Thanks - i know about the plugin (as I mentioned in my post) - it’s more a confusion about which of the two plugins to use (or indeed whether either of them are required if I could use AngularFire). My comment was raised after seeing discussions such as this one.

Cannot find module '@ionic-native/diagnostic/ngx'.ts(2307)

Getting apk build failure when using ionic-native/push and ionic-native/background-geolocation

Ionic 3 build apk

Viewing all 228527 articles
Browse latest View live


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