[android-developers] Re: Intents

2011-08-10 Thread kypriakos
Ok the answer to what I asked last is yes, I was able to get the Activities to communicate via the Extras. The Preview starts, snaps pictures and then the subsequent call stops the preview. Now regarding to what Dianne pointed out, I will look into her suggestions and see where we need to inject

[android-developers] Re: Intents

2011-08-10 Thread kypriakos
You have legitimate points Dianne .. thanks for the detailed feedback. I am running a web server on the phone (iJetty) and the servlet that handles incoming requests starts an activity that puts the phone into a camera preview. This works fine. I wanted subsequent service calls to reach the same

Re: [android-developers] Re: Intents

2011-08-09 Thread Dianne Hackborn
On Tue, Aug 9, 2011 at 7:56 AM, kypriakos wrote: > I am running a servlet on the phone that starts an Intent on an > Activity class. > The class starts the camera preview and takes a picture. Then I have a > subsequent > Intent start on the same Activity class to stop the preview. The > second In

[android-developers] Re: Intents

2011-08-09 Thread kypriakos
@Jim Yes it does get called. I added the NEW_TASK and the SINGLE_TOP flags to be able to start the intent and then to start subsequent ones. But as you note here if I don't remove the NEW_TASK flag each tiem I revisit the launching code I will keep generating a new intent - right? Regarding your pr

[android-developers] Re: Intents

2011-08-09 Thread Jim
Didn't see your previous post... FLAG_ACTIVITY_SINGLE_TOP causes a call to onNewIntent, but FLAG_ACTIVITY_NEW_TASK starts a new task and new activity. Is onNewIntent even being called? It shouldn't be since FLAG_ACTIVITY_NEW_TASK means the activity can't be recycled, it must be created in the curre

[android-developers] Re: Intents

2011-08-09 Thread Jim
That's true. Do you do anything in onResume() to alter the data? And, this might sound silly, but are you sure a String was stored where getString is called? (For example, if you putExtra a bundle, then getExtra returns a Bundle, not a string...) Hope that helps. -Jim On Aug 9, 1:16 pm, kypriako

Re: [android-developers] Re: Intents

2011-08-09 Thread Kostya Vasilyev
I don't believe you've posted an actual logcat stack trace for the crash yet - perhaps the time has come? 09.08.2011 22:26, kypriakos пишет: And I start the intents each time with this: Intent intent = new Intent(); intent.setClass(androidContext, myClass.class); int

[android-developers] Re: Intents

2011-08-09 Thread kypriakos
And I start the intents each time with this: Intent intent = new Intent(); intent.setClass(androidContext, myClass.class); intent.setFlags(intent.FLAG_ACTIVITY_NEW_TASK); intent.addFlags(intent.FLAG_ACTIVITY_SINGLE_TOP); intent.putExtra("from", stop);

[android-developers] Re: Intents

2011-08-09 Thread kypriakos
Gotcha - but do you agree that the following should work and return the Extras bundle? @Override protected void onNewIntent(Intent intent){ Bundle extras = intent.getExtras(); ... Like Mark said, the intent var that is passed to the onNewIntent each

[android-developers] Re: Intents

2011-08-09 Thread Jim
Since setIntent() stores a reference to the intent sent to onNewIntent(), you need to either capture the data there or copy the Intent to a local variable and reference it. Once onNewIntent() finishes, the Intent goes away and your reference is null. Try that... -Jim On Aug 9, 10:46 am, kypriako

[android-developers] Re: Intents

2011-08-09 Thread kypriakos
> Blech. he he ;) > Use the Intent supplied to onNewIntent(). The Intent returned by > getIntent() will always be the original Intent used to create the > activity. But I am - and that's where the null exception occurs. Not sure if the setIntent or the super are needed. I will poke around a bi

Re: [android-developers] Re: Intents

2011-08-09 Thread Mark Murphy
On Tue, Aug 9, 2011 at 10:56 AM, kypriakos wrote: > I am running a servlet on the phone that starts an Intent on an > Activity class. Blech. > The class starts the camera preview and takes a picture. Then I have a > subsequent > Intent start on the same Activity class to stop the preview. The >

[android-developers] Re: Intents

2011-08-09 Thread kypriakos
I am not sure what you mean Dianne - and that's probably because I am still not sure the way I think of this is the right way. I am running a servlet on the phone that starts an Intent on an Activity class. The class starts the camera preview and takes a picture. Then I have a subsequent Intent s

Re: [android-developers] Re: Intents

