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

Minimum versions of IOS and Android that Ionic 4 supports

$
0
0

Oh haha thanks for the clarification, it was my mistake, I should rephrase my question. thanks for pointing out


QR Reader on Ionic React

$
0
0

Hi I’m building an application with Ionic and React JS, now I have to implement a QR Reader. I found this react-qr-reader and it works perfectly on the web application if open from both pc and mobile, but if I compile the application for IOS the camera no longer works. Is there any way to use this QR Reader or any other QR Reader/Scanner using the native camera?

I also tried to implement the native camera with Capacitor and make the Zxing library read the qr but in addition to being very uncomfortable having to take the photo, very often it cannot read the QR.

Do not recommend using this QR Scanner because it is not compatible with Ionic React.

New Mac building Ionic-V3 application

$
0
0

Looking at the log this seems to be the first interesting issue

grpc@1.20.0 install <user>/Documents/Geme.io/node_modules/grpc
node-pre-gyp install --fallback-to-build --library=static_library

node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp WARN Tried to download(404): https://node-precompiled-binaries.grpc.io/grpc/v1.20.0/node-v72-darwin-x64-unknown.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for grpc@1.20.0 and node@12.15.0 (node-v72 ABI, unknown) (falling back to source compile with node-gyp) 

and then it downloads a lot of files to compile and build and gives compile errors and this resulting output

6 errors generated.
make: *** [Release/obj.target/grpc_node/ext/byte_buffer.o] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:223:5)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--library=static_library" "--module=/<user>/Documents/Geme.io/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown/grpc_node.node" "--module_name=grpc_node" "--module_path=/<user>/Documents/Geme.io/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown" "--napi_version=5" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /<user>/Documents/Geme.io/node_modules/grpc
gyp ERR! node -v v12.15.0
gyp ERR! node-gyp -v v5.0.5
gyp ERR! not ok 
node-pre-gyp ERR! build error 
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --library=static_library --module=/<user>/Documents/Geme.io/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown/grpc_node.node --module_name=grpc_node --module_path=<user>Documents/Geme.io/node_modules/grpc/src/node/extension_binary/node-v72-darwin-x64-unknown --napi_version=5 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/<user>/Documents/Geme.io/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:223:5)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
node-pre-gyp ERR! System Darwin 17.7.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/Users/thorvaldaagaard/Documents/Geme.io/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library"
node-pre-gyp ERR! cwd /Users/thorvaldaagaard/Documents/Geme.io/node_modules/grpc
node-pre-gyp ERR! node -v v12.15.0
node-pre-gyp ERR! node-pre-gyp -v v0.12.0
node-pre-gyp ERR! not ok 

And I have installed node-gyp 6.1.0 and also node-pre-gyp version 0.14.0 but it still picks up the old versions

Besides that I have updated note-sass to version 4.13.1 and fsevents to 1.2.9

Trying to install the grpc version using

npm i grpc@1.20.0

gives the same bunch of errors so there is my problem, but how to fix it?

I was able to install latest graph version using

npm install grpc --build-from-source

But during

npm i

it was still version 1.20.0 being requested

and trying

npm install grpc@1.20.0 --build-from-source

did not help me

Cannot find module '@ionic-native/splash-screen/ngx'

$
0
0

HI there, hope you will be fine.
Actually I created a balnk new project in ionic and when I run ( ionic serve ), it says Cannot find module ‘@ionic-native/splash-screen/ngx’ is not found. Here is the screenshort of the error:


my ionic version is 5.4.4. I also tried in the latest one.
I also tried to install this plugin:

but same error again and again.Looking forward for you response, Thanks!

Ionic 4 scrolling issue after input focus

$
0
0

I have ion content with ionic cards. Each card has two input fields. The code structure is like this.

ion-card-content contains text view like below

<ion-item no-padding padding-end="20px">
     <ion-input
           id="readingInput{{i}}"
           (ionBlur)="readingFocusLost($event, operation)"
           (ionFocus)="readingFocus($event, i)"
           (ionChange)="readingTextChanged($event, operation)"
           [disabled]="mode === 'online'"
           [ngModel]="operation.READING" placeholder="Enter Reading if applicable">
    </ion-input>
</ion-item>

I have multiple such cards in the view. If I scrolldown and clicked on input to type someting, the view is scrolling to top as I start typing the view will again scroll to bottom where input focus is present. Please check attached gif.

How to avoid this scrolling?
GIF Link

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

$
0
0

Thank you for your reponse…
Json variable not passing properly because i am getting this output

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
Connected successfully{“success”:true,“msg”:“Register Successfully”}

