I am trying to make an app for personal use that has the same functionality of the chrome sender sample app (https://github.com/googlecast/CastHelloText-chrome)
The only thing I am trying to change is the "SAMPLE APP" at the top of the casted screen. I have registered my device via the console and created a new custom receiver in this receiver i have included a URL for a Google drive HTML document I made (Just a black HTML page: https://www.googledrive.com/host/0B7IBRkdKpfYSRmZCYzJaTUpDamM
I then took my newly acquired application id and injected it into the code replacing the Googles sample app ID... I am using Mongoose to host the webpage locally and after I type a message I get no option to connect to my cast device.
Also I have entered my computers local IP and port number (where I am hosting the sender app) under sender details (chrome). I have tried Google's sample code and it works fine the only thing I have changed is the application ID.
Thanks!
I tried the same thing a week ago and the google drive's trick (to host an html page) doesn't work for me.
Your receiver app (your black html page) need to be accessible online, otherwise it's impossible to connect your sender app to your cast device.
So you must put your html file on a server. Do you have a personnal server to host it ?
I pushed your html file on my server and it's connected to a new App ID. Can you try with this App ID : E46DA3D7
If it's working then your probleme is really Google Drive hosting.
Let me know ;)
Related
The documentation link: https://developer.squareup.com/docs/pos-api/build-mobile-web#step-5-test-your-code suggest straight forward code like this:
<a href="intent:#Intent;
action=com.squareup.pos.action.CHARGE;
package=com.squareup;
S.browser_fallback_url=https://my.website.com/index.html;
S.com.squareup.pos.WEB_CALLBACK_URI=https://my.website.com/index.html;
S.com.squareup.pos.CLIENT_ID=sq0ids-yourClientId;
S.com.squareup.pos.API_VERSION=v2.0;
i.com.squareup.pos.TOTAL_AMOUNT=100;
S.com.squareup.pos.CURRENCY_CODE=USD;
S.com.squareup.pos.TENDER_TYPES=com.squareup.pos.TENDER_CARD,com.squareup.pos.TENDER_CASH;
end">Start Transaction</a>
I tested it and it does not open any link, my devide already have app installed.
When I try this code:
Take a QR code 2
It open play store app with squareup pos app information, I need to directly open the app and not play store screen of the app, is there any way?
*UPDATE:
I got transactions to work after adding S.com.squareup.pos.LOCATION_ID={{ my_location_id }}. The location ID can be found in Square Developer Portal > Locations. Also if the POS app is passcode protected, you have to open and login with passcode before sending transaction.
*END UPDATE
I've been working through this same issue. I still haven't gotten a transaction to work, but have at least gotten the app to open.
Make sure the CLIENT ID is your production application ID. NOT sandbox.
The WEB_CALLBACK_URI needs to match the Web Callback URL defined in your Square Developer Portal > Point Of Sale API.
I hope this helps. If you do figure this out and get transactions to work, please post your solution for me and others who are sure to run into this issue since the documentation is lacking.
I am unable to make a successful connection with the square reader via android request after following documentation found at https://docs.connect.squareup.com/articles/web-api-android
It seems straightforward, but the connection links end up crashing the app or causing it to restart without any error reporting or callback information sent to either S.browser_fallback_url or S.com.squareup.pos.WEB_CALLBACK_URI.
Sample link activated on dev server (127.0.0.1) is: intent:#Intent;action=com.squareup.pos.action.CHARGE;package=com.squareup;S.browser_fallback_url=http://localhost:8080/tb/square;S.com.squareup.pos.WEB_CALLBACK_URI=http://localhost:8080/tb/square;S.com.squareup.pos.CLIENT_ID=secret;S.com.squareup.pos.API_VERSION=v2.0;i.com.squareup.pos.TOTAL_AMOUNT=150;S.com.squareup.pos.CURRENCY_CODE=USD;S.com.squareup.pos.TENDER_TYPES=com.squareup.pos.TENDER_CARD,com.squareup.pos.TENDER_CARD_ON_FILE,com.squareup.pos.TENDER_CASH,com.squareup.pos.TENDER_OTHER;S.com.squareup.pos.REQUEST_METADATA=5a982466e7b46;S.com.squareup.pos.NOTE=This will be a note!;end
For the CLIENT_ID I was instructed to use Application ID found at https://connect.squareup.com/apps/
Firmware on Contactless, Chip reader is 2.9.36 which is connected to the android device via bluetooth.
--edit--
First time through
https://ibb.co/kSBUYH
https://ibb.co/fyUGDH
Second time through
https://ibb.co/duFZ0x
https://ibb.co/i1MUYH
To bring this out of the comments, the issue was missing the web callback URL being registered in the Square Developer Portal.
You want to be sure to register your callback URL(s)
In order for Square Point of Sale to accept a request from your website, Square needs to verify that you have registered a web callback URI for the application in the Application Dashboard.
First, go to the Application Dashboard, then click on the Point of Sale API tab of your application's settings. Under the Web section, specify your app's web callback URI under the corresponding field.
If your transaction does not succeed for any reason, you should be receiving a error back to you.
I am new to Android and am confused on what to put for the URL fields when registering a new client with the Instagram API using their web form.
I'm specifically confused as to what to put for these fields:
Website URL
Valid Redirect URIs
I am making an Android app and it doesn't have a website, so what am I supposed to be putting here?
In my search for an answer that made sense to me, I found this: http://oferei.com/2013/06/serverless-instagram-authentication/
In short, this is what one would need to know about how to fill these fields if they are registering an app that does not have its own website:
Website URL: it doesn't matter what value goes here, I used localhost
Redirect URIs: The article above specifies a custom URI scheme, but this is not supported w/ the Instagram API anymore. However, I did see that also using localhost would work here as well in this article: http://jelled.com/instagram/access-token
Not sure if that is the best practice, but it is a way to get the client ID for an Android app.
I'm trying to create an Android (2.2) app using Phonegap (version 1.9.0) and jQuery Mobile (1.1.0). Specifically, the app is supposed to send a GET request to an existing WCF REST service and retrieve JSON data (a list of folders) and display each item as an option in a select drop down menu.
Right now, all this works as it should when I use the desktop browser. The WCF REST service sends the correct response, the browser renders the page correctly and puts the options in the select menu as I want it to. However, when I use the following code in Android app using Phonegap:
$.getJSON('http://xxx.xxx.xxx/MobileService.svc/GetFolders?callback=?', null, function (folders) {
$.each( folders, function( i, folder ) {
$("#folders").append("<option value='"+folder.Id+"'>"+folder.Name+"</option>");
});
$("#folders").selectmenu("refresh");
});
...I get the error message when I boot the Android app (debugging on physical device):
Connection to the server was unsuccessful. ("file:///android_asset/www/index.html")
When I comment out the above $.getJSON code, the app loads fine, but the select menu is unpopulated.
I've also noticed that apparently because Phonegap uses the "file://" protocol, it is not affected by the "same-origin policy" that the "http://" protocol is...I had been using JSONP when I was working with the browser, which is why I have the callback. I don't think this should be the reason why it is failing, but I dont know. Any help will be greatly appreciated!
Things I've tried:
Changing the access origin to ".*" in the cordova.xml
Adding 'super.setIntegerProperty("loadUrlTimeoutValue", 60000);' to the activity
You can try to set your cordova.xml to "*" instead of ".*" as seen on the Getting Started Guide
Or even better:
http://xxx.xxx.xxx
It turns out in my particular case that the issue boiled down to the mobile phone being on guest wifi network that didn't have access to the network where the REST service was hosted so the connection was being blocked.
Hope that can help someone
I am new to rhomobile so let me begin.
I am able to view the device rho-log file on my android device. There is a few options when the window opens "Refresh,Clear,Send,Close".
Question 1. When I press send where does it get sent to?
Question 2. Is it possible to send it somewhere so I could download it as .txt file on a desktop and view it.
Thanks in advance.
In the rhoconfig.txt file of the root directory, there is a logserver property that points to a URL where the log will be posted to, logserver = 'http://yourloggerapp.heroku.com'
You can find the logging application to stand up on Heroku (quickly, but can be deployed anywhere) here. This application is set up to hook into an Amazon S3 server, but again, can be modified to store the log files anywhere.
You can set this variable at runtime:
Rho::RhoConfig.logserver = 'http://yourserver.com/logs'
Or this fixed parameter in rhoconfig.txt:
logserver = 'http://yourserver.com/logs
When the user press the "Send" button your server will receive a POST request in this URL:
http://yourserver.com/logs/client_log