Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all 48969 articles
Browse latest View live

Open a page upon clicking a image in grid view

$
0
0

@Kanna1234 wrote:

Hi there i have created a image grid view now i wanted that images to be clickable and upon clicking it should open desired page ex-contact,about. hope you guys will help i am very new to this, have a great day.

<ion-content padding="true">

    <div class="row">
        <div class="col">
          <img src="assets/imgs/coming-soon.jpg" style="display: block; width: 100%;height: auto; margin-left: auto; margin-right: auto;">
        </div>
        <div class="col">
          <img src="assets/imgs/Other.jpg" style="display: block; width: 100%; height: auto; margin-left: auto; margin-right: auto;">
        </div>
        </div>
        <div class="row">
        <div class="col">
          <img src="assets/imgs/nee-prema.jpg" style="display: block; width: 100%;height: auto; margin-left: auto; margin-right: auto;">
        </div>
        <div class="col">
          <img src="assets/imgs/viluvaina.jpg" style="display: block; width: 100%;height: auto; margin-left: auto; margin-right: auto;">
        </div>
        </div>
  

</ion-content>

Posts: 1

Participants: 1

Read full topic


Datetime change height and color

$
0
0

@swentzler wrote:

Hey guys,

I have a problem with the datetime-component.
Tried to solve it with Google and this Forums Topics, but I have absolutly no clue, why this is not working.
I want to run an Ionic-Webapp on a RaspberryPi with a screen-res of “320x240” and i need the
datetime-component.
The default height, is just 5px too high and it would be nice to change the background color and also the text color.
I am pretty new to ionic and scss/css.

So this is inside my home.html

<ion-content class="no-scroll"  text-center="" style="background: #1B1B1B">
  <h1 ion-text class="timeText" color="nxtaFont" (click)="setTime()" id="timelabel">{{timeLabel}}</h1>
  <ion-datetime class="foobar" #dateTime displayFormat="mm/ss" [(ngModel)]="myDate" (ionChange)="changedTime()"></ion-datetime>
  <button class="button" ion-button (click)="startStopAction()">{{buttonText}}</button>
</ion-content>

I tried to create a class named “.foobar” in my home.scss with height, max-height and so on.
Nothing worked :frowning:

I also tried to overwrite the sass-variable in my variables.scss and again it didnt work.

Are u able to help a newb pls?
Thanks :slight_smile:

Posts: 1

Participants: 1

Read full topic

Phonegap-plugin-barcodescanner error

$
0
0

@lunneyd wrote:

I had a plugin working and it opened up my camera as a scanner but for some reason tried to build an app again and at first, the scanner didn’t work so I uninstalled and downgraded to android 6.4.0 and Android 6.3.0 and installed the plugin again. Now the build fails when doing ionic cordova run android --device. Any ideas why this is as was working previously. I can add the QR scanner code but I don’t think this is the problem as it was working previously. Below is error got from trying build app

