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

(NATIVE AUDIO) Asset reference does not exist

$
0
0

I finally got to the bottom of the java.io.FileNotFoundException: www/{audioUrl} issue.

The answer was linked in (NATIVE AUDIO) Asset not found IOS which said this.

Solution
Cordova Native Audio plugin expects an assets “www” folder. But in an Ionic Capacitor project it’s named “public”.
As the plugin has this value hard coded, the solution in the link below tells you to dive in the plugin source code inside each platform and replace “www” with “public”.

Alternatively add a symlink from the “www” folder to the “public” folder in the android main/assets location.

See this issue for more info:


Using a StencilJS project with Electron for Capacitor

$
0
0

You will want to look at the electron-serve package.

The next iteration of capacitor/electron will fix this issue in the base template.

Ionic capacitor project not working after android studio update

$
0
0

I have just updated android studio and getting following errors

org.xml.sax.SAXParseException; systemId: file:/D:/client/app/android/capacitor-cordova-android-plugins/src/main/AndroidManifest.xml; lineNumber: 5; columnNumber: 49; Element type “application” must be followed by either attribute specifications, “>” or “/>”

Failed to parse XML in D:\client\app\android\capacitor-cordova-android-plugins\src\main\AndroidManifest.xml

Androidmanifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.farm.fork">

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme"
        android:usesCleartextTraffic="true">

        <activity
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
            android:name="com.farm.fork.MainActivity"
            android:label="@string/title_activity_main"
            android:theme="@style/AppTheme.NoActionBarLaunch"
            android:launchMode="singleTask">

            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>

            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="@string/custom_url_scheme" />
            </intent-filter>

        </activity>

        <provider
            android:name="androidx.core.content.FileProvider"
            android:authorities="${applicationId}.fileprovider"
            android:exported="false"
            android:grantUriPermissions="true">
            <meta-data
                android:name="android.support.FILE_PROVIDER_PATHS"
                android:resource="@xml/file_paths"></meta-data>
        </provider>
    </application>

    <!-- Permissions -->

    <uses-permission android:name="android.permission.INTERNET" />
    <!-- Camera, Photos, input file -->
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <!-- Geolocation API -->
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-feature android:name="android.hardware.location.gps" />
    <!-- Network API -->
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <!-- Navigator.getUserMedia -->
    <!-- Video -->
    <uses-permission android:name="android.permission.CAMERA" />
    <!-- Audio -->
    <uses-permission android:name="android.permission.RECORD_AUDIO" />
    <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
</manifest>

npx cap doctor

Capacitor Doctor   

Latest Dependencies:

  @capacitor/cli: 2.1.2

  @capacitor/core: 2.1.2

  @capacitor/android: 2.1.2

  @capacitor/electron: 2.1.2

  @capacitor/ios: 2.1.2

Installed Dependencies:

  @capacitor/ios not installed

  @capacitor/electron not installed


  @capacitor/cli 2.1.2

  @capacitor/core 2.1.2

  @capacitor/android 2.1.2

[success] Android looking great! �👌

Capacitor Device addListener

$
0
0

You could use the plugin capacitor-intents https://github.com/IT-MikeS/capacitor-intents :wink:

and setup Broadcast Receivers with filters,
one for android.intent.action.ACTION_POWER_CONNECTED
and one for android.intent.action.ACTION_POWER_DISCONNECTED
and on startup you can find out whether they are plugged in by (await Device.getBatteryInfo()).isCharging

Scaling Ionic with CSS rem units

$
0
0

Great article guys thanks for sharing it. I every now and then have issues with keeping my layouts intact at the same time as going to really excessive display resolutions. Would you recommend % or VW/VH as a unit degree for layout consistency on diverse display screen resolutions?

Ionic capacitor project not working after android studio update

$
0
0

The error is in D:\client\app\android\capacitor-cordova-android-plugins\src\main\AndroidManifest.xml, you have provided your app AndroidManifest.xml, those are different files

Ionic capacitor live reload not working on android

$
0
0

what are your ionic cli and capacitor/android capacitor/cli versions? try updating to latest

iOS build error: 'Could not find Xcode project' and 'modify_cap_ios_config'


Is Webstorm Good For Angular?

$
0
0

Yes webstorm and visual studo both are best for backend

Reorder group + virtual scroll = problem

$
0
0

Hello everyone,
I tried to combine virtual scrolling and reorder groups like this:

<ion-reorder-group (ionItemReorder)="doReorder($event)" disabled="false">
    <ion-virtual-scroll [items]="items">
      <ion-item *virtualItem="let item">
        <ion-label>
          {{ item }}
        </ion-label>
        <ion-reorder slot="end"></ion-reorder>
      </ion-item>
    </ion-virtual-scroll>
  </ion-reorder-group>

