Skip to main content

Home/ Android Dev/ Group items tagged text

Rss Feed Group items tagged

Vincent Tsao

《程序员》精彩推荐:Android程序创意过滤与失败经验谈 - 0 views

  • 思路转换的失败
  • 针对的用户群体动辄就是全球目标用户,在商业判断和分析上,最基础的一个考量就是用户群体和业务模式的总量的收益是否足够大,对用户群体的研究和商业判断分析完全根据市场分析报告和数据来做判断。因此,不可避免地在程序创意思路上会沿用以前的工作思路和分析方法。 在考虑Android上的创意的同时,不自觉地就考虑和分析了如下几个方面的问题: 1. 是否为用户所必需? 2. 技术上是否领先? 3. 程序的粘性是否足够? 4. 用户群体是否足够大? 因此,沿用这个思路,不可避免地就会往大的应用和大的服务上去思考和做出判断。
  • 经过反复地反省和对比,初步得出了这样的失败教训: 1. 对于个人开发者和小型团队来说,不适合做过于基础的程序。操作的模式和理念上的创新与用户的接受度有相当的距离。这样的事情只有大公司才有财力和可能进行推广。比如说手机生产商,他们可以通过预置的方式进行推广。而对个人开发者来说,得先证明你的想法是成功的,不能假设一个会成功的需求和应用,然后卖给设备厂商。 2. 个人开发者和小型团队不适合做大的程序,尤其是开发时间不要超过2个月。4个人,3个月的时间,对于一个小团队来说 ,是相当宝贵的。这不仅仅是时间和金钱的问题,更多的是信心问题。 3. 用户能否真正接受你的想法,是一个关键性的问题。设想和推导都很完美,唯独缺了用户是否真正喜欢和接受这一条,又没有方法进行快速地验证和试错,基本上不能成功。
  • ...6 more annotations...
  • 因此,在开发者头脑风暴产生一个创意之后,要做的几个最主要的过滤在于: 1. 开发时间是否太长? 2. 开发的技术难度是否会过高,而导致不能实现或者质量不可靠? 3. 有怎样的办法来判断用户是否会喜欢? 有了这几个过滤条件,相信能够减少失败的几率,或者说能够Fail Fast(尽快失败),从而减少损失。
  • 技术门槛的失败
  • 这也让我们多了一个失败的教训: 1. 技术门槛不高,不能保证你一直保持优势。对你来说简单的程序,对竞争对手来说,程序同样的简单。因此,你能做,别人也能做。在这一点上,其实竞争同样激烈。 2. 封账号的代价相当之大,基本上等于你的努力悉数尽毁。Don’t do evil。 因此,在这个案例中,增加了一个新的创意过滤条件: 程序的创意是否过于简单?如果过于简单,那么创意能够始终保持成功的机会不会太高
  • 依赖第三方资源的失败
  • 这个时候,FML的官网发现了这个机会。他们觉得这是一个很好的想法,应该自己在Market上发布自己的官方程序。于是,他们干了这样的事情来清除竞争对手。他们直接向Google举报,说其它程序没有得到他们的授权。一次举报,竞争对手全部清干净了,于是他们的官方程序上线了。 这一次,得到了一个更加深刻的教训: 1. 不要过于依赖第三方资源。依赖第三方资源或者网站的名气,的确可能帮助你的程序受到很多关注,代价也同样存在,一旦人家开始动手举报,你连还手的机会都没有。 2. 不要选错第三方资源。很多的服务提供商是不开放的,尽管他们没有明确说明。同时还有很多服务提供商是充分开放的,比如Twitter就是一个非常开放的例子。选错了第三方资源,结果一样会失败。 因此,这里又多了一个创意过滤的条件: 是否依赖于第三方资源? 如果是,请尽快绕道离开,因为很难靠这个想法走太远。
  • 1. Don’t do evil。美国人做事的方式非常直接,同时会默认你是善意的。对于Google来说,尤其如此。因此,在我尝试过的程序中,你可以任意发布你的程序到Google Market。但是,如果涉及到版权纠纷,不管是网站的所有者、原程序的开发者还是其它任何一种类型的版权纠纷,一旦举报到Google,轻者下架单个程序,重者封禁整个账号,并且下架所有程序。也就是说,一旦受到处罚,你就别想翻身了。因此,Don’t do evil。 2. Google的审查底线。尽管Google不做审查,但除了和版权争议相关的程序之外,哪怕是你自己的程序,依然有如下的禁区是不能碰的: a. 不要使用任何Google相关的名义。程序名、开发者名都不能涉及到Google或者看起来类似Google的名称,否则Google不会予以通过。 b. 不要违反任何Google的开发者协议。需要仔细阅读Google的开发者协议,在不同时候Google的开发者协议会经常更新。因此,只要违反了任何Google开发者协议,当Google处罚到你的时候,基本上没有申辩机会。因此,务必要小心。
