I have an android application, which I want to launch from the website.
Here is the condition: If user had installed that app previously then give the option to open it, if not then go to the play store.
I used this code in my website:
Click me
It is working fine.
Now what I want that when a user searches my website on Google and the link appears, if someone clicks on that link it will open the app.
As well as this code:
Click me
is not working if I put this into a function like:
launchApp:function(){
$window.location.href='myapp://link';
}
this is not working.
How do I fix these issues?
Create an Intent filter for the main activity/ the activity which you want to open, something like this: https://stackoverflow.com/a/31404717/7527995
Related
Is it possible to install a pwa from a link?
For example:
you go to a domain name index.html page and view multiple links to different pwa apps.
Then click a link and it installs a pwa to that specific app (with or without) going to a landing page for that app?
As it is now:
if i go to
www.domainname.com/subfolder/index.html
and I have set it up as a installable pwa, it installs and the icon appears on the devices home screen with a link to www.domainname.com/subfolder/index.html..
What im looking for is:
if i go to www.domainname.com/index.html i will see a menu of available apps. if i click an app link it will install the home screen icon and when that is pressed will go to www.domainname.com/subfolder/index,html as the start page, without first going to the app main screen.
I have been experimenting with this, but i cant get it to work, just checking if it is possible, or my code is wrong.
i tried subdomian works, with https for earch subdomain is ok, let me try and post comment later for if subfolder is work
Ok, I haven't found an answer to this.
I need to create a Popup in HTML that allows me to install the PWA Icon on the home screen, and I am not speaking of the regular install banner.
I already know how to do this by using the manifest and the service worker.
Now, to understand this, what I need you can see this behavior when installing Instagram PWA.
Instagram shows this html popup, I guess that theres some sort of javacript code that gest fired when pressing the button, it fires the regular
install banner.
Any idea?
When the PWA meets the requirements for adding to home screen, the browser fires a "beforeinstallprompt" event. The event may be caught and fired manually again at a later time. Basically: listen for the event, grab it if it fires, show the user your custom add to home screen view, if the user clicks re-fire the vent.
Specific details and code samples: https://developers.google.com/web/fundamentals/app-install-banners/
I'm building a chrome extension to debrid and stream a link on my raspberry pi (running Kodi).
So far, it's working well. I can give a link :
and it's debrided + streamed on Kodi.
I would like to make it easier to use.
Instead of pasting the link into the app, I made a little script to search on a given type of page if a link can be debrided via Realdebrid and is so, the script add a button to directly stream it :
The problem here is :
When the user click on the button, how can I pass the link to my extension ? I would like to have it in my extension because I can display the link into history.
I tried something like that :
from the view :
from the extension :
But it's not working.
I think I should use messages but I don't understand how.
It's an open source project that you can find on Github.
As it's not working yet you won't find the code I shared in the 2 images before. It's just on my computer, not pushed.
Any help would be really appreciated !
Thanks !
EDIT 1 :
When I click on the button injected in the page, I get this error :
Which leads to this line :
EDIT 2 :
If I keep the app open while I click on the button it's working. But I do not want to have to launch the app of course, the goal is to click on the button only.
Popup script is loaded when you open the app by a user action i.e clicking on the app icon. Until then, it is not available to you. As such you are getting this error because when you send a request the listener should be available and in your case its not there.
Now, the easiest way to achieve this would be to send the request from the content script to the background page which is available even when the app is not open.
Inject the button using the content script and send a message to the background page (called event pages) on click event of the button.
Add an event listener in your background page which will listen to the request from the content script and store the link in the local storage.
When your app opens just load the link from the local storage and display your links in the history.
I hope this helps.
Can I set a link on my site so it will open certain Android app when clicked?
This depends on whether or not the app you want to open is capable of handling a link. If the app has an appropriate <intent-filter> then it could be launched through a link. For example, the Google Play app has a filter for all play.google.com links, and gives the user an option to choose between the browser and Google Play when the linked is clicked.
I want to make a mobile app that makes a user like a certain page to continue.
I know that to check if a user has liked a page for a regular app you can make the app a tab of that page, and then use the signed_request to see if the user has like the page.
How would this work in mobile? I have looked to see if you can include a mobile page as a tab, but I couldn't find much information.
Can you include a mobile app as a tab? If not then how would you make a user like a page before entering?
I will be using jquery mobile and javascript for most of the non back end work.
try this
You can subscribe to events . Following event will be raised when some user clicks "Like" button.
FB.Event.subscribe('edge.create', function(response) {
//redirect or perform some action
});
Source : http://developers.facebook.com/docs/reference/javascript/FB.Event.subscribe/