I am developing a chat application. I connect my mobile phone for testing/debugging while developing. But I can't call backend node API from my mobile phone and have to use an emulator to do so and the emulator works very slow on my laptop. Is there any way I could call the API from my connected mobile itself while developing?
static const BaseUrl = "http://10.0.2.2:3000/";
I also tried by giving ip address wherein both pc and my mobile phone are in the same network as below-
static const BaseUrl = "http://ipv4 address:8000/";
Is there any way I can test my app while developing through connected mobile phone and call backend node api?
Go into your Command Prompt or whatever console you have. I am using windows, so I would open up the CMD and type in IPconfig. Go to where you see "IPv4 Address", and copy the numbers that you see there. THAT will be what you will need to use in order to get access to your server. Make sure that your phone and computer(or whatever you are running the server on) is on the same WIFI, or else this will not work.
Related
So im trying to access my React web application with ipadress and the portnumber 3000. I tried from another computer and from another phone. But the webpage keeps on loading and then tells me it can't reach the website. Why not?
Here is the github link for my project:
https://github.com/darja2001/collaborative-whiteboard-SR
Make Sure Your Computer and Phone or computer are connected to same
network.
Open command prompt and type ipconfig and Copy Ipv4 address.
In your phone or another computer open URL http://(Ipv4 adress):(port
number)
And you will get it
Else you can also use ngrok to access your react app anywhere.
I'm developing a simple app using WinJS for Windows 8 and 10. The app makes an Http request using Winjs.xhr.
I developed Web API hosted on a server with CORS enabled into that. Now, when I install my Win app in development machine (where API(s) are hosted), Win App is able to download the data.
On remote computer it fails. It executes error code block and returns readyState=4, status=0.
See detail description of problem I'm facing here
Finally Solved after spending my 3 days behind this searching everywhere.
I have been using http://192.168.4.134:9084/.... URL for sending the request. Initially, I had set app capability to Internet(client) and Internet(client & server). Later while rethinking I realized that since it's routed through network, I may also require Private Network (Client & Server) to be checked marked.
for now this has solved the problem, and created a question that "Do I need to check mark it when I will publish it for store?"
Another off topic question, How to sideload this app in all computers at once assuming that all those PCs are connected with single AD server under one domain?
I'm doing all my mobile development on my Mac OS X (Xamarin Studio or native languages), and using Parallels to work my Microsoft Azure Mobile Services backend in Visual Studio.
I've came to the point I want to test my Azure Mobile API, but I don't want to publish the service for every change and also debug it.
My problem is that I deploy to my IIS, express or local, works fine in terms of seeing the land page of the API on my Mac physical hosting machine but as soon as I click try it out I get an authentication message, check screenshot, I don't want any security to be applied right now.
How to disable it and test my Azure Mobile Service API from my Mac and eventually from my mobile projects.
[EDIT]
I should mention that from my VM Windows 8 the IIS is running properly and I can access the API without any username/password.
[EDIT 2] From #lindydonna answer.
The proxy seems to working fine since from my Mac I can call localhost/MyApiService and it goes to my Windows 8 VM Local IIS server.
So I have access the API server, all the controllers and their endpoints, you select an endpoint and get the sample screen, click try it out and fails to complete the HTTP request, 404/NotFound error. See screenshot.
The BODY of the GET request in this gist.
The above is a problem in the Local IIS settings since the same behavior applies in the Windows 8 VM environment when trying the Azure Mobile Service test page.
I made it to work using Postman, it returns JSON data properly, the iOS simulator doesn't seem to work with localhost. The MobileServiceContext throws an exception when trying to pull.
protected virtual async Task PullAsync (IMobileServiceTableQuery<TEntity> query)
{
try {
await Initialization;
IMobileServiceSyncTable<TEntity> entityTable = GetTable ();
await entityTable.PullAsync (typeof(TEntity).ToString (), query); // <-- The System.Net.WebException thrown here.
await entityTable.PurgeAsync ();
} catch (MobileServiceInvalidOperationException preconditionFailedEx) {
Debug.WriteLine(preconditionFailedEx.Message);
}
}
The problem is that your IIS Express instance is configured not to accept external network connections as a security precaution, and the Parallels VM is considered a different machine.
The easiest solution is to follow this Fiddler tutorial: Configure Fiddler for Mac, which will set up Fiddler as a proxy on the VM.
Then, on your Mac, you should modify your network settings and add a proxy setting that connects to the Fiddler proxy (http://docs.telerik.com/fiddler/Configure-Fiddler/Tasks/ConfigureForMac#configure-mac-). Your iOS simulator will pick up those proxy settings.
NOTE: the Fiddler setting opens up a port on the VM, which you should turn off once you are no longer using it, as a security precaution.
Also, according to this response (iOS 8 / Xcode 6 Simulator is not using HTTP Proxy anymore) you need to also restart your iOS simulator so that it picks up the new settings.
Leave the username blank and use your Application or Master Key as the password.
Also answered here: Authentication for Azure Mobile Web Services test pages
I am trying to get the tic tac toe demo from github working on my Chromecast after changing only the app id of the clients. With the default app id, I have been able to launch and play the game with an android client and a mac client.
I have:
Added my Chromecast device on the developer console (it has a green status indicator)
Set (via the Android Chromecast app) the Chromecast to send the device serial number
Verified that the serial number is correct
Verified with both the Android and Windows Chromecast apps that the serial# setting is retained
Power cycled the Chromecast
Setup an app id in the developer console (status is a grey circle labeled 'Unpublished')
Entered an internet accessible (not local) URL for the app id
Installed the receiver app at the above url and verified I can access it from a browser on the same network as the Chromecast
Also tried a local IP address (192.168.x.x) which I understand is supported as well
Modified the web client ttt.js file to use my app id (and verified app id is correct)
Modified the android client (GameActivity.java) to use my app id (and verified app id)
Did a git diff to make sure that I didn't inadvertently change anything else
Verified that my local copy of the source is the latest from git
When running the android client I can connect to my Chromecast but the Chromecast home screen shows "Brain Freeze", "We're sorry, but something could not load", "Activity aborted".
The logcat console in eclipse for the android device reports, "ConnectionResultCallback. Unable to launch the game. statusCode: 2002".
The web client on the Mac results in the same messages on the Chromecast and
'"reason":"CANCELLED","type":"LAUNCH_ERROR"'
on the web page output.
Is there a way to get more information from the Chromecast to indicate what is going wrong with the launch?
Follow Up
It turns out that the issue was in my network setup and not in my chromecast setup. After sniffing the network traffic with wireshark, I could see that the ARP request to retrieve the MAC address of my server was not getting a response. I am running my server on Virtualbox with a bridged adapter but needed to turn on promiscuous mode (allow all). Now the chromecast successfully launches the receiver app and I can play the tic tac toe game when using an HTTP based URL. (I need to fix the certificate for HTTPS).
Thanks Les, for the effort.
Did you verify that [x] send my serial # to Google has been checked (using the setup app)?
Also, did you wait 15 minutes and then restart your device (power cycle)?
I developed a test mobile app with PhoneJS, which access a node server ( localhost:3000) w MongoDB local DB...
Everything is working fine when testing in web browser or using Ripple simulator.
Then I deployed this test app using PhoneGap/Cordova ( 3.0.0 ) and installed it on my iPhone device.
Starting the app, the data are not loaded ( got the Loading icon... and nothing happen)
As my node server doesn't display anything in the console, I guess there is an issue in the .get Ajax call
is there any specific parameter to be added to the PhoneGap config.xml ?
( I have already : github.com/erwin/DataBound.Mobile.git included ..
Localhost is "this computer" so when you try to access localhost from your phone you don't get an answer because you don't have a server in your phone.
You have to use the local IP of the computer with the server instead using localhost if the server and the phone are on the same network