Skip to main content

Home/ Android Dev/ Group items tagged Google Group

Rss Feed Group items tagged

Vincent Tsao

用google adsense的小心了!!!! - China Android Dev | Google Groups - 0 views

  • google最后给的判决书: Hi, After further review from our abuse team we have confirmed that your account that was closed was modifying the ad behavior which is strictly prohibited as stated in the AdSense policies. These types of violations pose a significant risk to advertisers and for this reason we can no longer work with you through any partnering AdSense account or product offering. This will be the final communication about this issue. Please do not reply to this email as you will not receive a response. Thank you for your understanding. Google AdSense 我们自始至终都不知道原因。
  • 我Google了下 "modifying the ad behavior " 就是指你修改了 Google提供的 adsense js code 或者 sdk 唯一有可能的就是这里了 GoogleAdView adView = (GoogleAdView) activity.findViewById(R.id.ad<http://r.id.ad/> ); if (adView != null) { View vc = adView.getCurrentView(); if (vc instanceof WebView) { ((WebView) vc).destroy(); } View vn = adView.getNextView(); if (vn instanceof WebView) { ((WebView) vn).destroy(); } } 因为用了adsense之后 我们的程序老是crash 从stack trace看是因为Google adsense sdk 引起的. 资源没有释放. 然后去Adsense的那个mail list AFMA 问了 碰到2个都有同样问题的 然后有人给了个code 因为adsense sdk没有destroy ad view  所以要手动destroy下 我们就在每个有ads的activty的 onDestroy 加上这段 就好了 程序没有crash了 结果就被搞了 连负责我们android adsense sales都事先不知道 adsense team就直接把我们封了 还在beta 测试阶段的东西 还有bug  我们只是加了这个保证他资源正常释放不会影响到我们程序 结果就挂了 而且Google的态度巨NX无比 连个申述的途径都没有  只是给了个link类似事后调查
  • 我刚刚给我的sale发了一封信: Hi Sunil, It has been long that I haven't talked to you. I have a question, when I went to the application register page, I found the page layout was changed and some of my apps were gone. For example UK TV Guide, Australia TV Guide, etc. Also, the published status are all "false". I am confused because I am still seeing my ads are clicked in the daily report. Is there anything wrong? I am nervous because I just knew that an AdSense developer's account was disabled without any warning,  and the developers themselves don't know the reason. I don't want that happened on me so I really appreciate your comment. below is the letter in AFMA group. Looking forward to your reply. Thanks. Cheers, Luke 接下来我引用了superdroid的信。看看他怎么说吧。
  • ...1 more annotation...
  • 把这句抄下来了,大家以后小心了。 Ad Behavior AdSense code may not be altered, nor may the standard behavior, targeting or delivery of ads be manipulated in any way that is not explicitly permitted by Google. For instance, clicking Google ads may not result in a new browser window being launched. 我猜是不是可以找google总部投诉一下这个部门
Vincent Tsao

用google adsense的小心了!!!! - China Android Dev | Google Groups - 0 views

  • Sunil回信了。 Hi Luke, Rest assured the apps are fine. We are migrating people over the new system and will let you know when it's complete. Showing false does not impact your earnings or account. 他只字未提Superdroid的事件。
  • http://groups.google.co.nz/group/android-developers/browse_thread/thr... 这个有个账号做adsense网页的,账号被封 又打开的,半年前的事情。 在android developer人多些
Vincent Tsao

putExtra error on AppWidget - Android Developers | Google Groups - 0 views

  • I am just making some AppWidget and I want to pass some Strings through UpdateView to an Activity. But the Bundle is null. I try this: -Widget.java                       Intent defineIntent = new Intent(context, Visor.class);                        defineIntent.putExtra ("org.rss.androides.post2","artist");                        PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, defineIntent, 0);                        updateViews.setOnClickPendingIntent (R.id.widget, pendingIntent); -Viewer.java           Bundle b = intent.getExtras();                 if (b == null) {                     finish();                     return;                 } b is always null.
  • Remember that PendingIntents aren't keyed using extras: http://groups.google.com/group/android-developers/msg/b296f43ae70c4587 You could hack the extras through by mangling them into Uri parameters, or if you're using a ContentProvider, just point to a specific row.
  • Or use PendingIntent.FLAG_UPDATE_CURRENT; just be careful that each active instance has its own unique Intent.
Vincent Tsao

List view with textviews and imageview, best practices - Android Developers | Google Gr... - 0 views

  • 1. you can look at the video from Google IO conference 2009, called Turbo charging your UI's by Romain Guy; he discussed some of the optimizations you can do when working with ListViews. 2. You can read Mark Murphy's series of ListView tutorials at android guys titled Fancy ListViews: http://www.google.co.in/url?sa=t&source=web&ct=res&cd=4&ved=0CBYQFjAD...
