Phongap build useing splash.9.png as default splashscreen for android - splash-screen

Phone gap build documentation states that:
The default splash must be named splash.png and must reside in the
root of your application folder.
<gap:splash src="splash.png" />
but they also say:
Patch-9 backgrounds are supported. All patch-9 files have to have a
".9.png" suffix.
Does this mean that I can use
<gap:splash src="splash.9.png" />
as the default ?

You are right, according to the documentation, you can't use a 9-patch image as default splash.
Extracts from the Phonegap Build Documentation page:
The default splash must be named splash.png and must reside in the root of your application folder.
and
All patch-9 files have to have a ".9.png" suffix.
I suggest the following solution: Use the same splash.9.png source for all Android sizes and you will have a similar result. One file for all screens.
<gap:splash src="splash.9.png" gap:platform="android" gap:qualifier="ldpi" />
<gap:splash src="splash.9.png" gap:platform="android" gap:qualifier="mdpi" />
<gap:splash src="splash.9.png" gap:platform="android" gap:qualifier="hdpi" />
<gap:splash src="splash.9.png" gap:platform="android" gap:qualifier="xhdpi" />
<gap:splash src="splash.9.png" gap:platform="android" gap:qualifier="xxhdpi" />
<gap:splash src="splash.9.png" gap:platform="android" gap:qualifier="xxxhdpi" />
Still, the default splash.png must be present, but will not be used on Android.
<gap:splash src="splash.png" />

Related

custom splashscreen not showing with ionic and phonegap build (3.5.0)

I'm referring to phonegap doc here:
http://docs.build.phonegap.com/en_US/configuring_icons_and_splash.md.html
yet can't have the splashscreen to show after building ( build via phonegap build service, not locally )
relevant ( I suppose ) config.xml lines:
<gap:plugin name="org.apache.cordova.splashscreen" />
<gap:splash src="splash.png" />
<preference name="webviewbounce" value="false"/>
<preference name="UIWebViewBounce" value="false"/>
<preference name="DisallowOverscroll" value="true"/>
<preference name="BackupWebStorage" value="none"/>
<preference name="SplashScreen" value="screen" />
<preference name="SplashScreenDelay" value="3000" />
splash.png is in the root, as is config.xml, is a 480x800 PNG (32-bit color)
I'm building with phonegap 3.5.0 selected; pulling from the git for the ionic project ( so no local 'platforms' dir in the way, since it's in ionic .gitignore.
I also tried the
<gap:splash src="res/screen/android/screen-ldpi-portrait.png" gap:platform="android" gap:qualifier="port-ldpi" />
options to no result ('res/screen... dirs also starting from the root where config resides')
I have made no specific splash show/hide code in the app, is this mandatory ? I just want the splash to show for a fixed bunch of seconds...
My advice is twofold:
First, use PGB 3.6.3. Not only is 3.5 outdated, it also has a security flaw in Android that means apps will be removed from the Past Store.
Second (re: your problem). Go back to basics - follow the PGB docs on splash screens in the simplest way possible.
I don't know what the issue, it looks OK to me, but there are a few preferences you have that I don't use and it works fine for me. I'd expand more but I'm on a mobile. I'll check it out in detail later.

How to resolve ConfigurationError error 'Unknown directive' in Plone?

I created new plone site after that I created new product using the following command
../bin/zopeskel plone_basic dummy.work
I created browser folder under ../dummy.work/src/dummy/work .then I configured the browser folder in configure.zcml file as like below.
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:five="http://namespaces.zope.org/five"
xmlns:i18n="http://namespaces.zope.org/i18n"
xmlns:browser="http://namespaces.zope.org/browser"
xmlns:plone="http://namespaces.plone.org/plone"
xmlns:zcml="http://namespaces.zope.org/zcml"
xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
i18n_domain="dummy.work">
<five:registerPackage package="." initialize=".initialize" />
<plone:static
directory="browser"
type="work"
name="dummy.work"
/>
<genericsetup:registerProfile
name="default"
title="dummy.work"
directory="profiles/default"
description="Installs the dummy.work package"
provides="Products.GenericSetup.interfaces.EXTENSION"
/>
<include package=".browser" />
</configure>
when i try to create an instance i am getting the error like
ConfigurationError: ('Unknown directive', u'http://namespaces.plone.org/plone', u'static')
can any one help me to solve this problem
To use the plone:static directive you must include the meta.zcml.
It's documented in the package documentation at https://pypi.python.org/pypi/plone.resource/
You must do <include package="plone.resource" file="meta.zcml"/> before you can use the plone:static directive.
So: add the line <include package="plone.resource" file="meta.zcml"/> before the usage of plone:static.

Cordova splash screen

I setup everything in phonegapp application. After i drag and drop the CordovaLib.xcodeproj then change the splash screen inside my app icon & screen folder. But still app loading cordovaLib splash screen. So, i deleted screens from CordovaLib project and it's working. I have splash screen name as Default.png, Default#2x.png etc. But in config.xml file having some other name. But my app working with proper screens. Is i need to change in config.xml file.
<gap:splash gap:platform="ios" height="480" src="res/screen/ios/Default.png" width="320" />
<gap:splash gap:platform="ios" height="960" src="res/screen/ios/Default_at_2x.png" width="640" />
<gap:splash gap:platform="ios" height="1136" src="res/screen/ios/Default-568h_at_2x.png" width="640" />
<gap:splash gap:platform="ios" height="1024" src="res/screen/ios/Default-Portrait~ipad.png" width="768" />
<gap:splash gap:platform="ios" height="768" src="res/screen/ios/Default-Landscape~ipad.png" width="1024" />
<gap:splash gap:platform="ios" height="2048" src="res/screen/ios/Default-Portrait_at_2x~ipad.png" width="1536" />
<gap:splash gap:platform="ios" height="1536" src="res/screen/ios/Default-Landscape_at_2x~ipad.png" width="2048" />
Yes, your config.xml should always point to the correct location of your splash screens.
Whilst Xcode will ignore config.xml when choosing splash screens, the Cordova CLI does not. Attempting to build and run using the CLI will fail.
In addition, services such as PhoneGap Build will fail to build your app, and even some plugins will cause random errors because of a malformed config.xml, where a path points to a non-existent file.

Adobe Flex 4: Runtime Loading of Localized Framework Files

