I am building a console and have successfully rendered my iframe:
gapi.load('gapi.iframes', function() {
var options = {
'url': 'https://play.google.com/work/embedded/search?token=' + data + '&mode=SELECT',
'where': document.getElementById('container'),
'attributes': { style: 'width: 950px; height:500px', scrolling: 'yes'}
}
However, when I select an app using the provided SELECT button, it only returns the expected payload. I assumed that the iframe would do the heavy lifting here but now know that I need to build the logic. Can someone point me in the rightt direction here for approving the app via SELECT button? Is there a set of iframe events that I should be writing this with in mind? I'm completely lost since documentation here https://developers.google.com/android/management/apps#select-button_1
is extremely vague. Has anyone had issues with this before?
Thanks!
The documentation for the select button indicates that “You need to specify the action that takes place when the IT admin clicks this button”. It is up to the EMM to decide what to do next. You could prompt the user to approve the app on play.google.com/work
For example, you need to approve dropbox. You need to login with your enterprise account then go to this link https://play.google.com/work/apps/details?id=com.dropbox.android and then approve the app.
Or you could prompt the user to add the application to a policy, which automatically approves the app for use by the user’s enterprise.
You may refer to this link for more information about handling iframe events.
Related
I have a number of console application that use winforms to gather simple input from the user (Do this and click "OK", Did this happen click "Yes" or "No" That kind of thing) There is a new requirement that we provide the option to gather the simple input from the user on a handheld device that runs Android.
I had hoped to convert our winforms to Xamarin forms that could be used either locally or be sent to the handheld device. This is not my area, really, so it may be that I am not looking at the problem in the right way.
The system running the console application is usually a laptop or maybe a desktop.
Does anyone have any advice?
You can use App Center Analytics Events Metrics to track user event.
Here is the document for Xamarin:
You can track your own custom events with up to twenty properties to
understand the interaction between your users and the app.
Analytics.TrackEvent("Video clicked", new Dictionary<string, string> {
{ "Category", "Music" },
{ "FileName", "favorite.avi"}
});
I'm testing a functionnality on a website that allows the user to fill a form. At a moment, the users needs to click on a button, which triggers an Ajax loaded modal that allows him to upload a file. However, when I trigger the button, Behat doesn't seem to "see" the modal window.
Maybe I should precise I'm in a Drupal 8 environment, but I don't know if this changed anything
Just so we're clear, I'm not talking about an alert, but this kind of modal
So far my tests looks like this:
Scenario: Creates a stage test with two sessions
Given I am on "/user/login"
And I fill in "user#user.com" for "name"
And I fill in "password" for "pass"
And I press "Log in"
Then I should get a "200" HTTP response
And I should see "User Name"
When I go to "/node/add/stage"
Then I should get a "200" HTTP response
And I should see "Add content CISIA Stage"
When I fill in "Test Cisia Stage" for "edit-title-0-value"
And I press "Select files"
Then I should see "Upload files" <-- fails
And I should see "Click or drop files here to upload them" <-- gets ignored but is likely to fail too
I can't find anything modal-related on SO or Google in general, only about small message alerts, and people talk about objects or functions I don't have (such as getWebDriver())
I also tried to find the modal's content by myself by doing so:
public function iShouldSeeAModalWindow() {
$element = $this->getSession()->getPage();
$modal = $element->find('css', sprintf('div:contains("%s")', 'Upload files'));
if($modal) {
exit('Yaaaay!');
}
else {
throw new Exception("No modal found");
}
}
However I got no luck so far.
What should I do?
You have an iframe and you need to switch to it.
Use something like this:
$this->getSession()->getDriver()->switchToIFrame('iframe_name');
I think you should also consider to write your scenario on a high level basis and also use page objects extension to avoid getting long scenarios that are hard to maintain and unreadable and also to reuse as much code as possible.
Follow Behavior Driven Development methodology.
Having integrated PayPal Express for one of our clients (in ASPX WebForms) and received some under-documented integration steps (https://developer.paypal.com/docs/classic/express-checkout/in-context/integration/) for bolting on the so-called in-context integration, we're facing the following issues:
1) The document asks for the Merchant ID, which, for a sandbox can't be found, wondering if it's the same as the Username in the API credentials
2) I've set up an aspx page for the express checkout to do the posts and gets, which only requires the order id (this would be /checkout_paypal_nvp.aspx?oid={OrderID} below). Judging by the example code PP provided, we're guessing this is what needs to be passed in, but on clicking the 'Check out with PayPal' button, there's only an about:blank popup appearing, and the page doesn't get executed.
Also wondering if 2) is caused by using the wrong Merchant ID in 1), hence the double question (sorry).
Screenshot for ease of visualisation:
Relevant code:
<a id="lnkPaypalCheckout" href="/checkout_paypal_nvp.aspx?oid=81774"></a>
<script>
window.paypalCheckoutReady = function () {
paypal.checkout.setup('{API_username_here}', {
container: 'lnkPaypalCheckout',
locale: 'en_GB',
environment: 'sandbox'
});
};
</script>
<script src="//www.paypalobjects.com/api/checkout.js" async></script>
Many thanks in advance.
Answers to your issues:
The merchant ID (you can found under My Account > Profile > My business info > Merchant account ID) can be used for both production and sandbox environments.
Please make sure "/checkout_paypal_nvp.aspx?oid=81774” returns with the correct PayPal flow url. If you comment out the two script sections which for in-context setup, you should see the PayPal flow being loaded in the full page. That will be your first step before adding in-context setup.
I am using Shield UI ASP.NET Charts to show registered (and logged in) users informations regarding their accounts. I went through the documentation, but can't find a solution to the following thing: is it possible to invoke an immediate save once the user clicks on the export icon?
I am enabling the save so:
<ExportOptions AllowExportToImage="true" AllowPrint="false" />
Are there any edditional parameters to be set?
There are no additional properties to be set/enabled because it is not possible to invoke an immediate save/export of the chart's image (skipping the filename and location choices).
However you may take use of the additional tooltips:
ExportTooltip="" or/and PrintTooltip=""
to provide the users some more information if needed.
I setup my website to use google+signin.
For the login google provides a more or less nice, translated button to log in.
The code
<span id="signinButton">
<span
class="g-signin"
data-callback="signinCallback"
data-clientid="CLIENT_ID"
data-cookiepolicy="single_host_origin"
data-requestvisibleactions="http://schemas.google.com/AddActivity"
data-scope="https://www.googleapis.com/auth/plus.login">
</span>
</span>
is expandet to :
To follow googles developer policies, the app must provide a way to delete the association between your app and the account. (From: google account logout and redirect)
The implemenatation is easy, but as far as I understood does Google not provide a (styled/desigend) disconnect button. Or did I miss it?
It should look similar/like the login button.
To follow the policies, you have to provide a way for your user's to revoke your app's access to their information and account. This is different than logging out.
See how to provide that disconnection and revoking of access
After the user disconnects, then you would perform the clean up steps required by the terms.
Here is an example that uses jQuery from the documentation. It assumes that you stored your access token in the global variable access_token:
<script type="text/javascript">
function disconnectUser(access_token) {
var revokeUrl = 'https://accounts.google.com/o/oauth2/revoke?token=' +
access_token;
// Perform an asynchronous GET request.
$.ajax({
type: 'GET',
url: revokeUrl,
async: false,
contentType: "application/json",
dataType: 'jsonp',
success: function(nullResponse) {
// Do something now that user is disconnected
// Start account clean up
},
error: function(e) {
// Handle the error
// console.log(e);
// You could point users to manually disconnect if unsuccessful
// https://plus.google.com/apps
}
});
}
// Could trigger the disconnect on a button click
$('#revokeButton').click(disconnectUser);
</script>
<button id="revokeButton">Disconnect</button>
Edit:
If you'd like resources to assist with customizing the look of a disconnect button to match up with the look of the sign-in button, you can use the resources that are provided on the Google+ Platform branding guidelines page. On that page, you can download PhotoShop source files that you can use to create a disconnect button for your site. You will need to follow the instructions on that page to comply with the branding guidelines.
How sites choose to offer a disconnect option is up to the designer. One site might prefer a disconnect link and another to use a button, the design is up to you.
FYI even though their rules do say you must provide a way for a user to revoke access, it doesn't force you to make it easy for the user to do so. Most sites tend to tuck away the ability to disconnect in a user settings menu somewhere, keeping it as a text link. You really don't want users to disconnect and leave forever that easily.
If you're still bent on having the button though, have a look here for a CSS solution
https://developers.google.com/+/web/signin/#customizing_the_sign-in_button
Customize as necessary. Good luck!