Skip to main content

Home/ Android Dev/ Group items tagged testing

Rss Feed Group items tagged

Kiran Kuppa

Genymotion emulator - The faster Android Emulator - 0 views

  •  
    "Genymotion is a faster Android emulator for app testing and presentation. You can control simulated sensors like battery, GPS, accelerometer with the user-friendly interface, it includes powerful command line tools that allow you to build complex tests."
Vincent Tsao

Android Endless List - Stack Overflow - 0 views

  • 5 down vote accepted One solution is to implement an OnScrollListener and make changes (like adding items, etc.) to the ListAdapter at a convenient state in its onScrollStateChanged method. The following ListActivity shows a list of integers, starting with 40, adding 10 per scroll-stop.
  • public class Test extends ListActivity implements OnScrollListener {    Aleph0 adapter = new Aleph0();    protected void onCreate(Bundle savedInstanceState) {        super.onCreate(savedInstanceState);        setListAdapter(adapter);         getListView().setOnScrollListener(this);    }    public void onScroll(AbsListView v, int i, int j, int k) { }    public void onScrollStateChanged(AbsListView v, int state) {        if(state == OnScrollListener.SCROLL_STATE_IDLE) {                adapter.count += 10;                adapter.notifyDataSetChanged();        }    }    class Aleph0 extends BaseAdapter {        int count = 40;        public int getCount() { return count; }        public Object getItem(int pos) { return pos; }        public long getItemId(int pos) { return pos; }        public View getView(int pos, View v, ViewGroup p) {                TextView view = new TextView(Test.this);                view.setText("entry " + pos);                return view;        }    }}
  • You should obviously use separate threads for long running actions (like loading web-data) and might want to indicate progress in the last list item (like the market or gmail apps do).
Vincent Tsao

Backward Compatibility for Applications | Android Developers - 0 views

  •  
    官方关于android sdk各个版本的兼容性建议,正如官方建议的:"Testing is key"
Vincent Tsao

Getting the Manifest Version Code - Android Developers | Google Groups - 0 views

  • PackageInfo pInfo = null; try {         pInfo = getPackageManager().getPackageInfo("com.beanie.test", PackageManager.GET_META_DATA);         } catch (NameNotFoundException e) {                 e.printStackTrace(); } System.out.println(pInfo.versionCode);
Vincent Tsao

Android 2.2 demolishes iOS4 in JavaScript benchmarks - 1 views

  • We compared these findings with that of our tests of Apple's mobile Safari browser on the iPhone 4. The results show that the Android device delivers significantly faster JavaScript execution than the iPhone, scoring over three times better on V8 and almost twice as fast on SunSpider
  •  
    总是有这类比较Froyo和其他OS渲染JS性能的评测,难道是Google在鼓励更多web app运行在android浏览器下?
Vincent Tsao

Using the Android Search Dialog | Android Developers - 0 views

  • If your data is stored in a SQLite database on the device, performing a full-text search (using FTS3, rather than a LIKE query) can provide a more robust search across text data and can produce results significantly faster.
  • If your data is stored online, then the perceived search performance might be inhibited by the user's data connection. You might want to display a spinning progress wheel until your search returns.
  • <?xml version="1.0" encoding="utf-8"?><searchable xmlns:android="http://schemas.android.com/apk/res/android"    android:label="@string/app_label"    android:hint="@string/search_hint" ></searchable>
    • Vincent Tsao
       
      这个地方一定要记得在string.xml文件中定义label,并在此处refrence定义好的label key。直接在里面写value是不会work的,得出这个结论我花了2个小时!
    • Vincent Tsao
       
      android:label="@string/app_label" 如果我写成 android:label="test", 铁定不能invoke search,不知道为什么Android要区别对待,我认为这是Android的一个bug
Vincent Tsao

How to connect your Android phone to Ubuntu to do development, testing, installations o... - 0 views

  • $ sudo gedit /etc/udev/rules.d/99-android.rules
  • $ sudo restart udev
  • $ adb kill-server $ adb start-server
  • ...2 more annotations...
  • Add the following line to it and save it: SUBSYSTEM==”usb”, ATTRS{idVendor}==”18d1″, SYMLINK+=”android_adb”, MODE=”0666″
    • Vincent Tsao
       
      for Nexus one
  • $ lsusb
Vincent Tsao

Android Rises in Mobile Web Usage, iPhone Stagnates, Declines - 0 views

  • Worldwide, it doesn't look so bad for Apple yet; it's still the king of the hill by a long shot, steady at about 50%. Android is making inroads, though, now accounting for almost a quarter of the world's mobile web usage.
  • And now we get to the interesting part: the United States. The top-notch Android phones have been available in the US for longer than in other countries, and carriers there have been pushing them longer. This shows: in the US, Android has almost overtaken the iPhone OS (which excludes the iPod Touch!) in mobile web usage - 42% vs. 44%.
  • ...2 more annotations...
  • In November 2009, the iPhone OS accounted for 55% of the mobile web usage in the US; now it's down to 44%. In the same timespan, Android grew from 27% to 42%. The US can be seen as a test bed for the rest of the world, since Android hasn't been pushed as much outside of the US as it has been inside of the US. In Apple's defence, though, the arrival of the iPad in the coming weeks may reverse the declining trend of the iPhone OS. And, as noted, the iPod Touch is not included in these figures. All in all, it's clear that Android is no longer just a speck on the horizon. Google's mobile operating system is a serious threat to Apple's iPhone, which could further explain why Apple decided to sue HTC. Jobs might be drinking coffee with Schmidt in a nicely staged press moment, but in the meantime, the '80s and '90s are happening all over again for Apple: the PC business model beating the Mac one.
Vincent Tsao

[Tip][Google I/O 2011]Apply A/B testing to your Android App - 5 views

private static final boolean isA = UUID.randomUUID().getLeastSignificantBits() % 2 == 0; public void onCreate(Bundle savedInstanceState){ super.onCreate(savedInstanceState); if(isA){ setConte...

android tip

started by Vincent Tsao on 12 May 11 no follow-up yet
1 - 20 of 22 Next ›
Showing 20 items per page