android "open with" not listing chrome - sl4a

I have a short python program running on Android 6.0.1 (Nexus 7 tablet)
It tells the OS to open up an html file.
Unfortunately, when I get the "Open with" dialog box, Chrome is not one of the options. If I pick Firefox, everything works, but I want Chrome.
Here is the python code:
import android
droid=android.Android()
file_name = "file:///storage/emulated/0/Temp/Newspaper/Comics.html"
intent = droid.makeIntent('android.intent.action.VIEW', file_name, "text/html").result
droid.startActivityIntent(intent)

Thanks!! That was the answer.
I was using SL4A to run the python program, so I'm guessing that the error is in their code. If I install ASTRO file manager and switch my python code to say:
file_name = "content://com.metago.astro.filecontent/file/storage/emulated/0/Temp/Newspaper/Comics.html"
It lets me pick Chrome and everything works.

Related

What is preventing me from downloading files in Browser window that opens when using automated testing?

I am unable to download a CSV file using Selenium-Webdriver in a Chrome Browser window (Version 73.0.3683.86 (Official Build) (64-bit)) that opens when doing automated tests. I am using Selenium version: 3.4
Here is the HTML:
<h4>
<a href="/Hardware/ExportCsv?hardId=USB" download="Drives.csv" id="excel-btn">
<img src="../../Content/Images/excel.svg">
Export csv file.
</a>
</h4>
Neither click() nor using the Actions class work. If I click the link with my mouse, the file is downloaded.
Browser.driver.findElement(By.id("excel-btn")).click();
action.moveToElement(Browser.driver.findElement(By.id("excel-btn"))).click().perform();
I expect the file to be downloaded.
Instead, however, the download link text is just being highlighted.
Important to note: in contrast, I can find other elements, assign them to a WebElement and execute Selenium actions on those elements successfully. It is just the download that is eluding me.
I found an answer that works! The same solution that allows you to download files in a headless browser applies in this case as well. Essentially, there is a feature to prevent software from downloading files to your computer via the Chrome Browser. To get around that, you need to .setDownloadBehavior to allow downloading. (Make sure to set the Download Path to your download directory.)
Read more about it here; and here for code samples in Java, Python and C#.

Sencha touch app remains on blue loading screen when viewing on Android device or emulator

I just created a basic sencha app by
sencha generate app --name AndroidDemo --path ../demo
and I viewed it in browser and everything is perfect.
I then followed the instructions here: http://www.sencha.com/blog/android-setup-for-sencha-touch/
and compiled the app with Sencha Cmd and when the emulator opens I only get a blue loading screen.
I also tried compiling/building the app with phonegap on phonegap build site and the build finishes successfully and after loading the app in my andoid device, again I only see the loading page and it stays on this page and the app does not launch.
I'm completely clueless. Need your help friends.
Thanks,
In your app code may be miner syntax error or other error so while app run in emulator check log cat or other option run or app in chrome and check console log. Because loading screen display in case of error as my expression with this.
i'm having the exact same problem..
(currently on windows, btw)
while it's not exactly a solution,
a workaround that i did (out of desperation to see the rest of my app on the emulator):
is to just install it directly to the emulator using the "adb" command.
haven't tried this on a mac, but i'm guessing it's almost the same thing?
after building the app using "sencha" cmd, open cmd/terminal to the build directory.
-assuming you did not change the output location, the apk will be created in your
project root folder under this folder:
"build\native-package-mobile\MYAPPNAME\packager.json\"
make sure the emulator is already running
run the following in command/terminal at the folder where the apk is located:
adb install -r MYAPPNAME.apk
wait for awhile and it should say successfully installed.
run the app in the emulator and hopefully it will go beyond the loading screen.
I don't know why this issue is happening though.
(only started tinkering with android dev/sencha yesterday and it seems to be doing all in it's power to prevent me from running my app. haha)
please share if you find the correct fix for this :)
This usually happens when you build your version and you did not imbed all needed components.
For example, when you use ...
Ext.Image
... in your code.
While running without ...
Sencha app build xxx
... Sencha will grab the component from the touch/src components folder.
But at the time you build the app, it cannot reference to that folder any longer and Sencha will stall.
Please open the console and look out for a warning like this:
[WARN][Anonymous] [Ext.Loader] Synchronously loading 'Ext.MessageBox';
consider adding 'Ext.MessageBox' explicitly as a require of the
corresponding class
You need to add these to the requires section of either App.js or a class where you use the item (here Ext.Messagebox).
Another way to find out what is happening is to run the build code inside the browser and look into the console (so instead of localhost/myapp/index.html you run localhost/myapp/build/{package}/{myapp}/index.html).
There is one other thing that might happen. It’s the scope of async operations.
Like this:
Ext.defer(function() {this.log(‘all good’);}, 500);
this is not the scope of your class.
You need to use:
Ext.defer(function() {this.log(‘all good’);}, 500, this);
Or you might even use ...
Ext.bind()
...to bind the scope to the function.

