Broadcast Receiver in Phonegap 'Build' - android

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 ^^

Related

Is it possible to open native android clock app from web application?

I am looking for a way to open the native android alarm clock app when a user clicks on the link or button on a web browser of the android. So basically need to open the native android app from web application. I tried using intent://#Intent;package=com.android.deskclock;end' and it is not working. I am wondering if I am using the wrong package name or it is not even possible in android.
Thank you much for help!
According to this documentation, this is not possible. In particular, this footnote is the limiting factor:
Only activities that have the category filter, android.intent.category.BROWSABLE are able to be invoked using this method as it indicates that the application is safe to open from the Browser.
If you look at the AndroidManifest.xml for the DeskClock app, none of the activities contain the android.intent.category.BROWSABLE category filter, meaning none of them can be opened from the browser.
I have a suspicion that the problem is that you are not providing a URI path in your URL. It might need to be a path declared in the app's manifest. See: https://developer.chrome.com/multidevice/android/intents
This could change it to ie intent://path/#Intent;package=com.android.deskclock;end'
It might be helpful if you were to look at the javascript console when you try to click on that link in Chrome, there might be details of what went wrong.
Keep in mind that the alarm clock app is not necessarily consistent. Manufacturers can remove the default alarm clock app to replace it with a different one, or just modify the source code so that it has the same package name but different source code. You could try opening multiple package names from javascript depending on what happens when the intent can't be opened.
Welcome to code party
You can get a android device IFrame from appetize site.
This is the easiest way for show android apps in web applications.
Update me in comments ;)

add another app inside my app?

my goal is to get a video from a usb connected device (an easycap video grabber) displayed. There is already an android app that does exactly that. However i need to add some buttons and some extra functions to it. So i came to the idea of displaying the app that already exists inside my app. Is that possible in any way?
I already tried to decompile the existing app to edit the code a bit but i didn't get anything to work with.
Do you have any other idea? If you know how to program that please let me know what i need to achieve that.
Thank you!
This cannot be done due to security reasons in the Android OS itself.
Android provides a security layer called the Sandbox in which the OS assigns a User ID for each app, so that an app will not have permission to access resources from another app.

Phonegap - Eclipse - opening files or external websites

Good morning, first of all sorry if this have been asked before, i've found no answer yet and i've been looking for it for a long time.
The problem: there's links to external websites in my app. This links always open inside my app. I want them to open like the following image, asking me what app i want to use to open the link:
Click to see image
http://blog.laptopmag.com/wpress/wp-content/uploads/2013/03/complete-action-i.jpg
Another problem is that i have some files i want to download from the app. They have the same problem. I would like the requested file to download automatically but it does nothing.
Wish you could help me, i am new in this and i'm a little (or too much) lost. Appreciate your help¡¡¡ Thanks
I'm pretty sure that you can do this with the InAppBrowser plugin: http://cordova.apache.org/docs/en/3.0.0/cordova_inappbrowser_inappbrowser.md.html#window.open
If you set the target=_system, it will "Opens in the system's web browser." I think if you have set a default web browser already on your device, it will probably use that web browser and not give you the prompt in your screen shot. I don't think there is a way to force the system to ask you which app to use, unless the user somehow clears that association/setting.

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.

Start Androidapp with a link in a email

Hallo Developers,
is it possible to start a activity with a link from a Email like in Iphone SDK and start this aktivity with params.
Iphone example:
Appname:///?param1=value1&param2=value2
It appears to be possible - check these other answers on stackoverflow:
How to implement my very own URI scheme on Android
Android Respond To URL in Intent
Not to my knowledge in stock Android. However they've made a link scheme that will open up the Market application to a specific page, so this is possible. I would think however that in order to set something like that up the app you are wanting to start from link would have to be listening for clicks on that specific type of link and tell the system that it can handle them. I have no idea how you'd go about implementing that though, and it would only be able to start specific apps that were designed that way.
Try content://com.user.package.ActivityClass/. I haven't tried it so I am not sure if it will work though.
See here for more information: http://developer.android.com/reference/android/content/Intent.html

Categories

Resources