2011-08-08 Thread Dianne Hackborn
No. That is telling you about the new Intent. If you want to remember it, you will need to remember it yourself. On Mon, Aug 8, 2011 at 8:43 PM, kypriakos wrote: > > Exactly! > > I am getting nulls when accessing the extras that I set from the > launching intent: > >@Override >prot

[android-developers] Re: Intents

2011-08-08 Thread kypriakos
Exactly! I am getting nulls when accessing the extras that I set from the launching intent: @Override protected void onNewIntent(Intent intent){ // super.onNewIntent(intent); setIntent(intent); Log.v("NotifServImpl","# = "+inten

Re: [android-developers] Re: Intents

2011-08-08 Thread Mark Murphy
On Mon, Aug 8, 2011 at 2:27 PM, kypriakos wrote: > Never mind - most likely missing the Override allows for anything ;) Bingo. @Override has no effect at runtime, but it's a compile-time sanity check. Rather useful, particularly for classes with lots of generics (e.g., AsyncTask). -- Mark Murph

[android-developers] Re: Intents

2011-08-08 Thread kypriakos
Never mind - most likely missing the Override allows for anything ;) On Aug 7, 6:38 am, Mark Murphy wrote: > On Sun, Aug 7, 2011 at 4:25 AM, kypriakos wrote: > > I start an new intent on an activity: > > > Intent intent = new Intent(); > > > intent.seClass (..); > > > intent.setFlags(...NEW_TAS

Re: [android-developers] Re: Intents

2011-08-08 Thread Kostya Vasilyev
Once you add "@Override", only one will. -- Kostya Vasilyev 08.08.2011 22:18 пользователь "kypriakos" написал: > > One additional question - I see that both OnNewIntent and onNewIntent > compile > fine. Is there a difference between the two? > > On Aug 7, 6:38 am, Mark Murphy wrote: >> On Sun, A

[android-developers] Re: Intents

2011-08-08 Thread kypriakos
One additional question - I see that both OnNewIntent and onNewIntent compile fine. Is there a difference between the two? On Aug 7, 6:38 am, Mark Murphy wrote: > On Sun, Aug 7, 2011 at 4:25 AM, kypriakos wrote: > > I start an new intent on an activity: > > > Intent intent = new Intent(); > > >

[android-developers] Re: Intents

2011-08-08 Thread kypriakos
Hi Mark, right on! An oversight on my part. Thanks On Aug 7, 6:38 am, Mark Murphy wrote: > On Sun, Aug 7, 2011 at 4:25 AM, kypriakos wrote: > > I start an new intent on an activity: > > > Intent intent = new Intent(); > > > intent.seClass (..); > > > intent.setFlags(...NEW_TASK); > > intent.ad

[android-developers] Re: Intents doesn't resume my activity properly

2010-11-24 Thread umakantpatil
But I'm just confused why it is stopped ? And also If i handle it oncreate then may be in some mobiles it wont stop.. then my app will break.. Why its not behaving normal ? On Nov 24, 4:59 pm, Kumar Bibek wrote: > If it is stopped, then it will call onCreate. You cannot escape that. > > Kumar Bi

Re: [android-developers] Re: Intents doesn't resume my activity properly

2010-11-24 Thread Kumar Bibek
If it is stopped, then it will call onCreate. You cannot escape that. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Wed, Nov 24, 2010 at 5:23 PM, umakantpatil wrote: > > I logged all the functions and got to know the thing. But I don't know > why its happening. just need

[android-developers] Re: Intents doesn't resume my activity properly

2010-11-24 Thread umakantpatil
I logged all the functions and got to know the thing. But I don't know why its happening. just need suggestion from somebody. When Im in Activity A. I open browser for twitter authentication. That time i logged. On pause, on stop are called in activity. Now when i authenticate in browser then br

[android-developers] Re: Intents doesn't resume my activity properly

2010-11-24 Thread umakantpatil
Emailed you the code. Its not that complicated. I have also described in email , which functions does what.. Hope you help me out.. My head has gone mad. I cant get it anymore.. Thanks On Nov 24, 2:58 pm, Kumar Bibek wrote: > I really cannot suggest you anything without looking at your whole cod

Re: [android-developers] Re: Intents doesn't resume my activity properly

2010-11-24 Thread Kumar Bibek
I really cannot suggest you anything without looking at your whole code now. Sorry. Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Wed, Nov 24, 2010 at 3:23 PM, umakantpatil wrote: > See.. > I have page which show article. On menu click a function it sets new > content as b

[android-developers] Re: Intents doesn't resume my activity properly

2010-11-24 Thread umakantpatil
See.. I have page which show article. On menu click a function it sets new content as below setContentView(R.layout.sharing); Now this layout has edittext and button. On click on button ..It goes as given in that tutorial.. But when use authenticates.. Then in onResume I get error because I thin

Re: [android-developers] Re: Intents doesn't resume my activity properly

2010-11-24 Thread Kumar Bibek
Umm, I am still confused. How are you changing the content view of the Activity. Is it really required? If you are getting NullPointer exception, then it means that the EditText that you are trying to initialize is not presently on the Activity. It's simple enough, if you see the EditText on your

[android-developers] Re: Intents doesn't resume my activity properly

2010-11-24 Thread umakantpatil
I posted two messages here. One of them is missing... Let again explain everything.. I do all this stuff in single activity. onCreate I list articles.. On click on any single article I open that article. So there are options to share. On click of that I open a page in same activity using setconte

[android-developers] Re: Intents doesn't resume my activity properly

2010-11-24 Thread umakantpatil
As i told that I used EditText content = (EditText) findViewById(R.id.content); twitter.updateStatus(content.getText().toString() + " #testing"); If i remove EditText content = (EditText) findViewById(R.id.content); and directly post. twitter.updateStatus("Testing my tweets #testing"); then it

[android-developers] Re: Intents in broadcastrecievers

2010-08-01 Thread Kumar Bibek
Whats the error/problem? -Kumar Bibek http://tech-droid.blogspot.com On Jul 30, 6:53 pm, run wrote: > hi, > i wanted to place an intent in broadcastreceiver , > by which i can call other applications. > >   public void onReceive(Context context, Intent intent) >     { >         //---get the SMS

[android-developers] Re: Intents to play video on YouTube App

2010-05-24 Thread Moto
One pointer I can give you is plug your phone to the debugger so that you can see log events, and find an app or something that triggers the YouTube app. See the intents used and that way you could theoretically figure out what intents to use :P -Moto On May 22, 1:35 pm, Yenchi wrote: > Hi

Re: [android-developers] Re: Intents problem

2010-05-10 Thread Mark Murphy
Esdras Beleza wrote: > 5) Here comes the problem: if I go to other application (browser, for > example) and go back to my application, the intent seems to be received > again, onResume() is called and the dialog A, B or C is shown. But they > must be shown *only* when the widget is clicked. > > Any