Vincent Tsao

Icons for submenu items doesn't show up - Android Developers | Google Groups - 0 views

  • The fact that sub-menus don't support icons. http://developer.android.com/intl/fr/guide/topics/ui/menus.html <http://developer.android.com/intl/fr/guide/topics/ui/menus.html> *Icon Menu * This is the collection of items initially visible at the bottom of the screen at the press of the MENU key. It supports a maximum of six menu items. *These are the only menu items that support icons* and the only menu items that *do not* support checkboxes or radio buttons.
  • Try to use PopUpWindow <http://developer.android.com/reference/android/widget/PopupWindow.html>class. Here you have an example<http://www.anddev.org/how_to_create_a_popupwindow-t1259.html>
Vincent Tsao

How to do ListView dynamic item growing? - Android Developers | Google Groups - 1 views

  • OnScrollListner there is an example in the API demos. On Tue, Oct 13, 2009 at 2:12 PM, wangxueming <m.wongxm...@gmail.com> wrote: > Now I want to make a  ListView,with 20 items, > Then when it scroll to the end, > I get new data and add to the end of ListView dynamic. > Just Like ListView in Android Market.
  • You can try my EndlessAdapter for that: http://github.com/commonsguy/cwac-endless
Vincent Tsao

请教,使用layout_gravity属性不能垂直居中 - China Android Dev | Google Groups - 0 views

  • 按我理解,layout_gravity 属性是用于设置View 与其容器的对齐关系的,但实际使用中 却发现 似乎不是这样,请看如下代码: <?xml version="1.0" encoding="utf-8"?> <LinearLayout     xmlns:android="http://schemas.android.com/apk/res/android"     android:orientation="vertical"     android:layout_width="fill_parent"     android:layout_height="fill_parent"     android:background="#AA009988">     <TextView         android:id="@+id/my_view"         android:layout_width="220dip"         android:layout_height="100dip"         android:text="sdfasdfsdfsdf\nsdfjlwjesd"         android:background="#889900AA"         *android:layout_gravity="center"* /> </LinearLayout> 我为 TextView 设置了 *layout_gravity="center"*- ,本来它应该在父容器中 垂直和水平 居中的,但事实上只是水平居中了,垂直方向并未居中。 我再进一步通过 *layout_gravity="**center_vertical**"* ,但仍然无法垂直居中,请问这是为什么呢?
  • 你可以在最外面的 LinearLayout 加上android:gravity="center". Vertical LinearLayout中, layout_gravity 设置成center无法垂直剧中,是因 为container的排版被限制为从上到下, 试想一下,如果按照你的逻辑,假设第一个child layout_gravity设置成bottom,   第二个childlayout_gravity设置成top,  那么第一个就会跑到第二个下面了。 所以, 当你设置整个linearlayout为垂直, layout_gravity中, 只有 left, right, center_ horizontal 管用的。 tj
Vincent Tsao

How to update the GUI in Push/C2DM sample from advandroid book? - cw-android | Google G... - 0 views

  • > Now I just want to update the GUI from this method. > Can I somehow call a method in PushEndpointDemo.java? No, for two reasons: 1. Because C2DMReceiver is a manifest-registered BroadcastReceiver and therefore has no access to any activities 2. There might not be an activity, since you have no control over the timing of when the C2DM message is received (e.g., the user pressed BACK, the user pressed HOME) > Do I need a Broadcast Intent to do this? Possibly. -- If you want to update an activity or else ignore the message, have C2DMReceiver send out a private broadcast, picked up by a receiver registered via registerReceiver() in the activity -- If you want to update an activity or else raise a notification, have C2DMReceiver send out an ordered broadcast, as described here: http://commonsware.com/blog/2010/08/11/activity-notification-ordered-... -- If you want to update a database, call startActivity() on an IntentService, and have it do the database I/O, plus possibly broadcast an Intent to update an activity/raise a notification.
Vincent Tsao

