Hi Filip,
Yes it's the correct file name.. I'll show a snippet of the code:
public class thenNnowMode extends Activity implements
SurfaceHolder.Callback{
SurfaceView tnnSurfaceView;
SurfaceHolder mSurfaceHolder;
Camera tnnCamera;
boolean mPreviewRunning = false;
private Context mContext = this;
ImageView transparencyPreview;
Bitmap TNNPicture;
TextView blinktext;
Animation animation;
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.thennnowmode);
Bundle w = getIntent().getExtras();
, so that's how I get my Bundle W ! And this is the way I send it:
Intent addIntent = new Intent(v.getContext(), thenNnowMode.class);
Bundle w = new Bundle();
String activityName = "addPic";
w.putString("activity", activityName);
w.putParcelable("bitmap", selectedDeviceImage);
//
a.putString("id", picId);
addIntent.putExtras(w);
startActivity(addIntent);
finish
();
The thingis.. no matter which class I put here
Intent addIntent = new Intent(v.getContext(), thenNnowMode.class);
The application always take me to thenNnow.class
So I think the problem might be on the class that is creating the
intent and not the one receinvg it
On Aug 23, 2010, at 9:58 AM, Filip Havlicek wrote:
Hi Pedro,
are you sure you are using correct class name (shouldn't be an issue
if it starts fine, but just to be sure) and that you are bundling
the "thenNnowMode" class with your application? I think it might
happen that you are not bundling it and then the intent resolver
tries to find suitable class to deliver the intent and chooses the
"thenNnow" class, which is similar to "thenNnowMode" class (based on
their names).
Best regards,
Filip Havlicek
2010/8/23 Pedro Teixeira <[email protected]>
Hi,
No I don't want to start in that manner... the explanation for that
String is that I have two distinct classes that have an intent that
direct them to thenNnowMode. So in the thenNnowMode class I retrieve
the bundle... and check the String activity name just to know which
activity made that class start.. meaning, "just to know which
activity was previous to the one I'm now" .
Well ... I don't know what's the matter then.. the code you gave
me .. is what I already have ... this is really confusing.. anyway
Thank you
On Aug 23, 2010, at 7:40 AM, pablisco wrote:
Hi,
Can we assume that thenNnowMode is an extension of Activity? Also, I
can see you pit the string "addPic" into the bundle. I hope you are
not trying to start the activity in this manner. To open an activity,
say called AddPic (which must be an activity class) and simply call:
startActivity(new Intent(getContext(), AddPic.class));
Also some code from the mentioned classes may help solve your problem.
On Aug 22, 11:39 pm, Pedro Teixeira <[email protected]> wrote:
Hello,
I'm having a struggle understanding why my intent is not working.. I
basically just copied paste from other examples in my code that work
perfectly like this.. here it is:
Intent addIntent = new Intent(v.getContext(), thenNnowMode.class);
Bundle w = new Bundle();
String activityName = "addPic";
w.putString("activity", activityName);
w.putParcelable("bitmap", selectedDeviceImage);
//
a.putString("id", picId);
addIntent.putExtras(w);
startActivity(addIntent);
finish
();
The intent is opening a different class called thenNnow.class instead
of thenNnowMode.class.. and I have no idea why this is happening.. any
suggestion? I've tried sending the intent to open other activities
other than thenNnowMode but it always opens thenNnow.. am I missing
some silly syntax mistake? It's so strange.. its the same code
PS: Im not sure if it's relevant but the thenNnowMode class uses the
device camera
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
Pedro Teixeira
www.pedroteixeira.org
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
Pedro Teixeira
www.pedroteixeira.org
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en