Re: [android-developers] Re: Intents problem

2010-05-10 Thread Esdras Beleza
On 8 May 2010 10:08, Mark Murphy wrote: > Esdras Beleza wrote: > > I don't know if I understood your advice, but I tried some things like > > that. > > > > I tried to put new data into the intent (like a "used" flag) and > > updating the intent with setIntent(updatedIntent). I also tried to > > c

Re: [android-developers] Re: Intents problem

2010-05-08 Thread Mark Murphy
Esdras Beleza wrote: > I don't know if I understood your advice, but I tried some things like > that. > > I tried to put new data into the intent (like a "used" flag) and > updating the intent with setIntent(updatedIntent). I also tried to > create an useless new intent and replace the applicatio

Re: [android-developers] Re: Intents problem

2010-05-08 Thread Esdras Beleza
On 8 May 2010 05:39, blew wrote: > You may want to update your intent with the latest app state just > before the user leaves your application. > That way your onResume will work with the most up-to-date intent: > Either the one from updated by your widget or the one updated by your > app itself.

[android-developers] Re: Intents problem

2010-05-08 Thread blew
You may want to update your intent with the latest app state just before the user leaves your application. That way your onResume will work with the most up-to-date intent: Either the one from updated by your widget or the one updated by your app itself. On May 8, 12:25 am, Esdras Beleza wrote:

[android-developers] Re: Intents

2010-02-15 Thread Christopher Walker
I forgot. That was the problem. Thank you. On Feb 15, 7:33 pm, TreKing wrote: > On Mon, Feb 15, 2010 at 6:27 PM, Christopher Walker < > > sven.hakons...@gmail.com> wrote: > > The app appears to crash shortly after I reach > > startActivityForResult(i, NEW_GAME); > > but before I make it into the

Re: [android-developers] Re: Intents

2010-02-15 Thread TreKing
On Mon, Feb 15, 2010 at 6:27 PM, Christopher Walker < sven.hakons...@gmail.com> wrote: > The app appears to crash shortly after I reach > startActivityForResult(i, NEW_GAME); > but before I make it into the constructor. > Did you remember to declare this activity in your manifest? --

Re: [android-developers] Re: Intents

2010-02-15 Thread Mark Murphy
Christopher Walker wrote: > The app appears to crash shortly after I reach > startActivityForResult(i, NEW_GAME); > but before I make it into the constructor. I discovered this using > breakpoints, but I don't know how to examine the stack trace. Well, I don't use Eclipse much. If you eliminate th

