I am developing my phonegap application in Eclipse on Android platform and i want to create .APK file from Adobe's account(build.phonegap.com)
So, my problem is that i don't know the difference between Manifest.xml file and config.xml file.
In which file i have to add permissions for my phonegap application(In manifest or in config file)??
There are 2 files - one is AndroidManifest.xml, the other config.xml.
The first file - AndroidManifest.xml - is used to set up information about your application, the main activity (Java class) it uses to actually run, permissions and more-less everything Android-related. This file is only for use on Android devices (not iOS, nor BlackBerry etc.).
config.xml on the other hand is PhoneGap-specific and contains information to set up your PhoneGap project. You set up plugins, allowed URLs that PhoneGap can access and few other settings here.
Related
I am currently working on a Xamarin.Forms application that uses native barcode scanning capabilities of the mobile device. I have integrated two different device SDKS from different manufacturers (Casio & Denso).
The main launcer is SplashActivity, which shows the splash screen, detects device info and launces one of the following:
CasioActivity
DensoActivity
These activities are responsible for subscribing to scan events raised by corresponding device.
Denso integration is done with a DLL file supplied by the manufacturer, while Casio integration is done through a Xamarin Bindings project, following this tutorial.
Deployment to Casio works fine but when I deploy the application on the Denso unit, I get the following error message in Visual Studio:
install_failed_missing_shared_library device.sdk is required
I believe that the Casio SDK (*.aar file) is forcing that the app runs only on Casio devices. I tried adding the following to the application manifest:
<uses-library android:name="device.sdk" android:required="false" />
and also tried adding the UsesLibrary attribute to all activities to make device.sdk optional but none worked. It appears that the bindings project is injecting the following to the manifest file on deployment:
<uses-library android:name="device.sdk" android:required="true" />
Is there any way to prevent the injection of the above line into the manifest file?
I would like to make the application compatible with both of these units.
I solved this by modifying the aar file.
Use 7zip to extract the aar file to a folder
Find the application manifest in the extracted folder
Set android:required attribute to false.
Zip the folder again
Change the file extension from .zip to .aar
Put the new file under Jars folder as shown here
Is there a way to do this without deleting and re-installing the platforms directory?
The reason I'm asking is that I'm trying to generate two APKs with different bundle IDs -- one for Development and one for Production. The bundle ID is being read correctly from the config.xml file at the root of the project and updated in the <manifest> tag. However, I have the cordova-push-plugin installed which requires an android:name XML attribute of the form PACKAGE_NAME.permission.C2D_MESSAGE and the bundle ID part of this property is not being updated with the bundle ID found in config.xml.
It looks like the Cordova build process for Android looks at the PACKAGE_NAME property in the platforms/android.json file and uses that to insert permissions into the AndroidManifest.xml file. Is there a way to update this?
edit: I'm using Ionic to build my project and use the ionic state reset command to delete/add the platforms back.
I want know where to tell android phonegap cordova to allow access to all external url.
I know i have to do it in cordova.xml but am running cordova 3.0 and there is no file
called cordova.xml in my application.
The only xml file i could find is
AndroidManifest.xml
Build.xml
The whitelisting rules are found in res/xml/config.xml and declared with the element .
http://docs.phonegap.com/en/3.0.0/guide_appdev_whitelist_index.md.html#Domain%20Whitelist%20Guide
I am working on an android app with Phonegap and Jquery Mobile which I will compile with build.phonegap.com.
I first want to know the difference between Manifest.xml and config.xml files, and also whether it is required to add androidManifest.xml when i am uploading the files to build.phonegap.com.
Secondly i will like to know if there will a device problem assuming i add three different Manifest.xml for three difference devices eg, android, ios and blackberry when i upload the files to phonegap build.
Thank you
First Answer: Diff between manifest.xm and config.xml files .... now manifest is where u declare stuff like
1> Package
2>version
3> install location and many more btw i just finish one of my phongap and there is not config in my files though ...
second question .. i dont know about that david ... you can probly go to google !!
First of all manifest.xml is using only for your android application. It defines permissions, services, broadcastresivers ,activities and intents. This file will be using by JVM to register your application on device.
Config.xml is using for cordova library, to define all plugins(interfaces between js and jsvs layer).
How does the Android market know our minimum SDK versions and permissions?
The thing that I guess is, their server opens APK file and parse manifest.xml file. Then will find these two elements. Am I right?
I changed the extension of TestProject.apk to TestProject.zip then I extract it. I found manifest.xml and tried to open it but i was not successful. (in Windows, notepad and wordpad couldn't open it but I saw An invalid character was found in text content. Error processing resource 'file:///C:/Users/Inf/AppData/Local/Temp/Temp...' when I opened it with IE).
I want to know, If I have an APK file can I modify it's manifest file directly or after compiling manifest will be encoded?