Phonegap build - install screensaver for Android devices

I'm currently trying to install a splash screen for Android devices in the phonegap assembly. I installed 4 different screens, but for some reason the screens are deformed and lose their aspect ratio. Is there any way to prevent this?

Best wishes

+4
source share
6 answers

Do'h, skipping the Android question, here is the Android section from my config.xml:

<gap:splash src="img/splash/android/ldpi.png" gap:platform="android" gap:density="ldpi" /> <gap:splash src="img/splash/android/mdpi.png" gap:platform="android" gap:density="mdpi" /> <gap:splash src="img/splash/android/hdpi.png" gap:platform="android" gap:density="hdpi" /> <!--<gap:splash src="splash/android/xhdpi.png" gap:platform="android" gap:density="xhdpi" />--> 

Yes, Apple is a lot easier! On Android, they go by a qualifier called "density."

As far as I know, PhoneGap Build only supports three out of four right now. ldpi, mdpi, hdpi and NOT xdpi (so it is commented above).

All Android devices will use one of these four sizes, I understand. Getting the perfect aspect ratio on hundreds of different devices can be a little tricky, but at least you're getting close.

Read this, I know this is a lot, but worth reading: http://developer.android.com/guide/practices/screens_support.html#support

And, the PGB manual: http://build.phonegap.com/docs/config-xml

+3
source

we can fix this in three ways.

  • via config.xml
  • through an activity class defining a property
  • through script

to link to the sample source code source code example with an example for the screen phonegap-build-set-splash-screen

http://getmebyclickme.blogspot.in/2013/10/phonegap-build-set-splash-screen-for.html

+1
source

See the Splash screen information for the phone book @ Screen saver in the phone book

0
source
 import android.os.Bundle; import org.apache.cordova.*; public class RemindMeActivity extends DroidGap { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.setIntegerProperty("splashscreen", R.drawable.splash); super.loadUrl("file:///android_asset/www/index.html", 10000); } } 

this will help you display the screen saver using phonegap

0
source

Here is how I have my PGB config.xml (your folder structure and file names will vary), this supports most of the iOS devices that I consider. How many startup images do you have?

 <gap:splash src="img/splash/ios/Default.png" width="320" height="480" /> <gap:splash src="img/splash/ios/Default_at_2x.png" width="640" height="960" /> <gap:splash src="img/splash/ios/Default_iphone5.png" width="640" height="1136" /> <gap:splash src="img/splash/ios/Default-Landscape.png" width="1024" height="768" /> <gap:splash src="img/splash/ios/Default-Portrait.png" width="768" height="1024" /> <gap:splash src="img/splash/ios/Hi-Rez-Portrait.png" width="1536" height="2008" /> <gap:splash src="img/splash/ios/Hi-Rez-Landscape.png" width="2048" height="1496" /> 

Apple Guides: http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/mobilehig/IconsImages/IconsImages.html

Phonegap Creation Instructions: http://build.phonegap.com/docs/config-xml

0
source

This is likely to satisfy your needs. It allows you to configure and add all the relevant config.xml settings, images and pop-ups in a nice intuitive interface.

I recommend downloading the file and installing it manually. The web installer is not working.

http://aj-software.com/configap/index.html

0
source

All Articles