一个发布应用需要注意的地方 - China Android Dev | Google Groups - 0 views

  • 我今天说的,无关于功能,也无关于布局,而在于资源命名。 我是这样发现问题的,我的应用《千字文》发布两天内获得了大概600个安装,但是有三个用户说他们无法安装,错误是“安装包没有正确的签名”。用户们的 共同点是他们都是1.5的固件。怎么会出现这样的事情呢?我在发布之前使用我的1.6固件的G2进行测试的,没有在1.5固件上测试过,这是因为我在开 发时功能和布局都是以1.5固件为基准做的,我很有信心不会在1.5上出现异常。于是我尝试在1.5固件的虚拟机上安装我的apk文件,果然遇到了用户 提到的错误。我检查了AndroidManifest.xml文件,miniSDK是3,也没有1.5不支持的配置选项,没问题的。于是Google 之,发现了解决方案。 原来1.5和它之前的固件都有bug,就是对资源文件(asset或者res目录下的文件)的命名解析的不好,具体的错误我也没有仔细看,大概的意思就 是,资源文件的名字和数量的组合和排列有可能会造成某些资源文件无法被解析。我们无法得知哪些名字是无法解析的,也不知道哪些资源文件数量是恰好不能解 析的。我们可以做的,就是在打包之后,发布之前,自己在1.5固件(或之前的固件)上进行安装测试。通过了就好,通不过就尝试改几个资源文件的名字,或 者增加一个或几个dummy文件,再打包,直到测试安装成功。 我的应用就是在我改了一个资源文件的名字之后通过了1.5的安装测试。 希望我说的明白。重点:发布之前,务必在1.5固件上进行测试安装。
    • Vincent Tsao
       
      良子大哥关于平台兼容性的宝贵经验
Vincent Tsao

attempt to acquire a reference on a close SQLiteClosable - Android Developers | Google ... - 0 views

  • If you're managing the cursor yourself the cleanest way to go is probably this: Cursor cursor = getContentResolver().query(...); try {     // read from the cursor and do stuff } finally {     if (cursor != null) cursor.close(); }
  • Another option if you still want to use Activity.managedQuery() is to get your information and then: stopManaging(cursor); cursor.close(); Cheers, Justin Android Team @ Google
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

sqlite3 in adb not in 2.2? - Android Developers | Google Groups - 0 views

  • Then I went ahead and installed 2.2 and now when > I type sqlite3 in the shell it says sqlite3 not found....  Any ideas? Well, it's in the 2.2 emulator image, for what that's worth. -- Mark Murphy (a Commons Guy)
  •  
    Android 2.2 的真机中不再有sqlite调试工具了? WTF! ! !
  •  
    求助于China android dev开发小组,有了解决办法: step 1: 从其他真机或者模拟器的 /system/xbin目录下copy一份 sqlite3 step 2: 进入shell执行chmod a+x sqlite3 或者 chmod 777 sqlite3 大功告成
Vincent Tsao

Is it possible to update a widget from an Activity? - Android Developers | Google Groups - 0 views

  • An AppWidgetProvider is a BroadcastReceiver. That gives you two possibilities right off the bat: 1. Have it also handle whatever other Intents you were planning on setting up with a separate BroadcastReceiver, or 2. Send an Intent from whatever component you want to the AppWidgetProvider. In other words, don't worry about trying to talk directly to the app widget (which I suspect is impossible) -- just talk to your code that already talks to the app widget.
    • Vincent Tsao
       
      good explanation
  • I update my widget from within my app, when I delete/add entries to a list. To do this, I have a method (updateWidget) and a static String (UPDATE_ACTION). My updateWidget() method sends a broadcast which is received by the widget class and then calls onUpdate() with the appropriate params: private void updateWidget() {                 Intent i = new Intent(this, TVWidget.class);                 i.setAction(TVWidget.UPDATE_ACTION);                 sendBroadcast(i);         } In TVWidget class: @Override         public void onReceive(Context context, Intent intent) {                 String action = intent.getAction();                 if (action != null && action.equals(UPDATE_ACTION)) {                         final AppWidgetManager manager = AppWidgetManager.getInstance (context);                         onUpdate(context, manager,                                         manager.getAppWidgetIds(new ComponentName(                                                         context, TVWidget.class)                                         )                         );                 }                 else {                         super.onReceive(context, intent);                 }         } This seems to work fine.
Vincent Tsao

ListView/ListActivity limit items until last item reached, like in Android Market - And... - 0 views

  • These applications use an OnScrollListener to detect when the last item is displayed. When this happens, they load more items and add them to the list adapter.
Vincent Tsao

Widget(s) and Pending intent - Android Developers | Google Groups - 0 views

  • Then i've tried PendingIntent.FLAG_UPDATE_CURRENT i'm no longer crashing, but it always launches the activity with extras were put in the widget that was updated the last. It looks like pending intent is shared among my widget instances
  • I've changed the call to  PendingIntent pending = PendingIntent.getActivity(context, appWidgetId, intent, PendingIntent.FLAG_UPDATE_CURRENT); Now everything is cool except based on discussions i'm not sure how reliable it'll be . ( Doc says it's not supported yet )
Vincent Tsao

Adding items to a ListView - Android Developers | Google Groups - 0 views

  • SizzlingSkizzorsProgrammer wrote: > After the listview is already initialized, is it possible to add items > to it during runtime? Just add the new items to the adapter, or the data source that backs up the adapter (if it's a CursorAdapter).
1 - 20 of 37 Next ›
Showing 20 items per page