I am trying to launch twitter with selected user from my WP8 application and it does not work so good.
In my click event for the button that will do the job the code looks like this:
private void Button_Click_3(object sender, System.Windows.RoutedEventArgs e)
{
Windows.System.Launcher.LaunchUriAsync(new Uri("twitter:#user"));
}
When I click the button I get a message that asks if I want to search the app in the store but i have Twitter installed so what is happening.
Are you sure that the twitter app supports app to app coms? this might be your issue ill look into it later
Related
After I saved my PWA (Test App) built using Create React App to homescreen and launched the app in standalone mode on android using chrome and iOS using safari. Then in the app I initiate Firebase method signInWithPopup(GoogleProvider) the device asks me if I want to open the action with Test App or other browsers installed on device i.e chrome, firefox. If I select to open with my Test App the popup opens and I select the correct Google account.
Error: After the google account selection the popup closes without ever redirecting back to my Test App.
If I instead to open the Firebase method signInWithPopup(GoogleProvider) with chrome browser and not my Test App the popup opens for google account selection and after I select the google account the popup closes and redirects back to the Test App momentarily and then
Error: directs back to chrome tab where is asks for google account to select while showing a loading indicator, and just hangs there.
There are no console error or warnings that come up .
Note 1: The error of popup not closing and staying in loading also occurs if I add the App to homescreen on a Windows 10 x64 machine using Version 64.0.3259.0 (Official Build) canary (64-bit) and launch as a standalone window.
Note 2: The error also occurs for signInWithPopup(Facebookprovider) and signInWithPopup(Twitterprovider) Also If I uninstall app from Homescreen and launch purely in browser the signing in OAuth flow works fine.
Note 3: After further troubleshooting it seems the error more specifically occurs when user input is required in the OAuth popup.
i.e If for example if user has previously given the Test App permissions through Facebook, the flow works fine and the popup closes. Also if only a single google account is detected and it has previously given app OAuth permissions then the popup works as it should. But If multiple google accounts exists on device then the user has to input a selection of which account to sign in through --> this leads to the previously mentioned error again. And using Twitter OAuth the error occurs every-time because twitter popup requires user to select Authorize App every-time.
UPDATE: I believe this may have something to do with google chrome recent changes to OAuth from Webview.
GIf of the error on windows machine: notice the popup for twitter auth never closes, even after authorizing the app, same thing occurs for google and facebook OAuth.
Reading Google documentation:
https://firebase.google.com/docs/auth/web/google-signin
Authenticate with Firebase using the Google provider object. You can prompt your users to sign in with their Google Accounts either by opening a pop-up window or by redirecting to the sign-in page. The redirect method is preferred on mobile devices.
So you have 2 options:
firebase.auth().signInWithPopup(provider)
firebase.auth().signInWithRedirect(provider)
The second must be used when you are into a mobile device.
So the question is: How I detect when I running into a mobile device ?
Code must be something like:
if ( isInMobileDevice) {
firebase.auth().getRedirectResult().then(function(result) { .... }
}
else {
firebase.auth().signInWithPopup(provider).then(function(result) { .... }
}
Sorry, Im still searching the way to get the correct value (true/false) into "isInMobileDevice"
you can stablish in the manifest of the app "display:standalone" then detect the launch mode like this
function isRunningStandalone() {
return (window.matchMedia('(display-mode: standalone)').matches);
}
...
if (isRunningStandalone()) {
/* This code will be executed if app is running standalone */
}
Good news, fixed in Chrome Canary
https://bugs.chromium.org/p/chromium/issues/detail?id=771418#c84
Let me start off by saying this is for a local web site and a local Android tablet running Tasker Apps and custom Android Apps created with Flash CS6. Not for general users.
I am using Tasker and a Motion Detection App that will wake my tablet if someone walks by. I have code in my HTML 5 web site that tests for user interaction and if there is no interaction it will reset the web site to the first page after X amount of time.
What I want it to do is also let Tasker know the user interaction information too so it can reactivate the motion detector and dim the screen if there is no user interaction. I have looked and I cant seem to find a Tasker profile or Tasks that will monitor if the system is idle.
I have seen some web pages showing that a Web page can send an Intent message to open an App but what I want is to just send Tasker a simple message either 0 or 1.
I am using an HTML5 Kiosk browser compatible with chrome but not the Chrome Browser.
My question:
1. Is there any way to send an HTML5 Intent message to Tasker?
2. Or is there a better way to do this from within Tasker?
3. Or is there an app that monitors user interaction and will send an intent message that Tasker can read?
4. Or is there a way for Flash CS6 (Android app) to send an Intent for Tasker?
I am not looking for Android code because I don't program in that language.
Thank you for the help.
Try using the Tasker Network Event Server. You could send a "still alive"-message to the Tasker plugin over http with javascript, when a user clicks on a link or anywhere else on the screen inside the browser. Tasker could dim the display if there is no click for a few minutes...
(https://play.google.com/store/apps/details?id=bidoismorgan.httpevent&hl=de)
I have added Facebook Log-in and Log-out functionality in my android app using Facebook SDK4.0.
I am having one particular problem for log-out from the native Facebook app.
My app is for an event where hundred users need to log-in and install event app to share their event experience. So, i need the log-in and log-out functionality to be as smooth as possible.
I am using Facebook new android SDK 4.0 log-in, log-out functionality.
I have added this code in activity function and destroy function:
FacebookSdk.sdkInitialize(this.getApplicationContext());
LoginManager.getInstance().logOut();
I have investigated during the log-in process when the log-in is successful and the app installation is done, Facebook SDK caches the current users login session for the native Facebook app. When the user logs out from my app, the user is still logged-in into his native facebook app.
This makes my event app journey very painful and time consuming. Because after every user's log-in and installation process from my app, i have to revisit the native Facebook app and then need to log out them manually from the native Facebook app.
This scenario is not the perfect solution for a busy event app!
Is there any one who also experienced similar or any idea, how the log out functionality can log out users from both native Facebook app and my app?
Thanks for your help.
Cant you use AccountManager class from Android to remove the Facebook account?
public static void removeAccount(Context context){
AccountManager am = AccountManager.get(context);
Account[] localAccounts = am.getAccounts();
for (int i=0; i<localAccounts.length; i++){
if (localAccounts[i].type.equals("com.facebook.auth.login")){
am.removeAccount(localAccounts[i], null, null);
}
}
}
I don't think it's possible to log the user out of the main facebook app from your app.
We're developing an application which is receive toast notification when app is not active.
But it's seem like Mvvmcross Core have taken control of the application and control the RootFrame. So when a toast notifcation comming, user click in that toast and the application doesn't launch exactly to the uri was set in the push, it launched to page that was set in Core when App Start.
I would ask if there's anything solution for this case ?
Thank you very much :)
This scenario is covered by "Custom app starts" - it's covered for WP in https://speakerdeck.com/cirrious/appstart-in-mvvmcross - there's also some information about custom AppStart in the wiki on http://github.com/mvvmcross/mvvmcross/wiki
I have a Chrome Packaged Web app (which is required as it needs to access the Serial Port), and I'd like to be able to launch it from my website (with some data) when I click on a link/button on that website.
It'd be even better if it could detect if the user wasn't running chrome or didn't have the web app installed and could direct them to the right place...
Are there any examples? It seems like an obvious thing to want to do, but I'm really struggling to find anything...
To launch an app you can use url_handlers, a new feature recently landed (should make Chrome 31). You can pass data in the URL.
You can check if an app is already installed, and initiate the install if not, by using the chrome web store's inline install functionality.
Found a better solution to this problem.
In #Vincent Scheib solution you have to redirect the user to /some/url, or open a new window (that can be actually blocked as popup). All of this it's not so good from an UX aproach.
My solution is to create the app and configure the externally_connectable. You have to pass the url domain of the web site that will try to open the app. For example:
"externally_connectable": {
"matches": ["*://developer.chrome.com/*"]
}
Then, in your packaged app in your background script, you can do something like this:
chrome.runtime.onMessageExternal.addListener(function(message) {
if(message.launch){ //This parameter will be passed in sendMessage method below
chrome.app.window.create("main.html");
}
});
Finally, to trigger the app open you have to send a message using your packaged app id. For example:
chrome.runtime.sendMessage("mdoedhlejmepngilmgoenbhmipoclckb", { launch: true });