Vincent Tsao

Android 2.1′s speech-to-text feature reviewed - it's "OK", just about » EuroD... - 0 views

  • Their conclusion is that Android 2.1′s new speech-to-text thing works, just about, although there’s a delay of a few seconds while the phone crunches your spoken words and tries to get the gist of what you’re saying – and a few errors sneak in, particularly when dealing with those smaller words we tend to hurry over. Basically, it looks like you have an awkward choice to make – speak your messages then spend a bit of time awkwardly tidying up the few errors that will inevitably sneak in, or carry on as normal with traditional text input methods.
Vincent Tsao

谷歌:Android手机日出货量6.5万 接近iPhone_Google Android_cnBeta.COM - 0 views

  • 施密特说:“按照目前发展趋势,Android手机有望在全球手机市场扮演第一或第二的角色。”除 向手机厂商提供Android软件外,谷歌还发布了自有品牌智能手机Nexus One。 施密特表示:“我们的合作伙伴每天Android手机出货量约为6.5万部。如果你经常访问博客网站,就会发现一些有关Android手机出 货量的估计数字远远低于实际情况。”
  • 美国市场研究公司NPD近日发布的统计数据显示,今年第一季度期间,Android手机在美国市场 的销量已超过iPhone,占据该季度美国智能手机总销量的28%,iPhone相应份额为21%,而加拿大智能手机制造商RIM的黑莓 (BlackBerry)手机相应市场份额仍居第一,为36%。
  • 施密特周四表示:“我们的手机市场战略与其他厂商不同。我 们向各大手机厂商免费提供Android软件,这是具有变革意义的举动。我们希望建立起一个开放环境,这一点与其他手机厂商的市场策略正好相反。” 谷歌联合创始人拉里·佩奇(Larry Page)周四也出席了谷歌股东年度大会。他当天表示,采用Android软件的智能手机型号数量增加后,将有利于谷歌搜索总量的增长,并使谷歌其他业务 也受益,“智能手机产品逐步成熟后,我们将能够制定出相应盈利方案。” 施密特称,自 己同意佩奇的看法,“虽然我们已向各大手机厂商免费提供Android软件,但与Android手机平台相关的应用程序和服务具有巨大增长潜力。今后 5~10年内,手机应用程序和服务将成为业务范围极为广泛的产业,其市场价值不容小视。”
  •  
    Good News for Android
Vincent Tsao