'CoreVideo/CoreVideo.h' file not found

When I run a iOS App on my device , This error will appear
'CoreVideo/CoreVideo.h' file not found
not matter what project even though create a new project , once run the app on my device this error will appear
but the Simulator will be OK~
and I can't find some frameworks in
Target--Build Phase--Link Binary With Librares--add
like AVFoundation.framework AudioToolBox.framework
Should i reinstall the xcode on my mac~???
Make certain you've added the CoreVideo framework to your project.
Here's how I do it in my own projects:
If you need help figuring out where it is (it's hidden within the XCode app package itself), let me know and I can show you.
Also, make certain "Target Membership" is checked for CoreVideo in the File Inspector of your project. It looks like this:

Sencha touch build error when native packaging for ios !AMDeviceSecureInstallApplication

When i try to package my application natively for IOS in Sencha Touch 2.1 it gives me this error:
Sencha Cmd v3.0.0.250
[ERR]
!AMDeviceSecureInstallApplication
The application was successfully packaged
The application was successfuly signed
[ERR] stbuild exited with non-zero code : 1
It's not working with Xcode please any help will be appreciated.
This is my packager.json
{
"applicationName":"Demoedifarm",
"applicationId":"com.palapa.demoedifarm",
"bundleSeedId":"S5583Y6VFB",
"versionString":"1.0",
//"versionCode":"1",
"icon": {
"57":"resources/icons/Icon.png",
"72":"resources/icons/Icon~ipad.png",
"114":"resources/icons/Icon#2x.png",
"144":"resources/icons/Icon~ipad#2x.png"
},
"inputPath":"./",
"outputPath":"../build/",
"configuration":"Debug",
"platform":"iOS",
"deviceType":"iPad",
"certificateAlias":"iPhone Developer",
//"certificatePassword":"",
"provisionProfile":"/Users/palapa1/Library/MobileDevice/Provisioning Profiles/CA412FD2-60D6-407E-B7AD-A34637A8FF55.mobileprovision",
//"sdkPath":"/path/to/android-sdk",
//"sdkPath":"/path/to/android-sdk",
//"androidAPILevel":"8",
/*"permissions":[
"INTERNET",
"ACCESS_NETWORK_STATE",
"CAMERA",
"VIBRATE",
"ACCESS_FINE_LOCATION",
"ACCESS_COARSE_LOCATION",
"CALL_PHONE"],*/
"minOSVersion": "4.2.1",
"orientations": [
"landscapeLeft",
"landscapeRight"
]
}
I'm running a more recent version of Sencha Cmd (3.1), and I believe the command syntax has changed slightly, but I hit this same error so I figured I'd put an answer out just in case it helps someone.
If I run the following command:
sencha app package run myConfigFile.json
Then it fails with the same error, and I don't know what the problem is. However if I change the config file so it is targeting the iOS Simulator (the 'platform' property) then it works fine (the simulator opens automatically).
If I run this command instead:
sencha app package build myConfigFile.json
Then it completes successfully, and I end up with a MyApp.app file in the output folder.
If I have the XCode Organizer window open, I can then drag this file onto the 'Applications' folder underneath my attached phone and it will deploy/install the app for me.
If you use a provisioning profile you need to set
"configuration":"Release"
instead of Debug in packager.json. That's a bug in the docs.
Also, see this post for a good tutorial: http://frightanic.com/software-development/sencha-touch-native-packaging-for-ios-done-right/

problems configuring qooxdoo Inspector component

I am trying to configure the Inspector component as per instructions here: http://manual.qooxdoo.org/current/pages/application/inspector_selenium.html#pages-application-inspector-selenium-using-the-qooxdoo-inspector-to-write-selenium-tests
I am having problems following the configuration instructions, where it says to configure the Selenium window with the selenium-core zip file. I cannot find this file at the provided address: http://seleniumhq.org/download/
Any suggestions as to what I should use instead of that zip file?
Thanks
You can just press the "Use default URI" button in the Inspector's Selenium Options window and it will load the scripts from the Selenium SVN repository on Google Code. If that doesn't work for you it gets a bit complicated since the Inspector requires a deprecated version of Selenium:
Download Selenium RC from here and unpack it:
https://code.google.com/p/selenium/downloads/detail?name=selenium-remote-control-1.0.2.zip
Then extract
selenium-remote-control-1.0.2/selenium-server-1.0.2/selenium-server-standalone-1.0.2.jar to a directory named e.g. "selenium-server" and enter the path to that directory in the Inspector's Selenium Options window.

Resources