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

Issue with Importing Ionic App into Android Studio

$
0
0

Have followed the tutorial (Android Development - Ionic Documentation )for setting up Ionic App with Capacitor in Android Studio
installed Android Studio on Windows and then run following command
ionic capacitor run android
The Project Opesn in Android Studio and the avd is installed but I have a few errors in the project and when I try to run the project as an Android APP I get no module specified any ideas what I am doing wrong?

Thanks

1 post - 1 participant

Read full topic


Add pre prepared db file to ionic project and read data

Ionic app HttpClient remote MySQL PHP XMLHttpRequest has been blocked by CORS policy

$
0
0

Hello,

I’m trying to POST and GET data from a remote MySQL database with PHP from Ionic -v: 6.13.1 request with using of import { HttpClient } from '@angular/common/http'; as private http: HttpClient in constructor::

request.page.ts:

 post() {
   let myHeaders = { 'Content-Type': 'application/json' };
    let postParams = '&ID=' + 1;
    this.http
      .post(this.phpPath + 'group.php', postParams, { headers: myHeaders })
      .subscribe(
        (data) => {
          console.log(data);
        },
        (error) => {
          console.log('Error' + error);
        }
      );
  }

connect.php:

<?php
header("Access-Control-Allow-Origin: *");
header('Content-type: text/xhtml; charset=windows-1255');

$con = new mysqli('serverIp', 'username', 'password');
$con->set_charset('utf8');

if (!$con)
{
    echo 'Not Connected To Server';
}
 
if (!mysqli_select_db ($con, 'museit_db'))
{
    echo 'Database Not Selected';
}
?>

I’ve tried add connect.php:

header('Access-Control-Allow-Origin: *');
header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Access-Control-Request-Method, Authorization");
header('Access-Control-Allow-Methods: POST, GET, DELETE, PUT, PATCH, OPTIONS');

and group.php:

<?php
require 'connect.php';

$ID = mysqli_real_escape_string($con, $_POST["ID"]);

$sql = "SELECT ID, keys, folders FROM document ORDER BY ID";
$result = mysqli_query($con, $sql);
$myArray = array();
if (mysqli_num_rows($result) > 0) {
    while($row = mysqli_fetch_assoc($result)) {
       $myArray[] = $row;
    }
    echo json_encode($myArray);
} else {
    echo "0 results";
}

mysqli_close($con);
?>

but chrome console:

Access to XMLHttpRequest at ‘path/group.php’ from origin ‘http://localhost:8100’ has been blocked by CORS policy: Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response.

1 post - 1 participant

Read full topic

Display only last part of string at visible area. iOS platform problem

$
0
0

Good day! Could anyone help please… how to display only last part of string at <ion-title> </ion-title> without line breaks ? E.g. " ...string.

I add style direction: rtl; to ion-title and it working well on android platfrom but not on iOS.

For example I have a string … “Vaderstad US Dealer / 660 TANK ICON 660 TANK ICON 2021 (202110000 - 202119999) / AUGER / FILL SYSTEM FRONT SUPPORT ASY - 500 & 660”

On android platform it looks correctly. In visible area the end of srting RT ASY - 500 & 660

On ios platform it looks not correctly. In visible area I see the beginning of string.

On iOS and Android platform styles the same. Could anyone help please ?

1 post - 1 participant

Read full topic

Android status bar shown on touch

$
0
0