How to disable a button on an appwidget? | Hello Android - 0 views

  • RemoteViews can't manipulate a buttons enabled/disabled state, but it can modify its visibility. So the trick is to have two buttons, the real one, and an other which is designed to look like the real one in disabled state, and change witch one is visible.
  • <Button android:id="@+id/startbutton" android:text="Start" android:visibility="visible"></Button> <Button android:id="@+id/startbutton_disabled" android:text="Start" android:clickable="false" android:textColor="#999999" android:visibility="gone"></Button>   <Button android:id="@+id/stopbutton" android:text="Stop"  android:visibility="gone"></Button> <Button android:id="@+id/stopbutton_disabled" android:text="Stop" android:clickable="false" android:textColor="#999999" android:visibility="visible"></Button>
  • RemoteViews remoteView = new RemoteViews(context.getPackageName(), R.layout.widget); remoteView.setViewVisibility(R.id.startbutton, View.GONE); remoteView.setViewVisibility(R.id.startbutton_disabled, View.VISIBLE); remoteView.setViewVisibility(R.id.stopbutton, View.VISIBLE); remoteView.setViewVisibility(R.id.stopbutton_disabled, View.GONE); AppWidgetManager.getInstance(context).updateAppWidget(appWidgetId, remoteView);
  • ...1 more annotation...
  • RemoteViews remoteView = new RemoteViews(context.getPackageName(), R.layout.widget); remoteView.setViewVisibility(R.id.startbutton, View.VISIBLE); remoteView.setViewVisibility(R.id.startbutton_disabled, View.GONE); remoteView.setViewVisibility(R.id.stopbutton, View.GONE); remoteView.setViewVisibility(R.id.stopbutton_disabled, View.VISIBLE); AppWidgetManager.getInstance(context).updateAppWidget(appWidgetId, remoteView);
Vincent Tsao

Onscreen Input Methods | Android Developers - 0 views

  • The android:inputType attribute has three pieces: The class is the overall interpretation of characters. The currently supported classes are text (plain text), number (decimal number), phone (phone number), and datetime (a date or time). The variation is a further refinement on the class. In the attribute you will normally specify the class and variant together, with the class as a prefix. For example, textEmailAddress is a text field where the user will enter something that is an e-mail address (foo@bar.com) so the key layout will have an '@' character in easy access, and numberSigned is a numeric field with a sign. If only the class is specified, then you get the default/generic variant. Additional flags can be specified that supply further refinement. These flags are specific to a class. For example, some flags for the text class are textCapSentences, textAutoCorrect, and textMultiline.
  •     <EditText android:id="@+id/edtInput"        android:layout_width="0dip"        android:layout_height="wrap_content"        android:layout_weight="1"        android:inputType="textShortMessage|textAutoCorrect|textCapSentences|textMultiLine"        android:imeOptions="actionSend|flagNoEnterAction"        android:maxLines="4"        android:maxLength="2000"        android:hint="@string/compose_hint"/>
Vincent Tsao

Selecting text in a WebView? - Stack Overflow - 1 views

  • From the class that extends WebView: public void selectAndCopyText() {    try {        Method m = WebView.class.getMethod("emulateShiftHeld", null);        m.invoke(this, null);    } catch (Exception e) {        throw new AssertionError(e);    }} And then you have to use ClipboardManager to watch for new text. P.S. Historical note: this hack is based on Android 1.5 WebView implementation.
Vincent Tsao

