I am new to android and using Android Studio 2.3.3 on Windows 10.
When I run android emulator, I choose Galaxy_Nexus_API_25 with telnet local host 5554, I want to adjust the internet speed by network speed edge instruction, but after using telnet it says that I should type auth <auth_token> and the key is in the location which it refers.
But when I go to that location and open the file .emulator_console_auth_token and copy and paste it like this: auth <mykey>
, it says:
"KO: authentication token does not match ~/.emulator_console_auth_token"
Can anyone help me?
I had this same issue recently. I resolved it by deleting the .emulator_console_auth_token file and restarting the emulator to generate a new auth token which worked.
I believe it is caused by using multiple emulator and the auth key doesnt get updated for the 2nd device so you end up using an auth key meant for a different emulated device.
Related
I downloaded the sdk from here, created an application but when i run the app the logcat notifies:
Error 401, Failure: You are not authorized.
I tested the Bluemix app with the sample code you can find here, obviously switching the default parameters with my app's ones.
Solved.
I downloaded the April jars, the most recent ones. That worked.
A 401 error sounds as if the Mobile Application Security (MAS) is not set up correctly. Could you try going to your mobile back end on Bluemix, clicking the MAS service, turning the "Enable Client List" switch to on, and then adding your bundle id under iOS? Additionally, confirm that you've copied the client-id & client secret correctly into the properties file for the application.
I have a phonegapp App running on an Android emulator and I would like to access my ASP.NET MVC 4 server in order to make a log in request.
The problem is that my Emulator can't access my IIS application.
I tried this :
Use 10.0.2.2:port to refer my web site from the android navigator.
Use my local ip address (192.168.0.1:port)
Disabled my Firewall
Change bindings in my configuration file in IISExpress
Despite of that, i've got a "400 bad request error invalid username"...
Can anyone help me ?
I had the same problem. the port number in url isn't recognized by android emulator. so wehn I open visual studio project settings, I changed the IIS settings to have a virtual directory under the local host (for example "localhost/testPorject") instead of "localhost:PortNumer". this worked and the emulator recognized it.
For development I would like to use the calendar in an Android 4 emulator but the option "Calendars to display" is empty and I am not able to add an account with calendar.
I found several solutions but none of them worked:
m.google.com
Like adding account with m.google.com as server but it keeps telling me "You don't have permission to sync this server. Contact your server's administrator for more information." because it is disabled for new devices.
CalDAV
In the link above they are talking about using CalDAV but how without appstore? I installed the caldav4j apk to use CalDAV but it does not run. logcat tells me java.lang.NoClassDefFoundError: android.provider.Calendar$Events.
Add Google Account
If I add an normal Google account I can only select mail for sync, calendar is missing.
Android x86
Maybe I could avoid this problem by using Android x86 like suggested here as performance booster.
Got it working using AndroVM.
Download VirtualBox and an AndroVM image with gapps. Like androVM_vbox86p_4.1.1_r6.1-20130222-gapps-houdini-flash.ova. vbox86p is for phone and vbox86tp for a table with phone functions.
Follow the configuration tutorial: Import Virtual Machine, activate network
Start the VM and enter your gmail account during setup.
For debugging with eclipse: run AndroVM Config app (on mobile desktop) to get the IP and on the host: adb connect [IP]
Hareware keys: ESC = back, F1 = menu, Pos1 = home/unlock, End = lock
Btw: AndroVM is a speed rocked compared to the normal emulator.
I build a worklight application. create android app and test this application with local machine , its working fine with emulator.but when i try to test this application with android tablet it through error "The Application failed connecting to the service".
I try to find application-descriptor.xml and fix localhost to 192.168.1.1:8080
my ip local machine,but it not working.In my tablet I can't to go to 192.168.1.1:8080/console/index.html
Can anybody help me regarding this issue. how can i fix this one in my worklight android application and run it on my android tablet
Some things to check:
- Are your tablet and your worklight development machine on the same wireless network? (they need to be!)
- Does your computer have a firewall on it which may need configuring to let the traffic through. As a test you could briefly disable the firewall and see if you then have access (subject to disclaimer of the risk involved in disabling the firewall). A test without disabling the firewall would be to try accessing 192.168.1.1:8080 from another desktop/laptop machine on that same subnet.
Check ip in local machine ipconfig ( field Adaptador de Ethernet )
Set this IP in field host name configuration server.
Rebuild
The other test is to check the direction in other machine, in the same network.
In a command window, run ipconfig and copy the IPv4 address. This is the IP address you need to place as the value for worklightServerRootURL in the file application-descriptor.xml.
The IP address you are usingnow does not look to me like the correct (public) IP address that you need to use. Try my above suggestion.
How about adding "192.168.181.1:8080" in application-descriptor.xml?
I would suggest the following debugging steps:
a) Go to your device browser and browse to http:
//xx.xx.xx.xx:8080/console
-> If this doesn't work, you have an obvious ip address issue. Then you have to figure out why, maybe you have a Symantec thingy that blocks any incoming traffic to your desktop - which they do. You should do an explicit allow.
b) If a) works, then you need to check in your code to make sure your app does try to connect to the server at startup. Or else the app will only try to connect when it calls adapter.
Now, go to your code. open the initOptions.js file. I typically, would set connectOnStartup to true, but also enable the onConnectionFailure so that it runs offline when there is no connection.
var wlInitOptions = {
// # Should application automatically attempt to connect to Worklight Server on application start up
// # The default value is true, we are overriding it to false here.
connectOnStartup : true,
// # The callback function to invoke in case application fails to connect to Worklight Server
onConnectionFailure: function (){wlCommonInit();},
// # Worklight server connection timeout
timeout: 2000,
};
3) Make sure you have the right URL in the application-descriptor.xml
<worklightServerRootURL>http://xx.xx.xx.xx:8080
</worklightServerRootURL>
If you are using the consumer edition (the real purchased WL), your URL would be.
<worklightServerRootURL>http://xx.xx.xx.xx:9080/worklight
</worklightServerRootURL>
(Note no space in between those URL - it's just this website putting a space there when there is a line break)
Redeploy your code to the WL server and create a new APK file. Update your device with the new APK file.
4) Do a test with the console again, you should see the console. Click on the Preview app link, it should work.
5) Now that you have updated your code on the server and the APK file. Open it up again on the device.
Do you still see the error message?
If things still not work.
6) Go to the app setting, since you have enable offline mode, it would allow you to access the App settings (it's the 4th button in Android) Go to Worklight Settings. Select Server Address -> Add the worklight URL to the Server URL. When you go back to the app, this will automatically reload the content from your WL server.
I created a worklight application. I tried running that application on android emulator and i am getting the following error.
[http://localhost:8080/apps/services/api/MyFirstApp/android/query] Host is not responsive.
Try to manually access the URL through the android emulator browser to verify connectivity
So i tried to enter the same url in the emulator browser, i got the following text:
/*-secure-
{"WL-Authentication-Failure": {"wl_remoteDisableRealm":{"reason":"Login Failed}}} */
Can someone help me with this?
I am using Android OS version: 4.2.2, API level: 17
I haven't changed any application settings myself..
I am trying to go to a basic login page with the url "https://jazz.net/jazz/auth/j_security_check"
This is my adapter XML:
<wl:adapter xmlns:wl="worklight.com/integration"; xmlns:http="worklight.com/integration/http"; xmlns:xsi="w3.org/2001/XMLSchema-instance"; name="RQMAdapter">
<displayName>RQMAdapter</displayName>
<description>HTTP type Worklight Adapter for jazz server</description>
<connectivity>
<connectionPolicy xsi:type="http:HTTPConnectionPolicyType">
<protocol>https</protocol>
<domain>jazz.net</domain>
</connectionPolicy>
<loadConstraints maxConcurrentConnectionsPerNode="2" />
</connectivity>
<procedure name="loginToRQM" />
</wl:adapter>
This is my scenario:
I have a requirement where I need to read information about the projects from jazz.net for a user. They are all available on the jazz server within an XML file. I need to process it to a mobile device to make it available on hand held device... So, now I am told that i will have to download some of the files from the server, so i need to have file IO on my app. I learned that we need to write this part using a Cordova plug-in in Worklight.
please let me know what else is needed for the solution... thank you
Make sure to place the actual IP address of your server machine:
Change the value for worklightServerRootURL in the file
application-descriptor.xml (located at: yourProject\apps\yourApp)
Build and deploy
Right-click on the generated Android project >> Run As >> Run application
If you are using using Worklight 5.0.5, make sure to upgrade to 5.0.6, where a fix is available when only API Level 17 is installed.
As for going to that URL, you need to explain where exactly you're trying to go to it from, and how... you need to be more descriptive. It sounds to me like you haven't gone through the Getting Started material. Please do.
I had the same problem.
I have solved it by using the real IP address of the server in the WL app instead of using localhost:
When the emulator is running your app, press the Menu button.
Select to change your server URL
Remove "localhost" and use the IP address.
Accept and try again.
This fixed my problem.