Open image in default gallery - basic4android

Here's the code I'm using to open an image taken with the camera with the default gallery:
Dim i As Intent
i.Initialize(i.ACTION_VIEW, "mnt/sdcard/DCIM/Camera/IMG_20121027_205219.jpg")
Log("mnt/sdcard/DCIM/Camera/IMG_20121027_205219.jpg")
i.SetType("image/*")
StartActivity(i)
Log("error:"&I)
When I click the button, the gallery opens and then just force closes itself.

Dim i As Intent
i.Initialize(i.ACTION_VIEW, "file:///sdcard/DCIM/Camera/IMG_20121027_205219.jpg")
Log("mnt/sdcard/DCIM/Camera/IMG_20121027_205219.jpg")
i.SetType("image/*")
StartActivity(i)
Log("error:"&I)

Related

How can i click on allow on firefox microphone popup in protractor?

I want to click on Allow when firefox browser microphone popup will display. I have attached the screenshot of popup window. I have tried browser.switchTo().alert().accept() but in console i got error that No modal dialog is currently open in protractor. So how can i do that?enter image description here
Allow microphone is a browser alert. Only way to handle it is to use flag in your config file to bypass the alert shown as below:
For chrome it would be '--use-fake-ui-for-media-stream'.
For firefox :
FirefoxProfile firefoxProfile = new FirefoxProfile();
firefoxProfile.setPreference("media.navigator.streams.fake", true);
FirefoxOptions firefoxOptions = new FirefoxOptions();
firefoxOptions.setProfile(firefoxProfile);
capabilities.merge(firefoxOptions.toCapabilities());

Issue with browse and upload new thumbnail in the template of CQ 5.5

I have provided thumbnail image for my templates. The thumbnail has jcr:content with property as below
name jcr:data
type boolean
value view
On double click view we get a browse option to upload new image from file system. But on selecting an image and clicking "OK" button the window isn't closing, though the new image gets uploaded in the thumbnail. And thus we have to close it either by clicking the "cancel" button or the 'X' (close) button.
Any solution to fix the "OK" issue.
Thanks.
I think this is a bug in CQ, because I have the same problem. I don't think CRXDE Lite can handle uploading an image directly. I would recommend creating a new package with a filter for just that image (/apps/myproject/templates/htmlpage/thumbnail.png). Build the package and then download it. Extract the package and replace the image with the new thumbnail. Rezip the package and upload it to your CQ instance, then click the install button. This workaround will let you update the image.
There is also a way to directly access the JCR filesystem. In Mac OSX I open up Finder and hit CMD-K to connect to the CQ instance directly. Then I can just drop the new image in directly. I'm not sure what environment you're working in, so your mileage with this approach may vary.

How to have image target new window or _blank using FPDF?

In my app the PDF gets opened in the web page and in the below example, when the users clicks on Logo.png it's getting redirected to FPDF site in the same page, but i want to open the link in the new window, instead of opening in the same window, so the users has the PDF opened.
$pdf->Image('logo.png',10,10,30,0,'','http://www.fpdf.org');
Yes I have tried some workarounds for this but its seem to not possible currently. But I have achieved this using ViewerJS.
Just display pdf using viewerjs(pdf js). Just put this line $('a').attr('target', '_blank'); after div.setAttribute('data-loaded', true); inside viewer.js file.
And you will find target blank. Hope this helps!
Sorry, I am pretty sure that this is not possible currently.

Tinymce - Convert image url to html image url

This is question about tinymce... Current image editor is slow for because it demands opening popup for every new picture I want to add. I have my own external image gallery where each image contains it's url so copy-paste of url's is very easy and fast...
I would like to have button similar to Bold that does following:
To editor I paste url of image (for example: www.site.com/image.jpg) and when i select this url and click on my new button it converts image url to <img src='www.site.com/image.jpg'> and shows image in editor.
I searched plugins and found nothing similar to this.
Any ideas?
Thanks in advance!
Ilija
solved!
In documentation there is example how to manipulate text in editor from external commands... end even set them as button

Closing an opened window on mobile safari with javascript?

In app mode, if I open a new window using javascript, the newly-opened window cannot close itself (on an on-click event) using the standard window.close() or self.close(). Does anyone know if there's an alternate method?
What I find most beguiling about this is that it goes against Apple's very own design guidelines: essentially a site has the ability to open a new window but the user cannot get out of it without closing the webapp using the Home button.
Any ideas? Thanks!
JavaScript:window.self.close() is how to do that.
you can try this js code snippet.
var win = window.open('','_self');
win.close();