App crash with distriqt scanner ane on Android - actionscript

I use the distriqt scanner ane and it works very vell on iOS. But with the similar app on Android it crashes the app immediately (while calling Scanner.service.startScan( options ))
I got follwing from logcat:
E/QCOM PowerHAL( 313): Invalid hint ID.
E/mm-camera-intf( 313): mm_camera_open: opened, break out while loop
E/InputDispatcher( 858): channel '2da9ab5b air.myfunnyappidcovered/air.myfunnyappidcovered.AppEntry (server)' ~ Channel is unrecoverably broken and will be disposed!
E/InputDispatcher( 858): channel 'e01d279 air.myfunnyappidcovered/com.distriqt.extension.scanner.zbar.ZBarScannerActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
Any Idea? All permissions and permission-freatures are set. The AS-Code works, like the iOS-compile shows. Tested with the same result on different Android-devices.

Related

How can iOS 3D touch on app be automated?

I write Appium UI tests for my iOS app. Some of the tests have such workflow:
an app is sent to background
the user does "force touch" on the app's icon, until menu (shortcuts) appear
an app is launched from this shortcut
My environment:
Simulator iOS 13.2
appium 1.15.0
Appium Python Client 0.47
I've tried such code (Python), it doesn't do "force touch":
self.driver.background_app(-1) # this works: sends an app to backround
args = {'duration': 5, 'x': 200, 'y': 200}
self.driver.execute_script("mobile:touchAndHold", args) # this doesn't work: force touch on Home screen
(I've tried to adjust coords, e.g. (150,200), (260,400) - no app icon was pressed).
I've tried AppleScript, but all I can do now is to activate Simulator app. :)
What I've found but it's not working:
https://saucelabs.com/blog/how-to-automate-3d-force-touch-with-appium: in this post "press" command was used with "element" = AppName, but my selenium driver says "press" requires "x", "y", not "element"
https://developers.perfectomobile.com/display/TT/Using+iOS+3D+Touch: in this post, driver.executeScript("mobile:touch:tap", parms) is used, but my driver says there's no command "mobile:touch:tap":
selenium.common.exceptions.WebDriverException: Message: Unknown mobile command 'touch:tap'. Only scroll, swipe, pinch, doubleTap, twoFingerTap, touchAndHold, tap, dragFromToForDuration, selectPickerWheelValue, alert, setPasteboard, getPasteboard, source, getContexts, installApp, isAppInstalled, removeApp, launchApp, terminateApp, queryAppState, activateApp, viewportScreenshot, startPerfRecord, stopPerfRecord, installCertificate, startLogsBroadcast, stopLogsBroadcast, batteryInfo, deviceInfo, activeAppInfo, pressButton, enrollBiometric, sendBiometricMatch, isBiometricEnrolled, clearKeychains, getPermission, siriCommand commands are supported.
I've looked at XCUITestDriver documentation/code, e.g. https://github.com/appium/appium-xcuitest-driver/blob/master/lib/commands/execute.js, and can't see any 3D-touch related stuff.
So do you know:
1. how to automate 3D-touch on app icon in iOS Simulator?
2. How to check if it's supported by XCUITest-Driver?
3. Can it be automated by smth like AppleScript?
Thanks in advance :)
If you mean like https://i.stack.imgur.com/3Fo7v.png, you can open it like below.
(Ruby code)
# Long press 'Contacts' icon with W3C actions
el = #driver.find_element :name, 'Contacts'
action_builder = #driver.action
action_builder.move_to(el)
.pointer_down(:left)
.pause(action_builder.pointer_inputs[0], 2)
.pointer_up(:left).perform
https://appium.io/docs/en/commands/interactions/actions/ is the API.
You can find Python, too.
(iOS 13 does not provide '3D touch'. The feature has been long-press style)

TelephonyManager.ExtraIncomingNumber is always returning null in android pie

