Compiling app to browser or android and showing old code - android

When I build my Cordova app sometimes the correct HTML and CSS is displayed but other times I'm missing entire HTML blocks and css files. I've tried building multiple times and running on Browser/Device but it still shows the old app. I've also tried deleting the platforms folders re-adding the platforms and then building but still no luck.
Anyone had this issue and know how to solve it?

Empty the browser cache and then restart the browser.

Related

Meteor mobile application seemingly not loading outside assets

Here is my issue, I am using Bootstrap (twbs:bootstrap), font-awesome (natestrauser:font-awesome) and Avatar (utilities:avatar).
When I load my application in a desktop browser, all assets load fine.
When I load my application in a mobile browser, all assets load fine.
But when I load my application in the compiled (Android) app, font-awesome and Avatar don't load their assets. The reason I am targeting them is they are both reliant on contacting outside sources. font-awesome is served off of a CDN and Avatar retrieves avatars from social networks. I know I can package font-awesome but I can't do the same for avatars so I need to figure this out.
I have looked to see if Meteor does something odd like sandboxing the app to prevent outside contact but I can't seem to find any mention of these kinds of issues. Is there a default security settings that I can set where it would allow my app to 'contact' whitelisted sites? It would be absurd but it is Meteor after all.
I figure someone more knowledgeable in Meteor can point out my error.
There is no code for font-awesome (besides using CSS classes) and there is really no specific code for Avatar besides {{> avatar ... }}
Thank you in advance!
Note, as of 5/30/2017: Please skip to EDIT 2 below unless you want to read the very long and confusing ramblings of my former self. Thank you.
Okay, I was right but not necessarily right about who was causing what (I was kind of right). The reasoning behind it makes sense so I am thankful for that.
Here is what I've determined. Cordova has a whitelist under /res/config.xml where URLs are whitelisted and only those URLs are the only URLs allowed outside of the application.
But, if you try to edit config.xml it will be overwritten by Meteor on build which indicates this config is governed / overwritten by Meteor.
I searched around and found a few things: Meteor / Cordova, Meteor. The second article gives the solution. You must use the package browser-policy to whitelist what URLs you want.
After installing browser-policy, you must include them in a file in /server. I tried installing them inside a if(Meteor.isServer) block outside of /server but it didn't work.
Hope this helped! I couldn't find anything similar to this and I presume others will run into this road block as well
EDIT: This will only fix it for desktop. For my issue, I had to create a top-level file called mobile-config.js and use config settings from this page to whitelist URLs. This change happened in Meteor 1.0.4
EDIT 2:
Here is it said more clearly: You must whitelist all outside URLs that you want to contact inside of mobile-config.js
For instance, if you want to contact google.com from your mobile app, you would add
App.accessRule('https://www.google.com')
Thankfully Meteor has fixed their extreme documentation issue and has now included this on the official documentation here

Worklight hybrid android project stuck on IBM logo?

I created a hybrid project which creates a default 'Hello Worklight' page which successfully runs on the android emulator... Now i replaced the default HTMl page with a different page along with its css and javascript folders... I rebuilt the project... It builds without any errors... But when the apps launches in the emulator....the app is just stuck on the IBM logo... I can see no errors in the logcat, that is why i cant figure out whats the problem... Do i need to modify something when i replaced the default HTML age? Help please....
You cannot simply "replace" the contents of index.html with some other content.
The file MUST contain the following:
Reference to css/main.css in the HEAD
References to the following in the BODY
js/initOptions.js
js/main.js
js/messages.js
Without these (and especially initOptions.js and main.js), the app will indeed get stuck on the splash because you will fail to load the Worklight framework, so nothing will work...
Instead, you need to ADD to it (additional references, content, etc).
Explain what you're trying to accomplish...

Remove white flicker after Splashscreen PhoneGap

I'm trying to remove the white flicker from PhoneGap 2.9.0.
First of all can somebody clarify me a few things?
For PhoneGap 2.9.0, if I use local build (Eclipse) is the config.xml used or is it just for PhoneGap build? If so, how can I use instructions that were written in config.xml if it is not used.
Is AndroidManifest.xml actually the config.xml file (for local build)?
I managed to create a Splash screen and I put it in drawable folders, but the problem is that each time after the Splashscreen a white flicker is displayed.
How can I remove this white flicker?
I saw many workarounds, but they didn't worked. Actually I did't understand much of them because some were in local build some in PhoneGap build.

including cordova.js exits my application

when I include cordova-2.2..0.js in my phonegap application , it exits after a sec of loading index .html. though process keeps runing. just gui disappears ... have no clue how to approch the problem. works fine in emulator but crashes on actual device.
First check that your cordova.js is loaded before jquery.js and jquery_mobile.js
If last point didn't help strip your code and make a basic page
If you still have a problem then your Cordova project has an error. Maybe a badly loaded plugin or you didn't set your project correctly (common problem).
If point 2. solved your problem check your js code, mainly parts using cordova/phonegap framework.
Have you used this line:
navigator.app.exitApp();
if answer is yes comment it and try again

ajax navigation error when using phonegap and ran locally

Sorry for the complete newbie question but i'm not having much luck.
I've created a project through eclipse with the phonegap plugin and deployed it as an android app onto a tablet to run locally - but I'm getting the 'Note: Navigation may not work if viewed locally' bar being added on the bottom of the pages.
How do I get round this? I thought if it was packaged up in this format I wouldn't have to install an android webserver onto the tablet and run it through the browser?
All guidance is much apreciated.
I had the samme error, and it turned out that jquery.mobile was included twice. Removal of the twin reference resulted in removal of the Note.

Categories

Resources