@flycoders_sourav wrote:
how can I translate an app using google translate API.
Please help me out.
Thanks in advance
Posts: 1
Participants: 1
@flycoders_sourav wrote:
how can I translate an app using google translate API.
Please help me out.
Thanks in advance
Posts: 1
Participants: 1
@wekas wrote:
I am trying to write a pdf to file on an android device with data either as blob or base64 but the Capacitor writeFile only seems to accept a string as data and creates a text document.
When I gave it a base64 string it just dumped it into the file as text.Is there any way to write a file using blob or base64 or will I have to give up and convert my project back to Cordova?
Posts: 3
Participants: 2
@gtrigo wrote:
Hello I’m new to IONIC and I have a question! Is it possible to load a frame on the camera? What I need is to present a rectangle where the user frames a document and takes a photo? Is it possible to do this using the camera-preview plugin?
Posts: 1
Participants: 1
@Tripathi wrote:
I’m surprised to see that there is no ‘bluetooth classic plugin’ that was truly cross-platform in the ionic community. The ‘bluetooth serial’ plugin apparently has several issues. E.g- android to andoroid not supported ios to ios not supported
Hence, I’m looking for a bluetooth classic plugin that communicate across and amongst different platforms - Win 7,10; iOS and Android. Please let me know, do you have any alternatives or suggestions here! If we have windows 7 or windows 10, I am fine with it.
Posts: 1
Participants: 1
@joshuaf wrote:
- What went wrong: A problem occurred configuring project ‘:CordovaLib’.
No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android
- 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 1s cmd: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception.
- What went wrong: A problem occurred configuring project ‘:CordovaLib’.
No toolchains found in the NDK toolchains folder for ABI with prefix: mips64el-linux-android
- 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 1s [ERROR] An error occurred while running subprocess cordova.
cordova build android --release exited with exit code 1. Re-running this command with the --verbose flag may provide more information
Posts: 1
Participants: 1
@Manel00 wrote:
I’m trying to set and get some TODO notes, but the problem is i’m sharing it with all the users, and it ISN’T SAVING on my firestore database, don’t know why, but it remains. My model is:
and my add and get method is:
idea: Idea = { name: '', note: '', date: new Date().getTime() }; ADD: this.afs.collection(`users/${this.user.getUID}/ideas`).add(this.idea) GET_ALL: this.afs.collection(`users/${this.user.getUID}/ideas`)I’m doing well my modal? i need to set some Id on every idea? Thank you so much
Posts: 1
Participants: 1
@pfallin wrote:
I have set up Ionic Deploy in my app (v3) and have it running the manual check process to watch for new deploy builds.
One of the things I have set it up to do is to find the
deploy_uuidfrom thegetCurrentVersion()function and match it to an ID in my database that will keep track of information about the deploy build (ex. is it required, update notes, version name, etc.).Right now the only way I am able to find the
deploy_uuidis by running a production version of my app with an incremented version number and using theversioningcontrols to prevent it from updating my production apps, then watching the logs in my local production build to check thedeploy_uuid.My question is this:
Is there a way to get thedeploy_uuidor another sort of identifier for the deploy build without having to run thegetCurrentVersion()in my app? It seems like this ID should be displayed in the control panel or at least the log output from the build process.
Posts: 1
Participants: 1
@adboio wrote:
I’m trying to set notification badges on my app, but for some reason it’s not working. Right now I just have a button for testing that, when clicked, runs this function:
setBadge() { try { this.badge.set(10); } catch (e) { console.error(e); } }When this function is called an error is caught reading:
ERROR: {"line":54169,"column":126,"sourceURL":"http://localhost:8080/build/vendor.js"}That line in vendor.js is:
Badge.prototype.set = function (badgeNumber) { return Object(__WEBPACK_IMPORTED_MODULE_1__ionic_native_core__["cordova"])(this, "set", {}, arguments); };I’ve got Badge imported like this, as per Ionic docs here
import { Badge } from '@ionic-native/badge/ngx';and have added Badge to my
app.module.tsfile.Any ideas on what might be causing this?
Currently testing on an iPhone 8+ with iOS 12.1.2.
Posts: 1
Participants: 1
@MaxSp wrote:
I would like to create an Ionic 3 project from the CLI after Ionic 4 has been released. I tried to create one with
ionic start MyProjectbut it generated a project for Ionic 4. How can I target the latest Ionic 3? I am using Ionic 4.11.0.
Posts: 1
Participants: 1
@adsfelipe wrote:
Is it possible to make a filter in the camera?
My objective is to use the image to text recognizer…so i want the user to point the camera and the API recognize the text… but not in all the photo, only in a specific area…
exemple: WhatsApp web
can someone just point to the right direction? how to make this filter and get the filtered image
many thanks.
Posts: 1
Participants: 1
@jzin7 wrote:
i have this function:
let alert = this.alertCtrl.create({ title: 'Acessibilidade', buttons: [ { text: 'Alto Contraste', role: 'cancel', handler: data => { if (this.classeConteudo=='textoDescricao'){ this.classeConteudo = 'textoDescricaoAltoContraste'; this.classeRodape = 'rodapeContraste'; this.classeTopo = 'topoContraste'; } else { this.classeConteudo = 'textoDescricao'; this.classeRodape = ''; this.classeTopo = ''; } } }, { text: 'Letra Pequena', role: 'cancel', handler: data => { let biografiaText = document.getElementsByClassName('conteudo') as HTMLCollectionOf<HTMLElement>; if (biografiaText.length != 0) { biografiaText[0].setAttribute("style", ""); } } }, { text: 'Letra Média', handler: data => { let biografiaText = document.getElementsByClassName('conteudo') as HTMLCollectionOf<HTMLElement>; if (biografiaText.length != 0) { biografiaText[0].setAttribute("style", "font-size:20px !important; line-height:30px !important"); } } }, { text: 'Letra Grande', role: 'cancel', handler: data => { let biografiaText = document.getElementsByClassName('conteudo') as HTMLCollectionOf<HTMLElement>; if (biografiaText.length != 0) { biografiaText[0].setAttribute("style", "font-size:25px !important; line-height:40px !important"); } } } ] }); alert.present();when i click outside the squere of options, it triggers the first function, changing the css classes. I would like just to exit, without doing anything. Can anyone helps me out?
thanks
Posts: 1
Participants: 1
@Dsurrao wrote:
I need to fetch the username of the currently logged in user on an Android device. Is there an API call for this?
Posts: 1
Participants: 1
@AmberS wrote:
I am having issues with the emulator/simulator for my Ionic application. For my app, I am using Firebase as the backend. When running the command below, the information from Firebase isn’t showing on the iOS Simulator, but when I use the Ionic Dev App and serve on the browser, the information that is supposed to be retrieved from Firebase is showing. For some reason, when trying to access parts of the application that is suppose to retrieve information from Firebase isn’t showing on the simulator but only on a real device using Ionic Dev App. I really need help as soon as possible.
Command I am using to run simulator:
ionic cordova run ios --livereload
Posts: 1
Participants: 1
@F4OST wrote:
Hi!
I’m having a problem when I’m trying to build my application using the
--prodflag and only when I use this flag otherwise it works perfectly.
I have a white screen after the splashscreen and this error:
package.json:"dependencies": { "@angular-devkit/core": "^7.3.1", "@angular-devkit/schematics": "^7.3.1", "@angular/animations": "^7.2.8", "@angular/common": "^7.2.8", "@angular/compiler": "^7.2.8", "@angular/compiler-cli": "^7.2.8", "@angular/core": "^7.2.8", "@angular/forms": "^7.2.8", "@angular/http": "^7.2.8", "@angular/platform-browser": "^7.2.8", "@angular/platform-browser-dynamic": "^7.2.8", "@angular/router": "^7.2.8", "@fortawesome/angular-fontawesome": "^0.3.0", "@fortawesome/fontawesome-svg-core": "^1.2.15", "@fortawesome/free-solid-svg-icons": "^5.7.2", "@ionic-native/clipboard": "^5.2.0", "@ionic-native/core": "^5.2.0", "@ionic-native/email-composer": "^5.2.0", "@ionic-native/http": "^5.2.0", "@ionic-native/in-app-browser": "^5.2.0", "@ionic-native/keyboard": "^5.2.0", "@ionic-native/screen-orientation": "^5.2.0", "@ionic-native/splash-screen": "^5.2.0", "@ionic-native/status-bar": "^5.2.0", "@ionic/angular": "^4.1.1", "@ionic/storage": "^2.2.0", "add": "^2.0.6", "cordova": "^8.1.2", "cordova-android": "^8.0.0", "cordova-browser": "5.0.4", "cordova-clipboard": "^1.2.1", "cordova-ios": "5.0.0", "cordova-plugin-advanced-http": "^1.11.1", "cordova-plugin-device": "^2.0.2", "cordova-plugin-email-composer": "^0.8.15", "cordova-plugin-extension": "^1.5.4", "cordova-plugin-file": "^6.0.1", "cordova-plugin-inappbrowser": "^3.0.0", "cordova-plugin-ionic-keyboard": "2.1.3", "cordova-plugin-ionic-webview": "^4.0.0", "cordova-plugin-screen-orientation": "^3.0.1", "cordova-plugin-splashscreen": "^5.0.2", "cordova-plugin-statusbar": "^2.4.2", "cordova-plugin-whitelist": "^1.3.3", "cordova-promise-polyfill": "0.0.2", "es6-promise-plugin": "^4.2.2", "ionic": "^4.10.3", "ionic-angular": "3.9.2", "ionic-native-http-connection-backend": "^5.0.4", "ionic-plugin-keyboard": "^2.2.1", "ionicons": "3.0.0", "rxjs": "^6.4.0", "rxjs-compat": "^6.4.0", "sw-toolbox": "3.6.0", "webrowser": "0.0.0", "yarn": "^1.13.0", "zone.js": "0.8.26" }, "devDependencies": { "@ionic/app-scripts": "3.2.3", "typescript": "3.1.6" }, "description": "Ionic", "cordova": { "plugins": { "cordova-plugin-whitelist": {}, "cordova-plugin-device": {}, "cordova-plugin-splashscreen": {}, "cordova-clipboard": {}, "cordova-plugin-screen-orientation": {}, "cordova-plugin-email-composer": {}, "cordova-plugin-statusbar": {}, "ionic-plugin-keyboard": {}, "cordova-plugin-advanced-http": {}, "cordova-plugin-inappbrowser": {}, "cordova-plugin-ionic-keyboard": {}, "cordova-plugin-ionic-webview": {} }, "platforms": [ "browser", "android", "ios" ] }
config.xml:<?xml version='1.0' encoding='utf-8'?> <widget id="com.me.myproject" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"> <name>My project</name> <description>A project</description> <author email="contact@myproject.com" href="https://myproject.com/">Project</author> <content src="index.html" /> <access origin="*" /> <allow-intent href="http://*/*" /> <allow-intent href="https://*/*" /> <allow-intent href="tel:*" /> <allow-intent href="sms:*" /> <allow-intent href="mailto:*" /> <allow-intent href="geo:*" /> <preference name="ScrollEnabled" value="false" /> <preference name="android-minSdkVersion" value="19" /> <preference name="BackupWebStorage" value="none" /> <preference name="SplashMaintainAspectRatio" value="true" /> <preference name="FadeSplashScreenDuration" value="300" /> <preference name="SplashShowOnlyFirstTime" value="false" /> <preference name="SplashScreen" value="screen" /> <preference name="SplashScreenDelay" value="3000" /> <platform name="android"> <allow-intent href="market:*" /> <icon src="resources/android/icon.png" /> <splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" /> <splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" /> <splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" /> <splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" /> <splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" /> <splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" /> <splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" /> <splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" /> <splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" /> <splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" /> <splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" /> <splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" /> <icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" /> <icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" /> <icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" /> <icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" /> <icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" /> <icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" /> </platform> <platform name="ios"> <allow-intent href="itms:*" /> <allow-intent href="itms-apps:*" /> <icon height="57" src="resources/ios/icon/icon.png" width="57" /> <icon height="114" src="resources/ios/icon/icon@2x.png" width="114" /> <icon height="40" src="resources/ios/icon/icon-40.png" width="40" /> <icon height="80" src="resources/ios/icon/icon-40@2x.png" width="80" /> <icon height="120" src="resources/ios/icon/icon-40@3x.png" width="120" /> <icon height="50" src="resources/ios/icon/icon-50.png" width="50" /> <icon height="100" src="resources/ios/icon/icon-50@2x.png" width="100" /> <icon height="60" src="resources/ios/icon/icon-60.png" width="60" /> <icon height="120" src="resources/ios/icon/icon-60@2x.png" width="120" /> <icon height="180" src="resources/ios/icon/icon-60@3x.png" width="180" /> <icon height="72" src="resources/ios/icon/icon-72.png" width="72" /> <icon height="144" src="resources/ios/icon/icon-72@2x.png" width="144" /> <icon height="76" src="resources/ios/icon/icon-76.png" width="76" /> <icon height="152" src="resources/ios/icon/icon-76@2x.png" width="152" /> <icon height="167" src="resources/ios/icon/icon-83.5@2x.png" width="167" /> <icon height="29" src="resources/ios/icon/icon-small.png" width="29" /> <icon height="58" src="resources/ios/icon/icon-small@2x.png" width="58" /> <icon height="87" src="resources/ios/icon/icon-small@3x.png" width="87" /> <icon height="1024" src="resources/ios/icon/icon-1024.png" width="1024" /> <splash height="1136" src="resources/ios/splash/Default-568h@2x~iphone.png" width="640" /> <splash height="1334" src="resources/ios/splash/Default-667h.png" width="750" /> <splash height="2208" src="resources/ios/splash/Default-736h.png" width="1242" /> <splash height="1242" src="resources/ios/splash/Default-Landscape-736h.png" width="2208" /> <splash height="1536" src="resources/ios/splash/Default-Landscape@2x~ipad.png" width="2048" /> <splash height="2048" src="resources/ios/splash/Default-Landscape@~ipadpro.png" width="2732" /> <splash height="768" src="resources/ios/splash/Default-Landscape~ipad.png" width="1024" /> <splash height="2048" src="resources/ios/splash/Default-Portrait@2x~ipad.png" width="1536" /> <splash height="2732" src="resources/ios/splash/Default-Portrait@~ipadpro.png" width="2048" /> <splash height="1024" src="resources/ios/splash/Default-Portrait~ipad.png" width="768" /> <splash height="960" src="resources/ios/splash/Default@2x~iphone.png" width="640" /> <splash height="480" src="resources/ios/splash/Default~iphone.png" width="320" /> <splash height="2732" src="resources/ios/splash/Default@2x~universal~anyany.png" width="2732" /> </platform> <plugin name="cordova-plugin-whitelist" spec="^1.3.3" /> <plugin name="cordova-plugin-device" spec="^2.0.2" /> <plugin name="cordova-plugin-splashscreen" spec="^5.0.2" /> <plugin name="cordova-clipboard" spec="^1.2.1" /> <plugin name="cordova-plugin-screen-orientation" spec="^3.0.1" /> <plugin name="cordova-plugin-email-composer" spec="^0.8.15" /> <plugin name="cordova-plugin-statusbar" spec="^2.4.2" /> <plugin name="ionic-plugin-keyboard" spec="^2.2.1" /> <plugin name="cordova-plugin-advanced-http" spec="^1.11.1" /> <plugin name="cordova-plugin-ionic-keyboard" spec="2.1.3" /> <plugin name="cordova-plugin-ionic-webview" spec="^4.0.0" /> <plugin name="cordova-plugin-inappbrowser" spec="^3.0.0" /> <engine name="browser" spec="5.0.4" /> <engine name="android" spec="^8.0.0" /> <engine name="ios" spec="5.0.0" /> </widget>Ionic info:
Ionic: ionic (Ionic CLI) : 4.10.3 Ionic Framework : ionic-angular 3.9.2 @ionic/app-scripts : 3.2.3 Cordova: cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1) Cordova Platforms : browser 5.0.4, ios 5.0.0 Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.0.0, (and 11 other plugins) System: ios-deploy : 1.9.4 ios-sim : 7.0.0 NodeJS : v11.10.0 (/usr/local/Cellar/node/11.10.0/bin/node) npm : 6.9.0 OS : macOS Mojave Xcode : Xcode 10.1 Build version 10B61I created an empty project using
ionic startto see if maybe I could found some differences that would change anything to that problem but I found nothingI hope somebody could help me!
Thanks!
Posts: 1
Participants: 1
@cdwebinfo wrote:
This error comes when I try to run the project in iSO. I spend much time to resolve this issue, Some say we can run pod update OR pod install command to resolve this issue. But noting work in my case. Finally, I found the solution for this. This is very simple. Just follow the steps mentioned on below URL -
Posts: 1
Participants: 1
@donnasarahmccabe wrote:
I am using Tesseract to recongize text. however it doesn’t work because the .set and .complete methods in the ngProgress. I’m assuming its because of ionic 4 but is there any way to fix this
Tesseract.recognize(this.selectedImage)
.progress(result => {
if (result.status === ‘recognizing text’)
//this.progress.set(result.progress)
console.log(result);
})
.catch(err => console.error(err))
.then(result => {
this.imageText = result.text;
})
.finally(resultOrError=>{
//this.progress.complete();
})
Posts: 1
Participants: 1
@oopatech wrote:
Hey guys, doing a quick post here to spare another human the pain I just went through to get this working.
The problem:
Access the ionic storage. Get your token, modify the request headers and send the request.Sounds easy but not quite. The problem is that the promise is asynchronous which means it does not care whether you have the token or not. It will send your request with most likely a null token as it does not wait. The async/wait approach did not work.
Below is my code which i modified for the ionic storage off a solution I saw somewhere for a similar Angular 7 problem. The important things to pay attention to here is the from and SwitchMap imports from rxjs.
Hope this helps!
Code:
import {Injectable} from '@angular/core'; import { HttpInterceptor, HttpRequest, HttpResponse, HttpHandler, HttpEvent, HttpErrorResponse } from '@angular/common/http'; import { Observable, throwError, from } from 'rxjs'; import { map, catchError, switchMap } from 'rxjs/operators'; import { AlertController } from '@ionic/angular'; import { Storage } from '@ionic/storage'; const TOKEN_KEY = 'auth-token'; @Injectable() export class HttpConfigInterceptor implements HttpInterceptor { protected url = 'http://example.com/api'; protected debug = true; constructor(private alertController: AlertController, private storage: Storage) {} intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> { // YOU CAN ALSO DO THIS // const token = this.authenticationService.getToke() return from(this.storage.get(TOKEN_KEY)) .pipe( switchMap(token => { if (token) { request = request.clone({ headers: request.headers.set('Authorization', 'Bearer ' + token) }); } if (!request.headers.has('Content-Type')) { request = request.clone({ headers: request.headers.set('Content-Type', 'application/json') }); } if (this.debug) { request = request.clone({ url: this.url + request.url + '?XDEBUG_SESSION_START=1'}); } return next.handle(request).pipe( map((event: HttpEvent<any>) => { if (event instanceof HttpResponse) { // do nothing for now } return event; }), catchError((error: HttpErrorResponse) => { const status = error.status; const reason = error && error.error.reason ? error.error.reason : ''; this.presentAlert(status, reason); return throwError(error); }) ); }) ); } async presentAlert(status, reason) { const alert = await this.alertController.create({ header: status + ' Error', subHeader: 'Subtitle', message: reason, buttons: ['OK'] }); await alert.present(); } }
Posts: 1
Participants: 1
@hn162 wrote:
Hi,
I’ve build an app which would simply act as a quick call center as well as a location tracker for emergency numbers only (there’re 3 numbers for different divisions in my country instead of 911). However, I’m not making the call right from the app itself, a user click a call button and he will be redirected to the phone’s default dialer with a selected emergency number sent along.
After the app has been reviewed by Google, they rejected it with this following message: “After review, we found that your app does not qualify for use of the requested permissions. In your permissions declaration form, you had indicated that your app is a default handler; however, we were unable to detect that capability in your app’s manifest.”
I would love to receive any suggestion on how to address this matter and the plugin I’ve used in the app to make the phone call is: https://ionicframework.com/docs/v3/native/call-number/
Thanks so much.
Posts: 1
Participants: 1
@jwwceo wrote:
Hello! I’ve been developing php web apps for 10+ years, and am working on my first Ionic app. I have just a few very basic (possibly stupid questions). The app is really just a simplified version of our main app which is designed for tablets and desktops. My main reason for using Ionic/Cordova is to get the app into the app stores.
-Is there anything wrong with just switching out ionic tags for html tags and using all my same php functions (albeit simplified) for server side processing. My app essentially becomes a super simple website spit out in Ionic tags.
-If above is true, can I rely on the app essentially behaving like it’s running inside a browser on users cell phones? That is, I can use cookies to store persistent logins and session data just like in my main app.
-How are push notifications best handled?
-Is there a chat/messaging app like Comet Chat that plays well with Ionic/Cordova??
Thanks in advance for the push in the right direction.
James
Posts: 1
Participants: 1
@26medias wrote:
Hi,
I’m in the exploratory phase, trying to figure out which framework to use for my project.
Despite quite a bit of google search, I haven’t found a definitive answer to one of my requirements:I need to execute a REST API call & process its response data locally once per hour, even if the app isn’t launched or hasn’t been launched by the user since the phone started, including triggering a push notification depending on the output of the data processing.
Is that possible with Ionic?
Posts: 1
Participants: 1