I am developing a Xamarin.Android App to read the incoming call phone number, and I was able to get the same in Android Oreo. But once we upgraded to Android Pie
string telephone = intent.GetStringExtra(TelephonyManager.ExtraIncomingNumber);
always returns 'null'.
While Searching, I find out that by adding 'READ_CALL_LOG' permission it will work in Android Pie.
I already tried by adding 'READ_CALL_LOG' to AndroidManifest.xml,
Also given the run time permission for 'READ_CALL_LOG' and 'READ_PHONE_STATE'
in my MainActivity.cs
But Nothing worked for me.
Please tell me if I am missing anything?
```in AndroidManifest.xml
<uses-permission android:name="android.permission.READ_CALL_LOG" />
```in MainActivity.cs
if (ContextCompat.CheckSelfPermission(this,
Manifest.Permission.ReadPhoneState) !=
Android.Content.PM.Permission.Granted ||
Manifest.Permission.ReadCallLog) != Android.Content.PM.Permission.Granted)
{
ActivityCompat.RequestPermissions(this,
new string[] { Manifest.Permission.ReadCallLog,
Manifest.Permission.ReadPhoneState },2);
}
in Android 9, you have to explicitly ask for both the READ_PHONE_STATE and the READ_CALL_LOG permissions at run time. In previous Android versions you only had to ask for the READ_PHONE_STATE permission. Both of them have to be asked at run time.
If the receiving app has Manifest.permission.READ_CALL_LOG and
Manifest.permission.READ_PHONE_STATE permission, it will receive the
broadcast twice; one with the EXTRA_INCOMING_NUMBER populated with the
phone number, and another with it blank
Here is the TelephonyManager docoument.

HTMLAudioElement Audio Not Playing on iOS (Ionic App)

I am using Xcode 8 and Ionic. I can get audio to play on Android but not iOS. The log from Xcode says this:
2016-07-13 18:19:44.802014 SpotShuffle[830:104683] [] <<<< FIGSANDBOX >>>> Path </private/var/mobile/Containers/Data/Application/EC634407-1752-4EE2-814E-B88353EA36B0/tmp/MediaCache> could not be converted by realpath() (requires all elements of path are present)
2016-07-13 18:19:44.803145 SpotShuffle[830:104683] [] __InternalSandboxRegisterURL_block_invoke signalled err=-12780 (kFigBaseObjectError_ParamErr) (Could not obtain realpath for specified URL) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/EmbeddedCoreMediaFramework/EmbeddedCoreMedia-1847.11.1/Prototypes/Player/ClientServer/FigSandboxSupport.c line 590
Do you have any advice?
I'm getting a similar error trying to play a video in iOS 10 beta 2.
"Could not obtain realpath for specified URL"
ObtainAndRegisterSandboxExtensionForPath signalled err=-12780 (kFigBaseObjectError_ParamErr) (Could not obtain realpath for specified URL) at /BuildRoot/Library/Caches/com.apple.xbs/Sources/EmbeddedCoreMediaFramework/EmbeddedCoreMedia-1873/Prototypes/Player/ClientServer/FigSandboxSupport.c line 486
My guess is that somewhere in the file is a URL starting with "//:" instead of "http//:". Web browsers will pickup the right URL protocol from the pages URL. In Ionic and Cordova the page protocol is "file://", which might be breaking the realpath library.
try to covert your audio file to base64
mySound = new Audio("data:audio/mp3;base64,//uQBAAAAAA.... ..qq");
collectSound.play();
it may work. however it may open system player as well. need to find a way to keep the context of you app

Does media.playVideo() work on Corona SDK with windows OS

I'm using Corona sdk, and just learnt the API media.playVideo("myfilename.mp4", true, listener).
When I open a blank file with only the code:
function showSuccess()
print( "success" )
end
media.playVideo( "hummingbird.mp4" , true, showSuccess)
The corona simulator displays nothing on screen, and the output is empty as well. On my android phone the video plays fine.
Question: Can corona simulator handle media.playVideo while i'm using a windows OS?
If not possible on Windows. How can I get around this? On bigger projects I would need the showSuccess function to print "success" in order to debug.
Thank you
Replace your last line by:
media.playVideo( "hummingbird.mp4" , true, showSuccess)
Your current line invokes the showSuccess method directly on the same line, instead of passing it as a function handle.

Flex AS3 Iphone - How to Open Native Maps Application?

I have a bunch of buttons that opens the default map application and puts something in the users system clipboard. It works fine on Android tablets, but the Iphone does nothing when the button is clicked. Here is the code:
case "MapYummyYummy":
System.setClipboard( "1665 Stelton Rd Piscataway Nj 08901" )
_callURL = "geo: 40.4978922, -74.4488224";
var targetURL:URLRequest = new URLRequest(_callURL);
navigateToURL(targetURL);
break;
Does anyone know the equivalent for this that will work on Iphone devices? thanks!
Have you tried this setData method? (I have no experience with this one, but looks like a viable alternative).
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/desktop/Clipboard.html#setData()
iOS launch maps via URL reference:
http://developer.apple.com/library/ios/#featuredarticles/iPhoneURLScheme_Reference/Articles/MapLinks.html
Querying for a location:
http://maps.apple.com/?q=cupertino
setting a start and end for directions:
http://maps.apple.com/?daddr=San+Francisco,+CA&saddr=cupertino
Hope it works for ya (looked up not tested).

Resources