Disable orientation change for only specific page - jquery-mobile

I am developing an application with jquerymobile. I want to disable my landscape orientation for only main page not for others. Are there any commands to do this for pages separately instead of manifest file?

For Android, you can use this screen orientation Phonegap plugin in your main page. I've updated the code to be compatible with Phonegap 2.8.0 - you can find the source code in my answer to this question as well my Eclipse project and resulting APK.
There's an equivalent iOS plugin here but I haven't used it and it may need updating for use with the most recent versions of Phonegap.

Related

React Native newbie. Using XCode for the native iOS part in /iOS. What do I use for javascript in root folder? What's a best-practice workflow?

Confused as any newbie would be!
I am a React Native newbie. Following a tutorial I created a project. I can use XCode to open the native iOS project in /iOS. What do I use for the javascript files in the root folder? Should I use a second editor for js - i.e. one of the standard js editors (Atom, vi etc). What is the best-practice workflow? Or can I accomplish everything with one editor. Advice, recommendations would be most appreciated.
CLARIFICATIOINS:
To clarify my question, take the following sample project:
I want to write a react native app which opens to a table view i.e. list screen with multiple items in a list screen. When you pick one item in the list the app navigates to a details screen. Suppose the list screen is React Native and the details screen is Native iOS. I can code up the list screen using VSCode in React Native js. And then I can code the native details screen in XCode. So for the native part I can open XCode and create a fresh project. What kind of project should this be? Should it be an IOS App or am IOS framework/library? Perhaps a main app as the AppDelegate and a test harness, and a framework/library for the one View Controller screen I will need to import into my React Native project? And then how do I run this to test and debug it out end to end in the simulator? I can possibly correct and live reload the React native portion, but suppose I want to update the iOS portion, what step do I need to go back to? etc.
It's not very common to do your coding work directly inside XCode. XCode is more of a place to organize your project/environment/builds/signing etc...
Instead you should be writing all of your code inside the editor of your choice. The standard workflow would be:
Create project on command line
Use your editor of choice for coding. I use VSCode.
in your editor, open your project folder that you just created
use XCode for running the ios emulator and super specific iOS tasks
All Android specific work can easily be done in VSCode (you don't ever actually need to use Android Studio)

How can I override Cordova's audioCapture interface in iOS?

I'm developing a PhoneGap/Cordova project that utilizes the org.apache.cordova.media-capture plugin to capture audio (capture.captureAudio).
iOS has a listed "quirk" that it doesn't have a native audio capturing graphical interface. PhoneGap/Cordova automatically provides the following GUI:
Can this be overridden/edited somehow? I'm talking more about theming (changing the background/image, button styles etc) the interface than re-coding whole screen. I don't need more functionalities to be added on the view.
You have the images available on the bundle
https://github.com/apache/cordova-plugin-media-capture/tree/master/src/ios/CDVCapture.bundle
You can try to download the plugin, replace the images with others of your own and add the plugin locally.
Another option might be to create your own plugin using the same code but creating your own bundle for images (changing the code where necessary)

IOS Phonegap 3.X: Lock page orientation during runtime

I am developing a webapp using phonegap + sencha touch, and I want to lock orientation on certain pages during runtime. I found this phonegap plugin , but it's not working for phonegap 3.X.
I also found something about a js function which named 'shouldRotateToOrientation', is it provided by phonegap? And it seems just works in multi-page(html files) app, my sencha touch app only have one html file.
So, how can I do that? Any help from you will be greatly appreciated.
i know this is not really a valid "answer" but SO doesn't let me comment with <50 rep. anyway, i noticed it's not that difficult to set up an old plugin to be used with cordova 3+. adhere to the folder structure (which you can see in existing cordova plugins like "device"), create a plugin.xml and install the plugin with plugman. read the documentation about plugin development and you should be good.
you will especially have to replace the function header in the ios files. replace
-(void)setAllowed:(NSMutableArray*)arguments withDict:(NSMutableDictionary*)options
with
- (void)setAllowed:(CDVInvokedUrlCommand*)command
This is a phonegap plugin for android/ios.
https://github.com/yoik/cordova-yoik-screenorientation

Custom Cordova IOS keyboard

I am working on a Cordova app for which the client insists we have a custom keyboard for numeric input that looks native; the goal is similar to a keyboard that comes up with PayPal.
Here is the problem: we need to do this without touching the way things work for Android in our app. This probably means we need to create a cordova plugin, but I have read that creating custom keyboard is looked down on by the folks over at Apple (see this old post about it).
I've had a very difficult time finding any documentation on how to do this with Cordova on IOS, which makes me lean towards rolling a solution inside of Cordova using a jquery library. My question has two parts:
1: If possible, how does one create a custom keyboard for html5 inputs in Cordova as an IOS plugin?
2: If this is a lost cause, what existing jquery plugins would you recommend instead?

Override Phonegap default splash screen using jquery mobile

I use jQuery Mobile with HTML5 and CSS3.
When I upload my code to PhoneGap cloud build servers and place the app on my iPhone and start the app, I see the following splashscreen:
The question now is: how can I override this image?
Do note: I'm not using a regular phonegap project (e.g. in Visual Studio), but just an index.html file with js and css files.
Thanks!
You can get some valuable information from here. This is from official Phonegap team. Also you can look into this too.
Hope it helped you.
Apple now requires a splash image. So if you don't include one in your config file on Phonegap Build, then the compiler inserts that ugly default version for you. So the solution is to make sure that you use your own custom splash image and specify that custom image with appropriate settings in the config file. You should be fine after that.
https://build.phonegap.com/blog/new-apple-app-store-submittal-rules
If a splash screen is not found in your package the PhoneGap default
image will be used, so be sure to include your splash screen in all
the required dimensions for your device. Apple has a handy guide to
these dimensions here.

Resources