[android-developers] Re: Pass image to a new Intent
Hi I found a solution In the GridView I pass the images with ImageView Class: gridview.setAdapter(imageview); The images are in res/drawable path an we set them by: imageview.setImageResource(mThumbIds[position]); // mThumbIds is an array with images id's Then we know that ImageView is an extend class from View Class. View Class define a method setId(int), so: imageView.setId(mThumbIds[position]); Here we considere mThumbIds as public array. To get the reference of image id we can set next: public AdapterView.OnItemClickListener pulsarImagen = new AdapterView.OnItemClickListener() { public void onItemClick(AdapterView? arg0, View arg1, int arg2,long arg3) { Intent intent = new Intent(this , new.class); intent.putExtra(id, arg1.getId()); startActivity(intent); //finish(); } }; arg1 is a View and we can get the id That's all Thanks to all ENM On 20 nov, 09:56, Abderrahim Baallal baallal.abderra...@gmail.com wrote: hi, i did this trick but in other way ,in the same activity and in the same layout, i define an imageView witch hidden , and when when i click in the gridView i set the image in this imageView and i set it also visible . -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Pass image to a new Intent
Hi I've got a problem My app show a first layout like: Gridview1 (3 images in 1 row) ImageView1 (1 image) Gridview2 (3 images in 1 row) ImgaeView2 (1 image) Gridview3 (3 images in 1 row) ImgaeView3 (1 image) When you clik over an image it will be open full screen in a second layout The problem was that I don't know how to pass the image to the new intent Now I've the next code: public AdapterView.OnItemClickListener pulsarImagen = new AdapterView.OnItemClickListener() { public void onItemClick(AdapterView? arg0, View arg1, int arg2,long arg3) { Intent intent = new Intent(GridViewer.this , GalleryViewer.class); intent.putExtra(id, arg0.getItemIdAtPosition (arg2)); startActivity(intent); //finish(); } }; But the ItemID is always 0... Before I've only one gridview and then I passed the item's position. But now I've 3 different gridviews and I don't know if the position of item selecte it's from gridview 1,2 or 3. I supose that the great solutin it will be to pass the id resource (image) but I don't know how to pass it. Can you help me? ENM -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Need an invitation to google Wave?
One for me please! Thnkx On Nov 1, 1:20 am, Auguste Lunang legraphi...@gmail.com wrote: Hi, i have some google wave. invits to share. tell me if u want .. thx -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Ad test problem in app with AdMob
I solve it! The problem wan in AndroidManifest.xml in line Code : meta-data android:value=a14adf472974adb android:name=Test / Test is my AdMob campain name and here is the attribute name from publisher id. Here is the correct line meta-data android:value=a14adf472974adb android:name=ADMOB_PUBLISHER_ID / Thnkx On Oct 22, 12:32 am, Wayne Wenthin wa...@fuligin.com wrote: The first two lines of the Logcat output pretty much sum it up:10-21 17:57:25.064: INFO/AdMob SDK(722): The user ID is null 10-21 17:57:25.124: DEBUG/AdMob SDK(722): Publisher ID read from AndroidManifest.xml is null The user ID is null. I'm assuming that it must be put in the AndroidManifest.xml based on the second line. On Wed, Oct 21, 2009 at 11:03 AM, erick nicolas ericknico...@gmail.comwrote: Hi, I've got a problem with my Android app. It doesn't show test ad and I don't understand why. Here is my java code: package org.ifies.android; import android.app.Activity; import android.graphics.Color; import android.os.Bundle; import android.widget.TableLayout; import android.widget.TableRow; import android.widget.TextView; import com.admob.android.ads.AdManager; import com.admob.android.ads.AdView; public class AdmobExample extends Activity{ private TextView example_message; private AdView example_adview; �...@override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.setContentView(R.layout.main); example_adview = (AdView) findViewById(R.id.ad); example_adview.setVisibility(AdView.VISIBLE); example_message = (TextView) findViewById(R.id.example_message); example_message.setVisibility(TextView.VISIBLE); // example_message.setText(This is an example of AdMob for Android); } } Here my xml layout LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; xmlns:app=http://schemas.android.com/apk/res/org.ifies.android; android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:layout_gravity=bottom TextView android:id=@+id/example_message android:layout_width=wrap_content android:layout_height=wrap_content android:text=TextView android:layout_weight=1 / com.admob.android.ads.AdView android:id=@+id/ad android:visibility=gone android:layout_width=fill_parent android:layout_height=wrap_content android:layout_alignParentBottom=true app:backgroundColor=#FF app:textColor=#00 app:keywords=Android game app:testing=true / /LinearLayout Here is the AndroidManifest.xml ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=org.ifies.android android:versionCode=1 android:versionName=1.0 application android:icon=@drawable/icon android:label=@string/ app_name activity android:name=.AdmobExample android:label=@string/app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity meta-data android:value=a14adf472974adb android:name=Test / /application uses-sdk android:minSdkVersion=2 / uses-permission android:name=android.permission.INTERNET / /manifest And here is the logcat when app starts 10-21 17:57:25.064: INFO/AdMob SDK(722): The user ID is null 10-21 17:57:25.124: DEBUG/AdMob SDK(722): Publisher ID read from AndroidManifest.xml is null 10-21 17:57:25.144: ERROR/AdMob SDK(722): Could not read ADMOB_PUBLISHER_ID meta-data from AndroidManifest.xml. 10-21 17:57:25.144: ERROR/AdMob SDK(722): java.lang.NullPointerException 10-21 17:57:25.144: ERROR/AdMob SDK(722): at com.admob.android.ads.AdManager.getPublisherId(AdManager.java:157) 10-21 17:57:25.144: ERROR/AdMob SDK(722): at com.admob.android.ads.AdRequester.buildParamString(AdRequester.java: 184) 10-21 17:57:25.144: ERROR/AdMob SDK(722): at com.admob.android.ads.AdRequester.requestAd(AdRequester.java:67) 10-21 17:57:25.144: ERROR/AdMob SDK(722): at com.admob.android.ads.AdView$1.run(AdView.java:317) 10-21 17:57:25.244: WARN/AdMob SDK(722): Could not get ad from AdMob servers. 10-21 17:57:25.244: WARN/AdMob SDK(722): java.lang.IllegalStateException: Publisher ID is not set! To serve ads you must set your publisher ID assigned fromwww.admob.com. Either add it to AndroidManifest.xml under the application tag or call AdManager.setPublisherId(). 10-21 17:57:25.244: WARN/AdMob SDK(722): at com.admob.android.ads.AdRequester.buildParamString(AdRequester.java: 188) 10-21 17:57:25.244: WARN/AdMob SDK(722
[android-developers] Ad test problem in app with AdMob
Hi, I've got a problem with my Android app. It doesn't show test ad and I don't understand why. Here is my java code: package org.ifies.android; import android.app.Activity; import android.graphics.Color; import android.os.Bundle; import android.widget.TableLayout; import android.widget.TableRow; import android.widget.TextView; import com.admob.android.ads.AdManager; import com.admob.android.ads.AdView; public class AdmobExample extends Activity{ private TextView example_message; private AdView example_adview; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.setContentView(R.layout.main); example_adview = (AdView) findViewById(R.id.ad); example_adview.setVisibility(AdView.VISIBLE); example_message = (TextView) findViewById(R.id.example_message); example_message.setVisibility(TextView.VISIBLE); // example_message.setText(This is an example of AdMob for Android); } } Here my xml layout LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; xmlns:app=http://schemas.android.com/apk/res/org.ifies.android; android:orientation=vertical android:layout_width=fill_parent android:layout_height=fill_parent android:layout_gravity=bottom TextView android:id=@+id/example_message android:layout_width=wrap_content android:layout_height=wrap_content android:text=TextView android:layout_weight=1 / com.admob.android.ads.AdView android:id=@+id/ad android:visibility=gone android:layout_width=fill_parent android:layout_height=wrap_content android:layout_alignParentBottom=true app:backgroundColor=#FF app:textColor=#00 app:keywords=Android game app:testing=true / /LinearLayout Here is the AndroidManifest.xml ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=org.ifies.android android:versionCode=1 android:versionName=1.0 application android:icon=@drawable/icon android:label=@string/ app_name activity android:name=.AdmobExample android:label=@string/app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity meta-data android:value=a14adf472974adb android:name=Test / /application uses-sdk android:minSdkVersion=2 / uses-permission android:name=android.permission.INTERNET / /manifest And here is the logcat when app starts 10-21 17:57:25.064: INFO/AdMob SDK(722): The user ID is null 10-21 17:57:25.124: DEBUG/AdMob SDK(722): Publisher ID read from AndroidManifest.xml is null 10-21 17:57:25.144: ERROR/AdMob SDK(722): Could not read ADMOB_PUBLISHER_ID meta-data from AndroidManifest.xml. 10-21 17:57:25.144: ERROR/AdMob SDK(722): java.lang.NullPointerException 10-21 17:57:25.144: ERROR/AdMob SDK(722): at com.admob.android.ads.AdManager.getPublisherId(AdManager.java:157) 10-21 17:57:25.144: ERROR/AdMob SDK(722): at com.admob.android.ads.AdRequester.buildParamString(AdRequester.java: 184) 10-21 17:57:25.144: ERROR/AdMob SDK(722): at com.admob.android.ads.AdRequester.requestAd(AdRequester.java:67) 10-21 17:57:25.144: ERROR/AdMob SDK(722): at com.admob.android.ads.AdView$1.run(AdView.java:317) 10-21 17:57:25.244: WARN/AdMob SDK(722): Could not get ad from AdMob servers. 10-21 17:57:25.244: WARN/AdMob SDK(722): java.lang.IllegalStateException: Publisher ID is not set! To serve ads you must set your publisher ID assigned from www.admob.com. Either add it to AndroidManifest.xml under the application tag or call AdManager.setPublisherId(). 10-21 17:57:25.244: WARN/AdMob SDK(722): at com.admob.android.ads.AdRequester.buildParamString(AdRequester.java: 188) 10-21 17:57:25.244: WARN/AdMob SDK(722): at com.admob.android.ads.AdRequester.requestAd(AdRequester.java:67) 10-21 17:57:25.244: WARN/AdMob SDK(722): at com.admob.android.ads.AdView$1.run(AdView.java:317) 10-21 17:57:25.264: INFO/AdMob SDK(722): Server replied that no ads are available (141ms) I attach a picture from my admob acount settingIs. I'm developing with Eclipse, Android SDK 1.5 under Kubuntu. Can anyone help me please? Thanks --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: Google wave invitations...?
Please me too thnkx On Oct 16, 5:41 am, Kenneth Adam Miller kennethadammil...@gmail.com wrote: Who wants to be in Google wave? I have 16 invitations --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] AdMobExample no visibility ad
Hi I don't understand why my app don't show test ad. It's only show text view. Here is: -layout FrameLayout xmlns:android=http://schemas.android.com/apk/res/android; xmlns:app=http://schemas.android.com/apk/res/org.ifies.android; android:layout_width=fill_parent android:layout_height=fill_parent RelativeLayout android:layout_width=fill_parent android:layout_height=fill_parent com.admob.android.ads.AdView android:id=@+id/ad android:visibility=gone android:layout_width=fill_parent android:layout_height=wrap_content android:layout_alignParentBottom=true app:backgroundColor=#00 app:textColor=#FF app:keywords=Android game app:testing=true / TextView android:id=@+id/example_message android:layout_width=wrap_content android:layout_height=wrap_content android:text=@string/lunar_layout_text_text android:layout_weight=1 / /RelativeLayout /FrameLayout -attars.xml ?xml version=1.0 encoding=utf-8? resources declare-styleable name=com.admob.android.ads.AdView attr name=testing format=boolean / attr name=backgroundColor format=color / attr name=textColor format=color / attr name=keywords format=string / attr name=refreshInterval format=integer / attr name=isGoneWithoutAd format=boolean / /declare-styleable /resources -app.java package org.ifies.android; import android.app.Activity; import android.graphics.Color; import android.os.Bundle; import android.widget.TableLayout; import android.widget.TableRow; import android.widget.TextView; import com.admob.android.ads.AdManager; import com.admob.android.ads.AdView; public class AdmobExample extends Activity{ private TextView example_message; private AdView example_adview; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); this.setContentView(R.layout.main); example_adview = (AdView) findViewById(R.id.ad); example_adview.setVisibility(AdView.VISIBLE); example_message = (TextView) findViewById(R.id.example_message); example_message.setVisibility(TextView.VISIBLE); } } -Manifest ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=org.ifies.android android:versionCode=1 android:versionName=1.0 application android:icon=@drawable/icon android:label=@string/ app_name meta-data android:value=a14ac86db5709d9 android:name=Default / activity android:name=.AdmobExample android:label=@string/app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity /application uses-sdk android:minSdkVersion=2 / uses-permission android:name=android.permission.INTERNET / /manifest I'm developing under Kubuntu,Eclipse and Android SDK 1.5 What's wrong?? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---