These are chat archives for angular/angular-2-ionic-2

21st
Feb 2018
maxeber
@maxeber
Feb 21 2018 01:39

Hi guys, I'm trying to use SiriWavejs. Everything work flawlessly even on my Android device with adb (in debug).

Unfortunately, the canvas (that's my guess here, since there is nothing shown) doesn't display at all when I'm building the APK and installing it on Android.

By looking at the SiriWave script, it use window.getComputedStyle & (window.requestAnimationFrame. I was wondering if the variable exist when its built for Android?

That's the only hint I have toward it not rendering...

UncertaintyP
@UncertaintyP
Feb 21 2018 02:23
Why not try to build in prod mode first?
maxeber
@maxeber
Feb 21 2018 14:49
Hmm I'll try that. I'll get back to you shortly
maxeber
@maxeber
Feb 21 2018 16:38
image.png
@UncertaintyP It seem that it doesn't include the siriwave.js file in the assets (when I inspect the app from chrome remote device inspect). The things is that when I build the app, it successfully add it to the www. I don't know how it doesn't get serve in the final build...
maxeber
@maxeber
Feb 21 2018 16:44
image.png
That picture is from my local develoption, and the first one is on chrome.
UncertaintyP
@UncertaintyP
Feb 21 2018 17:29
What is this folder structure? I don't recognize it
maxeber
@maxeber
Feb 21 2018 20:20
image.png
@UncertaintyP So first here the structure of the project
UncertaintyP
@UncertaintyP
Feb 21 2018 20:23
The www folder is of no interest for device builds
It's build from src folder
UncertaintyP
@UncertaintyP
Feb 21 2018 20:28
but all assets should be copied to android/assets/www/assets
that is, your fonts/icon/imgs also missing, how do you build?
maxeber
@maxeber
Feb 21 2018 20:41
image.png

@UncertaintyP thats is my android file structure. Seems its also got copied there also when building.

The thing is when I remote debug the APK from chrome I can see that the files aren't really there (as youve seen in the first picture I posted)

Is it normal that its android/app/src/main/assets/www/assets instead of: (like you wrote) android/assets/www/assets

maxeber
@maxeber
Feb 21 2018 20:49
@UncertaintyP I tried building with several command "build:www": "rm -rf www && ionic-app-scripts build --prod" or "ionic:build": "ionic-app-scripts build" or "build-apk": "ionic cordova build android --test" and to serve to my device with "android:run": "cordova run android"