The data stored database but return to client page register.ts this.accsPrvds.postData(body,‘process_api.php’).subscribe((res:any)=>{ } -->If condition not work (client side notification not work)

Ionic/react version 4

$
0
0

well material ui does have a lot of components pre designed so just checking is it possible or not

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

$
0
0

Lose this. It’s breaking the JSON.


New Mac building Ionic-V3 application

$
0
0

In order to eliminate peculiarities of your environment, I would suggest installing nvm, uninstalling all node stuff you currently have if it’s still being picked up on your PATH (shouldn’t be necessary, but just in case…).

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

$
0
0

Thank you so much :grinning:…The error was gone… :partying_face: :partying_face: :partying_face: Its very helpful for me… :grinning:

How to access a particular value from json.i

$
0
0

I have stored a json in local storage.
The stored json data is as follows -
{“0”:“Anirban Roy”,“1”:“8876019127”,“name”:“Anirban Roy”,“u_mobile”:“8876019127”}.

Now trying to get and display only name from this json. Below is my code. log displaying “name: undefined.”

 let data = localStorage.getItem('userData');
    console.log('name: '+data.name);

Error on executing 'ionic serve' on a fresh installation of npm, angular cli and ionic - Cannot find module @angular\cli\bin\ng

$
0
0

Just had the same exact problem. Renaming folders fixed it.

How to build this interface with ionic is it possible? or do I need react js or native android?

Once downloaded, images not display in android gallery? in ionic 3..stuck from last two month... please help

$
0
0

Below is my code which execute successfully and downloading image file successfully in given folder link but image not showing in mobile phone gallery, i have tried all things like after download image file i moving/copying from one location to another to refresh gallery but image not showing in gallery. please help how can I do in ionic 3.

// home.html page
<button (click)=“getPermission(adv.imgurl)” style=“color: white;background: #ff7600;padding: 6px 27px; border-radius: 6px;margin-left: 78px;”>Download

// home.ts page
getPermission(getlink) {
this.src_link = getlink;
// get permission from device to save this.androidPermissions.checkPermission(this.androidPermissions.PERMISSION.READ_EXTERNAL_STORAGE).then(
result =>//,
err => this.androidPermissions.requestPermission(this.androidPermissions.PERMISSION.READ_EXTERNAL_STORAGE)
);

// get permission from device to save 
this.androidPermissions.hasPermission(this.androidPermissions.PERMISSION.WRITE_EXTERNAL_STORAGE)
    .then(status => {
        if (status.hasPermission) {
          this.downloadimage();             
        }
        else {
            this.androidPermissions.requestPermission(this.androidPermissions.PERMISSION.WRITE_EXTERNAL_STORAGE)
                .then(status => {
                    if (status.hasPermission) {
                        this.downloadimage();                            
                    }
                });
        }
    });

}

downloadimage(){
const fileTransfer = this.transfer.create();
this.platform.ready().then(() => {

this.filename = Math.floor(100000 + Math.random() * 900000);    

              let url = encodeURI('http://gstgroupbhokar.com/myapp/'+this.src_link);

fileTransfer.download(url, this.file2.externalRootDirectory +’/Foldername/Media/images/’ + this.filename+".jpg",true).then((entry) => {
alert('download complete: ’ + JSON.stringify(entry.toURL()));
//this.photoViewer.show(entry.toURL());

this.moveToGallery(this.filename,entry.toURL());   

}, (error) => {
alert(JSON.stringify(error));
});

  fileTransfer.onProgress((progress) => {
     var downloadProgress = Math.round((progress.loaded / progress.total) * 100) + '%';
          console.log('Downloading progress ...', downloadProgress);
          this.dprogress = downloadProgress;
      });

})
}

moveToGallery(filename, values){
//this.path = “file:///storage/emulated/0/Foldername/Media/images”;
this.path = values.substr(0, values.lastIndexOf(’/’) + 1);
this.newPath = “file:///storage/emulated/0/Foldername2”;

this.file2.moveFile(this.path, filename+’.jpg’, this.newPath, filename+’.jpg’).then(success => {
alert(‘success.’+JSON.stringify(success));
alert(‘success.’+success);
}, (error) => {
alert(‘Error while storing file.’+JSON.stringify(error));
alert(‘Error while storing file.’+error);
});
}

How to access a particular value from json.i


BackgroundMode by default?

Which are the best pre-bridal beauty packages?

$
0
0

Pre-bridal makeup packages are something that gives a helping hand an uplift to the natural
beauty of the bride. But the question is which are the best pre-bridal beauty packages?
While living in Delhi there are so many options to choose from, but which are the Best Beauty
Packages in Delhi
? Which are the best pre-bridal beauty packages?
When getting ready for her wedding every girl wants to look the most beautiful bride of all. But
the bridal makeup is not the only thing that enhances her beauty and gorgeous glowing look but
also the pre-wedding beauty treatments on her face and the body.
We, at Bride Team Studio, offers a wide variety of Pre Bridal Beauty Packages for customers
according to their skin types. BTS will take care of your skin problems that will help you to look
at the most beautiful bride on your wedding day.
Prices range varies according to the constituents of the packages. Some packages include the
necessities from manicure, pedicure, threading, etc. While premium packages have full body
waxing, hair spa treatments, De-tan treatments, and many more things.
Bride Team Studio will serve you with the best quality products and best makeup and beauty
professionals. We will take care of your every skin related problem and queries.
Give your skin the best quality pre-bridal treatments that will help your natural glow pop out and
gives your bridal make more natural touch.
Get ready to shine and dazzle, and everyone spellbound with your beauty and natural glow.
At the bride team, Studio would love to serve you and give you the best look you want for your
wedding day.

How to access a particular value from json.i

$
0
0

Not an issue with localstorage. I have stored value successfully. Just unable to get a particular value. In my case I need only value of name attribute from the entire json.

How to access a particular value from json.i

How to access a particular value from json.i

$
0
0

Thank you very much. Now I am able to get the desired value. Below is my modified lines of code-

    let retrievedObject = localStorage.getItem('userData');
    let stored_data = JSON.parse(retrievedObject);
    console.log('retrievedObject: ',stored_data.u_mobile );
Viewing all 228529 articles
Browse latest View live


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