[android-developers] Re: Cam picture 'bigger' then preview

2010-07-25 Thread EnnaN
For anyone interested: The problem is there on a 1.5 G1, but not on a
2.1 Milestone/Droid. It might be the handset or the OS version, which
i don't know.

The basics of the problem as far as I can see, is that the preview is
returned in 2:3 (320:480), and the picture will be in 3:4 (1536x2048).
Using a scaling-factor I can at least predict _how_ the picture will
change.
On the milestone/droid the numbers for the preview are 480:640, which
is also 3/4, so the scaling issue is non-existent.

I tried setting the preview to something 3:4, but as the allowed
preview sizes are limited, and I can't get them with the API lvl 5
memberfunction, I didn't get very far (and haven't tried that much).

On Jul 18, 3:33 pm, EnnaN nhui...@gmail.com wrote:
 I could really use some help on this. I have not provided any code, as
 I'm hoping it is something more abstract, like limitations on the
 preview size vs. what the camera sees. But for what it's worth:

 XML:
 ?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

         my.Package.mySurfaceView
                 android:id=@+id/myView android:layout_width=wrap_content
                 android:layout_height=wrap_content /
 /LinearLayout

 the surfaceview is almost equal to the camerePreview.java code from
 the examples: the 1.5 version, not the 2.0 version with the
 getOptimalPreviewSize code.

 I can't seem to put my finger on why there is more information in the
 shot then i see in the preview :(

 On Jul 16, 9:01 pm, EnnaN nhui...@gmail.com wrote:

  I am hoping that there is something predictable i'm doing wrong, but i
  seem to have more info on picture then on the preview.

  Situation:
  I have an app basically based on the CameraPreview code. (1.5!)
  When I take a picture, the resulting image has more content then i saw
  on the preview.
  To clarify:
  Say i'm looking at something with lines, and while looking at the
  preview i see line 4 to 10. After taking the picture it suddenly is
  clear i've shot lines 5 to 11. I'm trying to sync something I draw
  ontop of the view (a line-drawing) with what i'm photographing, and I
  can't get it to match like this.

  The newest example has some extra code involving
  getSupportedPreviewSizes. I  can't use this because of the API
  version: I'm coding for min. 3, and that one is from 5.

  How can I make sure that what i see on the preview is also what i see
  on the picture?



-- 
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: Cam picture 'bigger' then preview

2010-07-18 Thread EnnaN
I could really use some help on this. I have not provided any code, as
I'm hoping it is something more abstract, like limitations on the
preview size vs. what the camera sees. But for what it's worth:


XML:
?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

my.Package.mySurfaceView
android:id=@+id/myView android:layout_width=wrap_content
android:layout_height=wrap_content /
/LinearLayout

the surfaceview is almost equal to the camerePreview.java code from
the examples: the 1.5 version, not the 2.0 version with the
getOptimalPreviewSize code.

I can't seem to put my finger on why there is more information in the
shot then i see in the preview :(

On Jul 16, 9:01 pm, EnnaN nhui...@gmail.com wrote:
 I am hoping that there is something predictable i'm doing wrong, but i
 seem to have more info on picture then on the preview.

 Situation:
 I have an app basically based on the CameraPreview code. (1.5!)
 When I take a picture, the resulting image has more content then i saw
 on the preview.
 To clarify:
 Say i'm looking at something with lines, and while looking at the
 preview i see line 4 to 10. After taking the picture it suddenly is
 clear i've shot lines 5 to 11. I'm trying to sync something I draw
 ontop of the view (a line-drawing) with what i'm photographing, and I
 can't get it to match like this.

 The newest example has some extra code involving
 getSupportedPreviewSizes. I  can't use this because of the API
 version: I'm coding for min. 3, and that one is from 5.

 How can I make sure that what i see on the preview is also what i see
 on the picture?

-- 
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] Cam picture 'bigger' then preview

2010-07-16 Thread EnnaN
I am hoping that there is something predictable i'm doing wrong, but i
seem to have more info on picture then on the preview.

Situation:
I have an app basically based on the CameraPreview code. (1.5!)
When I take a picture, the resulting image has more content then i saw
on the preview.
To clarify:
Say i'm looking at something with lines, and while looking at the
preview i see line 4 to 10. After taking the picture it suddenly is
clear i've shot lines 5 to 11. I'm trying to sync something I draw
ontop of the view (a line-drawing) with what i'm photographing, and I
can't get it to match like this.

The newest example has some extra code involving
getSupportedPreviewSizes. I  can't use this because of the API
version: I'm coding for min. 3, and that one is from 5.

How can I make sure that what i see on the preview is also what i see
on the picture?

-- 
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: On activity (re)usage en creation

2010-05-11 Thread EnnaN
  Any thoughts on how bad the current behaviour is?

 Not sure what you mean - but if you haven't touched anything else, the
 current behavior is the default behavior, which should suffice for most
 apps.


My point was, you're basically doing the equivalent of browsing a
site. But for each click (as you go from an entry to its comments, to
an entry), you start a new activity.
Now i can imagine that for a browser you'd have an activity per tab,
but not per page (as you have one superclass here, being page).
This feels more efficient

It is in this case easiest to make a separate activity for each type
of page, but this means that while 'browsing' you're making a new
activity for each click and that feels a bit redundant, expensive or..
well, something like that? I was wondering if it would be wise to make
an effort to keep both pages in the same activity.

-- 
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] On activity (re)usage en creation

