PhoneScreen problems with incoming call - blackberry

I want to add a field to the Phone Screen when a screen is received. I successfully made this using the following code:
public void callIncoming(int callId) {
PhoneScreen ps = new PhoneScreen(Call, UiApplication.getApplication());
PhoneScreenHorizontalManager manager = new PhoneScreenHorizontalManager();
LabelField label = new LabelField("Call Received");
manager.add(label);
ps.add(manager);
ps.setScreenBackground(Color.RED);
ps.sendDataToScreen();
}
I tried this code on the following devices:
BB Mini Curve, Bold 4, Bold 2 and Curve and this works like a charm with all the functionality I want. A background colored red is appearing in the area where I can draw fields
I tried it on these phones and the label field did not appear: Torch, Bold3
On these phones, When I add data to the screen, I guess that these fields are appearing below the ringer off notification. With these devices, no Background is appearing... So this is a main issue.
How to solve this and make the fields appear on these phones too?
Thanks in advance

I don't have the answer, but have started a thread here:
http://supportforums.blackberry.com/t5/Java-Development/PhoneScreenDemo-not-displaying-information-on-os6/m-p/1450769#M184811
I've opened a RIM ticket and will share info as I get it.
As far as I can see PhoneScreen has big issues and is not consistently supported across devices.
Using isSupported() will only determine if the device screen type supports the API, (SVG is required according to RIM Jira ticket), not if it will actually work.

Related

Is it possible to change color of bottom horizontal line of iPhone X series within app?

is it possible to change color of bottom horizontal line of iPhone X series within app(inside app only)? my client is asking to change color of this line, and i am not able to find any related topic or solution.
Thanks.
No, I don't think it is. That's drawn by the system, and is not part of your app. Apple does not let apps change things outside of that app's "sandbox".
Edit:
I found a long article on the subject online:
https://medium.freecodecamp.org/reverse-engineering-the-iphone-x-home-indicator-color-a4c112f84d34
It seems it's called the "home indicator" and this author supports my suspicion that you can't change its color.
Edit #2
As Matt points out, the color of the home indicator changes automatically. The system has logic in it that tries to keep enough contrast between the home indicator and the area around it so that it's clearly visible. See the article I linked for more on that subject than you probably wanted to know.
You can only remove it:
override var prefersHomeIndicatorAutoHidden: Bool {
return true
}
The color is applied automatically.

Get all elements in the view of iphone app using xcode

I am trying to take screenshot of every screen during iphone app automation on a simulator. Along with the screenshot I also want to extract all strings in the that particular view before taking a screenshot using xcode. Is there a way to do that? Purpose is to send these screenshots and strings for validation to another tool.
This can be done using Web Driver Agent(WDA) provided by facebook. It does provide all the functionalities you need for your app.
Here is link to github repo for it:
https://github.com/facebook/WebDriverAgent
Please have a look at it. It might help you achieving your goal.
If you are using the XCUITest framework for your automation, you can use XCUIScreen.main.screenshot() to get a screenshot of the current state.
To fetch all text currently on screen you can use XCUIApplication().descendants(matching: .textField) or .buttons or .any or whatever you expect to be on the screen, and extract the text from the element
let descendants = XCUIApplication().descendants(matching: .textField)
foreach descendant in descendants { descendant.label /*do something*/ }
You need to set an Accessibility Identifier on the view elements for this to work.

Solving Rendering Artifacts in Frame Buffer with WebView and EditText on Android 5.0?

