Menu
  • HOME
  • TAGS

How can I set image in textDocumentProxy with custom keyboard extension iOS 8?

ios,objective-c,iphone,custom-keyboard

I have get solution for this question use clipboard copy and paste Code : UIPasteboard *pasteBoard = [UIPasteboard generalPasteboard]; NSData *data = [self.Videoassets objectAtIndex:btn.tag]; NSLog(@"File size is : %.2f MB",(float)data.length/1024.0f/1024.0f); [pasteBoard setData:data forPasteboardType:@"public.mpeg-4"]; ...

How to create a button that have same functionality as apple original keyboard backspace button have?

swift,backspace,custom-keyboard

I Found the answer from HERE. In this keyBoard the deleteButton have same functionality as I want. Code for that button is: private func addDeleteButton() { deleteButton = KeyButton(frame: CGRectMake(keyWidth * 8.5 + spacing * 9.5, keyHeight * 2.0 + spacing * 3.0 + predictiveTextBoxHeight, keyWidth * 1.5, keyHeight)) deleteButton.setTitle("\u{0000232B}",...

Pass Bool() value between dfferent swift targets

xcode,swift,ios8,boolean,custom-keyboard

Create a property on both sides of your controllers: class ViewController1:<CtrlType1> { var otherController:<CtrlType2> func doSomething() { if otherController.sharedBool { .... } } } class ViewController2:<CtrlType2> { var sharedBool = false } In the place where you create both instances (or where they have been created by IB) add viewController1.otherController...

Custom keyboard crashing after trying to set the text input as the title of a label in each key

ios,swift,ios-app-extension,custom-keyboard

Finally figured it out. Here's the working code: func keyPressed(sender: UITapGestureRecognizer){ for subview in sender.view!.subviews as [UIView] { if subview.tag == 1 { let label = subview as UILabel if capsLockOn { (textDocumentProxy as UIKeyInput).insertText("\(label.text!.uppercaseString)") } else { (textDocumentProxy as UIKeyInput).insertText("\(label.text!.lowercaseString)") } } } } ...

How to change background color of custom keyboard when button is pressed into host app?

ios,swift,cocoa-touch,custom-keyboard

Enable App Groups for both targets Step 1. Same steps and group name should be same for NuberWidget Target Keep in mind. Step 2. Step 3. Step 4.Code for store value Objective C NSUserDefaults *sharedDefaults = [[NSUserDefaults alloc] initWithSuiteName:@"group.yourcompany.TodayExtensionSharingDefaults"]; [sharedDefaults setInteger:[self.textField.text integerValue] forKey:@"MyNumberKey"]; [sharedDefaults synchronize]; // (!!) This is crucial....

iOS 8 Custom Keyboard AutoLayout Keys

ios,iphone,autolayout,custom-keyboard,nsautolayout

There are two possibilities here: 1. Adjust the widths of the keys By adjusting the widths of the keys, you can make it so they span all the way across, just like on the smaller screens. To do this, just add a leading and trailing constraint from each key to...

Prevent calling of viewDidLayoutSubviews on user interaction with iOS 8 custom keyboard

ios,objective-c,ios8,keyboard,custom-keyboard

I highly recommend you not to use viewDidLayoutSubviews(and also viewWillLayoutSubviews) in keyboard extension. They will be called due to frame changing, constraints changing and so many other events, which will sometimes cause unexpected problems. viewDidAppear can be a replacement. If you really have to override viewDidLayoutSubviews, try use flags to...

Android Custom Keyboard Vertical and Horizontal Keys

android,android-layout,custom-keyboard

Ok, thanks for your answers. Maybe i wrote my question a little unclear but I wanted to know how to design keyboard looking like on picture, not how to create keyboard from the start. It was a little confusing because at first I was using only android: keyHeight atribute which...

custom keyboard in iOS 8 access

ios8,custom-keyboard

No, you cannot. As Apple documentation states: Because of its focused role in the system, an app extension is ineligible to participate in certain activities. An app extension cannot: Access a sharedApplication object, and so cannot use any of the methods on that object Use any API marked in header...

How to change action key of android custom keyboard according to the text field?

java,android,android-softkeyboard,custom-keyboard

I used this in Keyboard class. public class LatinKeyboard extends Keyboard { /** * This looks at the ime options given by the current editor, to set the * appropriate label on the keyboard's enter key (if it has one). */ void setImeOptions(Resources res, int options) { switch (options&(EditorInfo.IME_MASK_ACTION|EditorInfo.IME_FLAG_NO_ENTER_ACTION)) {...

iOS Keyboard extension: working too much Slow if no full access

input,ios8,xcode6,custom-keyboard

[[UIDevice currentDevice] playInputClick]; makes your delay. Just wrap it with full access check....

ios keyboards are different height

ios,iphone,keyboard,uitextfield,custom-keyboard

I ran into this problem as well. If you are running your app on an iPhone 6 or 6 Plus and have not yet provided app launch images for those particular devices then the iOS will scale the screen size up instead of calculating UI elements based on the actual...

Command, alt, control, tab keys in iOS 8 Custom keyboard

ios,objective-c,swift,custom-keyboard

Nope. Custom keyboards (that is, onscreen keyboards from the iOS 8 keyboard extension API) insert text, they don't send key events. And inserting text is all they can do — the API for custom keyboards is very narrowly defined... presumably for privacy/security reasons. I know I wouldn't want a keyboard...

Get programmatically NSExtensionAttributes dictionary in iOS 8 custom keyboard extension

ios,objective-c,ios8,custom-keyboard

I've found the following solution: NSDictionary *infoDict = [[NSBundle mainBundle] infoDictionary]; NSDictionary *extentionDictionary = infoDict[@"NSExtension"]; NSDictionary *extentionAttributesDictionary = extentionDictionary[@"NSExtensionAttributes"]; NSString *languageCode = extentionAttributesDictionary[@"PrimaryLanguage"]; ...

Android handle 'search' button press on custom keyboard

android,custom-keyboard

I found the solution to do it: endDefaultEditorAction(true); it's a method of InputMethodService The full code is: case Keyboard.KEYCODE_DONE: final int options = this.getCurrentInputEditorInfo().imeOptions; final int actionId = options & EditorInfo.IME_MASK_ACTION; switch (actionId) { case EditorInfo.IME_ACTION_SEARCH: sendDefaultEditorAction(true); break; case EditorInfo.IME_ACTION_GO: sendDefaultEditorAction(true); break; case EditorInfo.IME_ACTION_SEND: sendDefaultEditorAction(true); break; default: ic.sendKeyEvent(new...

How to open general settings (not in the app settings) from the app in iOS 8?

ios,settings.bundle,custom-keyboard

You cannot open system apps in iOS. You can show them the path to the message though. 'Settings->General->Keyboard' etc in a modal whenever you wish to display this information to the user....

How to detect Orientation Change in Custom Keyboard Extension in iOS 8?

ios8,ios-app-extension,custom-keyboard,uiinputviewcontroller

In order to update your custom keyboard when the orientation changes, override viewDidLayoutSubviews in the UIInputViewController. As far as I can tell, when a rotation occurs this method is always called. Additionally, as the traditional [UIApplication sharedApplication] statusBarOrientation] doesn't work, to determine the current orientation use the following snippet: if([UIScreen...

How do I send audio file send via iMessage ios 8

ios,audio,custom-keyboard,uipasteboard,imessage

I believe you could directly attach the file to MFMessageComposeViewController. Here is the documentation link of how it could be done. Following would be the steps to do so. Check if file can be send using file UTI using + (BOOL)isSupportedAttachmentUTI:(NSString *)uti Find File UTI. i.e. path for the file...

UIView inputView vs inputViewController

ios,ios7,ios8,autolayout,custom-keyboard

The keyboard height issue is an iOS8 bug, and subclassing UIInputViewController will not fix it. The purpose of UIInputViewController is solely for doing system-wide keyboards, and as Apple states here, you shouldn't use it if you are doing a custom keyboard for your own app, only. "Make sure a custom,...

Can a keybord app run services like regular app? - android

android,android-service,android-softkeyboard,android-keypad,custom-keyboard

So, The answer is yes. From what I have seen, a custom keyboard app can run multiple services and broadcast receivers. I hope my question\answer will help somebody in the future.

Adding images to EditText from Custom IME

android,emoji,ime,custom-keyboard

After many hours of pouring over blogs, Stackoverflow, and the rest of the internet, I've discovered that it's essentially impossible to add a custom image to an EditText unless you own that EditText. All was not lost however. After looking through documentations on UTF-8, ASCII, and other character sets, I've...

Custom Keyboard: How to Paste Image from pasteboard into messages.app MMS ios8

xcode,swift,ios8,custom-keyboard,uipasteboard

I haven't tried to create my own keyboard at the moment. Nevertheless I use two keyboard on my iPhone that includes images. Both of them ask the user to copy & paste the images into the message. I might be wrong, but I guess this is an actual restriction. Edit...

How to perform a search action by android custom keyboard action button? [closed]

java,android,android-softkeyboard,custom-keyboard

I got the answer. getCurrentInputConnection().performEditorAction(EditorInfo.IME_ACTION_GO); getCurrentInputConnection().performEditorAction(EditorInfo.IME_ACTION_SEARCH); getCurrentInputConnection().performEditorAction(EditorInfo.IME_ACTION_NEXT); ...