Binding to Data with AdapterView | Android Developers - 0 views

  • Spinner s2 = (Spinner) findViewById(R.id.spinner2);Cursor cur = managedQuery(People.CONTENT_URI, PROJECTION, null, null);     SimpleCursorAdapter adapter2 = new SimpleCursorAdapter(this,    android.R.layout.simple_spinner_item, // Use a template                                          // that displays a                                          // text view    cur, // Give the cursor to the list adatper    new String[] {People.NAME}, // Map the NAME column in the                                         // people database to...    new int[] {android.R.id.text1}); // The "text1" view defined in                                     // the XML template                                         adapter2.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);s2.setAdapter(adapter2);
Kiran Kuppa

Emojicon Android Text View library - 0 views

  •  
    "Do you like emojis in Whatsapp, iMessage? Emojicon is a library to implement such a thing for 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

Exploring the world of Android :: Part 2 « JTeam Blog / JTeam: Enterprise Jav... - 1 views

  • But in practice, you will notice that the AsyncTask is limited to 10 threads. This number is hardcoded somewhere in the Android SDK so we cannot change this. In this case it’s a limitation we cannot live with, because often more than 10 images are loaded at the same time.
    • Vincent Tsao
       
      使用AsyncTask类开辟的线程还有数量限制?必须小于10,这个倒是以前没有注意到的,要看看源代码怎么实现的
  • I’ve shown you how to improve performance of a ListView in three different ways: By loading images in a seperate thread By reusing rows in the list By caching views within a row
  • ...1 more annotation...
  • Notice that I used a SoftReference for caching images, to allow the garbage collector to clean the images from the cache when needed. How it works: Call loadDrawable(imageUrl, imageCallback) providing an anonymous implementation of the ImageCallback interface If the image doesn’t exist in the cache yet, the image is downloaded in a separate thread and the ImageCallback is called as soon as the download is complete. If the image DOES exist in the cache, it is immediately returned and the ImageCallback is never called.
  •  
    这个帖子完美解决了Image lazy load的性能问题, it works~
Vincent Tsao

Mark Murphy | AndroidGuys - 0 views

  • Mark Murphy is the founder of CommonsWare and is the author of _The Busy Coder's Guide to Android Development_, _The Busy Coder's Guide to *Advanced* Android Development_, and _Android Programming Tutorials_.
  •  
    Articles from Mark Murphy
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

RecognizerIntent | Android Developers - 0 views

  • Since: API Level 3
    • Vincent Tsao
       
      这样的话,android 1.5 以上的 OS 都使用这个intent了
  • Constants for supporting speech recognition through starting an Intent
Vincent Tsao

Android Dev Phone, Ubuntu and VMWare Server : Johan de Koning - 0 views

  • Create a new file (as root) sudo gedit /etc/udev/rules.d/50-android.rules with the following content SUBSYSTEM=="usb", SYSFS{idVendor}=="0bb4", MODE="0666" Make sure that the text after {idVendor} is the same as the device id found when using the lsusb command. Save and exit the editor To make execution of the rule possible, perform a chmod sudo chmod a+rx /etc/udev/rules.d/50-android.rules To make the rule active, restart udev sudo /etc/init.d/udev restart
  • You can perform a check, to see that the Android Dev Phone is shared with Ubuntu, by opening a Terminal (inside Ubuntu. Open a VMWare Remote Console to make use of the Ubuntu) and type the following command lsusb A list of USB devices will be shown. For example: Bus 002 Device 001: ID ld6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 004: ID 0bb4:0c02 High Tech Computer Corp. Bus 001 Device 001: ID ld6b:0002 Linux Foundation 2.0 root hub
Vincent Tsao

webView load Data problem - Android Beginners | Google Groups - 0 views

  • sagar wrote: > Hello, > I have following code to display webview's background. > wv.loadData("<html><body background=\"file:///android_asset/lbh.png > \">"+data[0],"text/html","utf-8"); > here the data[0] contains the data to be displayed... > Data is displayed fine.. > but background is not displayed. > I can only use this method..i dont knw why i can t access android > assets.. > I have placed that image in assets folder already.. Try loadDataWithBaseUrl() instead of loadData(), supplying some bogus value for the base URL (e.g., fake://why/o/why/is/this/needed).
    • Vincent Tsao
       
      用loadDataWithBaseURL接口才能访问asset中的资源文件,且baseurl不能为null
Vincent Tsao

myandroidwidgets - Project Hosting on Google Code - 0 views

  • A bunch of sample apps for Android. Simple workarounds and examples for doing things on Android. Custom Progress Bar - A customized Progress Bar for android with your own animation Drag and Drop widgets on Android Ongoing notifications on Android HTML with images in a Text View Custom Expandable List Views on Android Custom List View - Phonebook Example Custom Title Bar Android WebView, Javascrip and CSS Unzip files on Android
1 - 20 of 21 Next ›
Showing 20 items per page