But the problem is that I just can’t select only one item, the entire list is always dragged.
Is there a solution to both have a successful list since I work on large sizes and to be able to drag and drop?

Ionc5 + Capacitor: How to download and to show a PDF?

$
0
0

Hi,
which is the best best, according to you, way to download a PDF and to show it in an Ionic5 app that uses a Capacitor?

Thank you very much

cld

Net: Connection refused error on ionic 3

$
0
0

Hello. I recently upgraded an ionic 3 cordova application and the app works fine on iOS. However, I am unable to load any asset on Android (net: connexion refused (http://localhost/).

I have read about this issue online, but I could only find very old articles about people who wanted compatibility with android KitKat. However, the issue occurs on any android device on my end. It might be related to me upgrading the cordova-plugin-ionic-webview to version 5.

Here is a screenshot of all the errors:

I did allow navigation to anything in my config.xml:

<allow-navigation href="*" />
.....
<plugin name="cordova-plugin-ionic-webview" spec="^5.0.0" />

The icons do exist in the project and work properly in iOS. I was wondering if anyone could help me out figuring out what is wrong.

Thanks!

Ion-content within a modal should fit content height

$
0
0

Hi! just wondering… did you solve this? If so, could you lend me a hand on this?

How to add eye-icon inside input field?

$
0
0

Without toggling and using a single element.

<ion-item>
	<ion-label color="primary" position="floating">Password</ion-label>
	<ion-input name="password" [type]="inputType" [(ngModel)]="inputValue"></ion-input>
	<ion-icon  [name]="(inputType == 'password') ? 'eye' : 'eye-off'" slot="end" (click)="inputType = (inputType == 'password') ? 'text' : 'password';"></ion-icon>
</ion-item>

Ionic capacitor live reload not working on android

$
0
0

It is working with following command

Ionic capacitor run android -l --address=192.168.2.2
Where 192.168.2.2 is ip address


Ionic capacitor project not working after android studio update

$
0
0

Oh sorry. I will upload the correct file tomorrow.

Appflow ignores strings from config.xml (Bluetooth Usage Description)

$
0
0

I misread your problem. You’re trying to make binary for iOS. I thought you were trying to do Live Deploy.

Best advice would be to just do it on your own Mac. Ionic is MIA probably because of the conference they are trying to put on in two weeks.

Appflow ignores strings from config.xml (Bluetooth Usage Description)

$
0
0

@edriven thanks for the answer but I hired the Appflow payment service because it allows me to build the app in the cloud, because I don’t have a Mac.

Anyone with a similar problem using Appflow?
Any ideas how to solve this problem?
Maybe the problem is not Xcode… in which case does someone suggest another cause?

Thanks in advance

ion-button v5 style issue

$
0
0

Hi,

I’m having a problem on stying the ion-button component in v5.

In v4 i use to do this (which worked pretty fine), but i cannot achieve the same result on v5 :

ion-button {

--background: var(--ion-color-primary);
--background-activated: #fff;
--background-focused: #fff;
--background-hover: #fff;

--color: var(--ion-color-primary-contrast);
--color-activated: var(--ion-color-primary);
--color-focused: var(--ion-color-primary);
--color-hover: var(--ion-color-primary);

--transition: all .5s;

--border-width: 1px;
--border-style: solid;
--border-color: var(--ion-color-primary);

--box-shadow: none;

}

I’ve tried this on v5 :

ion-button {

--background: var(--ion-color-primary);
/*--background-activated: #fff;*/
/*--background-activated-opacity: 1;*/
--background-focused: #fff;
--background-focused-opacity: 1;
--background-hover: #fff;
--background-hover-opacity: 1;

--color: var(--ion-color-primary-contrast);
/*--color-activated: var(--ion-color-primary);*/
--color-focused: var(--ion-color-primary);
--color-hover: var(--ion-color-primary);

--transition: all .5s;

--border-width: 1px;
--border-style: solid;
--border-color: var(--ion-color-primary);

--box-shadow: none;
--opacity: 1;

}

But i do have two problems :

  1. The ripple effect its somehow hidden when i use –background-hover-opacity: 1; (actually i need the background-color of the button to be white on hover and focus).
  2. The transition is only working on the color property and not on the background-color.

Thanks for your time,

Is Webstorm Good For Angular?

$
0
0

Maybe this is a semantics issue, but I think of Angular as a frontend environment, so one’s choice of an IDE for Ionic development wouldn’t necessarily be connected to that for “the backend process”. That being said, JetBrains (who make WebStorm) also have products that specialize in all sorts of other languages more suitable for backends, and I personally love them.

Viewing all 231638 articles
Browse latest View live


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