- 724 Posts
- 3 Reply Likes
Posted 4 years ago
- 724 Posts
- 3 Reply Likes
- 724 Posts
- 3 Reply Likes
dialog boxes work I will do tomorrow, If Allah wills, aameen Have a safe night.
- 724 Posts
- 3 Reply Likes
I can't joke or fun here, because I am too much serious for my app:
I tested yet on localhost:
But last night when u said
I quickly upload my config.php, complaints.php, complaint-data.php, complaint-list.php.
and check on remote server, but it's really fetching data on remote server too:
check my ftp server details.
I upload my webpages and checked it's fetching details into pick list.

Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
So you uploaded both your server side scripts and your html assets to the same server and retried?
Yes, that would be no difference with your localhost situation.
But what are you actually testing, then? Certainly NOT the client/server situation with a separate device. Certainly not a built app, executed in a device webview (with necessary whitelisting).
- 724 Posts
- 3 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
Install the apk and/or ipa on a regular device, go out onto the street and file a complaint using your app. Create following situations:
- with and without mobile internet connection
- with and without geolocation service
- using Android and iOS
- without picture, with camera picture and with picture from gallery
...and see if everything works as expected.
- 724 Posts
- 3 Reply Likes
-supported geo location or not.
-both platforms
-without picture and camera gallery
-yes i will check then.
I changed the enable/disable code as u said.
Q1. So, in which place or folder i can place my scripts files?
Q2. So, fetching data is correct?
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
Q2. As long as you're assuming that your app is a website at the same location as your server side scripts, yes. Otherwise, no.
- 724 Posts
- 3 Reply Likes
Secondly I didn't call ajax XHR yet, So, after ajax call on the remote server with database, I can final check the app, that it's working fine or not, i can test on various platform and from various places i can check.
- 724 Posts
- 3 Reply Likes
- 724 Posts
- 3 Reply Likes
- 724 Posts
- 3 Reply Likes
I am gonna use this plugin for network offline and online status: Is it correct?
cordova-plugin-network-information- 724 Posts
- 3 Reply Likes
I am working on "Icons and Splash screens
Have little doubt. I have one icon file, which working on my android app,
Should i configure different different icons and splashes for different platforms?
<!-- iPhone 6 / 6+ -->
<icon src="icon-60@3x.png" platform="ios" width="180" height="180" />
<!-- iPhone / iPod Touch -->
<icon src="icon-60.png" platform="ios" width="60" height="60" />
<icon src="icon-60@2x.png" platform="ios" width="120" height="120" />
<!-- iPad -->
<icon src="icon-76.png" platform="ios" width="76" height="76" />
<icon src="icon-76@2x.png" platform="ios" width="152" height="152" />
<!-- Settings Icon -->
<icon src="icon-small.png" platform="ios" width="29" height="29" />
<icon src="icon-small@2x.png" platform="ios" width="58" height="58" />
<!-- Spotlight Icon -->
<icon src="icon-40.png" platform="ios" width="40" height="40" />
<icon src="icon-40@2x.png" platform="ios" width="80" height="80" />
<!-- iPhone / iPod Touch -->
<icon src="icon.png" platform="ios" width="57" height="57" />
<icon src="icon@2x.png" platform="ios" width="114" height="114" />
<!-- iPad -->
<icon src="icon-72.png" platform="ios" width="72" height="72" />
<icon src="icon-72@2x.png" platform="ios" width="144" height="144" />
<!-- iPhone Spotlight and Settings Icon -->
<icon src="icon-small.png" platform="ios" width="29" height="29" />
<icon src="icon-small@2x.png" platform="ios" width="58" height="58" />
<!-- iPad Spotlight and Settings Icon -->
<icon src="icon-50.png" platform="ios" width="50" height="50" />
<icon src="icon-50@2x.png" platform="ios" width="100" height="100" />
<icon src="ldpi.png" platform="android" qualifier="ldpi" />
<icon src="mdpi.png" platform="android" qualifier="mdpi" />
<icon src="hdpi.png" platform="android" qualifier="hdpi" />
<icon src="xhdpi.png" platform="android" qualifier="xhdpi" />
<icon src="xxhdpi.png" platform="android" qualifier="xxhdpi" />
<icon src="fr-xxhdpi.png" platform="android" qualifier="fr-xxhdpi" />
<icon src="icon.png" platform="winphone" />
<icon src="tileicon.png" platform="winphone" role="background" />
<icon platform="winphone" width="44" height="44" src="res/Square44x44Logo.scale-100.png" />
<icon platform="winphone" width="106" height="106" src="res/Square44x44Logo.scale-240.png" />
<icon platform="winphone" width="150" height="150" src="res/Square150x150Logo.scale-100.png" />
<icon platform="winphone" width="360" height="360" src="res/Square150x150Logo.scale-240.png" />
<icon platform="winphone" width="71" height="71" src="res/Square71x71Logo.scale-100.png" />
<icon platform="winphone" width="170" height="170" src="res/Square71x71Logo.scale-240.png" />
<icon platform="winphone" width="310" height="150" src="res/Wide310x150Logo.scale-100.png" />
<icon platform="winphone" width="744" height="360" src="res/Wide310x150Logo.scale-240.png" />
Splash Screen
<!-- iPhone and iPod touch -->
<splash src="Default.png" platform="ios" width="320" height="480" />
<splash src="Default@2x.png" platform="ios" width="640" height="960" />
<!-- iPhone 5 / iPod Touch (5th Generation) -->
<splash src="Default-568h@2x.png" platform="ios" width="640" height="1136" />
<!-- iPhone 6 -->
<splash src="Default-667h@2x.png" platform="ios" width="750" height="1334" />
<splash src="Default-Portrait-736h@3x.png" platform="ios" width="1242" height="2208" />
<splash src="Default-Landscape-736h@3x.png" platform="ios" width="2208" height="1242" />
<!-- iPad -->
<splash src="Default-Portrait.png" platform="ios" width="768" height="1024" />
<splash src="Default-Landscape.png" platform="ios" width="1024" height="768" />
<!-- Retina iPad -->
<splash src="Default-Portrait@2x.png" platform="ios" width="1536" height="2048" />
<splash src="Default-Landscape@2x.png" platform="ios" width="2048" height="1536" />
<splash src="ldpi.png" platform="android" qualifier="ldpi" />
<splash src="mdpi.png" platform="android" qualifier="mdpi" />
<splash src="hdpi.png" platform="android" qualifier="hdpi" />
<splash src="xhdpi.png" platform="android" qualifier="xhdpi" />
<splash src="fr-xhdpi.png" platform="android" qualifier="fr-xhdpi" />
<splash src="portrait-xxhdpi.png" platform="android" qualifier="port-xxhdpi" />
<splash src="landscape-xxhdpi.png" platform="android" qualifier="land-xxhdpi" />
These icons (Idpi.png, mdpi.png, hdpi.png) I iwll create them with different resolution or they will load by default?
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
And what is this:
<icon src="fr-xxhdpi.png" platform="android" qualifier="fr-xxhdpi" />
Why do you need one french localized icon, and only in the size?
Be aware that you need the correct orientation(s), depending on the orientation preference in your config.
- 724 Posts
- 3 Reply Likes
cordova-plugin-splashscreenPetra V., Champion
- 7794 Posts
- 1391 Reply Likes
Why didn't you look it up in npm?
- 724 Posts
- 3 Reply Likes
that
i saw in many example that they declared images's height and width, so when i will create icons in adobe photoshop, so i wll set their resolution if icon have height and width respectively: 320x480?
<splash src="res/screen/ios/Default~iphone.png" width="320" height="480"/>
?Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
btw: you don't have to use exactly these paths and file names. This would be just as well:
<platform name="ios">
<splash
src="mysplashes/ios/portrait320.png"
width="320" height="480"
/>
</platform>- 724 Posts
- 3 Reply Likes
http://pgicons.abiro.com/
- 724 Posts
- 3 Reply Likes
<!-- SPLASH SCREENS-->
<platform name="android">
<!-- you can use any density that exists in the Android project -->
<splash src="res/screens/android/screen-hdpi-land.png" density="land-hdpi"/>
<splash src="res/screens/android/screen-ldpi-land.png" density="land-ldpi"/>
<splash src="res/screens/android/screen-mdpi-land.png" density="land-mdpi"/>
<splash src="res/screens/android/screen-xhdpi-land.png" density="land-xhdpi"/>
<splash src="res/screens/android/screen-hdpi-portrait.png" density="port-hdpi"/>
<splash src="res/screens/android/screen-ldpi-portrait.png" density="port-ldpi"/>
<splash src="res/screens/android/screen-mdpi-portrait.png" density="port-mdpi"/>
<splash src="res/screens/android/screen-xhdpi-portrait.png" density="port-xhdpi"/>
</platform>
<platform name="ios">
<!-- images are determined by width and height. The following are supported -->
<splash src="res/screens/ios/screen-iphone-portrait.png" width="320" height="480"/>
<splash src="res/screens/ios/screen-iphone-portrait-2x.png" width="640" height="960"/>
<splash src="res/screens/ios/screen-iphone-land.png" width="480" height="320"/>
<splash src="res/screens/ios/screen-iphone-land-2x.png" width="960" height="640"/>
<splash src="res/screens/ios/screen-ipad-portrait.png" width="768" height="1024"/>
<splash src="res/screens/ios/screen-ipad-portrait-2x.png" width="1536" height="2048"/>
<splash src="res/screens/ios/screen-ipad-land.png" width="1024" height="768"/>
<splash src="res/screens/ios/screen-ipad-land-2x.png" width="2048" height="1536"/>
<splash src="res/screens/ios/screen-iphone-portrait-568h-2x.png" width="640" height="1136"/>
<splash src="res/screens/ios/screen-iphone-land-568h-2x.png" width="1136" height="640"/>
<splash src="res/screens/ios/screen-iphone-portrait-667h.png" width="750" height="1334"/>
<splash src="res/screens/ios/screen-iphone-land-667h.png" width="1334" height="750"/>
<splash src="res/screens/ios/screen-iphone-portrait-736h" width="1242" height="2208"/>
<splash src="res/screens/ios/screen-iphone-land-736h.png" width="2208" height="1242"/>
</platform>
<platform name="windows">
<!-- images are determined by width and height. The following are supported -->
<splash src="res/screens/windows/splashscreen.png" width="620" height="300"/>
<splash src="res/screens/windows/splashscreenphone.png" width="1152" height="1920"/>
</platform>
<platform name="wp8">
<!-- images are determined by width and height. The following are supported -->
<splash src="res/screens/wp8/SplashScreenImage.jpg" width="768" height="1280"/>
<splash src="res/screens/wp8/SplashScreenImageland.jpg" width="1280" height="768"/>
</platform>
<!--PREFERENCES-->
<preference name="SplashScreenDelay" value="3000" />
<preference name="AutoHideSplashScreen" value="true" />
<preference name="SplashShowOnlyFirstTime" value="true" />
<!-- ICONS -->
<platform name="android">
<icon src="res/icons/android/icon-36-ldpi.png" density="ldpi" />
<icon src="res/icons/android/icon-48-mdpi.png" density="mdpi" />
<icon src="res/icons/android/icon-72-hdpi.png" density="hdpi" />
<icon src="res/icons/android/icon-96-xhdpi.png" density="xhdpi" />
</platform>
<platform name="ios">
<!-- iOS 8.0+ -->
<!-- iPhone 6 Plus -->
<icon src="res/icons/ios/icon-60-3x.png" width="180" height="180" />
<!-- iOS 7.0+ -->
<!-- iPhone / iPod Touch -->
<icon src="res/icons/ios/icon-60.png" width="60" height="60" />
<icon src="res/icons/ios/icon-60-2x.png" width="120" height="120" />
<!-- iPad -->
<icon src="res/icons/ios/icon-76.png" width="76" height="76" />
<icon src="res/icons/ios/icon-76-2x.png" width="152" height="152" />
<!-- iOS 6.1 -->
<!-- Spotlight Icon -->
<icon src="res/icons/ios/icon-40.png" width="40" height="40" />
<icon src="res/icons/ios/icon-40-2x.png" width="80" height="80" />
<!-- iPhone / iPod Touch -->
<icon src="res/icons/ios/icon.png" width="57" height="57" />
<icon src="res/icons/ios/icon-2x.png" width="114" height="114" />
<!-- iPad -->
<icon src="res/icons/ios/icon-72.png" width="72" height="72" />
<icon src="res/icons/ios/icon-72-2x.png" width="144" height="144" />
<!-- iPhone Spotlight and Settings Icon -->
<icon src="res/icons/ios/icon-small.png" width="29" height="29" />
<icon src="res/icons/ios/icon-small2x.png" width="58" height="58" />
<!-- iPad Spotlight and Settings Icon -->
<icon src="res/icons/ios/icon-50.png" width="50" height="50" />
<icon src="res/icons/ios/icon-50-2x.png" width="100" height="100" />
</platform>
<platform name="wp8">
<icon src="res/icons/wp/ApplicationIcon.png" width="99" height="99" />
<!-- tile image -->
<icon src="res/icons/wp/Background.png" width="159" height="159" />
</platform>
<platform name="windows">
<icon src="res/icons/windows/logo.png" width="150" height="150" />
<icon src="res/icons/windows/smalllogo.png" width="30" height="30" />
<icon src="res/icons/windows/storelogo.png" width="50" height="50" />
</platform>
After deeeeeep concentration I create.
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
1. You are missing the larger dimensions
2. You can't use a 'density' attribute with qualifiers for values.
See the Icons and Splashscreens section of the PGB Docs
iOS:
Seems OK. Make sure your images have the exact dimensions. Make sure the paths are correct (as stored in your zip). Make sure you have at least the required icons and splashes as per Apple dev documentation
Windows:
Only two splashes, one landscape (small) and one portrait (large). Is that correct?
You have
<preference name="AutoHideSplashScreen" value="true" />
Are you sure you want your splashes automatically dismissed after 3 seconds, no matter whether the first page isn't ready for display yet, or has been ready for 2 seconds already?
Do you have the splashscreen plugin specified?
- 724 Posts
- 3 Reply Likes
Android:
1. You are missing the larger dimensions
2. You can't use a 'density' attribute with qualifiers for values.
1.larger dimension for icons or splash screens ?
2. So, I must remove density attributes?
iOS:
Seems OK. Make sure your images have the exact dimensions. Make sure the paths are correct (as stored in your zip). Make sure you have at least the required icons and splashes as per Apple dev documentation
Yes, i made sure the paths and icons/splashes names at my source folder.
what are the Apple dev documentation?
You have
Are you sure you want your splashes automatically dismissed after 3 seconds, no matter whether the first page isn't ready for display yet, or has been ready for 2 seconds already?
So I should remove it too? I thougt like games and other applications it should hide after few seconds.
Do you have the splashscreen plugin specified?
Yes I have already specified this plugin:
<plugin name="cordova-plugin-splashscreen"/>
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
1.larger dimension for icons or splash screens ?1. Yes, larger dimensions
2. So, I must remove density attributes?
2. Yes. Like I said: See the Icons and Splashscreens section of the PGB Docs
I thougt like games and other applications it should hide after few seconds.How do you know that these games dismiss the splashscreen after a fixed number of seconds?
Think again: suppose your cordova.js hasn't fired 'deviceready' after 3 seconds yet and the page isn't ready to display. Do you really still want to dismiss the splashscreen already?
- 724 Posts
- 3 Reply Likes
Petra, I used now large dimensions see:
<platform name="android">
<icon src="res/icons/android/icon-36-ldpi.png"/>
<icon src="res/icons/android/icon-48-mdpi.png"/>
<icon src="res/icons/android/icon-72-hdpi.png"/>
<icon src="res/icons/android/icon-96-xhdpi.png"/>
<icon src="res/icons/android/icon-144-xxhdpi.png"/>
<icon src="res/icons/android/icon-192-xxxhdpi.png"/>
</platform>
after build when i testing on my android phone, Its showing very small icon
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
- 724 Posts
- 3 Reply Likes
- 724 Posts
- 3 Reply Likes
<script type="text/javascript">
document.addEventListener("offline", onOffline, false);
function onOffline() {
alert('Please Check you Internet Connection');
}
document.addEventListener("online", onOnline, false);
function onOnline() {
// Handle the online event
}
</script>
?????
with plugin
<plugin name="cordova-plugin-network-information"/>
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
a. If I understand an issue correctly, you should remove
<preference name="SplashShowOnlyFirstTime" value="true" />
b. Splashes will be stretched to fit. Thousands of different devices with different screens (including round and square screens) run Android, so unlike Apple there is no way to create a set of fitting splashes for all devices.
If you want to specify where such image should remain unstretched and what areas should be stretched, you must use a 9-patch png.
c. I can't imagine that Android picks the wrong icon to display. My guess is that your icons are incorrect.
Could you upload them to some public place and post the url here, so I can have a look at your images?
2. Online and offline
a. You have
function onOffline() {
alert('Please Check you Internet Connection');
}
function onOnline() {
// Handle the online event
}
So, you want an alert displayed when the user goes offline, while the current page remains active. The user can click 'OK' and the alert disappears. The active page remains visible. Is that really what you want?
If so, what is it that you want to happen when the user comes back online? I guess nothing, unless you want to confirm to him that he is back online again. In that case, you could place the confirmation in the onOnline function.
It would look a bit...errrm...amateuristic, though.
b. You also need to check the state of the network connection at the start of the app, because the online and offline events are only fired on a status change. So, you must make sure that the app has been online, otherwise your alert will never show when the app was, is and remains offline all the time.
- 724 Posts
- 3 Reply Likes
<preference name="SplashShowOnlyFirstTime" value="false" />
Yes I solved it by value false, Now it's showing everytime when we are launching app,
-And I also understood about offine and online events.
-Now I am coming back on Icons and Splashes problem again:
-Splashes are showing in landscape even we switch orientation portrait or Landscape.
see: at bottom
href="https://d2r1vs3d9006ap.cloudfront.net...">
the paths i checked they are correct and also picture names.
BUt i couldn't found large dimensions for splash screen, yes but i have add icons large dimensions.
-and icons is so mall see:
<a
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
- 724 Posts
- 3 Reply Likes
It was showing good, when I set an default icon for all platforms like:
<icon src="icon.png">But now I dont know y showing small icon. and also splash screen is good at landscape but at portrait orientation. Landscape picture showing.- 724 Posts
- 3 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
Splashes: did you change the 'density' attribute?
- 724 Posts
- 3 Reply Likes
I removed before 'density' attribute for splashes, but if I wiil add them again so which value i will give them? u said did u change that attribute, chnge with whom?
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
- 724 Posts
- 3 Reply Likes
<platform name="android">
<!-- you can use any density that exists in the Android project -->
<splash src="res/screens/android/screen-hdpi-land.png" density="land-hdpi"/>
<splash src="res/screens/android/screen-ldpi-land.png" density="land-ldpi"/>
<splash src="res/screens/android/screen-mdpi-land.png" density="land-mdpi"/>
<splash src="res/screens/android/screen-xhdpi-land.png" density="land-xhdpi"/>
<splash src="res/screens/android/screen-hdpi-portrait.png" density="port-hdpi"/>
<splash src="res/screens/android/screen-ldpi-portrait.png" density="port-ldpi"/>
<splash src="res/screens/android/screen-mdpi-portrait.png" density="port-mdpi"/>
<splash src="res/screens/android/screen-xhdpi-portrait.png" density="port-xhdpi"/>
</platform>

Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
- 724 Posts
- 3 Reply Likes
I tried with
....density="land-ldpi".... But same result with it.Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
This might help:
https://github.com/phonegap/build/iss...
http://stackoverflow.com/questions/20...
http://stackoverflow.com/questions/16...
Also, I'm still not quite sure what the UI requirements are. Do you have a liquid, responsive layout for both portrait and landscape screen formats? Or could your client settle for one or the other?
- 724 Posts
- 3 Reply Likes
-yes i am using responsive layout since beginning.
this is code:
<platform name="android">
<!-- you can use any density that exists in the Android project -->
<splash src="res/screens/android/screen-ldpi-portrait.png" density="ldpi" qualifier="port-ldpi"/>
<splash src="res/screens/android/screen-mdpi-portrait.png" density="mdpi" qualifier="port-mdpi"/>
<splash src="res/screens/android/screen-hdpi-portrait.png" density="hdpi" qualifier="port-hdpi"/>
<splash src="res/screens/android/screen-xhdpi-portrait.png" density="xhdpi" qualifier="port-xhdpi"/>
<splash src="res/screens/android/screen-xxhdpi-portrait.png" density="xxhdpi" qualifier="port-xxhdpi"/>
<splash src="res/screens/android/screen-xxxhdpi-portrait.png" density="xxxhdpi" qualifier="port-xxxhdpi"/>
<splash src="res/screens/android/screen-hdpi-land.png" density="hdpi" qualifier="land-hdpi"/>
<splash src="res/screens/android/screen-ldpi-land.png" density="ldpi" qualifier="land-ldpi" />
<splash src="res/screens/android/screen-mdpi-land.png" density="mdpi" qualifier="land-mdpi"/>
<splash src="res/screens/android/screen-xhdpi-land.png" density="xhdpi" qualifier="land-xhdpi"/>
<splash src="res/screens/android/screen-xxhdpi-land.png" density="xxhdpi" qualifier="land-xxhdpi"/>
<splash src="res/screens/android/screen-xxxhdpi-land.png" density="xxxhdpi" qualifier="land-xxxhdpi"/>
</platform>
I would like to pay a HUGE THANKS to you PETRA, you are really working here like an angel not only for me, for all complainants.
THANK YOU
Saba
- 724 Posts
- 3 Reply Likes
I am in a trouble Sir,
-After I added online and offline events, My app didn't showing Static map image, Only map holder showing, Image is not loading. At laptop it's showing well,but not on mobile.On Mobile GPS is also open, network also opened, I also checked required plugin all are there.
-Secondly, my app is behaving abnormally when internet data is on.
-Even some time offline too, It's hanging at php pages loading, HTML pages opening nicely, but whenever opening 'Post Complain' or 'Check Complain Status' pages which are php scripted, they are loading late and some time hanging on loading image. And when it's going hang, everytime i try to open it's hang, once it's hang, and when I clear the cache/RAM and again launch app, It's work normally but static map still not loading.
:(
what is the solution Petra.
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
what is the solution Petra.Solution? You need to find the cause, first. Then the solution is to remove the cause.
After I added online and offline events, My app didn't showing Static map image, Only map holder showing, Image is not loading.While offline, a map can't be loaded from an external source, of course. Is that what you mean?
Secondly, my app is behaving abnormally when internet data is on.How is it 'behaving abnormally'? What constitutes this abnormal behaviour? Under what OS and what version? Can it be reproduced, and if so, und what situation?
It's hanging at php pages loadingThen you have a server problem. PHP pages are not loaded in the client, are they?
but whenever opening 'Post Complain' or 'Check Complain Status' pages which are php scripted, they are loading late and some time hanging on loadingHow are you posting the data? Do you use an xmlHttpRequest or do you make use of the FileTransfer methods?
- 724 Posts
- 3 Reply Likes
Solution? You need to find the cause, first. Then the solution is to remove the cause.
Yes, causes i want to know.
While offline, a map can't be loaded from an external source, of course. Is that what you mean?
No, yes I know that It can't be load offline. I mean before It was showing map, but after I added offline/online script.The static map is not showing when network is available.
How is it 'behaving abnormally'? What constitutes this abnormal behaviour? Under what OS and what version? Can it be reproduced, and if so, und what situation?
Its going hang sometime. Sometime the loading gif image not spinning. It stopped at page load.
Then you have a server problem. PHP pages are not loaded in the client, are they?
Petra, when i upload my zip folder with Html, css, java scripts and php pages. It was successful build. Then I Installed apk file into mobile and when i checked the php pages were opened also with static map. I was also shocked but really they were opened.
How are you posting the data? Do you use an xmlHttpRequest or do you make use of the FileTransfer methods?
I am not posting data , I didn't start yet, server-client communication. It was just only at client side problems i shared.
Petra V., Champion
- 7794 Posts
- 1391 Reply Likes
No, yes I know that It can't be load offline. I mean before It was showing map, but after I added offline/online script.The static map is not showing when network is available.So, you have a bug in your code. You need to find out where the code is failing.
Petra, when i upload my zip folder with Html, css, java scripts and php pages. It was successful build. Then I Installed apk file into mobile and when i checked the php pages were opened also with static map. I was also shocked but really they were opened.Either miracles happen, or your PHP pages are simply displayed without the embedded PHP code being parsed and executed...
Anyway, why did you include PHP documents in your assets?
And of course it was successfully built. Those PHP documents were simply added to the assets directory and they merely clutter up the app. You could also add a Word document with a fairy tale, or a .httpconf file for a webserver.
- 724 Posts
- 3 Reply Likes
You could also add a Word document with a fairy tale, or a .httpconf file for a webserver.
- 724 Posts
- 3 Reply Likes
Anyway, why did you include PHP documents in your assets?
I am testing locally , so where i should keep php documents? u said
Client side: in your assets. Server-side: on a remote server, together with your database
But if i am testing on local server so where i should keep php script files?
or I should use first ajax calls? After I check other problem?
So, you have a bug in your code. You need to find out where the code is failing.
It means i am doing mistake in online/offline events because before it was showing map.
Related Categories
-
PhoneGap Build
- 15111 Conversations
- 275 Followers
-
Plugins
- 1283 Conversations
- 38 Followers




Saba Rais
Saba Rais
Petra V., Champion
$.getJSON("compltype-data.php", function(return_data){...???
Does your app have any clue where to find that server side script?
Saba Rais
Petra V., Champion
Furthermore, I was surprised that you are using jQuery for this. If you do, you shouldn't mix it up with vanilla javascript as in your previously posted code. That would quickly become a mess and hardly maintainable.
You should then rewrite code, such as
function EnableDisableTextarea(othercheck) {
var otherdescription = document.getElementById("otherdescription");
otherdescription.disabled = othercheck.checked ? false : true;
student.disabled = othercheck.checked ? true : false;
otherdescription.style.background = "#DDD";
...
so it's done with the more convenient jQuery framework.