-
Notifications
You must be signed in to change notification settings - Fork 33
Add resource-file support in config.xml #472
Comments
+1 |
Might be helpful. The biggest impact will be for cordova plugins like phonegap-plugin-push, which allows custom icons in the drawer. However PhoneGap Build users are out of luck, till this is implemented. http://stackoverflow.com/questions/30802589/how-to-add-native-image-with-phonegap-build Thank you. |
+1 this is very much needed |
+1 !!!! |
+1 - would like this so that universal links (via https://github.com/nordnet/cordova-universal-links-plugin) can be used. |
+1 - I'm still stuck with the nasty workaround of using my app image with transparencies just because I can't add a custom image to resources directory, which phonegap-plugin-push requires for the new android layout: phonegap/phonegap-plugin-push#118 |
+1 |
A beta feature was added in November that should actually solve this for Android -- its described for the purpose of translation files but should work for arbitrary images etc. Put your files in Example:
|
@wildabeast thanks a lot! I keep an eye on http://phonegap.com/blog/phonegap-build/ but I'm pretty sure this was not announced. Am I wrong? This is a really key new feature! |
it works! thanks! |
I'm here from the above referenced issue, trying to make a custom sound play when my app receives a push notification in the background. We build with PhoneGap Build and don't know how to place the sound files so that the OS can play them when the app is in background state. @wildabeast comment helped get our custom sound working for android devices, but as far as I know there is no solution to this problem yet for iOS. |
@neffnet yes unfortunately no support for iOS at this time. I'd suggest creating a new issue, and perhaps reference all the pertinent issues in other projects. |
We are trying to include a sound file in ios project, we have copied it using gulp task but it seems that ios project is not adding this file in its solution, unless we manually add it through xcode. We have tried in config.xml but in vain. If someone has any solution please share. |
Hey Guys, I've found solution to my problem. I'm adding my custom sound file in www directory, and after that when I build my project, it is easily available in XCode www directory. |
@razam217 FYI, this is not for the Phonegap CLI, but rather the Adobe Phonegap Build service. Your solution isn't applicable here because Phonegap build users don't need to use Xcode at all. |
@gabaum10 May be my problem is other than yours, thats why I mentioned I've found solution to my problem... |
Hi, I'm trying to add png files like described above from: But they are not being copied over when I look in the apk. I'm using phonegap build cli 5.4.1. Any ideas as to why they aren't getting copied? Thanks |
@razam217 For what it's worth, your answer helped me -- for some simple things the www folder is added to the project by convention so you don't need to specifically config anything to be copied over. |
Is the copy I have |
It looks like it used to work until CLI 7.0.1 with builder 1 but not 7.0.1 builder 2 and upward: Copy files into res/values/ Has this feature been removed or modified? |
According to the blog, support for |
Why don't you use 7.1.0 or 8.0.0? 7.0.1 is terribly old (a year) :). |
@andersborgabiro Sorry, that was a typo (I've updated). We're using version 7.1.0 with the old builder. Have you had any luck with the |
No. I use my own platform independent translation solution, that stores texts in a JS object. |
I've just tried to add resource-file element in config.xml with my Phonegap build v8.0.0 and build fails on android
Build Log See this for explanation Seen as I cant use hooks any ideas? |
If you are using PhoneGap build v 8.0.0, your resource-file directive should copy to 'app/src/main/res/:
Copying to res/ will cause PhoneGap build to fail, as noted above. |
gap:config-file
allows users to edit the manifest/plist file, but a common request for some users for adding custom images/strings/etc or other resource files to their PhoneGap platform projects. Common examples include overriding images added by plugins for UX purposes, string translations for different users on Android, etc.This might only be implementable after #445 though.
The text was updated successfully, but these errors were encountered: