Chrome packaged app, user sing in - google-chrome-app

i'm writing a chrome packaged app, i'm using chrome.identity to get user email id from chrome browser. But, now if user is not logged in chrome browser i want to redirect him to chrome://chrome-signin/?source=0. To achieve this i tried using windows.open(),but page always open blank, so later i tired it with chrome.browser.openTab api with "browser" permission in manifest json, but it is throwing error.
What is the proper way to do it ,what am i missing?

You are missing (as of 2015-03-22) the following notice on the API documentation:
This API is in beta. It is only available to Chrome users on the beta channel and dev channel.
According to bug tracker, it is expected to get to stable soon, but possibly not in Chrome 42. The current Stable release is 41.

Related

Error when Initializing the Firebase component in Nativescript

I am trying to setup Firebase in my Nativescript app(Angular 2- TypeScript). However, It prompts me the error as below.
A valid Facebook app id must be set in the AndroidManifest.xml or set by calling Facebook.setApplicationId before Initializing the sdk.
Why should I provide the Facebook app ID for the start-up?
Any idea?
Much appreciate.
I have resolved by reinstalling the native-script-firebase-plugin without initialized the Facebook's Authentication for this error message "A valid Facebook app id must be set in the AndroidManifest.xml or set by calling Facebook.setApplicationId before Initializing the SDK"
As for the second error message "Google Play Service is required on this device", I just installed and upgraded the Google Play Service on the particular Android Emulator, and it works fine now.
In conclusion, is worth to check the Google Play Service it has been installed and upgraded to the appropriate version or not.

New preview for MSAL login redirect for Xamarin droid fails

I'm using Xamarin Forms in Visual Studio 2015 with the new MSAL preview v.1.1.0. The app calls the PublicClientApplication.AcquireTokenAsync which pulls up the login form in Chrome on the mobile device. The login is successful, but when it redirects I get the error message "This site can't be reached. The webpage at msal[my app id]://auth/?code=[auth code]... might be temporarily down or it may have moved permanently to a new web address.
When stepping through the app I see that the PublicClientApplication's redirect uri property is set to msal[my app id]://auth. And that is the same custom redirect uri that I entered into the Azure B2C tenant application.
Does anyone have any suggestions from that error of what I should check? Thanks.
OK. I figured it out. I missed the instruction in step 6b on the new sample app: https://github.com/Azure-Samples/active-directory-b2c-xamarin-native‌​. There needs to be a BrowserTabActivity added inside the application element of the AndroidManifest.xml file. See the link on github for specifics.
You should check out the Integrate Azure AD B2C into a Xamarin forms app using MSAL sample.
This issue generally has the following causes:
You haven't configured your RedirectURI correctly in your AndroidManifest.xml, double check that you've populated both the scheme and the host correctly, where scheme only includes msal[APPLICATIONID] without colon, slashes or 'auth' and the host while the host only includes 'auth'
You haven't configured your RedirectURI correctly in your MainActivity.cs, double check that it matches the full redirect URI, meaning that it does include colon, slash and 'auth' like so: msal[APPLICATIONID]://auth
You're missing the OnActivityResult method that calls the AuthenticationContinuationHelper.
You need to use Chrome which is not installed on all images inside your emulator.
Running in an Android Emulator
MSAL in Android requires support for Custom Chrome Tabs for displaying authentication prompts. Not every emulator image comes with Chrome on board: please refer to this document for instructions on how to ensure that your emulator supports the features required by MSAL.

Getting error message when entering Chrome Webstore Item Id to old marketplace app

When I enter my Chrome Webstore Item Id in the settings for my old Google Marketplace app that I'm trying to migrate from, I get this error:
"Vendor is not one of the owners of the current listing"
I am following the instructions given here (See Step 3.):
https://developers.google.com/apps-marketplace/v1migratev2#heading=h.5oojrk7tttmq
I am logged in as the owner of both of the apps. This user is also the owner of the Project I have set up in Google Developer Console (http://cloud.google.com/console).
The new Chrome Webstore app is published (but only since very recently).
What am I missing here?
Turns out the user was not the owner (only member) of the API project used for the old app.
Problem solved!

Chrome does not show network traffic of Silverlight RIA services messages after update to version 32.0.1700.76 m

Couple days ago Google Chrome automatically updated from version 31.* to version 32.0.1700.76 m. After that happened it does not show in DevTools network traffic request/responses of "application/msbin1" type anymore. These requests are visible in all other browsers' dev tools (FireFox, IE) and in Fiddler, but not in Chrome. Also Chrome's popup menu in this version is very glitchy.
I don't see the way to downgrade Chrome to previous version. Please help I don't want to uninstall Chrome.
Network traffic does not even show resources (XAP file) a page loads.
Example:
http://www.microsoft.com/silverlight/pixel-shader/demo/
This page loads file SilverlightShaderApp.xap, however dev tools of new Chrome's version never shows it in network tab.
I posted the question here, because it's developers question, not just chrome users.
I reported this issue on google chrome forum as well: here.
Possibly related bugs:
Issue 173844: Developer tools (Network section) don't show response of requests from flash applications
Issue 335502: XMLHttpRequests from Silverlight is not visible in devtools network tab
To avoid the bug, you could downgrade to Chrome 31. A fully offline installer can be downloaded from http://download.oldapps.com/Chrome/31.0.1650.39_chrome_installer.exe.
If you downgrade Chrome, don't forget to disable auto-update. Also, "star" the relevant issues on Chromium's issue tracker so you'll receive email notifications for progress updates. When the issue is fixed, enable auto-update again.
Often, starting a new version of Chrome renders a profile unusable for older Chrome versions ("Your profile can not be used because it is from a newer version of Google Chrome."). When you see such message on start-up, either delete your old profile (don't forget to make a back-up!) (you can also try to delete some files, according to various users, deleting "Web Data" and "Web Data-journal" is sufficient), or launch Chrome with a new profile directory (--user-data-dir=path\to\profile-dir).
For more information on user profiles, see http://www.chromium.org/user-experience/user-data-directory.

Once an inline Chrome app is installed, how do you run it?

Once an inline Chrome app is installed, ie chrome.webstore.install(undefined,success(),fail()); // where success() is called ... how do you have the website automatically run the app?
Similarly, if chrome.app.isInstalled==true how do you have the website run the app?
If you are launching it from an extension, use chrome.management.launchApp:
chrome.management API for chrome extensions https://developer.chrome.com/extensions/management.html#method-launchApp
Edit: At this point I don't know of any way to launch a chrome packaged app using javascript other than the above. If you inspect the chrome object in the console you'll see that neither the chrome.app or the chrome.webstore objects provide any launching methods for installed apps.
Make your app externally_connectable and grant your website permission to connect.
In the website's code, use chrome.runtime.sendMessage (or chrome.runtime.connect in case you need a more involved communication channel) to send commands to your app.
In the app's event page, add a chrome.runtime.onMessageExternal listener to process commands from the website. From there, you can call chrome.app.window.open() just as you would from an onLaunched listener.