Ionic 3 : How to add the app to the share menu? - ionic-framework

I am looking to receive the URL and other content from pages visited in the browser. How can I achieve this with Ionic 3? It would consist of clicking the share button in the browser, choosing my app, and then being able to save the data to my app.
This is what it looks like after you click on your app in the share menu. (a different app) but I want to create an interface like this which sends data to the user:

Related

How can I have a separate setup process and home page in Flutter?

I am currently building an app that has a first page with two buttons: 'New users -->" and "Existing users -->". The goal is for new users to click their button and go through a setup process that ends with their home page that is saved when the app is closed. The next time a user opens the app, once they click their existing users button, I want the app to open to the home page the setup process ends at. How do I achieving this? Any help would be appreciated!
You can use GoRouter (from flutter team) plugin for handling this scenario and navigation.
https://pub.dev/packages/go_router
While initialising the router, you can provide redirect where you can handle if user should be navigated to the setup screen or home screen.
Use database / shared preference / secure storage to store whether the setup process was completed and what data was saved.
Now if you are using any framework like GetX or something you can easily navigate to the desired pages or you can use Navigator.to.... if not using a framework.
you can use something like
bool isSetupDone = // get from storage
the use this Boolean value to either alert, show/hide button/ popup message accordingly as per your usecase.

Share my objects using a link - ionic3

I'm imagining this situation: I have my app opened on my device. I've just created a new element (object) in my app, for example a new Film like this
film = {
title: 'Shark 3',
subtitle: 'the revenge',
date: '12-11-2019',
plot: '...'
};
and I've saved it in my local storage. Now I want to share it on socials (WhatsApp, Facebook...) generating a link to this object. By clicking on this link I want my app (or the app store if it is not installed) to open. In case my app is installed, it should display a page with the film's information.
Is it possible? How to do this in ionic?
The data you want to present is stored within the app and so available on every device your app is installed, I guess? Or is it data loaded from a backend?
What you want to do is called a Deep Link. This means clicking on a links opens your app and redirects the user to a specific page depending on the link.
This is possible with Ionic and the DeepLink native plugin.
But there need to be done other things outside your app to make it work. You need to register and verify your domain with Google and/or Apple.
And be aware testing this is very uncomfortable. It will only work with signed packes. So just running ionic cordova run android won't work, you will have to go the whole way creating a signed package as you need to do when you're going to publish it.
Here is a Blog article describing the functionality.

facebook app allows only one tab?

i have a business page ob facebook and i want to create 3 tabs for offers, best selling, promotions.
I have create on my website 3 pages without header and footer and show only the main content.
To do this
I have create an app on facebook developers.
i created my first custom facebook tab that show contents of my
webpage which working fine.
When i tried to created another tab clicking add platform the Page Tab is grey meaning that i cant create another tab.
This means that the app can have only one tab ?
and if i want to have 2-3 custom tabs whats the solution ?
Thanks
This means that the app can have only one tab ?
Yes.
and if i want to have 2-3 custom tabs whats the solution ?
To create 2-3 apps.

Reloading the existing browser Tab when the user tries to open same in GWT?

I have a one GWT application which contains 3 modules. The user can switch from one module another module by using buttons.
The user can access the modules in the following ways:
1) The user can enter the URL in the browser like below:
Ex: http://localhost:1045//app1
2) Clicking on the button once any of the 3 modules are already opened using above stpe 1:
On button click: Window.open("http://localhost:1045//app2", "app2Window", "");
So the app2 will be opened in the another tab.
Now If the user opens app1 by entering the module url in the browser and then click on the button to open the app2
in the new tab.
So We have two tabs with two modules(app1, app2).
Now the actual issue is:
If the user clicks on a button(to open "app1") in the 2nd tab with "app2". The new tab is opened instead of loading the
existing tab with "app1".
Steps:
As per the above mentioned steps:
1) User can open "app1" by entering the url in the browser(http"//localhost:1045/app1)
2) User clicks on button in the opened "App1" to open "App2" in the new tab.
3) From the "App2", the user can open "App3" by clicking on the button.
4) Now if the user clicks on the button in "App3" to open "App2" which is alreay opened. that time
new tab wont be opened the existing tab will be reloaded.
So the mentioned scenario is possible. but the problem here is, the browser is not able to reload the
(tab) module which is opened by using "entering URL".
How to avoid opening the new tab? I saw the window name will differentaiate the tab is opened or not?
But I was not able to find the method to name the window when the user enters the url in the browser?
How Can I achieve this GWT?
Window.Location.assign(String url) ?
GWT can do everything that Javascript can do, and can't do what is not possible in JS.
Seems like it is not possible to pick and choose which tab to open a link into (discussion here).
What you can do is to create your own container for you three modules or compile all three of them into one GWT application able to easily switch between them and never reload.
EDIT:
One of the great things about GWT is that you can create one-page-apps, and switch between functions, screens or applications with no problems. Actually GWT has a MVP implementations that is well done and serves this purpose ( MVP examples ).
I would strongly suggest to abandon the multi-window (or multi-tab) design and embrace the GWT nature. It will be painful at first but in the long term this design choice will make your application more solid and your code better.

Facebook Tabs - Difference between apps vs tabs

I have recently inherited the Admin/developer role for our page and I am new to Facebook Development. I am attempting to add a new tab to our page and the only option I am getting is to build an App but all of the App options I come across make it sound like it's trying to do more than what I want it to do.
What I want to do is produce a tab on the page. That will link to an app/canvas displaying an image that the user can click to go to our offer.
So far I've built a basic app with Display Name, namespace, Page Tab Name, Page Tab URL and a Tab image. but when I refresh my page I do not get a new tab and when I preview the app page it is not the format I am looking for.
I've tried going through the tutorials but since this is all new to me I ahve yet to make any sense as to what I'm looking for or missing. Could anyone let me know what app format I am looking for? Or am I in the wrong place entirely?
You need to explicitly add an app to a page. Not sure if you've tried it or not but navigate to:
https://www.facebook.com/dialog/pagetab?app_id=YOUR_APP_ID
&display=popup&next=YOUR_PAGE_TAB_URL
Replacing YOUR_APP_ID with your app id and YOUR_PAGE_TAB_URL with the url you set for you page tab.