How to make Chrome on Android launch my image picker rather than the system UI's in React Native? - react-native

My app is a custom image picker written in React Native using Expo, that lets a user select a particular image for uploading. When a user presses an Upload button in any third-part Web page, I want my app to open rather than the standard Android file picker dialog.
Is this possible? I'm only interested in Android at the moment. I've looked at Expo's ImagePicker, but this launches the standard Android System UI in response to a call from an app. In contrast, I need my app to open, not ImagePicker, in response to a user's click on a file upload button in a Web page.
ContentProviders looks like a promising approach, but I can't see how to use it in Expo, and I'm not sure if this is the right approach anyway.
Intents all seem to load the standard system UI image picker.
Is what I want possible, and if so, what approach should I use to achieve it?

Related

Getting past system alert on Android after device.openUrl call

When I use device.openUrl I get the prompt to pick my app or the WebView Shell app (see image below).
Is there a way to set this up to always pick my app?

How can i upload an image if i'm navigating to a different component

I am working on a react native application where i an upload image button in the Upload screen and during the upload process if i navigate back to the previous screen the upload process is stopped but i would want to upload the image in background of the app.
I am sure where to start trying this.
how will i approach this problem. Is there is any package i could use, i am even persisting data in redux store after the image is uploaded so is there a way i can use redux to upload the image.
One way of doing would be.
You can show uploading indicator while uploading and then return promise to navigate whatever the page you want.

How to open the apple app store internally using a modal segue

I am currently making an app that recommends other apps to download on the apple app store. I assumed that the only way for users to download these linked apps was to call the iTunes URL of the particular app -> the apple app store would then open pushing the original calling app into the background -> then the user would press the download button here as per normal.
Then I was playing with the app "App Hero" and they do something I thought wasn't possible. You can actually download another app to your device without ever leaving the "App Hero" application. I thought this was impossible due to sandboxing. They have a modal segue to what appears to be an embedded app store where you can commence installation of another app. This "embedded" app store doesn't have the usual UITabBar running along the bottom but everything else is basically the same.
Does anyone have any idea how they would have achieved this? It doesn't appear to be a UIWebView, perhaps I am wrong. And is this against any of the apple regulations?
*This is no way an advertisement for "App Hero". I am genuinely impressed/confused how they are able to do this and would love this functionality in my own app if it is allowed.
The class you are looking for is called SKStoreProductViewController. Docs here.

Download and display PDF with Trigger.io and jQuery Mobile

We are going to develop a mobile app (iOS and Android), which should provide downloading and storing several user-selected PDF files and viewing them within the app (iOS with WebView) or with an external PDF Viewer (Android).
My Question is: Is this possible with Trigger.io? I didn't find anything concerning this in the official documentation. Can we do something with the file or the child browser / tabs module? If yes, do you have any examples?
Note: We will use Backbone.js and jQuery Mobile as additional libraries.
The Android webview doesn't allow for inline opening of PDFs - you can test that by opening e.g. http://trigger.io/cross-platform-application-development-blog/wp-content/uploads/2012/05/trigger.io-whitepaper.pdf in your stock browser.
On iOS, you can use:
forge.tools.getURL('my_file.pdf',
function (file) {
forge.tabs.open(file);
}
);
But that won't work on Android (tested on 2.3, 3 and 4.0).
Short answer - yes.
Downloading, storing, then showing/referencing later can definitely be done. Check out the forge.file documentation.
I have not tried the child browser feature yet. Although the tabs module will work, I think its best to just let the device (and its user settings) decide how to display/render the PDF. I am only saying this because my devices (especially the Android ones... 2.3 and 4.x) tend to behave differently. Either way... the device's "back button" always gets me back to where I left off in my trigger.io app.

Is it possible to enable or disable VoiceOver within an iOS app?

I would like to be able to turn VoiceOver on or off within my iOS app. The reason for this is I am trying to help a person with disabilities which render her unable to read messages (hence the need for VoiceOver), and who is also unable to triple click the home-button due to motor coordination problems. The way to the setting through Settings>General>Accessibility>VoiceOver>VoiceOver>Flipswitch is far too long and complicated.
Is it possible, without jailbreaking the device, to change this setting in an app? The app doesn't need to make it to the App Store, if that helps.
Alternatively, is it easy to do this with a jailbroken device?
Another approach may be to simulate the triple-click on the home-button that automatically turns on VoiceOver. Is there any way to do this?
Get the app aHomeIcon.
Open the app and tap URL.
Insert the url: prefs:root=General&path=ACCESSIBILITY
Tap 'Done'.
Insert a name to be shown below the icon.
Tap the export button at the bottom of the page. Safari opens.
Add a bookmark and select 'to home-screen'.
Now you can tap that icon and you are redirected to the accessibility part of the settings app.
See this link for reference.