Calendar in Android 4 emuator - android

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.

Related

Couldn't connect internet in xamarin android emulator -AVD_for_Nexus_One_by_Google

I have created simple listview apps using xamarin form and data are coming from webservices.
My current problem is , i couldnt connect internet my android emulator. Please anyone can guide how to do?
My Error image
Notes: My PC connected internet via LAN.
Connecting to the Internet from an Android emulator can be tricky.
One common issue is falling foul of a network proxy. If you have one on your network you need to configure it on the emulator.
Here is an article detailing Android emulator network settings.
You should check the connection settings of your emulator when you create one try creating one more emulator and revert us so we can help you create one.
The way i suggest you do it is use the emulators that visual studio provides check visual emulators in your respected search menu to find it .
One of the problems could be you do not have internet permissions which you can update in your manifest using this line:
<uses-permission android:name="android.permission.INTERNET" />
If this doesn't work follow the steps below :
1.Go to settings->Wireless & networks->mobile networks->Access Point Names.
2.Press menu button. an option menu will appear.
3.from the option menu select New APN.
4.Click on Name. provide name to apn say My APN.
5.Click on APN. Enter www.
6.Click on Proxy. enter your proxy server IP. you can get it from internet explorers internet options menu.
7.click on Port. enter port number in my case it was 8080. you can get it from internet explorers internet options menu.
8.Click on User-name. provide user-name in format domain\user-name. generally it is your systems login.
9.Click on password. provide your systems password.
10.press menu button again. an option menu will appear.
11.press save. try n run your browser. hope its work for you it worked for me. good luck.

authentication token does not match in android studio 2.3.3

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.

Can't run IBM worklight app in real device android

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.

Out-of-the-box app-engine connected android project not working -- app crashes

I have been following to the letter the simple tutorial on Creating an App Engine Connected Android Project using the eclipse plugin.
After setting up everything, running the project leads to two possibilities:
If LOCAL_ANDROID_RUN = false, the project spits out the expected complaints:
1) Registration with Google Cloud Messaging...SUCCEEDED!
2) Registration with Endpoints Server...FAILED
Either your Cloud Endpoints server is not deployed to App Engine, or your
settings need to be changed to run against a local instance by setting
LOCAL_ANDROID_RUN to 'true' in CloudEndpointUtils.java.
If LOCAL_ANDROID_RUN = true, the second I click "register" the app crashes! This is the part I don't get. I am running the project right out of the box. The only thing I did was change LOCAL_ANDROID_RUN from false to true.
So I have been researching for the past four hours on a resolution. I see talks about -a 0.0.0.0 or -bindAddress 0.0.0.0; unless I am setting them incorrectly (I probably am), they are not working. Sometimes I get the "error" below. So if that's my problem please, what exactly am I supposed to have in the argument box before I click apply and run?
Options:
--help, -h Show this help message and exit.
--server=SERVER The server to use to determine the latest
-s SERVER SDK version.
--address=ADDRESS The address of the interface on the local machine
-a ADDRESS to bind to (or 0.0.0.0 for all interfaces).
--port=PORT The port number to bind to on the local machine.
-p PORT
--sdk_root=DIR Overrides where the SDK is located.
--disable_update_check Disable the check for newer SDK versions.
--generated_dir=DIR Set the directory where generated files are created.
--jvm_flag=FLAG Pass FLAG as a JVM argument. May be repeated to
supply multiple flags.
Any insights on how to get this out of the box project to work?

Android - Worklight Hybrid application fails to connect to server in the emulator

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.

Categories

Resources