Reduce splash screen and white screen total time in ionic 2 - ionic2

How can i reduce the white screen time because when i try “
<preference name="SplashMaintainAspectRatio" value="true" />
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="1000" />
<preference name="FadeSplashScreen" value="true" />
<preference name="AutoHideSplashScreen" value="false" />
<preference name="FadeSplashScreenDuration" value="300" />
total splash screen is take 8 to 9 second, it display 1 second for splash screen and 7 to 8 second extra (i mean white screen but background same as splash screen). i required to set total time 4-5 second for starting my app.
please help me…!

Run your app using this command to optimize speed,
ionic cordova run android --prod
Also, generate the pages with lazy loading. So, the pages will load only when it requires and not all at startup.

Related

Consistently show "Play" button on all browsers for MP3 Object

I'm using XHTML 1.1 plus MathML 2.0 plus SVG 1.1 (and I'd like to stick with it.)
I have some object elements to play music. For example:
<object id="Music_Player" type="audio/mp3" data="./Recordings/Hymns_2022/hymn22_02_20_justasiam.mp3">
<param name="filename" value="./Recordings/Hymns_2022/hymn22_02_20_justasiam.mp3" />
<param name="autoplay" value="false" />
<param name="autoStart" value="0" />
<param name="loop" value="false" />
</object>
In Firefox and Pale Moon, the media player has a little "play" button; in Chrome that button only SOMETIMES shows up, and in Edge I don't see it at all and the file cannot be played. How can I get the play button to show up consistently? For example, is there a "playbutton" parameter?

My App downloaded from the playstore fails to call web service