[android-developers] Re: Intents

2010-02-15 Thread Christopher Walker
The app appears to crash shortly after I reach startActivityForResult(i, NEW_GAME); but before I make it into the constructor. I discovered this using breakpoints, but I don't know how to examine the stack trace. On Feb 15, 1:38 pm, Mark Murphy wrote: > Christopher Walker wrote: > > I am new to a

Re: [android-developers] Re: intents

2010-01-09 Thread Dianne Hackborn
On Sat, Jan 9, 2010 at 3:36 AM, skink wrote: > On Jan 9, 12:15 am, dane131 wrote: > > ok i will check it out..is there an easier way than that?? > you could use Context#sendBroadcast(Intent) > Yeah if the work it is to do is short (not blocking for network or UI or whatever), this works well an

[android-developers] Re: intents

2010-01-09 Thread skink
On Jan 9, 12:15 am, dane131 wrote: > ok i will check it out..is there an easier way than that?? you could use Context#sendBroadcast(Intent) pskink -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to andr

Re: [android-developers] Re: intents

2010-01-08 Thread Mark Murphy
dane131 wrote: > ok i will check it out..is there an easier way than that?? Uh, well, you wrote: > I want to call this method from application A and > send an SMS without opening the activity(the GUI) of application B but > just send an SMS in the background by calling just the method of the > ac

[android-developers] Re: intents

2010-01-08 Thread dane131
ok i will check it out..is there an easier way than that?? On 9 Ιαν, 01:06, Mark Murphy wrote: > dane131 wrote: > > how can i do that?can you give link/s ? > > Here are sample projects demonstrating an AIDL API in a service and a > separate project accessing that API: > > http://github.com/common

Re: [android-developers] Re: intents

2010-01-08 Thread Mark Murphy
dane131 wrote: > how can i do that?can you give link/s ? Here are sample projects demonstrating an AIDL API in a service and a separate project accessing that API: http://github.com/commonsguy/cw-advandroid/tree/master/AdvServices/RemoteService/ http://github.com/commonsguy/cw-advandroid/tree/mas

[android-developers] Re: intents

