Recent Notes

Displaying keyword search results 91 - 100
Created by freyo on May 13, 2011 15:45:29    Last update: September 20, 2011 08:08:12
This is an Android app that dumps any binarized xml file as plain text - to the sdcard on the device or emulator. build.xml : <?xml version="1.0" encoding="UTF-8"?> <project... AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <man... res/layout/main.xml <?xml version="1.0" encoding="utf-8"?> <Lin... res/values/strings.xml : <?xml version="1.0" encoding="utf-8"?> <res... src/com/android/xmltool/DumpXml.java package com.android.xmltool; import java.ut... Screenshot Pre-built APK can be downloaded from: http://code.google.com/p/android-binxml-dump/
Created by magnum on September 16, 2011 16:04:05    Last update: September 16, 2011 16:05:06
Linux distros come with PPTP client bundled. This is how to configure Linux as PPTP client: Click System->Preferences->Network Connections: Select the VPN tab, click Add : Select PPTP from the list and click Create... : To connecto to the PPTP VPN: click the Network icon on the launch Panel and select the VPN name just created.
Created by freyo on September 15, 2011 08:49:41    Last update: September 15, 2011 08:59:34
There's no UI for setting proxy for Android browser. You set a proxy by directly manipulating the settings db: $ android-sdk-linux_86/platform-tools/adb shell ... where wifi_http_proxy is the proxy host name and wifi_http_proxy is the proxy port number.
Created by freyo on September 14, 2011 16:30:03    Last update: September 14, 2011 16:30:03
Select from the system table: $ android-sdk-linux_86/platform-tools/adb shell ... Other useful commands: sqlite> .databases seq name file ...
Created by magnum on September 11, 2011 21:31:45    Last update: September 11, 2011 21:32:00
The warning message was emitted by the gcc compiler with the " -Wdeclaration-after-statement " switch: $ gcc -Wdeclaration-after-statement hello.c for the following code: #include <stdio.h> int main(int argc, char* arg... There were no warnings without the " -Wdeclaration-after-statement " switch. GCC manual says: -Wdeclaration-after-statement (C and Objective-C only) Warn when a declaration is found after a statement in a block. This construct, known from C++, was introduced with ISO C99 and is by default allowed in GCC. It is not supported by ISO C90 and was not supported by GCC versions before GCC 3.0.
Created by freyo on September 09, 2011 11:43:36    Last update: September 09, 2011 11:45:45
When you run automated Android tests with Eclipse or from the command line, you get text output, which isn't good for reporting purposes. If you run a large set of test cases with automated build, the text report isn't very helpful. Fortunately, Android CTS generates test reports in XML with accompanying XSL to make it look nice in a browser. To run your own tests with Android CTS: Download Android CTS Make a new directory MyRepository under android-cts , alongside the existing repository directory. Copy host_config.xml from repository to MyRepository Create directory plans under MyRepository , add a test plan ( MyTests.xml ): <?xml version="1.0" encoding="UTF-8"?> <TestPla... Create directory testcases under MyRepository . Copy TestDeviceSetup.apk from repository/testcases to MyRepository/testcases Under MyRepository/testcases , create a test...
Created by freyo on September 09, 2011 09:18:32    Last update: September 09, 2011 09:19:23
To add your own test cases to the Android cts suite: Copy the whole example directory: cd cts/tests/tests cp -R example mytests Change mytests/Android.mk to fit your needs: LOCAL_PATH:= $(call my-dir) include $(CLEAR... Add the new tests to cts/CtsTestCaseList.mk : # These test cases will be analyzed by the CTS API... Develop the tests as usual If the test is not added to the CTS_COVERAGE_TEST_CASE_LIST , the build will only generate the xml file for the testcases, not the apk.
Created by freyo on September 08, 2011 07:45:35    Last update: September 08, 2011 13:22:13
Activity test: AndroidManifest.xml : <?xml version="1.0" encoding="utf-8"?> <manifes... Test code: package com.example.android.test; import co... Notes: Methods setUp and tearDown are called repetitively for each test method. If you override them, you must call the corresponding super methods for the tests to work. Self-instrumentation test (the target package is the test package itself): AndroidManifest.xml : <?xml version="1.0" encoding="utf-8"?> <manifes... Test code: package com.android.test; import android.ut...
Created by freyo on September 07, 2011 16:46:14    Last update: September 07, 2011 19:23:00
The Android unit test framework is based on JUnit 3 , not JUnit 4. Test cases have to extend junit.framework.TestCase or a subclass (such as android.test.InstrumentationTestCase ). Tests are identified by public methods whose name starts with test , not methods annotated with @Test (as in JUnit 4). An Android test suite is packaged as an APK, just like the application being tested. To create a test package, first you need to identify the application package it is testing. Google suggests to put the test package source in a directory named tests/ alongside the src/ directory of the main application. At runtime, Android instrumentation loads both the test package and the application under test into the same process. Therefore, the tests can invoke methods on...
Created by freyo on August 31, 2011 15:49:54    Last update: August 31, 2011 15:49:54
Got this error while trying to build Android app: [apkbuilder] Creating AppInfo-debug-unaligned.ap... Solution: Delete the Android debug keystore: $ rm ~/.android/debug.keystore Build again: $ ant debug The new key is valid for 30 years (keystore password is 'android'): $ keytool -list -v -keystore ~/.android/debug.keys...
Previous  5 6 7 8 9 10 11 12 13 14 Next