I recently developed a cordova App that is uploaded to google play store. I tested this app on my mobile and simulators for weeks and everything works fine. However, when i download the same app from the playstore it fails to call any of the web services and such doesn't display any content.
cordova : 9.0.1
npm : 6.10.1
cordova-android : 7.0.0
I have gone through every line of code and i can't seem to find the problem, i replaced every single call to window.localStorage to a global variables just to be able to fix what i thought would be the problem.
<?xml version='1.0' encoding='utf-8'?></code>
<widget defaultlocale="en-US" id="com.test.fr" version="1.0.6" android-versionCode="100050" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0" xmlns:vs="http://schemas.microsoft.com/appx/2014/htmlapps">
<content src="index.html" />
<access origin="*" />
<preference name="SplashScreen" value="screen" />
<preference name="windows-target-version" value="8.1" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<platform name="android">
<allow-intent href="market:*" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
</platform>
<platform name="android">
<icon src="www/res/icon/android/fr_mobile_icon.png" density="ldpi" />
<icon src="www/res/icon/android/fr_mobile_icon.png" density="mdpi" />
<icon src="www/res/icon/android/fr_mobile_icon.png" density="hdpi" />
<icon src="www/res/icon/android/fr_mobile_icon.png" density="xhdpi" />
</platform>
<plugin name="cordova-plugin-device" version="2.0.2" />
<plugin name="cordova-plugin-websql" version="0.0.10" />
<plugin name="cordova-plugin-dialogs" version="2.0.1" />
<plugin name="cordova-plugin-file" version="4.3.3" />
<preference name="target-device" value="handset" />
<preference name="BackupWebStorage" value="local" />
<preference name="android-targetSdkVersion" value="28" />
<preference name="android-minSdkVersion" value="17" />
<preference name="android-maxSdkVersion" value="29" />
<preference name="AndroidPersistentFileLocation" value="Compatibility" />
<plugin name="cordova-custom-config" spec="5.1.0" />
</widget>
Worst part.... No error shown on the device, it just doesn't work.
First of all, you need to figure out what is the output of this error. To allow debug on a release build use android:debuggable on application tag at AndroiManifest.xml (https://developer.android.com/guide/topics/manifest/application-element).
Then, plug the device to your computer and in dev settings (on your device) enable usb debugging. Then, navigate to chrome://inspect/#devices - your device should be appearing and will be a link to your webview.
With the inspector openned, do the request and look to the error on console tab.
I think there's a high chance that the error is a CORS error, may your production server has CORS eabled and then you need to use cordova-plugin-whitelist correctly to send a origin to the server, read more about cordova-plugin-whitelisthere: https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-whitelist/
Try adding android:usesCleartextTraffic="true" to the <application> in the AndroidManifest.xml or as below using config.xml
<platform name="android">
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
<application android:usesCleartextTraffic="true" />
</edit-config>
</platform>
android:usesCleartextTraffic Indicates whether the app intends to use cleartext network traffic, such as cleartext HTTP. The default
value for apps that target API level 27 or lower is "true". Apps that
target API level 28 or higher default to "false". More info
Cleartext is any transmitted or stored information that is not
encrypted or meant to be encrypted. When an app communicates with
servers using a cleartext network traffic, such as HTTP, it could
raise a risk of eavesdropping and tampering of content which is why in latest Android devices, it's set to false by default.

svclog file is not being generated

Been wasting a full day arround this problem.
This had never happen to me before.
My service is working in an Azure machine.
I'm trying to generate a .svclog file to trace whats causing my ios app not being able to login on https, but the svclog file is not being generated.
I tried to use fiddler to capture the requests but i get nothing when i try to login by the app.
If I try to use the app with http address im able to login but the svclog is also not generated.
If I use tcptrace i can see a request and an answer but it is encrypted.
I have given permissions to "Everyone" on the folder at c:\logs\
any idea what i might be missing here? is there some sort of pre requirement to make the tracer work
This is my system diagnostics in web.Config:
<system.diagnostics>
<sources>
<source name="System.ServiceModel.MessageLogging" switchValue="Verbose">
<listeners>
<add type="System.Diagnostics.DefaultTraceListener" name="Default">
<filter type="" />
</add>
<add initializeData="c:\logs\myMessages.svclog" type="System.Diagnostics.XmlWriterTraceListener"
name="messagelistener" traceOutputOptions="DateTime, Timestamp">
<filter type="" />
</add>
</listeners>
</source>
</sources>
<sharedListeners>
<add initializeData="C:\logs\Traces.svclog" type="System.Diagnostics.XmlWriterTraceListener"
name="xmlTraceListener" traceOutputOptions="Timestamp">
<filter type="" />
</add>
</sharedListeners>
<trace autoflush="true" />
</system.diagnostics>

GDK: Give Hint in Voice Prompt

Is it possible to give the user "hints" using voice trigger's input prompt? This is would be similar to what the action "make a call" displays, giving you a list of possible options.
For instance using the following...
<trigger keyword="#string/start_scan" >
<constraints
camera="true"
network="true" />
<input prompt="#string/prompt_scan_what" />
</trigger>
I would like the user flow to be as follows...
------------
"Ok, Glass"
------------
"Scan"
------------
What would you like to scan?
QR Code
Product
Barcode
------------
"Barcode"
Found a workaround with a few cons:
Bloats AndroidManifest depending on number of options.
Different method of getting selected option.
Can't be done programmatically.
Workflow is more like...
---------
"Ok, Glass"
---------
"Scan"
---------
ok glass, scan...
QR Code
Product
Barcode
---------
"Barcode"
Android Manifest:
<activity android:name="com.cantilsoftware.barcodeeye.LaunchActivity">
</activity>
<activity-alias
android:name="Product"
android:label="Product"
android:targetActivity="com.cantilsoftware.barcodeeye.LaunchActivity" >
<intent-filter>
<action android:name="com.google.android.glass.action.VOICE_TRIGGER" />
</intent-filter>
<meta-data
android:name="com.google.android.glass.VoiceTrigger"
android:resource="#xml/voice_trigger_scan" />
</activity-alias>
<activity-alias
android:name="Barcode"
android:label="Barcode"
android:targetActivity="com.cantilsoftware.barcodeeye.LaunchActivity" >
<intent-filter>
<action android:name="com.google.android.glass.action.VOICE_TRIGGER" />
</intent-filter>
<meta-data
android:name="com.google.android.glass.VoiceTrigger"
android:resource="#xml/voice_trigger_scan" />
</activity-alias>
<activity-alias
android:name="QR Code"
android:label="QR Code"
android:targetActivity="com.cantilsoftware.barcodeeye.LaunchActivity" >
<intent-filter>
<action android:name="com.google.android.glass.action.VOICE_TRIGGER" />
</intent-filter>
<meta-data
android:name="com.google.android.glass.VoiceTrigger"
android:resource="#xml/voice_trigger_scan" />
</activity-alias>
Selection detection:
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_launch);
try {
ActivityInfo activityInfo = getPackageManager().getActivityInfo(getComponentName(), 0);
processVoiceAction(activityInfo.loadLabel(getPackageManager()).toString());
} catch (NameNotFoundException e) {
e.printStackTrace();
processVoiceAction(null);
}
}
Have you tried adding a line feed character (i.e. '/n') after the question mark in the prompt text to get a fresh new line?

Spring security 3 intercept-url pattern with index

I am trying to use Spring Security v3.2 for a project. At the moment I always use a coldfusion file that calls other files to build up the view. So all my urls go trough index.cfm?blablah.
Now I am stuck with allowing the anonymous user enter the home view. Following Spring Security request matcher is not working with regex, I made up the this code:
<http use-expressions="true">
<intercept-url pattern="^.*index.cfm\?action=home.*$" access="permitAll" />
<intercept-url pattern="/root/index.cfm" access="isAuthenticated()" />
<intercept-url pattern="/**" access="isAuthenticated()" />
<form-login />
</http>
But whatever I try, I always enter the login field.
After more trying I found a solution:
<http request-matcher="regex" pattern="^.*index.cfm\?action=home.*$" security="none"/>
<http use-expressions="true">
<intercept-url pattern="/root/index.cfm" access="isAuthenticated()" />
<intercept-url pattern="/root/**" access="permitAll" />
<intercept-url pattern="/**" access="isAuthenticated()" />
<form-login />
</http>