I want to create folder inside the internal storage(android/data/com.AppName) in android and similarly for IOS. How to do that using phonegap?
Similarly what is the internal storage path for ios?
On Android: as per official API docs
add one of these two lines to config.xml:
<preference name="AndroidPersistentFileLocation" value="Internal" />
<preference name="AndroidPersistentFileLocation" value="Compatibility" />
Without this line, the File plugin will use Compatibility as the default. If a preference tag is present, and is not one of these values, the application will not start.
On iOS
add one of these two lines to config.xml:
<preference name="iosPersistentFileLocation" value="Library" />
<preference name="iosPersistentFileLocation" value="Compatibility" />
Without this line, the File plugin will use Compatibility as the default. If a preference tag is present, and is not one of these values, the application will not start.
Strongly recommended to read API docs before starting.
Related
I'm having some issues with Phonegap Build and my Iphone.
At the moment I have the following preferences in my config.xml
<preference name="webviewbounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<preference name="UIWebViewBounce" value="false" />
and the following meta tag;
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=medium-dpi" />
The application compiles fine and my app runs off the 'Test flight' system very well, barring this one issue. The application seems to be 'Draggable' (which I believe is the bounce problem).
Things i've tried;
Delete my Phonegap Build Project.
Remove all config.xml files barring my main one located in the project root.
Using only one of the preferences etc.
Does anyone have any idea how I can prevent the app from being dragged down the screen (I have elements that have overflow on them, and they scroll fine, but the whole app scrolls some times which really effects the user experience).
Thanks.
*Edit 1
So i've opened up my .ipa file on a mac and it seems that in the config.xml the "DisallowOverscroll" is being set to false. I'm not quite sure why this would be happening?
Well, actually just the <preference name="DisallowOverscroll" value="true" /> should be enough, your viewport tag looks good enough. Try to completely remove the ios platform, and re-add it again.
Okay, So I figured it out, thanks to dsokurenko who put the idea in my head that the config.xml wasn't actually being read!
So my steps to fix this;
Create a new phonegap project
Copy my files across
Move config.xml to /www/ folder (I believe this was the key to fix the issue, change any config values that have /www/ in them
Create new app on Phonegap Build, re-build and install!
This worked for me and I hope it helps someone else.
same log4net appender azure nuget code working fine for console app,
but not working in MVC application.
I'm using this nuget log4net.Appender.Azure 1.1.1
already added log4net.Config.XmlConfigurator.Configure();
in Global.asax
web.config
<log4net>
<!-- Azure Table Appender, uncomment, set proper QueueName and AWS credentials (appSettings) to try it out -->
<appender name="AzureAppender1" type="log4net.Appender.AzureTableAppender, log4net.Appender.Azure">
<param name="TableName" value="test" />
<param name="ConnectionString" value="***" />
<layout type="log4net.Layout.PatternLayout">
<conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] - %message%newline" />
</layout>
</appender>
Can anyone know why it is not working ?
I am not sure - but I would be a little careful about using Tables for large scale logging scenarios. Take a look at the logging anti-pattern in this Table Design Guide. It can often lead to hot partitions - and often times the scenario is much better supported using Blobs.
Here we go I found that it is problem od log4net dll version.
in nuget log4net appender azure version of log4net dll is 1.2.12 it is the older one. need should be updated to newer version 1.2.13
that solves the above issue.
I found other questions about this and I tried the suggested answers which were as follows.
Adjust the config.xml file:
I changed this <content src="index.html" /> to <content src="localhost:3000" />
and also
<access origin="*" /> to </content src="localhost:3000" subdomains="true">
But everytime I launch my application, it is still referring to the index.html file.
I am only trying it on iOS platform.
For testing purposes, I am trying the webpage online everytime, I launch the application using phonegap serve form the CLI, the webpage (localhost:3000), still refers to index.html
Any insights on that?
You cannot point a device to localhost as localhost is an alias of 127.0.0.1 which is not reachable over a network.
You need to point to the actual IP address of the machine that is hosting your code.
Example:
<content src="192.75.64.231:3000" subdomains="true" />
I know that to access an external link, one has to whitelist the access path in config.xml.
My problem is that I am unable to use asterisk as the whitelist option. Ripple emulator does not let me do it. My app downloads a number of image links and then display those images. These images could come from any number of sources/ domains. Now how do I mention an intelligent whitelist for this purpose?
My Environment:
BlackBerry 10 WebWorks SDK 1.0.4.11
BB10 Simulator
Windows 7
The way you do that is adding this line in the config.xml file:
<access subdomains="true" uri="*" />
But there's a quirk that renders this option useless whenever you use ajax. From the docs:
You can specify a wildcard () for the uri to whitelist any domain, but only for domains that do not access application APIs and that do not access content through XMLHttpRequest. If the domain requires access to APIs or accesses data through XMLHttpRequest, you must explicitly specify the domain in the uri.*
As Mister Smith said above, the proper way to 'whitelist' a domain is by adding the wildcard access element to your config.xml
<access subdomains="true" uri="*" />
You also have the ability to disable all web-security. While this is not the first recommended approach to dealing with cross origin requests, it's sometimes needed, especially when talking to services that use a CDN. To disable all web-security you'll want to add the following to your config.xml
<feature id="blackberry.app" >
<param name="websecurity" value="disable" />
</feature>
Lastly, your Ripple issue is something separate from all of this.
Go to manage your Chrome extensions, find Rippe, and check the box that says "Allow access to file URLs", and add the following flag to your Chrome shortcut --allow-access-from-files
When I created a new content page, the link to document was showing blank after publishing, I think I need to look into:
<add key="umbracoUseDirectoryUrls" value="false" />
<add key="umbracoUseDirectoryUrls" value="true" />
and see if it works. However I can't find the Config folder in Developer view even though I have admin access.
Any idea please?
Thanks
If you want to be able to access config files via the Umbraco backend, you'll need to install the Config Tree package. Then and only then will the Config tree/folder appear in the Developer section.
Otherwise you will have to make edits to the web.config and other config files from the local file system.