After upgrading Nexus 5 to Android 5.0, an activity with default focus on an EditText does not render correctly (EditText repeats down across the screen with grey dots in between and if you click again or dump the ViewHierarchy with UiAutomator, it will return to normal rendering).
(I would upload the image, but don't yet have reputation for images).
NOTE: This is ONLY after I have loaded a WebView within the application (though in a separate activity). The same screen renders correctly prior to loading the first WebView in the application.
NOTE: This is ONLY a problem on Android 5.0 and (so far) on Nexus 5. I do not have another 5.0 (non-nexus) device to try.
EDIT: This also happened on HTC One with Android 5.01.
NOTE: I have tried disabling hardware acceleration, modifying inputMode, and defaultFocus.
Has anyone seen or solved this problem?
Ended up solving this by changing softInputMode (similar to previous WebView/Keyboard issues, but this time with a native View and EditText).
getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_VISIBLE);
I had a similar issue on Lollipop 5.0.1 devices. My solution was to deactivate hardware acceleration in the WebView on these devices before loading any content with loadURL or loadData.
int SDKversion = android.os.Build.VERSION.SDK_INT;
if(SDKversion >= android.os.Build.VERSION_CODES.LOLLIPOP){
webview.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
}
If you do not want to do this, I could also drastically reduce the problem by adding a visibility="gone" webview to the disturbed activities and then calling something like:
webview_dummy.loadData("<head></head><body></body>", "text/html", "utf8");
after the loadURL of the actual webview.
Man, this is really some weird bug!
What solved my problem was to disable the hardware acceleration only on the activity which hosted my fragment. Not on the whole app, but specifically on that activity.

iMessage bubble in iOS 7

In iOS7 there is significant cropping (40-50%)– of MMS/GIF messages and photos (new “Square” orientation) - within the iMessage chat bubble. This was not a problem in ios6 - for MMS/animated gif/video files.
In iOS6-we could control the visibility of the MMS/GIF to perfectly “fit ” the chat bubble, by reducing the resolution of the MMS/GIF. However – reducing the resolution of the MMS/GIF files in iOS7 does not change the proportion of the message visible in the chat window.
Any body have any temporary “work around” solutions for this bug – or have any ideas on how we can present an animated GIF/MMS without significant cropping in the iMessage chat bubble?
Thanks in advance for your help

Bluetooth HID Device & iOS textFields

We are using a BT device, which acts as a keyboard, to talk to the iPad.
We want this bluetooth device to talk to 1 field in our app. (Which is on it's own view)
All other textFields/areaFields we want to display the virtual keyboard.
Is this possible?
Whenever the BT device is paired it disabled the on screen keyboard.
We thought of turning bluetooth off before the view with the 1 field that needs its input from the device is displayed and then turning it back on when the view is removed, but this has 2 problems. The iPad will not automatically connect to the device and there is no way to turn bluetooth off without using private API's.
This is a related question:
Force on screen keyboard to show when bluetooth keyboard connected
that has not yet got a satisfactory answer.
Any help will be greatly appreciated
Cheers
Phil
Erica Sadun found a way of bringing back the keyboard by sending a GraphicsServices event. Post: http://www.tuaw.com/2010/06/02/hacksugar-bringing-back-the-on-screen-keyboard/ see link to source code. Sending GSEvents might not be AppStore ready, but maybe worth a try.
Phil,
I'm not sure if you've discovered the External Accessory Framework but that is probably your best bet to get what you're after and have an app that will be accepted in the store. I'm currently working through some similar issues and I think this is how I'll be able to detect which of our supported devices the user is using.
https://developer.apple.com/library/ios/#documentation/ExternalAccessory/Reference/ExternalAccessoryFrameworkReference/_index.html
EAAccessoryManager looks like it may give you back a list of attached devices. That's exactly what I'm looking for. It should allow me to then take the correct path to connect to the devices.
This may give you back what you're interested in...
#import <ExternalAccessory/ExternalAccessory.h>
- (void)_getAttachedDevices;
{
EAAccessoryManager* accessoryManager = [EAAccessoryManager sharedAccessoryManager];
if (accessoryManager)
{
NSArray* connectedAccessories = [accessoryManager connectedAccessories];
NSLog(#"ConnectedAccessories = %#", connectedAccessories);
}
}
Hope this helps.

Resources