BUILD FAILED in 12s
at ChildProcess.whenDone (/home/declan/DUP/test/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
at ChildProcess.emit (events.js:127:13)
at maybeClose (internal/child_process.js:933:16)
at Process.ChildProcess._handle.onexit
(internal/child_process.js:220:5)
(node:12313) UnhandledPromiseRejectionWarning: Unhandled promise
rejection. This error originated either by throwing inside of an
async function without a catch block, or by rejecting a promise which
was not handled with .catch(). (rejection id: 1)
(node:12313) [DEP0018] DeprecationWarning: Unhandled promise
rejections are deprecated. In the future, promise rejections that are
not handled will terminate the Node.js process with a non-zero exit
code.

Posts: 1

Participants: 1

Read full topic

App stucks at splash screen when running with '--prod' build

$
0
0

@saumya04 wrote:

I’ve been working on an app which consists of “in-app purchases”, “firebase dynamic links”, etc.
The app works fine in both android and ios, when I used to run the app using commands:

ionic cordova run android --livereload
ionic cordova build ios

But as soon as I run the app using ‘–prod’ in front of them the app used to get stuck on my splash screen/app.component.ts screen.

Some of my app’s structure looks like this:

config.xml

<?xml version='1.0' encoding='utf-8'?>
<widget id="io.ionic.wordforyou" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>WordForYou</name>
    <description>An awesome Ionic/Cordova app.</description>
    <author email="hi@ionicframework" href="http://ionicframework.com/">Ionic Framework Team</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="16" />
    <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="loadUrlTimeoutValue" value="70000" />
    <preference name="webviewbounce" value="false" />
    <preference name="UIWebViewBounce" value="false" />
    <preference name="DisallowOverscroll" value="true" />
    <preference name="SplashScreenDelay" value="3000" />
    <platform name="android">
        <preference name="GoogleAndroidClientId" value="some_id_here" />
        <resource-file src="google-services.json" target="google-services.json" />
        <allow-intent href="market:*" />
        <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" />
        <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" />
    </platform>
    <platform name="ios">
        <preference name="GoogleIOSClientId" value="some_id_here" />
        <resource-file src="GoogleService-Info.plist" />
        <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>
    <allow-navigation href="http://192.168.0.181:8100" />
    <allow-navigation href="http://192.168.1.133:8100" />
    <allow-navigation href="http://192.168.0.180:8100" />
    <engine name="ios" spec="~4.5.4" />
    <engine name="android" spec="~6.3.0" />
    <plugin name="cordova-sqlite-storage" spec="^2.2.1" />
    <plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
    <plugin name="cordova-plugin-whitelist" spec="^1.3.1" />
    <plugin name="cordova-plugin-device" spec="^1.1.4" />
    <plugin name="cordova-plugin-splashscreen" spec="^4.0.3" />
    <plugin name="cordova-plugin-ionic-webview" spec="^1.1.16" />
    <plugin name="cc.fovea.cordova.purchase" spec="^7.1.2">
        <variable name="BILLING_KEY" value="some_key_here" />
    </plugin>
    <plugin name="cordova-support-google-services" spec="^1.0.0" />
    <plugin name="cordova-plugin-firebase-dynamiclinks" spec="^0.12.1">
        <variable name="APP_DOMAIN" value="waa24.app.goo.gl" />
        <variable name="APP_PATH" value="/" />
        <variable name="FIREBASE_VERSION" value="11.0.+" />
    </plugin>
    <plugin name="cordova-plugin-x-socialsharing" spec="^5.3.2" />
</widget>

app.component.ts

@Component({
  templateUrl: 'app.html',
  providers: [
    InAppPurchase2,
    HomeService,
    AuthService,
  ]
})
export class MyApp {
  @ViewChild(Nav) nav: Nav;

  rootPage: any;
  showStartupScreen: Boolean = true;
  public tempRootPage: any;
  public hasFirebaseDynamicLink: Boolean = false;

  constructor(
    private platform: Platform,
    statusBar: StatusBar,
    splashScreen: SplashScreen,
    private store: InAppPurchase2,
    // private deeplinks: Deeplinks,
    private authService: AuthService,
    private homeService: HomeService,
    private singletonService: SingletonService,
    private storage: Storage,
    private events: Events,
    private toast: Toast,
    private firebaseDynamicLinks: FirebaseDynamicLinks,
  ) {
    platform.ready().then(() => {
      // Okay, so the platform is ready and our plugins are available.
      // Here you can do any higher level native things you might need.
      statusBar.styleDefault();
      splashScreen.hide();
      this._initIap();
      // this._initDeeplinks();
      this._handleEvents();
      this._initServerCalls();
    });
  }
...

In ios I’m getting the logs:

2018-03-11 09:41:33.332179+0530 WordForYou[1159:183502] DiskCookieStorage changing policy from 2 to 0, cookie file: file:///private/var/mobile/Containers/Data/Application/C577545E-13A7-4C2F-86D7-F3D3D2A74A2E/Library/Cookies/Cookies.binarycookies
2018-03-11 09:41:33.428318+0530 WordForYou[1159:183502] Apache Cordova native platform version 4.5.3 is starting.
2018-03-11 09:41:33.430405+0530 WordForYou[1159:183502] Multi-tasking -> Device: YES, App: YES
2018-03-11 09:41:33.473991+0530 WordForYou[1159:183502] CDVWKWebViewEngine: trying to inject XHR polyfill
2018-03-11 09:41:33.847546+0530 WordForYou[1159:183502] CDVWKWebViewEngine will reload WKWebView if required on resume
2018-03-11 09:41:33.847717+0530 WordForYou[1159:183502] Using Ionic WKWebView
2018-03-11 09:41:33.849899+0530 WordForYou[1159:183502] [CDVTimer][console] 0.231028ms
2018-03-11 09:41:33.850581+0530 WordForYou[1159:183502] [CDVTimer][handleopenurl] 0.357032ms
2018-03-11 09:41:33.856422+0530 WordForYou[1159:183502] [CDVTimer][intentandnavigationfilter] 5.723953ms
2018-03-11 09:41:33.856731+0530 WordForYou[1159:183502] [CDVTimer][gesturehandler] 0.190973ms
2018-03-11 09:41:33.871924+0530 WordForYou[1159:183502] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
2018-03-11 09:41:33.872972+0530 WordForYou[1159:183502] [MC] Reading from public effective user settings.
2018-03-11 09:41:33.877654+0530 WordForYou[1159:183502] InAppPurchase[objc] Initialized.
2018-03-11 09:41:33.877766+0530 WordForYou[1159:183502] [CDVTimer][inapppurchase] 20.957947ms
2018-03-11 09:41:33.901254+0530 WordForYou[1159:183502] [CDVTimer][splashscreen] 23.403049ms
2018-03-11 09:41:33.903321+0530 WordForYou[1159:183502] [CDVTimer][keyboard] 1.774073ms
2018-03-11 09:41:33.903649+0530 WordForYou[1159:183502] Starting Firebase DynamicLinks plugin
2018-03-11 09:41:33.903767+0530 WordForYou[1159:183502] [CDVTimer][firebasedynamiclinks] 0.256062ms
2018-03-11 09:41:33.904093+0530 WordForYou[1159:183502] [CDVTimer][socialsharing] 0.259042ms
2018-03-11 09:41:33.904176+0530 WordForYou[1159:183502] [CDVTimer][TotalPluginStartup] 55.562019ms
2018-03-11 09:41:33.911672+0530 WordForYou[1159:183545] [MC] Filtering mail sheet accounts for bundle ID: io.ionic.wordforyou, source account management: 1
2018-03-11 09:41:33.922380+0530 WordForYou[1159:183545] [MC] Result: YES
2018-03-11 09:41:33.922951+0530 WordForYou[1159:183545] [MC] Filtering mail sheet accounts for bundle ID: io.ionic.wordforyou, source account management: 1
2018-03-11 09:41:33.924259+0530 WordForYou[1159:183545] [MC] Result: YES
2018-03-11 09:41:34.335772+0530 WordForYou[1159:183502] InAppPurchase[objc] (before init): WARNING: Your app should be single page to use in-app-purchases. onReset is not supported.

My ionic info prints this:

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.19.0
    ionic (Ionic CLI) : 3.19.0

global packages:

    cordova (Cordova CLI) : 7.1.0

local packages:

    @ionic/app-scripts : 3.1.5
    Cordova Platforms  : android 6.3.0 ios 4.5.4
    Ionic Framework    : ionic-angular 3.9.2

System:

    ios-deploy : 1.9.2
    Node       : v6.11.3
    npm        : 3.10.10
    OS         : macOS High Sierra
    Xcode      : Xcode 9.2 Build version 9C40b

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro

My chrome inspector showing me this log (in dev mode only, by the way my app is working with this log - this is only for your information)
49%20AM

I’ve been trying to solve this issue for past 2 days, but I’m unable to figure out this issue.
Can you please help me out with this?

See this question on stackoverflow - https://stackoverflow.com/questions/49217131/ionic-app-halts-at-splash-screen-when-running-with-prod-build

Posts: 6

Participants: 3

Read full topic

Take information from form

$
0
0

@nahuelreymundo wrote:

I need help.
People, as you can see in the video, a modal opens, and the modal has 2 inputs of text type and a button to send. I need you to fill in the form and when you click on the “Add” button, the first and last name will be shown on the previous screen that says 1º1º.
How can I do that?

(View first)
Video: https://drive.google.com/open?id=1o3uZXC8cqap10aZT6XJIEVTs6RDbUhZu
//home page


//form page

Posts: 1

Participants: 1

Read full topic

Big notification in ionic 3 using FCM

$
0
0

@Faizyfaazz wrote:

I want to send big notification using firebase. I add this code to MyFirebaseMessagingService.java page of FCM plugin

 .setStyle(new NotificationCompat.BigPictureStyle()
                                .bigPicture(myBitmap)
                                .bigLargeIcon(null))
                        .build();

but it shows error:


* What went wrong:
Execution failed for task ':compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
(node:5376) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: cmd: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
C:\Users\faizy\Desktop\styleplus\platforms\android\src\com\gae\scaffolder\plugin\MyFirebaseMessagingService.java:80: error: cannot find symbol
                                .bigPicture(myBitmap)
                                            ^
  symbol:   variable myBitmap
  location: class MyFirebaseMessagingService
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

how can I do this?

Posts: 1

Participants: 1

Read full topic

Android run - can't find build tools

$
0
0

@ZaLiTHkA wrote:

greetings… :slight_smile:

the tl;dr: I’m trying to get an Ionic 3 project up and running on an Ubuntu machine, but the Android SDK is giving me hell. didn’t have problems with this on my Windows machine (at work), but I can’t figure out what’s missing from my Ubuntu machine (at home). to the best of my knowledge, I’ve got all the correct requirements, but the build commands are simply not finding them.

with regards to the Android SDK, I do not have Android Studio, so I installed the SDK using the “SDK Tools” only approach, which is extracted to ~/android-sdk/tools with the following added to my ~/.bashrc file:

export ANDROID_HOME=/home/dre/android-sdk/tools`
export PATH=$ANDROID_HOME/bin:$PATH

full $PATH output is currently:

/home/dre/android-sdk/tools/bin:/home/dre/.nvm/versions/node/v6.12.3/bin:/home/dre/bin:/home/dre/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

really hoping this is just something silly that I did, but I can’t figure it out. :frowning: all my environment info is included below.


ionic info output:

dre@mobile-monster:~/workspace/nortech/pk-du-mobile$ ionic info
cli packages: (/home/dre/.nvm/versions/node/v6.12.3/lib/node_modules)

    @ionic/cli-utils  : 1.19.1
    ionic (Ionic CLI) : 3.19.1

global packages:

    cordova (Cordova CLI) : 8.0.0 

local packages:

    @ionic/app-scripts : 3.1.8
    Cordova Platforms  : android 7.0.0 ios 4.5.4
    Ionic Framework    : ionic-angular 3.9.2

System:

    Node : v6.12.3
    npm  : 5.6.0 
    OS   : Linux 4.13

Environment Variables:

    ANDROID_HOME : /home/dre/android-sdk/tools

Misc:

    backend : pro

ionic cordova requirements output (obviously the iOS requirements will fail here):

dre@mobile-monster:~/workspace/nortech/pk-du-mobile$ ionic cordova requirements
> cordova requirements
Android Studio project detected


Requirements check results for android:

Java JDK: installed 1.8.0

Android SDK: installed true

Android target: installed android-27,android-26

Gradle: installed /usr/share/gradle/bin/gradle

Requirements check results for ios:
Apple macOS: not installed 
Cordova tooling for iOS requires Apple macOS

(node:3046) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Some of requirements check failed

sdkmanager --list, installed packages and available updates:

note: I tried installing the specific version the build tools are looking for, just in case… but this made no difference, which makes me suspect this is more likely to be an issue with the location of the tools, rather than the fact that they’re not installed.

dre@mobile-monster:~/workspace/nortech/pk-du-mobile$ sdkmanager --list
Warning: File /home/dre/.android/repositories.cfg could not be loaded.
Installed packages:
  Path                 | Version | Description                    | Location             
  -------              | ------- | -------                        | -------              
  build-tools;19.1.0   | 19.1.0  | Android SDK Build-Tools 19.1   | build-tools/19.1.0/  
  build-tools;27.0.3   | 27.0.3  | Android SDK Build-Tools 27.0.3 | build-tools/27.0.3/  
  patcher;v4           | 1       | SDK Patch Applier v4           | patcher/v4/          
  platform-tools       | 27.0.1  | Android SDK Platform-Tools     | platform-tools/      
  platforms;android-26 | 2       | Android SDK Platform 26        | platforms/android-26/
  platforms;android-27 | 1       | Android SDK Platform 27        | platforms/android-27/
  sources;android-26   | 1       | Sources for Android 26         | sources/android-26/  
  sources;android-27   | 1       | Sources for Android 27         | sources/android-27/  
  tools                | 26.0.1  | Android SDK Tools 26.0.1       | tools/

<snip>

Available Updates:
  ID      | Installed | Available
  ------- | -------   | -------  
  tools   | 26.0.1    | 26.1.1   
done

and then the problem when trying to run my project:

dre@mobile-monster:~/workspace/nortech/pk-du-mobile$ yarn run:android
yarn run v1.5.1
$ ionic cordova run android --device --livereload
Starting app-scripts server: --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser 
--iscordovaserve --platform android --target cordova - Ctrl+C to cancel
[09:46:49]  watch started ... 
[09:46:49]  build dev started ... 
[09:46:49]  clean started ... 
[09:46:49]  clean finished in 3 ms 
[09:46:49]  copy started ... 
[09:46:49]  deeplinks started ... 
[09:46:49]  deeplinks finished in 82 ms 
[09:46:49]  transpile started ... 
[09:46:53]  transpile finished in 4.53 s 
[09:46:53]  preprocess started ... 
[09:46:53]  preprocess finished in 1 ms 
[09:46:53]  webpack started ... 
[09:46:54]  copy finished in 4.91 s 
[09:47:02]  webpack finished in 8.89 s 
[09:47:02]  sass started ... 
Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.
[09:47:04]  sass finished in 1.88 s 
[09:47:04]  postprocess started ... 
[09:47:04]  postprocess finished in 9 ms 
[09:47:04]  lint started ... 
[09:47:04]  build dev finished in 15.53 s 
[09:47:04]  watch ready in 15.61 s 
[09:47:04]  dev server running: http://localhost:8100/ 

[OK] Development server running!
     Local: http://localhost:8100
     External: http://10.0.0.120:8100
     

> cordova run android --device
Android Studio project detected

ANDROID_HOME=/home/dre/android-sdk/tools
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
studio
Subproject Path: CordovaLib
Subproject Path: app

FAILURE: Build failed with an exception.

* Where:

Script '/home/dre/workspace/nortech/pk-du-mobile/platforms/android/CordovaLib/cordova.gradle' line: 68


* What went wrong:

A problem occurred evaluating project ':CordovaLib'.

> 
No installed build tools found. Install the Android build tools version 19.1.0 or higher.


* 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 0s
(node:4233) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: /home/dre/workspace/nortech/pk-du-mobile/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* Where:
Script '/home/dre/workspace/nortech/pk-du-mobile/platforms/android/CordovaLib/cordova.gradle' line: 68

* What went wrong:
A problem occurred evaluating project ':CordovaLib'.
> No installed build tools found. Install the Android build tools version 19.1.0 or higher.

* 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 0s

please could someone help me figure out why this command can’t find the build tools?

Posts: 6

Participants: 2

Read full topic

EXIT ion-tabs

$
0
0

@Quiesan wrote:

Hi !

I try to exit my ion-tabs when I logout but I can’t. I tried let nav = this.app.getRootNav();
nav.push(AccueilPage); but that doesn’t work. Have you an idea please ?

Posts: 12

Participants: 3

Read full topic


Ionic build android app(lazy load) white screen on android lolipop 5.1

$
0
0

@ismailcse11 wrote:

ionic info

ionic info

cli packages: (C:\Users\ismail\AppData\Roaming\npm\node_modules)

    @ionic/cli-utils  : 1.19.1
    ionic (Ionic CLI) : 3.19.1

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.1.8
    Cordova Platforms  : android 6.2.3
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.1.1
    Node              : v8.9.4
    npm               : 5.7.1
    OS                : Windows 10

Environment Variables:

    ANDROID_HOME : C:\Users\ismail\AppData\Local\Android\Sdk

Misc:

    backend : pro

as usual build statement:
ionic cordova build --release android

 ionic cordova build --release android
Running app-scripts build: --platform android --target cordova
[15:49:04]  build dev started ...
[15:49:04]  clean started ...
[15:49:04]  clean finished in 118 ms
[15:49:04]  copy started ...
[15:49:04]  deeplinks started ...
[15:49:05]  deeplinks finished in 140 ms
[15:49:05]  transpile started ...
[15:49:15]  transpile finished in 10.66 s
[15:49:15]  preprocess started ...
[15:49:15]  preprocess finished in 1 ms
[15:49:15]  webpack started ...
[15:49:16]  copy finished in 12.22 s
[15:49:28]  webpack finished in 13.08 s
[15:49:28]  sass started ...
Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.
[15:49:34]  sass finished in 5.32 s
[15:49:34]  postprocess started ...
[15:49:34]  postprocess finished in 45 ms
[15:49:34]  lint started ...
[15:49:34]  build dev finished in 30.12 s
> cordova build android --release
[15:49:40]  lint finished in 6.06 s
ANDROID_HOME=C:\Users\ismail\AppData\Local\Android\Sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_161
Subproject Path: CordovaLib
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.

        at build_ct01a9zzo3flnx1f8yi609awn.run(D:\ionic\at\platforms\android\build.gradle:137)
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.

Incremental java compilation is an incubating feature.

The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.

:preBuild

UP-TO-DATE

:preReleaseBuild

UP-TO-DATE
:checkReleaseManifest
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preReleaseBuild UP-TO-DATE
:CordovaLib:checkReleaseManifest
:CordovaLib:prepareReleaseDependencies
:CordovaLib:compileReleaseAidl
 UP-TO-DATE

:CordovaLib:compileReleaseNdk
 UP-TO-DATE
:CordovaLib:compileLint
 UP-TO-DATE

:CordovaLib:copyReleaseLint UP-TO-DATE
:CordovaLib:mergeReleaseShaders

UP-TO-DATE
:CordovaLib:compileReleaseShaders
 UP-TO-DATE
:CordovaLib:generateReleaseAssets
 UP-TO-DATE
:CordovaLib:mergeReleaseAssets
 UP-TO-DATE
:CordovaLib:mergeReleaseProguardFiles
 UP-TO-DATE
:CordovaLib:packageReleaseRenderscript
 UP-TO-DATE

:CordovaLib:compileReleaseRenderscript
 UP-TO-DATE
:CordovaLib:generateReleaseResValues
 UP-TO-DATE

:CordovaLib:generateReleaseResources UP-TO-DATE
:CordovaLib:packageReleaseResources
 UP-TO-DATE
:CordovaLib:processReleaseManifest
 UP-TO-DATE

:CordovaLib:generateReleaseBuildConfig
 UP-TO-DATE
:CordovaLib:processReleaseResources
 UP-TO-DATE
:CordovaLib:generateReleaseSources UP-TO-DATE
:CordovaLib:incrementalReleaseJavaCompilationSafeguard
 UP-TO-DATE

:CordovaLib:compileReleaseJavaWithJavac
 UP-TO-DATE
:CordovaLib:processReleaseJavaRes
 UP-TO-DATE

:CordovaLib:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease
 UP-TO-DATE
:CordovaLib:mergeReleaseJniLibFolders

UP-TO-DATE
:CordovaLib:transformNative_libsWithMergeJniLibsForRelease
 UP-TO-DATE
:CordovaLib:transformNative_libsWithSyncJniLibsForRelease UP-TO-DATE
:CordovaLib:bundleRelease
 UP-TO-DATE
:prepareOrgApacheCordovaCordovaLib623ReleaseLibrary
 UP-TO-DATE
:prepareReleaseDependencies
:compileReleaseAidl UP-TO-DATE
:compileReleaseRenderscript
 UP-TO-DATE
:generateReleaseBuildConfig
 UP-TO-DATE

:generateReleaseResValues UP-TO-DATE
:generateReleaseResources UP-TO-DATE
:mergeReleaseResources
 UP-TO-DATE
:processReleaseManifest
 UP-TO-DATE

:processReleaseResources
 UP-TO-DATE

:generateReleaseSources UP-TO-DATE
:incrementalReleaseJavaCompilationSafeguard
 UP-TO-DATE
:compileReleaseJavaWithJavac
 UP-TO-DATE

:compileReleaseNdk
 UP-TO-DATE
:compileReleaseSources UP-TO-DATE
:lintVitalRelease

:mergeReleaseShaders
 UP-TO-DATE

:compileReleaseShaders

UP-TO-DATE
:generateReleaseAssets UP-TO-DATE
:mergeReleaseAssets

:transformClassesWithDexForRelease
 UP-TO-DATE
:mergeReleaseJniLibFolders
 UP-TO-DATE

:transformNative_libsWithMergeJniLibsForRelease
 UP-TO-DATE

:processReleaseJavaRes
 UP-TO-DATE
:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
:packageRelease

:assembleRelease
:cdvBuildRelease

BUILD SUCCESSFUL

Total time: 1 mins 30.308 secs
Built the following apk(s):
        D:/ionic/at/platforms/android/build/outputs/apk/android-release-unsigned.apk

app is comming in web browesr but android lolipop 5.1 white screen show always. I am not understanding. please help any one.

Posts: 3

Participants: 2

Read full topic

Upload multiple photo

$
0
0

@med001 wrote:

Hello,
How to upload multiple photo in ionic 2 ?? I founed plugin camera but tuto when I found is for upload one photo but I have upload multiple photo

Posts: 1

Participants: 1

Read full topic

Unable to parse JSONArray Response in HttpClient 4.3 , Ionic 3

$
0
0

@greatakpo wrote:

I have to parse a JSONArray response from a server
My rest method is

@Injectable()
export class RestProvider {
  apiUrl = 'https://xyz.phpp';
  constructor(public http: HttpClient) {
    console.log('Hello RestProvider Provider');
  }
  getCandidates(categoryval,stateval) {
    const paramsval = new HttpParams({
      fromObject: {
        category: categoryval,
        state: stateval,
      }
    });
    return new Promise(resolve => {
      this.http.get(this.apiUrl+'/get_candidates.php',{ params: paramsval }).subscribe(data => {
        resolve(data);
      }, err => {
        console.log(err);
      });
    });
  }
}
``
The response is in this format 

“candidates”:[{“c_id”:“3”,“c_name”:“James i”,“c_state”:“D”,“c_post”:“G”,“c_image”:null,“c_category”:“G”},{“c_id”:“4”,“c_name”:“OWy”,“c_state”:“G”,“c_post”:“D”,“c_image”:null,“c_category”:“GAL”}]}

Calling the method in this format

getCandidates() {
this.restProvider.getCandidates(this.c,this.s)
.then(data => {
this.json = data;
// alert(this.json);
console.log(this.json);
});
}
}

Trying to display array in a list in this format

{{candidate.c_name}}

{{candidate.c_post}}

``` The issue is that it is throwing an Error: ``` Cannot read property 'candidates' of undefined ``` which i assume is when i am trying to reference the 'candidates' array returned by the webservice.How can i resolve this?.Thanks

Posts: 1

Participants: 1

Read full topic

Search list of names only

$
0
0

@Dedoo wrote:

in file HTML

<ion-searchbar placeholder="Username" type="text" (ionInput)="getTopics($event)" [showCancelButton]="shouldShowCancel" (ionCancel)="onCancel($event)"></ion-searchbar>  
            <ion-item *ngFor="let item of items">
                    <ion-avatar item-left="item-left">
                        <img [src]="item.avatar"></ion-avatar>
                        <ion-label>  {{item.name}}</ion-label> 
                    </ion-item>

in file TS

export class AddChatPage {
  items: any[];
 constructor(public navCtrl: NavController,
     public navParams: NavParams   ) {  
      this.generateTopics();
} 

generateTopics() {   
 this.items = [
  { name: 'amr mohy', avatar: '/assets/imgs/6.png'  }, 
  { name: 'mando fady', avatar: '/assets/imgs/5.png'  }   
  ]  
 }

 getTopics(ev: any) {
    this.generateTopics(); 
    let serVal = ev.target.value;
    if (serVal && serVal.trim() != '') {
        this.name=  this.name.filter((topic) => {
        return (topic.toLowerCase().indexOf(serVal.toLowerCase()) > -1);
      })
    }
  }

}

Posts: 1

Participants: 1

Read full topic

Show images in cards from bytes

$
0
0

@Pasto92 wrote:

Hi. I’d like to show an image from an array of bytes. I tried this code but it doesn’t work:

<ion-card *ngFor="let result of results">
    <ion-card-header>
      <h2>{{result.title}}</h2>
    </ion-card-header>
    <ion-card-content>
      <img ng-src="data:image/JPEG;base64,{{result.arrayofbytes}}"/>
    </ion-card-content>
  </ion-card>

Static files must not be public in my application, so I don’t need something like this:

<img src="http://www.myserver.it/images/photo.jpg"/>

Any ideas?

Posts: 1

Participants: 1

Read full topic

--prod stuck on white screen, no errors

$
0
0

@mydoal2 wrote:

When running the build with –release --prod, the android / browser / ios application is stuck on the white screen after the splash screen.

With only –release flag, it works fine on adroid / browser / ios. There is no error, nothing in the build log or in the console and in LogCat.

The following options work:

ionic cordova run android --release --max-old-space-size=4096 --verbose --aot
ionic cordova run android --release --max-old-space-size=4096 --verbose --minifyjs 
ionic cordova run android --release --max-old-space-size=4096 --verbose --optimizejs
ionic cordova run android --release --max-old-space-size=4096 --verbose --optimizejs --aot
ionic cordova run android --release --max-old-space-size=4096 --verbose --minifyjs --aot
ionic cordova run android --release --max-old-space-size=4096 --verbose --minifyjs --optimizejs

The following fails:

ionic cordova run android --release --max-old-space-size=4096 --verbose --minifyjs --optimizejs --aot

If I understood correctly, there are no console logs in prod and you cannot do remote debugging in the browser so I have no idea how to find out what went wrong.

When running a blank project it works.

I could start from scratch and incrementally add my code but since the build takes quite long it is impractical.

Any ideas?

Thank you in advance.

Build log:

$ ionic cordova run android --release --max-old-space-size=4096 --verbose --aot --minifyjs --optimizejs --stacktrace
[DEBUG] Reason for not using local CLI: LOCAL_CLI_NOT_FOUND
[DEBUG] CLI flags: { interactive: true, confirm: false }
[DEBUG] { cwd: 'xxx', local: false, binPath: 'C:\\Users\\Lenovo\\AppData\\Roaming\\npm\\node_modules\\ionic\\bin\\ionic', libPath: 'C:\\Users\\Lenovo\\AppData\\Roaming\\npm\\node_modules\\ionic\\dist\\index.js' }
[DEBUG] Daemon found (pid: 4760)
Running app-scripts build: --aot --minifyjs --optimizejs --platform android --target cordova
[13:22:38]  build dev started ...
[13:22:38]  clean started ...
[13:22:38]  clean finished in 23 ms
[13:22:38]  copy started ...
[13:22:38]  deeplinks started ...
[13:22:39]  deeplinks finished in 713 ms
[13:22:39]  ngc started ...
[13:23:16]  ngc finished in 36.68 s
[13:23:16]  preprocess started ...
[13:23:16]  preprocess finished in 1 ms
[13:23:16]  webpack started ...
[13:23:16]  copy finished in 38.35 s
[13:28:58]  webpack finished in 342.65 s
[13:28:58]  uglify started ...
[13:28:58]  sass started ...
Without `from` option PostCSS could generate wrong source map and will not find Browserslist config. Set it to CSS file path or to `undefined` to prevent this warning.
[13:29:02]  sass finished in 4.06 s
[13:30:38]  uglify finished in 99.37 s
[13:30:38]  postprocess started ...
[13:30:38]  postprocess finished in 73 ms
[13:30:38]  lint started ...
[13:30:38]  build dev finished in 479.87 s
> cordova run android --release
ANDROID_HOME=C:\dev\lib\Android\sdk
JAVA_HOME=C:\dev\lang\Java\64\jdk1.8.0_111
Subproject Path: CordovaLib
Parallel execution is an incubating feature.

google-services plugin could not detect any version for com.google.android.gms or com.google.firebase, default version: 9.0.0 will be used.
please apply google-services plugin at the bottom of the build file.
Configuration 'compile' in project ':' is deprecated. Use 'implementation' instead.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
        at build_d2nopw3voc2pmstl7pa0kkv4w.run(...\build.gradle:143)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preReleaseBuild UP-TO-DATE
:preBuild
:CordovaLib:checkReleaseManifest UP-TO-DATE
:CordovaLib:processReleaseManifest
 UP-TO-DATE
:preBuild UP-TO-DATE
:CordovaLib:compileReleaseAidl
:preReleaseBuild

Ionic info:

$ ionic info

cli packages: (C:\Users\Lenovo\AppData\Roaming\npm\node_modules)

    @ionic/cli-utils  : 1.19.1
    ionic (Ionic CLI) : 3.19.1

global packages:

    cordova (Cordova CLI) : not installed

local packages:

    @ionic/app-scripts : 3.1.8
    Cordova Platforms  : android 6.4.0 browser 5.0.3
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.0.2
    Node              : v8.10.0
    npm               : 5.6.0
    OS                : Windows 7

Environment Variables:

    ANDROID_HOME : C:\dev\lib\Android\sdk

Misc:

    backend : pro

package.json

...
   "dependencies": {
    "@angular/common": "5.0.3",
    "@angular/compiler": "5.0.3",
    "@angular/compiler-cli": "5.0.3",
    "@angular/core": "^5.2.8",
    "@angular/forms": "5.0.3",
    "@angular/http": "5.0.3",
    "@angular/platform-browser": "5.0.3",
    "@angular/platform-browser-dynamic": "5.0.3",
    "@ionic-native/action-sheet": "^4.5.3",
    "@ionic-native/barcode-scanner": "^4.5.3",
    "@ionic-native/camera": "^4.5.3",
    "@ionic-native/core": "4.4.0",
    "@ionic-native/fcm": "^4.5.3",
    "@ionic-native/splash-screen": "4.4.0",
    "@ionic-native/status-bar": "4.4.0",
    "@ionic/pro": "1.0.20",
    "@ionic/storage": "2.1.3",
    "@ngx-translate/core": "^9.1.1",
    "@ngx-translate/http-loader": "^2.0.1",
    "angularfire2": "^5.0.0-rc.6",
    "cordova-android": "^6.4.0",
    "cordova-browser": "latest",
    "cordova-plugin-actionsheet": "^2.3.3",
    "cordova-plugin-camera": "^4.0.2",
    "cordova-plugin-compat": "^1.2.0",
    "cordova-plugin-device": "^2.0.1",
    "cordova-plugin-fcm": "^2.1.2",
    "cordova-plugin-ionic-keyboard": "^2.0.5",
    "cordova-plugin-ionic-webview": "^1.1.16",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-whitelist": "^1.3.3",
    "firebase": "^4.11.0",
    "ionic-angular": "3.9.2",
    "ionic-img-viewer": "^2.9.0",
    "ionicons": "3.0.0",
    "moment": "^2.20.1",
    "ngx-qrcode2": "0.0.5",
    "ngx-quill": "^2.1.2",
    "phonegap-plugin-barcodescanner": "^7.0.2",
    "rxjs": "^5.5.4",
    "striptags": "^3.1.1",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.18"
  },
...
  "devDependencies": {
    "@ionic/app-scripts": "3.1.8",
    "check-dependencies": "^1.1.0",
    "typescript": "2.4.2"
  },
...

Posts: 1

Participants: 1

Read full topic

Plugin not applied to iOS

$
0
0

@pdj wrote:

I’m using cordova-plugin-device 2.0.1 “Device” plugin to get unique id of device.

but having problem using it in iOS
xcode log said below.

2018-03-11 21:00:43.036326+0900 ionic_ruliweb[3683:2260203] CDVPlugin class CDVDevice (pluginName: Device) does not exist.
2018-03-11 21:00:43.036407+0900 ionic_ruliweb[3683:2260203] ERROR: Plugin ‘Device’ not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.
2018-03-11 21:00:43.036463+0900 ionic_ruliweb[3683:2260203] -[CDVCommandQueue executePending] [Line 142] FAILED pluginJSON = [“Device282422682”,“Device”,“getDeviceInfo”,[]]

why is it?

ionic info is below

li packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.19.1
ionic (Ionic CLI) : 3.19.1

global packages:

cordova (Cordova CLI) : 7.0.1

local packages:

@ionic/app-scripts : 3.1.8
Cordova Platforms  : android 6.4.0 ios 4.4.0
Ionic Framework    : ionic-angular 3.9.2

System:

ios-deploy : 1.9.2
Node       : v8.4.0
npm        : 5.6.0
OS         : macOS High Sierra
Xcode      : Xcode 9.2 Build version 9C40b

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : legacy

Posts: 1

Participants: 1

Read full topic


Cafebazaar in app billing with ionic

$
0
0

@amin-setayeshfar wrote:

cafe bazaar is an Iranian market and i’m trying to connect to it from ionic. i installed in-app-purchase from here and in the iabhelper in the cordova plugin file replaced these two lines

 Intent serviceIntent = new Intent("ir.cafebazaar.pardakht.InAppBillingService.BIND");
 serviceIntent.setPackage("com.farsitel.bazaar");

and added the

<uses-permission android:name="com.farsitel.bazaar.permission.PAY_THROUGH_BAZAAR"/>

to my android manifest and also the key to manifest.jason but the app crashes when it gets to the bazaar part of code. any help would be appreciated

Posts: 1

Participants: 1

Read full topic

Ionic cordova openlayers error in display

Popup input

Tabs right aligned

$
0
0

@nildan wrote:

Hi!
I really like how ion-tabs work and look, but I would like to display the tabs (icons+text) aligned to the right of the screen, not distributed evenly across the screen’s width – similar to how work in a toolbar.

Is this possible? Or am I better off customizing a Toolbar?

Thanks!

Ionic 3.9.2

Posts: 1

Participants: 1

Read full topic

Who can help me understand these two lines of code

$
0
0

@lolaswift1 wrote:

source:

// decide which menu items should be hidden by current login status stored in local storage
this.userData.hasLoggedIn().then((hasLoggedIn) => {
this.enableMenu(hasLoggedIn === true);
});

this.enableMenu(true);

I don’t understand why after checking if user has loggedin, set the menu(loggedin menu) to ‘enable’ anyway

Posts: 1

Participants: 1

Read full topic

Viewing all 48969 articles
Browse latest View live




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