Hi all,
I need my app to run full screen.
I hide the status bar with the Capacitor plugin:

    this.platform.ready().then(async () => {
      StatusBar.hide({
        animation: StatusBarAnimation.Slide
      });
      StatusBar.setOverlaysWebView({
        overlay: true
      });

    ...

and it works fine, except on Android.
On an Android device, whenever the user touches the top of the screen, or opens the keyboard, the status bar appears, and you need to minimize and re-open the app to have it closed again.

I have also configured the Android theme to hide the status bar:

    <style name="AppTheme.NoActionBar" parent="Theme.AppCompat.NoActionBar">
        <item name="windowActionBar">false</item>
        <item name="windowNoTitle">true</item>
    </style>

Does anyone knows how to better manage the status bar on Android?
Thanks a lot!

1 post - 1 participant

Read full topic

PWA iOS debugging - How?

$
0
0

Hi there,

I am struggling to debug an iOS PWA app. I am seeing mixed messages on the internet on ability of Safari to inspect the console log. Some say it is no longer possible, but then it should be possible as per iOS12?

I am experiencing behavior I cannot replicate while the phone is in non-PWA Safari mode.

It can be related to changes in the way an iOS PWA handles local storage. It seems blocking, or maybe a runtime kills the app. Either way, difficult to inspect.

I can inspect the service worker, so maybe the alternative strategy is to pass the console.logs to the service worker which will log it? That seems like a strange way…

Looking forward hearing your thoughts.

ps. running latest version on iOS. Catalina as MacOS. Ionic Angular.

1 post - 1 participant

Read full topic

Ionic cordova platform detection

$
0
0

I find out that is hard to know correctly what platform am I running on.

I want to detect if the app is running on web brower or through a native app.

this.platform.is doesn’t work. I thought using this.platform.is('mobileweb') with this.platform.is('desktop') would work but not at all.

So I used a trick !document.URL.startsWith('http') || document.URL.startsWith('http://localhost:8080') which also doesn’t work on some cases.

Like on Android.

Does someone know a working and proper way to detect what platform, web or native am I using ?

EDIT: I forgot but I have the same output with console.log(this.platform.platforms()) for native app and browser using an android phone through the inspector
["android", "cordova", "mobile", "hybrid"]

Any help would be nice :slight_smile:

1 post - 1 participant

Read full topic

Women's Jewelry

$
0
0

Gold Elite Jewelers has everything you are looking for when it comes to jewelry. We carry a variety of chains, pendants, rings, bracelets and watches for both Men and Women. We also have in-store jewelry and repair and we do complete customs.

Women’s Jewelry

1 post - 1 participant

Read full topic


Autocomplate covers label floating

$
0
0

<IonInput

              value={user.email}

              onIonChange={handlerOnchangedInput}

              type="email"

              name="email"

              autocomplete="email"

              className="mt-2"

              required

            ></IonInput>

When reloading the page and already having autocompletes saved in the browser, the attribute value does not detect the text, because what floating does not change the style, these are two problems since the state is not with the value and the style is wrong, thanks

1 post - 1 participant

Read full topic

Announcing Capacitor 3.0 RC

$
0
0

Today I’m happy to announce that the release candidate for Capacitor 3.0 is finally here :tada::tada::tada:.

Not too long ago, we announced Capacitor 3.0 beta and put out a call for feedback from the community. Thanks to all your feedback and testing, we’ve reached the point where we’re ready to call Capacitor 3.0 feature complete and ready to move to RC.

If you’re curious how to migrate to Capacitor 3.0, check out the migration guide we’ve published in our docs. This is a feature packed release, and we’re excited for folks to upgrade. Some key features include:

  • Split plugins into their own packages

  • CLI run command

  • TypeScript config file

  • Autoloading of Android plugins

  • Read the Release blog

3 posts - 1 participant

Read full topic

Help needed -> app.use(Vuex) not working

$
0
0

Hello everyone!

I have this code:

import { createApp } from 'vue'
import App from './App.vue'
import router from './router';
import Vuex from 'vuex'
import { store } from "./store/store";

import { IonicVue } from '@ionic/vue';

const app = createApp(App)
  .use(IonicVue)
  .use(router);

router.isReady().then(() => {
  app.mount('#app');
  app.use(Vuex)
  app.use(store);
});

But then I get this error:

[vue-cli-service]     Types of property 'install' are incompatible.
[vue-cli-service]       Type '(Vue: typeof import("C:/Users/USER/Documents/KwekerijVH/voorraadsysteem-mobile/node_modules/vue/dist/vue")) => void' is not assignable to type 'PluginInst
allFunction'.
[vue-cli-service]         Types of parameters 'Vue' and 'app' are incompatible.
[vue-cli-service]           Type 'App<any>' is missing the following properties from type 'typeof import("C:/Users/USER/Documents/KwekerijVH/voorraadsysteem-mobile/node_modules/vue/dis
t/vue")': compile, useCssModule, useCssVars, createApp, and 110 more.
[vue-cli-service]     32 | router.isReady().then(() => {
[vue-cli-service]     33 |   app.mount('#app');
[vue-cli-service]   > 34 |   app.use(Vuex)
[vue-cli-service]        |           ^^^^

Does anybody know why I get these errors?

2 posts - 2 participants

Read full topic

Ionic Event Recap: March 2021

$
0
0

Originally published at: https://ionicframework.com/blog/ionic-event-recap-march-2021/

Today we hosted our first launch event of 2021. During the event, we heard from core Ionic team members about some exciting new updates and recent releases across our open source and commercial products. Missed the live event? No problem. Continue reading for all the details, or watch the recording on YouTube here. Update from…

1 post - 1 participant

Read full topic

After a while popovers no longer open on Android

$
0
0

Hi,
a few days ago I started having this problem with an Ionic4 app.

The problem occurs both when running the app locally with “ionic cordova run android --livereload” and after installing the apk.

The app works fine at first, but after closing and reopening it, the popovers no longer open.
Or better I think they open (because the web service that returns the data is called) but they are not visible.

Have you ever had this problem?
How can I debug it?
This is how I open a popover:

    async presentPopoverItemDetail(item: Item, ev: any) {
        const popover = await this.popoverController.create({
            component: ItemDetailPage,
            event: ev,
            translucent: false,
            componentProps: {
                item_data: JSON.stringify(item)
            },
            cssClass: 'item-detail-popover'
        });

        popover.onDidDismiss().then((dataPar: OverlayEventDetail) => {

			...some stuff

        });

        return await popover.present();
    }

Thank you very much

cld

1 post - 1 participant

Read full topic

Capacitor Monorepo Questions

$
0
0

Hey there :wave:t3:

first: i’m not a Capictor User yet. The Reason ist that the apps that i’m building currently all use Google Maps and because i only wan’t to use the native SDK’s (not JS) and the Google Maps Plugin is not finished yet, i can’t.

I have done some small Capacitor Projects as Test but i’m not very into yet.

Now my Question: I’m currently developing a new App-System, where i have one App-Code, which i can deploy to unlimited Customer Apps (planned (hopefully) some hundert). Is this even possible with Capacitor? With Cordova i can use Hooks to replace related Stuff (config.xml values like id, name, etc., Icon Splash Screen) before build and then run the cordova Build as Cordova generates the native App Folders by zero again.

As far as i understand Capacitor doesn’t do this like this and isn’t able to create the full native projects from zero with all related native changes (plist values for example).

I’m i correct? So when doing this is Cordova the only Possibility? :thinking:

Also i’m planning to use Appflow to build the Apps as it offers Monorepo Support (i don’t know if this is relevant)

1 post - 1 participant

Read full topic

Ionic native local notifications not working on iOS 14

$
0
0

Hello everyone!

I cannot understand why but it doesnt show the pop up of a local notification on iOS (emulator and iPHone real 11), using Ionic 5 and "@ionic-native/local-notifications": "^5.29.0",

How to fix it? Thank you

Regards

1 post - 1 participant

Read full topic


Help jump starting an ionic app

$
0
0

Hello, long time back-end developer here. I have a side-project for an app that needs a front-end. I wanted to build it with Ionic and AWS Amplify. Can anyone point me at a resource for getting the basic pieces in place while I learn how to take it from there. Thanks much for any guidance available.

1 post - 1 participant

Read full topic

Ionic Developper and Solidity

$
0
0

Hi everyone,

I am Romualdo, project manager of StoneCash https://stonecash.net/ .
StoneCash is a B2B marketplace leader in the stone industry.

We want to start a new project in DeFi for the stone industry and we are looking a Senior developer
for ionic, Javascript, and Solidity.

We are open to discuss any type of contract, full-time or freelance. Please email me with “Ionic developer” in the subject to learn more about the project.

Best,

Romualdo
romualdo@stonecashgroup.com

1 post - 1 participant

Read full topic

Alert cuts off my label checkbox

$
0
0

I have an alert with checkbox inputs.

const alert = await this.alert.create({

  cssClass: 'my-custom-class',

  header: 'Your Address',

  inputs: [

    {

      name: 'checkbox1',

      type: 'checkbox',

      label: '360 North Michigan Avenue, 403 S. State.',

      value: 'value1',

      

    },

    {

      name: 'checkbox1',

      type: 'checkbox',
      label: '435 North Michigan Avenue, Chicago.',

      value: 'value1',

      

    },

    {

      name: 'checkbox1',

      type: 'checkbox',

      label: '875 North Michigan Avenue',

      value: 'value1',

      

    },

  ]

   

});

await alert.present();
}

The names of my items are long and are cut in half by the alert:

example1

I tried to change the alert width by “my-custom-class”, but it did not solve the problem.
How do I get all my label to be seen?

1 post - 1 participant

Read full topic

Docmentation for css classes applied?

$
0
0

Obviously you can look at the classes on generated markup to find out what classes are available for a given Ionic component.

But, is there any officially documented source for what’s available?

A good example is ion-tab-button.tab-selected. Super useful class for styling. Anyone know if there’s a better way than inspecting elements?

1 post - 1 participant

Read full topic

Output Events for ion-select-option

$
0
0

I am using Ionic 5 React and trying to add some custom logic to an IonSelect component. Is there an output event for the IonSelectOption component? I can see documentation for this in Ionic v3 Angular but not v5 React. I seem to only be able to bind to events at the IonSelect level, but really I would like to handle things at the IonSelectOption level…

Essentially custom disable logic in the checkbox list when using the multiple select option.

1 post - 1 participant

Read full topic

Viewing all 70972 articles
Browse latest View live


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