2010-01-08 Thread dane131
how can i do that?can you give link/s ? On 9 Ιαν, 00:52, Mark Murphy wrote: > dane131 wrote: > > well i want the GUI as well..in order to function as a proper sms > > application but i also want to use its functionality without raising > > the GUI > > Then split it into a Service (with an AIDL-ex

Re: [android-developers] Re: intents

2010-01-08 Thread Mark Murphy
dane131 wrote: > well i want the GUI as well..in order to function as a proper sms > application but i also want to use its functionality without raising > the GUI Then split it into a Service (with an AIDL-exposed API) and your current set of activities. -- Mark Murphy (a Commons Guy) http://co

[android-developers] Re: intents

2010-01-08 Thread dane131
well i want the GUI as well..in order to function as a proper sms application but i also want to use its functionality without raising the GUI On 9 Ιαν, 00:46, Jason Proctor wrote: > if app B needs to be called via an intent, but has no UI, consider > making it a Service? > > > > > > >i have two

Re: [android-developers] Re: Intents for google maps

2009-12-01 Thread sreekanth nambu
Hi Geoffrey, Thanks very much for the help.The sample code you have send is running absolutely fine. Regards Srikanth Nambu On Mon, Nov 30, 2009 at 8:56 AM, Geoffrey Monté wrote: > > > On 29 nov, 19:53, sreekanth nambu wrote: > > Hi all > > > >I am developing a android project named " Sma

[android-developers] Re: Intents for google maps

2009-11-30 Thread Geoffrey Monté
On 29 nov, 19:53, sreekanth nambu wrote: > Hi all > >    I am developing a android project named " Smart Google Maps ".For > my App, I need to use Google Maps Application which is built in with > Android SDK 1.6.I need to call google Maps from my App. How could I do > that? > > I am able to use

[android-developers] Re: Intents for google maps

2009-11-29 Thread Nithin
Hi Sreekanth, You need to get the google map API key and launch your application with Google API 4 from AVD manager. The procedure for getting API key is, http://groups.google.com/group/android-developers/browse_thread/thread/38545a723378005f/7cfc6ca3237bf348 Thanks On Nov 29, 11:53 pm, sreekan

[android-developers] Re: Intents and navigating the GUI

2009-11-03 Thread PJ
Don't create a new intent for the main GUI. Just call finish() instead. Also, if you want your main menu Activity to detect this event and do anything special when it comes back to it, it can override onActivityResult(). I'm leaving out some details such as howto return a result (RESULT_OK), how

[android-developers] Re: Intents that used to work stopped working.

2009-10-11 Thread Keith Wiley
I don't understand. The problem is happening before my app is ever triggered so how can any aspect of my code (or my manifest) have any effect? Linda File Manager simply doesn't show my app in its "send to" list. Likewise for GMail attachments by the way. I need to get these *other* apps to sh

[android-developers] Re: Intents that used to work stopped working.

2009-10-11 Thread Dianne Hackborn
Add the debug flag to your intent to get log output about how the intent resolution is happening. On Sun, Oct 11, 2009 at 10:02 AM, Keith Wiley wrote: > > My app used to appear in Linda File Manager's "send to" list. I just > realized this is no longer the case. I didn't update Linda File > Ma

[android-developers] Re: Intents with SDK 1.5

2009-06-08 Thread André Charles Legendre
Thank you Mark. It works good In fact in doc of PendingIntent.getBroadcast it is written that it does the same that Context.sendBroadcast. The way I use it should be wrong. Thank you for your help --~--~-~--~~~---~--~~ You received this message because you are

[android-developers] Re: Intents with SDK 1.5

2009-06-08 Thread Mark Murphy
André Charles Legendre wrote: > Hi Mark > > Probably but I don't know about sendBrodcast > sendBroadcast is a method from which class ? Context, I believe. It is available in Activity and Service. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android De

[android-developers] Re: Intents with SDK 1.5

2009-06-08 Thread André Charles Legendre
Hi Mark Probably but I don't know about sendBrodcast sendBroadcast is a method from which class ? Andre --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email t

[android-developers] Re: Intents with SDK 1.5

2009-06-08 Thread Mark Murphy
André Charles Legendre wrote: > I am porting an application to SDK 1.5 and I have problems with Intents . > In one activity I want to send an intent and I write : > > Intent intent = new Intent(REFRESH_SEARCH_LIST); > intent.putExtra("searchResults", this.placeMarks); > PendingIntent.getBroadcast

[android-developers] Re: Intents and Uris, for Ringtone Picker

2009-03-12 Thread droozen
Ah, thanks. I was only look at what Uri extends (Object) and didn't notice that it implemented Parcelable. Thanks! On Mar 12, 1:58 pm, Dianne Hackborn wrote: > Uri is a Parcelable, so you can just use intent.putExtra(String, > Parcelable). > > > > On Thu, Mar 12, 2009 at 9:02 AM, droozen wrote:

[android-developers] Re: Intents and Uris, for Ringtone Picker

2009-03-12 Thread Jason Parekh
If you're using a preference activity, check out on the RingtonePreference, it does a lot of the boilerplate work for you. jason On Thu, Mar 12, 2009 at 12:02 PM, droozen wrote: > > I'd like to allow the user to choose a Ringtone from my application, > that I will play later for an alarm. Look

[android-developers] Re: Intents and Uris, for Ringtone Picker

2009-03-12 Thread Dianne Hackborn
Uri is a Parcelable, so you can just use intent.putExtra(String, Parcelable). On Thu, Mar 12, 2009 at 9:02 AM, droozen wrote: > > I'd like to allow the user to choose a Ringtone from my application, > that I will play later for an alarm. Looking at the javadocs, I see > EXTRA_RINGTONE_DEFAULT_UR

[android-developers] Re: Intents

2008-04-23 Thread jtaylor
This is my simple theory on Intents. http://groups.google.com/group/android-discuss/browse_thread/thread/f012c3cee292c454# - Juan On Apr 22, 4:09 pm, WildLuka <[EMAIL PROTECTED]> wrote: > Hi, > > I'm still in the process of grasping the true concept of intents. > Surely I do understand that th

[android-developers] Re: Intents

2008-04-23 Thread WildLuka
to HackBod Wow, I must say that it's impressive. Thank you for your time. However there are a couple things I'm clear about. you refer to the UI displayed by the service, would this be a LoginDialog ? if so, I thought that services were not meant to interact with the user. One more thing, a web

[android-developers] Re: Intents

2008-04-22 Thread hackbod
Yeah, we have used this model very successfully in some of our services. Here's a concrete example: Say you have a "login service" that clients can connect with to get a cookie to access some web service. This login service maintains the password the user has entered, and doles out to clients a

[android-developers] Re: Intents

2008-04-22 Thread Dan U.
Well, I normally think of an Intent in the same way I think of a http request to a web server. I'm requesting to have something happen (show me a page in the browser = go to new activity, ask the server to do some long running processing = start service). And when I think of how intents are used i