According to the Adobe asdocs, Flex framework files are supposed to be able to be loaded at runtime. These localized framework files, the ones that exist at (on windows) C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.5\sdks\4.5.0\frameworks\locale, are responsible for items such as button text on Alert Dialogs, and a host of other controls. My expectation is that once these framework files are loaded I would see these resources available in my Flex app.
I've set up my project as follows:
MyProject
-src
-Flex4.5
-Referenced Libraries
-bin-debug
-bin-release
-libs
-locale (I've copied all of the directories(da_DK,en_US,es_ES,etc) of framework files for the locales I want to support inside of this dir)
Now the asdocs state that in order to do this, you have to set the compiler settings to read
-locale=en_US,da_DK,de_DE,es_ES,fi_FI,fr_FR,it_IT,ja_JP,ko_KR,nb_NO,nl_NL,pt_BR,ru_RU,sv_SE,zh_CN,zh_TW -allow-source-path-overlap=true -source-path=locale/{locale}
which I have done.
My Build Path Libraries for Flex 4.5 - C:Program Files (x86)\Adobe\Adobe Flash Builder 4.5\sdks\4.5.0 are set to be Runtime Shared library (of note, the {locale} subfolder says "Merged into code")
But when I change the language in the browser, I'm not seeing any of the framework resources.
Also, when I build my project, I don't see any indication of the locale-oriented resource files in the bin-release. Since we only deploy the contents of the bin-release folder (and not the entire project), how is this supposed to work?
I am also seeing .swz files in my bin-release (and I know these arent the localized framework resources).
Does anyone have any experience with Runtime Framework Localization?? What am I doing wrong? My expectation is that once I build my project (with the framework resources externalized) that the app would be able to load those resources, but this isn't happening and I am not interested in compiling a different version of my app for all of the locales I support.
Thanks in advance
I use the following ANT task which works for me:
<mxmlc file="${build.dir.src}/${mxml.file}" keep-generated-actionscript="false" output="${build.dir.stage}/${project.app.name}.swf"
actionscript-file-encoding="UTF-8" incremental="false" context-root="${project.app.name}" optimize="${app.optimize}"
debug="${app.debug}" configname="air" locale="en_US,ja_JP,fr_FR">
<jvmarg value="-Xmx1024m" />
<jvmarg value="-Xms512m" />
<compiler.theme append="true" file="${FLEX_HOME}/frameworks/projects/spark/MXFTEText.css" />
<source-path path-element="${FLEX_HOME}/frameworks" />
<source-path path-element="${build.dir.locale.src}/{locale}" />
<library-path dir="${FLEX_HOME}/frameworks/libs" append="true">
<include name="*.swc" />
</library-path>
<library-path dir="${FLEX_HOME}/frameworks/libs/air" append="true">
<include name="*.swc" />
</library-path>
<library-path dir="${FLEX_HOME}/frameworks/locale" append="true">
<include name="{locale}" />
</library-path>
<library-path dir="${build.dir.lib}" append="true">
<include name="*.swc" />
</library-path>
Add the following tag to the classes that use resources and read the strings in the way:
[ResourceBundle('application')]
// set up the locale chain
ResourceManager.getInstance().localeChain = [ 'en_US', 'ja_JP', 'fr_FR' ];
// load resources
ResourceManager.getInstance().getString('application', 'some.string.code');
An observation: One does not need to copy the framework files into one's project folder. They will be picked up the compiler when compiling.
Let me know if it works, else we can debug more!

How do I make my Ant Generated swf as small as possible?

I have a flex project and if I build a release version of the application using flash builder with RSLs on my swf is 115k. If however I build the same application using ant the swf is 342k. Without RSLs the swf is 520k.
How do I get the swf to be as small as the one built by FlashBuilder?
Here is my ant file I have another task that copies the rsls.
<project name="EUI Client Application" default="compileClientApp">
<target name="compileClientApp" depends="compileClientBundles">
<mxmlc
file="${CLIENT_PROJECT.dir}/src/${CLIENT_PROJECT.app}.mxml"
output="${DEPLOY.dir}/${CLIENT_PROJECT.app}.swf"
keep-generated-actionscript="false"
actionscript-file-encoding="UTF-8"
incremental="false"
>
<runtime-shared-library-path path-element="${FLEX_HOME}/frameworks/libs/framework.swc">
<url rsl-url="flex4_4.0.0.7791.swf"/>
<url rsl-url="framework_4.0.0.7791.swf"/>
<url rsl-url="framework_textLayout_4.0.0.7791.swf"/>
<url rsl-url="rpc_4.0.0.7791.swf"/>
<url rsl-url="textLayout_451.swf"/>
</runtime-shared-library-path>
<source-path path-element="${CLIENT_PROJECT.dir}/src" />
<compiler.library-path dir="${LIBS.dir}" append="true">
<include name="*.swc" />
</compiler.library-path>
<compiler.library-path dir="${DEPLOY_BIN.dir}" append="true">
<include name="*.swc" />
</compiler.library-path>
</mxmlc>
</target>
<target name="generateWrapper">
<html-wrapper
title="${CLIENT_APP_TITLE}"
file="${CLIENT_PROJECT.app}.html"
height="100%" width="100%"
bgcolor="white" application="app"
swf="${CLIENT_PROJECT.app}"
version-major="10" version-minor="0" version-revision="0"
history="true" output="${DEPLOY.dir}" />
</target>
<target name="compileClientBundles">
<compileBundle bundleName="Modules" source="${CORE_PROJECT.dir}/locale" />
</target>
Thanks for the replies guys but it wasn't either of those.
turns out all I needed to do was to remove the runtime-shared-library-path stuff as this is already in the flex-config.xml file. I also had to change the static-link-runtime-shared-libraries to false (so it's dynamic).
I've copied the flex-config.xml file into my build directory and use that so I can safely make changes.
This is with Flex 4 BTW - nto sure if I made that very clear.
my ant file now looks like this:
<project name="EUI Client Application" default="compileClientApp">
<target name="compileClientApp" depends="compileClientBundles">
<mxmlc
file="${CLIENT_PROJECT.dir}/src/${CLIENT_PROJECT.app}.mxml"
output="${DEPLOY.dir}/${CLIENT_PROJECT.app}.swf"
keep-generated-actionscript="false"
actionscript-file-encoding="UTF-8"
optimize="true" incremental="false"
link-report="${DEPLOY_BIN.dir}/app_link_report.xml"
>
<load-config filename="${basedir}/flex-config.xml" />
<define name="CONFIG::stub" value="false" />
<define name="CONFIG::release" value="true" />
<source-path path-element="${CLIENT_PROJECT.dir}/src" />
<compiler.library-path dir="${LIBS.dir}" append="true">
<include name="*.swc" />
</compiler.library-path>
<compiler.library-path dir="${DEPLOY_BIN.dir}" append="true">
<include name="*.swc" />
</compiler.library-path>
</mxmlc>
</target>
<target name="generateWrapper">
<html-wrapper
title="${CLIENT_APP_TITLE}"
file="${CLIENT_PROJECT.app}.html"
height="100%" width="100%"
bgcolor="white" application="app"
swf="${CLIENT_PROJECT.app}"
version-major="10" version-minor="0" version-revision="0"
history="true" output="${DEPLOY.dir}" />
</target>
<target name="compileClientBundles">
<compileBundle bundleName="Modules" source="${CORE_PROJECT.dir}/locale" />
</target>
You'll probably need to specify the paths to the external libs using the -external-library-path option.
See the docs for more info.
To use RSLs when compiling your application, you use the following application compiler options:
* runtime-shared-libraries Provides the run-time location of the shared library.
* external-library-path|externs|load-externs Provides the compile-time location of the libraries. The compiler requires this for dynamic linking.
Use the runtime-shared-libraries option to specify the location of the SWF file that the application loads as an RSL at run time. You specify the location of the SWF file relative to the deployment location of the application. For example, if you store the library.swf file in the web_root/libraries directory on the web server, and the application in the web root, you specify libraries/library.swf.
You can specify one or more libraries with this option. If you specify more than one library, separate each library with a comma.
Use the external-library-path option to specify the location of the library's SWC file or open directory that the application references at compile time. The compiler provides compile-time link checking by using the library specified by this option. You can also use the externs or load-externs options to specify individual classes or an XML file that defines the contents of the library.
The following command-line example compiles the MyApp application that uses two libraries:
mxmlc -runtime-shared-libraries=
../libraries/CustomCellRenderer/library.swf,
../libraries/CustomDataGrid/library.swf
-external-library-path=../libraries/CustomCellRenderer,
../libraries/CustomDataGrid MyApp.mxml
The order of the libraries is significant because the base classes must be loaded before the classes that use them.
You can also use a configuration file, as the following example shows:
../libraries/CustomCellRenderer
../libraries/CustomDataGrid
../libs/playerglobal.swc
../libraries/CustomCellRenderer/library.swf
../libraries/CustomDataGrid/library.swf
The runtime-shared-libraries option is the relative location of the library.swf files when the application has been deployed. The external-library-path option is the location of the SWC file or open directory at compile time. Because of this, you must know the deployment locations of the libraries relative to the application when you compile it. You do not have to know the deployment structure when you create the library, because you use the compc command-line compiler to create a SWC file.
Try separating your RSLs into their own arguments. Here's what how I have it on my build:
<runtime-shared-library-path path-element="${FLEX_HOME}/frameworks/libs/framework.swc">
<url rsl-url="${rsl.url}/framework_3.2.0.3958.swz" />
<url rsl-url="${rsl.url}/framework_3.2.0.3958.swf" />
</runtime-shared-library-path>
<runtime-shared-library-path path-element="${FLEX_HOME}/frameworks/libs/datavisualization.swc">
<url rsl-url="${rsl.url}/datavisualization_3.2.0.3958.swz" />
<url rsl-url="${rsl.url}/datavisualization_3.2.0.3958.swf" />
</runtime-shared-library-path>
Using RSL, remember to set use-network parameter to true, otherwise the compiled swf will complain security error (can't load RSL) when run in different location.

Resources