2010-05-10 Thread EnnaN
A question that might be a bit general/basic knowledge, but for me it
has a quite direct background, so i'll form it as an example:

I have an activity entry showing something equivalent of a blogpost,
that might have comments. You can click somewhere to open a comments
activity. But in this activity there are links back to entries,
creating a nice line of activities.

If I call the entry activity (with an intent) on a link to show this
entry, am I re-using the old activity, or am I creating an endless
string of entry, comment, entry, comment activities (pretty cost-
ineffective that would be).

-- 
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: On activity (re)usage en creation

2010-05-10 Thread EnnaN

 You can test this pretty easily by doing what you described and backing out.
 If it's the former, you should have 2 back presses. If it's the latter, you
 should have to back out as many times as activities you started. Yes?

Good point I think! That would mean that the back-button is defined as
go back 1 activity, and not something more fancy with states. I
couldn't find the precize definition of the back button, so i'll
assume you're right and go test. In the meanwhile, is there a standard
method to ensure some sort of singleton effect?
I'll check back later.



 -
 TreKing - Chicago transit tracking app for Android-powered 
 deviceshttp://sites.google.com/site/rezmobileapps/treking

 --
 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 
 athttp://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 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: On activity (re)usage en creation

2010-05-10 Thread EnnaN
Well that was easy:

Entry 1-click-Comments 1-click-Entry 2.

Using back works like you'd expect (that sounds good), so that would
mean i'm starting a string of activities (could be bad).
Anyone care to give advice about this? Is this a big memoryproblem, or
could this just work?


Nanne.


On May 10, 8:18 pm, EnnaN nhui...@gmail.com wrote:
  You can test this pretty easily by doing what you described and backing out.
  If it's the former, you should have 2 back presses. If it's the latter, you
  should have to back out as many times as activities you started. Yes?

 Good point I think! That would mean that the back-button is defined as
 go back 1 activity, and not something more fancy with states. I
 couldn't find the precize definition of the back button, so i'll
 assume you're right and go test. In the meanwhile, is there a standard
 method to ensure some sort of singleton effect?
 I'll check back later.



  -
  TreKing - Chicago transit tracking app for Android-powered 
  deviceshttp://sites.google.com/site/rezmobileapps/treking

  --
  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 
  athttp://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 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://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 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: On activity (re)usage en creation

2010-05-10 Thread EnnaN
  In the meanwhile, is there a standard method to ensure some sort of
  singleton effect?

 Not sure what you mean by singleton effect,

