[android-developers] Re: Pass image to a new Intent

2009-11-24 Thread erick nicolas
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 
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

2009-11-19 Thread erick nicolas
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?

2009-11-02 Thread erick nicolas
One for me please!
Thnkx

On Nov 1, 1:20 am, Auguste Lunang  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

2009-10-22 Thread erick nicolas

I solve it!
The problem wan in AndroidManifest.xml in line
Code :


Test is my AdMob campain name and here is the attribute name from
publisher id.

Here is the correct line


Thnkx

On Oct 22, 12:32 am, Wayne Wenthin  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 wrote:
>
>
>
>
>
> > 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
>
> >  >   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">
>
> >     >       android:id="@+id/example_message"
> >       android:layout_width="wrap_content"
> >       android:layout_height="wrap_content"
> >       android:text="TextView"
> >       android:layout_weight="1" />
>
> >     >          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"
> >        />
>
> > 
>
> > Here is the AndroidManifest.xml
>
> > 
> > http://schemas.android.com/apk/res/android";
> >      package="org.ifies.android"
> >      android:versionCode="1"
> >      android:versionName="1.0">
> >    
> >         >                  android:label="@string/app_name">
> >            
> >                
> >                 > android:name="android.intent.category.LAUNCHER" />
> >            
> >        
> >         > android:name="Test" />
> >    
> >    
> >    
>
> > 
>
> > 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.AdVi

[android-developers] Ad test problem in app with AdMob

2009-10-21 Thread erick nicolas

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

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">







Here is the AndroidManifest.xml


http://schemas.android.com/apk/res/android";
  package="org.ifies.android"
  android:versionCode="1"
  android:versionName="1.0">














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  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...?

2009-10-19 Thread erick nicolas

Please me too

thnkx

On Oct 16, 5:41 am, Kenneth Adam Miller 
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

2009-10-05 Thread erick nicolas

Hi
I don't understand why my app don't show test ad. It's only show text
view. Here is:

-layout

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">






 


-attars.xml













-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


http://schemas.android.com/apk/res/android";
  package="org.ifies.android"
  android:versionCode="1"
  android:versionName="1.0">














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
-~--~~~~--~~--~--~---