How to stop intercepting Zxing intents in my app? - android

I just emailed the dev and was asking him about this stuff.
Basically, I followed this:
http://damianflannery.wordpress.com/2011/06/13/integrate-zxing-barcode-scanner-into-your-android-app-natively-using-eclipse/
The person I'm working for isn't allowing me to use the Intent mechanism (same old reason.. can't make the users install another app), so I've to integrate the scanning functionality in my app.
I want to make sure that my app doesn't intercept intents for the QR Code scanner app. Right now, its doing that (in my Manifest..)
Do I need to rename the ZXing library project (and all of its packages)?
If I do need that, how would I do it? (Refactoring?)
Remember that I do need the QR scanning functionality from their library in my app.
Kindly help. I'm new :)

You remove <intent-filter> declarations that you are not using. Ideally don't use anything in our namespace -- nobody really should be in a third-party app.

Related

React Native - Open the device default gallery app

I'm developing a camera for a React Native app, and it needs to include a button to open the device gallery app (gallery for android, camera roll for iOS). All photos are stored in a specific album, so it would be better to open the app in that album, if possible, but it's not mandatory. It's worth noting that I don't want to create a custom in-app gallery. That would actually be easier, but it's not what the client asked for.
It seems to be a pretty simple task, but I haven't found a way to do this yet. Some people suggested using linking, like this:
Linking.openURL('content://media/internal/images/media');
This makes the OS ask the user what app should be used to open that link. If I select Google Photos, it works fine. However, if I use the default android gallery, it opens a photo that doesn't exist, showing a placeholder image. So this method doesn't work reliably.
According to android docs, it should be possible to open the gallery app by using an intent. But I tried doing both:
Linking.sendIntent('CATEGORY_APP_GALLERY');
Linking.sendIntent('android.intent.category.APP_GALLERY');
and it didn't work. Either I'm doing something wrong, or sendIntent doesn't work at all.
There's also a plugin called "react-native-send-intent", but it doesn't include a function to open the gallery. I'm running out of ideas, any help would be appreaciated.
I had the same issue in my personal project.
According to the doc, CATEGORY_APP_GALLERY is just specifying app categories and must be used with the ACTION_MAIN action.
As far as I understand, we cannot pass a category via React Native built-in Linking.sendIntent() method, unfortunately. We must rely on third-party libraries on that part.
I picked up expo-intent-launcher (If you are not using expo, still you can use it by following bare workflow as it's described in the doc).
Here is a working snippet example with expo-intent-launcher:
import * as IntentLauncher from 'expo-intent-launcher';
IntentLauncher.startActivityAsync('android.intent.action.MAIN', {
category: 'android.intent.category.APP_GALLERY',
})

Broadcast Receiver in Phonegap 'Build'

I'm trying to receive a link shared from another application like browser or youtube into my phonegap app. I'm using phonegap build (build.phonegap.com) to make my app.
I'd like to know how to make my app appear in the 'share' list for links.
All solutions I found online are making me edit Android Manifest or Java files, but is there a way (a plugin of sorts) I can use to make data transfer between apps possible?
There is a plugin available for PhoneGap which will handle receiving content from other application. You can use it. Following is the link to this plugin. https://www.npmjs.com/package/cordova-plugin-intent
If you find any issue or something else other than that functionality, you can make the custom plugin so that you will have direct access of java file from javascript.
If I understand your question correctly, you're talking about deep linking in android. The details about it can be found here
Correct me if I explain your ideas wrong: What you want to do is that you have an URL that showed up in another application (Ex: Facebook Messenger, Slack, ...) and you want after clicking it, a list of application that can be used to open that link appear and you want your app to be listed there.
But here is the problem, how can the OS knows what apps it can suggest to the end-user and what kind of link your is acceptable to your app? the answer lies in your application manifest and to be more precise, the intent-filter tag. It tells the OS what you kind of url you want and also use it to determine if the OS should suggest your app to be open by using that link for the user.
So the answer for your question about doing without editing Manifest is impossible. As for the reason why you don't want to edit your apps is unknown to me but I still suggest you to take a look at this tutorial. It still involves editing your manifest but the guide it self is clear and easy to implement.
Hope this help ^^

Android - HTML5 custom LAUNCHER

I want to create my custom android launcher but not with java code. I want to create it with HTML5 code. I've seen some launchers with HTML5 but not the documentation. Does anyone can give me some links or some tutorials/documentation to start? Thanks.
Does anyone can give me some links or some tutorials/documentation to start?
You could define much of the UI as HTML/CSS/JavaScript. Via PhoneGap, you could deploy this as an app. However, you will still need Java code -- or perhaps a PhoneGap plugin, if someone has written one -- to be able to access information about the installed apps, in order to populate your launcher.

Integrating existing android app into your app

I am very much new to android development!
I saw one existing application for android which will work as a first step in my app.
Actually a result of that application can be used as a input to my application.
But I don't know, is it possible to integrate existing application in your application?
If yes then definitely, that should be done only by having a code for that previous application, right???
If any one have any idea, what I am asking about, Please let me know. Thanks.
You can launch any Activity from your app but in order to get result from it, you need the developer of that activity to support it.
One example would be using "Barcode Scanner" app which is free and popular. Your app can use it by sending Intent asking to scan and return result instead of include the library into your app. Intent mechanism is Android way to do things.

Is there Android Intent concept in iPhone SDK

Just switching from Android to iPhone. In Android I can make several apps and use a tabView to call each app as intent.
In iPhone, I can make several apps. I need a tab to call each apps or app views. Is there similar concept as intent in iPhone? Just switched to iPhone, copying all the other projects into the tabbar does not work out. If you have other methods to solve, I really appreciate. Thanks,
Android and iOS are very different in this regard. Android is very open about letting you use intents to mix and match activities from other apps. iOS isn't like that; each app runs in its own private space and generally cannot even see other apps' data, let alone use their services. It is possible to cause other apps to run via custom URLs, but that's not the same thing.
What you'll need to do is to copy or move the code for the view controllers, views, etc. of your various iOS apps into your tab bar app project. You'll build them all into a single application, and the tab bar will switch between the view controllers.
With iOS 8 you will have something similar to Android Intents. Using App Extensions you can reach similar behavior.
In a close future Apps will start expose their "extension" (as you do in Android Framework declaring Intent Filters in the manifest) that will be used by application who need.The extension areas allowed in this first version are:
Today
Share
Action
Foto Editing
Document Provider
Custom Keyboard
It's great finally apple release this functionality!
Intent in Android covers a lot of functions. There is no iOS equivalent to that.
But if your objective is to launch a different app, and pass parameters to it, you can try out URL Schema.
Let's say you have app AAA with URL schema aaa:// and app BBB with URL bbb://
You can launch app AAA, and call bbb://v=1&c=2 for example, to launch BBB and get the parameters. you can even take these parameters to control what view to show, so you can have a similar concept in Android, to call different Activity with Intents.
You have to register URL schema in Info.plist
The closest concept to an Intent on iOS is the handling of certain URLs by the system applications. See here. It was possible to register your own application URL schemes at one point (see this article), but I must admit I haven't tried this in recent SDKs (IIRC Glympse links can be opened in the Glympse app, so this technique probably still works).
As of 2016, Apple has added an Intents framework that is similar to Android's, albeit much more restrictive. Expect Apple to add more Intents in the future, but for now it is quite limited. https://developer.apple.com/reference/intents
Since iOS 8, you can use App Extensions.

Categories

Resources