I was referring to the singleton pattern (http://en.wikipedia.org/wiki/
Singleton_pattern), but as its not completely correct in this case i
obfuscaded the term somewhat to singleton effect :) Sorry bout that.

 but you probably want to look
 at the launch mode flags when starting your activities. The singleTask flag,
 in particular, might be of interest to you.

I'll check that so i'll atleast have the choice between the two
options.
Any thoughts on how bad the current behaviour is?


(ow, and many thanks for the replies :)  )

Nanne.


 -
 TreKing - Chicago transit tracking app for Android-powered 
 deviceshttp://sites.google.com/site/rezmobileapps/treking

 --
 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 
 athttp://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 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: onReceive not triggering for SEND / image

2009-09-09 Thread EnnaN

I know i'm bumping this, but i really think it's something simple i've
missed. Trying to avoid definitions i might be using incorrectly:

This is what i have:
An app that turns up in the share menu of the gallery.
Selecting my app starts it as if you would start it normally

This is what i don't have:
A way to react to the image i was looking at: i do not know where to
define code to do stuff with the picture.

Just a small nudge in the right direction is enough hopefully,
please? :D

Nanne.

On Sep 2, 1:51 pm, EnnaN nhui...@gmail.com wrote:
 Thanks!
 THen i'm just confused about how to react to the intent - at some
 point the images i'm sharing should be triggering some sort of event,
 so i can handle it. That's what i was trying to do with the receiver.
 Could you point me how to have a functions that reacts as an event-
 handler of the received 'SEND'?

 Nanne.

 On Sep 2, 8:52 am, Dianne Hackborn hack...@android.com wrote:

  SEND is an activity action.  All you need to do is have it in your manifest
  for an activity, as you have shown, and you know it is working because you
  see it in the share menu, and when you select your item in the share menu
  your activity will be launched with the intent.  That is all there is to
  it.  There is no broadcast receiver involved at all, anywhere.

  On Tue, Sep 1, 2009 at 11:42 PM, EnnaN nhui...@gmail.com wrote:

   FOr some more information: I did try to add the intent to an
   receiver in the manifest XML on a tip i got, but this not only
   didn't work to start my receiver class, it also removed the share
   option from the image i was trying to do something with... So not so
   big a succes.
   I'm sure it's a small thing i've missed (i hope ;) ), so if anyone can
   point me towards how what where?

    activity android:name=.TestingApp
              android:label=@string/app_name
        intent-filter
            action android:name=android.intent.action.MAIN /
            category android:name=android.intent.category.LAUNCHER /
        /intent-filter
     /activity
    receiver android:name=.ImageReceiver
        intent-filter
          action android:name=android.intent.action.SEND /
          category android:name=android.intent.category.DEFAULT /
          data android:mimeType=image/* /
          /intent-filter
     /receiver
   /application

   On Aug 31, 9:21 pm, EnnaN nhui...@gmail.com wrote:
There are a number of posts about getting your intent to actually
register, but unfortunately i was not able to distill a sollution from
them. The simple concept of getting an image and doing something with
it seems to be too much at the moment :(

I have the following in my manifest.xml:

application android:icon=@drawable/icon android:label=@string/
app_name android:theme=@android:style/Theme.NoTitleBar
        activity android:name=.TestingApp
                  android:label=@string/app_name
            intent-filter
                action android:name=android.intent.action.MAIN /
                category
android:name=android.intent.category.LAUNCHER /
            /intent-filter
            intent-filter
                        action 
android:name=android.intent.action.SEND
   /
                        category
   android:name=android.intent.category.DEFAULT /
                        data android:mimeType=image/* /
                        /intent-filter
        /activity
    /application

And this does what i thought it should do: when i press share on a
picture, i get my application as an option.
Now, to act on this selecting, i thought to do this:

registerReceiver(new BroadcastReceiver(){
            @Override
                public void onReceive(Context context, Intent intent) {
                   //do some stuff
                 }
        }, new IntentFilter(android.intent.action.SEND,image/*));

Now i've tried this with a seperate class, without the second argument
on the intentfilter, and with several variations of the intent
action.SEND, but it doesn't seem to fire when i share my picture.
Could anyone point me somewheres? Do i need an extra permission for
this intent maybe?

  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com

  Note: please don't send private questions to me, as I don't have time to
  provide private support, and so won't reply to such e-mails.  All such
  questions should be posted on public forums, where I and others can see and
  answer them.


--~--~-~--~~~---~--~~
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: onReceive not triggering for SEND / image

2009-09-09 Thread EnnaN

and there we are. for future reference // other readers: i was looking
for the following line:

Intent i=getIntent();

n.

On Sep 9, 12:14 pm, EnnaN nhui...@gmail.com wrote:
 I know i'm bumping this, but i really think it's something simple i've
 missed. Trying to avoid definitions i might be using incorrectly:

 This is what i have:
 An app that turns up in the share menu of the gallery.
 Selecting my app starts it as if you would start it normally

 This is what i don't have:
 A way to react to the image i was looking at: i do not know where to
 define code to do stuff with the picture.

 Just a small nudge in the right direction is enough hopefully,
 please? :D

 Nanne.

 On Sep 2, 1:51 pm, EnnaN nhui...@gmail.com wrote:

  Thanks!
  THen i'm just confused about how to react to the intent - at some
  point the images i'm sharing should be triggering some sort of event,
  so i can handle it. That's what i was trying to do with the receiver.
  Could you point me how to have a functions that reacts as an event-
  handler of the received 'SEND'?

  Nanne.

  On Sep 2, 8:52 am, Dianne Hackborn hack...@android.com wrote:

   SEND is an activity action.  All you need to do is have it in your 
   manifest
   for an activity, as you have shown, and you know it is working because you
   see it in the share menu, and when you select your item in the share menu
   your activity will be launched with the intent.  That is all there is to
   it.  There is no broadcast receiver involved at all, anywhere.

   On Tue, Sep 1, 2009 at 11:42 PM, EnnaN nhui...@gmail.com wrote:

FOr some more information: I did try to add the intent to an
receiver in the manifest XML on a tip i got, but this not only
didn't work to start my receiver class, it also removed the share
option from the image i was trying to do something with... So not so
big a succes.
I'm sure it's a small thing i've missed (i hope ;) ), so if anyone can
point me towards how what where?

 activity android:name=.TestingApp
           android:label=@string/app_name
     intent-filter
         action android:name=android.intent.action.MAIN /
         category android:name=android.intent.category.LAUNCHER /
     /intent-filter
  /activity
 receiver android:name=.ImageReceiver
     intent-filter
       action android:name=android.intent.action.SEND /
       category android:name=android.intent.category.DEFAULT /
       data android:mimeType=image/* /
       /intent-filter
  /receiver
/application

On Aug 31, 9:21 pm, EnnaN nhui...@gmail.com wrote:
 There are a number of posts about getting your intent to actually
 register, but unfortunately i was not able to distill a sollution from
 them. The simple concept of getting an image and doing something with
 it seems to be too much at the moment :(

 I have the following in my manifest.xml:

 application android:icon=@drawable/icon android:label=@string/
 app_name android:theme=@android:style/Theme.NoTitleBar
         activity android:name=.TestingApp
                   android:label=@string/app_name
             intent-filter
                 action android:name=android.intent.action.MAIN /
                 category
 android:name=android.intent.category.LAUNCHER /
             /intent-filter
             intent-filter
                         action 
 android:name=android.intent.action.SEND
/
                         category
android:name=android.intent.category.DEFAULT /
                         data android:mimeType=image/* /
                         /intent-filter
         /activity
     /application

 And this does what i thought it should do: when i press share on a
 picture, i get my application as an option.
 Now, to act on this selecting, i thought to do this:

 registerReceiver(new BroadcastReceiver(){
             @Override
                 public void onReceive(Context context, Intent intent) 
 {
                    //do some stuff
                  }
         }, new IntentFilter(android.intent.action.SEND,image/*));

 Now i've tried this with a seperate class, without the second argument
 on the intentfilter, and with several variations of the intent
 action.SEND, but it doesn't seem to fire when i share my picture.
 Could anyone point me somewheres? Do i need an extra permission for
 this intent maybe?

   --
   Dianne Hackborn
   Android framework engineer
   hack...@android.com

   Note: please don't send private questions to me, as I don't have time to
   provide private support, and so won't reply to such e-mails.  All such
   questions should be posted on public forums, where I and others can see 
   and
   answer them.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android

[android-developers] Re: onReceive not triggering for SEND / image

2009-09-09 Thread EnnaN

thanks :D

and progress is being made, hopefully no more of these bumps in the
road :D

n.

On Sep 9, 7:33 pm, Beth emez...@gmail.com wrote:
 Here is the nudge you wanted...
 Your intent filter needs to be set on an activity.  The code you
 posted shows it as a Broadcast Receiver.
 Change:
 receiver android:name=.ImageReceiver
 to
 activity android:name=.ImageReceiver
 and move all your stuff from onRecieve to onCreate.  That should take
 you forward.

 Good luck!

 On Sep 9, 10:25 am, EnnaN nhui...@gmail.com wrote:

  and there we are. for future reference // other readers: i was looking
  for the following line:

  Intent i=getIntent();

  n.

  On Sep 9, 12:14 pm, EnnaN nhui...@gmail.com wrote:

   I know i'm bumping this, but i really think it's something simple i've
   missed. Trying to avoid definitions i might be using incorrectly:

   This is what i have:
   An app that turns up in the share menu of the gallery.
   Selecting my app starts it as if you would start it normally

   This is what i don't have:
   A way to react to the image i was looking at: i do not know where to
   define code to do stuff with the picture.

   Just a small nudge in the right direction is enough hopefully,
   please? :D

   Nanne.

   On Sep 2, 1:51 pm, EnnaN nhui...@gmail.com wrote:

Thanks!
THen i'm just confused about how to react to the intent - at some
point the images i'm sharing should be triggering some sort of event,
so i can handle it. That's what i was trying to do with the receiver.
Could you point me how to have a functions that reacts as an event-
handler of the received 'SEND'?

Nanne.

On Sep 2, 8:52 am, Dianne Hackborn hack...@android.com wrote:

 SEND is an activity action.  All you need to do is have it in your 
 manifest
 for an activity, as you have shown, and you know it is working 
 because you
 see it in the share menu, and when you select your item in the share 
 menu
 your activity will be launched with the intent.  That is all there is 
 to
 it.  There is no broadcast receiver involved at all, anywhere.

 On Tue, Sep 1, 2009 at 11:42 PM, EnnaN nhui...@gmail.com wrote:

  FOr some more information: I did try to add the intent to an
  receiver in the manifest XML on a tip i got, but this not only
  didn't work to start my receiver class, it also removed the share
  option from the image i was trying to do something with... So not so
  big a succes.
  I'm sure it's a small thing i've missed (i hope ;) ), so if anyone 
  can
  point me towards how what where?

   activity android:name=.TestingApp
             android:label=@string/app_name
       intent-filter
           action android:name=android.intent.action.MAIN /
           category android:name=android.intent.category.LAUNCHER 
  /
       /intent-filter
    /activity
   receiver android:name=.ImageReceiver
       intent-filter
         action android:name=android.intent.action.SEND /
         category android:name=android.intent.category.DEFAULT /
         data android:mimeType=image/* /
         /intent-filter
    /receiver
  /application

  On Aug 31, 9:21 pm, EnnaN nhui...@gmail.com wrote:
   There are a number of posts about getting your intent to actually
   register, but unfortunately i was not able to distill a sollution 
   from
   them. The simple concept of getting an image and doing something 
   with
   it seems to be too much at the moment :(

   I have the following in my manifest.xml:

   application android:icon=@drawable/icon android:label=@string/
   app_name android:theme=@android:style/Theme.NoTitleBar
           activity android:name=.TestingApp
                     android:label=@string/app_name
               intent-filter
                   action android:name=android.intent.action.MAIN 
   /
                   category
   android:name=android.intent.category.LAUNCHER /
               /intent-filter
               intent-filter
                           action 
   android:name=android.intent.action.SEND
  /
                           category
  android:name=android.intent.category.DEFAULT /
                           data android:mimeType=image/* /
                           /intent-filter
           /activity
       /application

   And this does what i thought it should do: when i press share 
   on a
   picture, i get my application as an option.
   Now, to act on this selecting, i thought to do this:

   registerReceiver(new BroadcastReceiver(){
               @Override
                   public void onReceive(Context context, Intent 
   intent) {
                      //do some stuff
                    }
           }, new 
   IntentFilter(android.intent.action.SEND,image

[android-developers] Re: onReceive not triggering for SEND / image

2009-09-02 Thread EnnaN

FOr some more information: I did try to add the intent to an
receiver in the manifest XML on a tip i got, but this not only
didn't work to start my receiver class, it also removed the share
option from the image i was trying to do something with... So not so
big a succes.
I'm sure it's a small thing i've missed (i hope ;) ), so if anyone can
point me towards how what where?

  activity android:name=.TestingApp
android:label=@string/app_name
  intent-filter
  action android:name=android.intent.action.MAIN /
  category android:name=android.intent.category.LAUNCHER /
  /intent-filter
  /activity
  receiver android:name=.ImageReceiver
 intent-filter
action android:name=android.intent.action.SEND /
category android:name=android.intent.category.DEFAULT /
data android:mimeType=image/* /
/intent-filter
  /receiver
/application



On Aug 31, 9:21 pm, EnnaN nhui...@gmail.com wrote:
 There are a number of posts about getting your intent to actually
 register, but unfortunately i was not able to distill a sollution from
 them. The simple concept of getting an image and doing something with
 it seems to be too much at the moment :(

 I have the following in my manifest.xml:

 application android:icon=@drawable/icon android:label=@string/
 app_name android:theme=@android:style/Theme.NoTitleBar
         activity android:name=.TestingApp
                   android:label=@string/app_name
             intent-filter
                 action android:name=android.intent.action.MAIN /
                 category
 android:name=android.intent.category.LAUNCHER /
             /intent-filter
             intent-filter
                         action android:name=android.intent.action.SEND /
                         category 
 android:name=android.intent.category.DEFAULT /
                         data android:mimeType=image/* /
                         /intent-filter
         /activity
     /application

 And this does what i thought it should do: when i press share on a
 picture, i get my application as an option.
 Now, to act on this selecting, i thought to do this:

 registerReceiver(new BroadcastReceiver(){
             @Override
                 public void onReceive(Context context, Intent intent) {
                    //do some stuff
                  }
         }, new IntentFilter(android.intent.action.SEND,image/*));

 Now i've tried this with a seperate class, without the second argument
 on the intentfilter, and with several variations of the intent
 action.SEND, but it doesn't seem to fire when i share my picture.
 Could anyone point me somewheres? Do i need an extra permission for
 this intent maybe?
--~--~-~--~~~---~--~~
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: onReceive not triggering for SEND / image

2009-09-02 Thread EnnaN

Thanks!
THen i'm just confused about how to react to the intent - at some
point the images i'm sharing should be triggering some sort of event,
so i can handle it. That's what i was trying to do with the receiver.
Could you point me how to have a functions that reacts as an event-
handler of the received 'SEND'?

Nanne.

On Sep 2, 8:52 am, Dianne Hackborn hack...@android.com wrote:
 SEND is an activity action.  All you need to do is have it in your manifest
 for an activity, as you have shown, and you know it is working because you
 see it in the share menu, and when you select your item in the share menu
 your activity will be launched with the intent.  That is all there is to
 it.  There is no broadcast receiver involved at all, anywhere.



 On Tue, Sep 1, 2009 at 11:42 PM, EnnaN nhui...@gmail.com wrote:

  FOr some more information: I did try to add the intent to an
  receiver in the manifest XML on a tip i got, but this not only
  didn't work to start my receiver class, it also removed the share
  option from the image i was trying to do something with... So not so
  big a succes.
  I'm sure it's a small thing i've missed (i hope ;) ), so if anyone can
  point me towards how what where?

   activity android:name=.TestingApp
             android:label=@string/app_name
       intent-filter
           action android:name=android.intent.action.MAIN /
           category android:name=android.intent.category.LAUNCHER /
       /intent-filter
    /activity
   receiver android:name=.ImageReceiver
       intent-filter
         action android:name=android.intent.action.SEND /
         category android:name=android.intent.category.DEFAULT /
         data android:mimeType=image/* /
         /intent-filter
    /receiver
  /application

  On Aug 31, 9:21 pm, EnnaN nhui...@gmail.com wrote:
   There are a number of posts about getting your intent to actually
   register, but unfortunately i was not able to distill a sollution from
   them. The simple concept of getting an image and doing something with
   it seems to be too much at the moment :(

   I have the following in my manifest.xml:

   application android:icon=@drawable/icon android:label=@string/
   app_name android:theme=@android:style/Theme.NoTitleBar
           activity android:name=.TestingApp
                     android:label=@string/app_name
               intent-filter
                   action android:name=android.intent.action.MAIN /
                   category
   android:name=android.intent.category.LAUNCHER /
               /intent-filter
               intent-filter
                           action android:name=android.intent.action.SEND
  /
                           category
  android:name=android.intent.category.DEFAULT /
                           data android:mimeType=image/* /
                           /intent-filter
           /activity
       /application

   And this does what i thought it should do: when i press share on a
   picture, i get my application as an option.
   Now, to act on this selecting, i thought to do this:

   registerReceiver(new BroadcastReceiver(){
               @Override
                   public void onReceive(Context context, Intent intent) {
                      //do some stuff
                    }
           }, new IntentFilter(android.intent.action.SEND,image/*));

   Now i've tried this with a seperate class, without the second argument
   on the intentfilter, and with several variations of the intent
   action.SEND, but it doesn't seem to fire when i share my picture.
   Could anyone point me somewheres? Do i need an extra permission for
   this intent maybe?

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.
--~--~-~--~~~---~--~~
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] onReceive not triggering for SEND / image

2009-08-31 Thread EnnaN

There are a number of posts about getting your intent to actually
register, but unfortunately i was not able to distill a sollution from
them. The simple concept of getting an image and doing something with
it seems to be too much at the moment :(

I have the following in my manifest.xml:

application android:icon=@drawable/icon android:label=@string/
app_name android:theme=@android:style/Theme.NoTitleBar
activity android:name=.TestingApp
  android:label=@string/app_name
intent-filter
action android:name=android.intent.action.MAIN /
category
android:name=android.intent.category.LAUNCHER /
/intent-filter
intent-filter
action android:name=android.intent.action.SEND /
category 
android:name=android.intent.category.DEFAULT /
data android:mimeType=image/* /
/intent-filter
/activity
/application

And this does what i thought it should do: when i press share on a
picture, i get my application as an option.
Now, to act on this selecting, i thought to do this:

registerReceiver(new BroadcastReceiver(){
@Override
public void onReceive(Context context, Intent intent) {
   //do some stuff
 }
}, new IntentFilter(android.intent.action.SEND,image/*));

Now i've tried this with a seperate class, without the second argument
on the intentfilter, and with several variations of the intent
action.SEND, but it doesn't seem to fire when i share my picture.
Could anyone point me somewheres? Do i need an extra permission for
this intent maybe?

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