[android-developers] Re: startActivityForResult() from service

2012-10-11 Thread Ansh
On Thursday, 11 October 2012 17:43:02 UTC+5:30, Archana wrote: > > Hi, I have defined a service. > > I need to call startActivityForResult(intent,REQUEST_CODE) from this. I > saw > > http://stackoverflow.com/questions/3448485/startactivityforresult-from-a-service > > But can someone explain me

[android-developers] Re: startActivityForResult() from service

2012-10-11 Thread Ansh
Hi Archana You can't do startActivityForResults in the service. I guess you want to do something after user has enabled the bluetooth from the setting.For this to achieve what you can do is write your code on OnResume checking the status of the bluettoth if it's not then navigate user to the se

[android-developers] Re: startActivityForResult problem

2012-09-09 Thread Ankit Pansuriya
Please remove noHistory=true from your android manifeast file. -- 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-de

[android-developers] Re: startActivityforResult does not return any result on Samsung Galaxy

2012-06-14 Thread Fina Perez
I had some problems with Samsung also, and it is due to getExternalStorageDirectory() . I cant find the link now but I read that Samsung threats the external storage differently so you have to "hack" your code or create your specific path. This code gives you the right path: try { path = Envi

[android-developers] Re: startActivityForResult

2011-05-20 Thread kypriakos
That's a good point to note - thanks! On May 20, 1:00 pm, luiX_ wrote: > Haven't read carefully all the responses but just a quick note: > > It's not a good idea to declare the request code as a local variable, I > usually declare them as constants because you'll need it in the > onActivityResul

[android-developers] Re: startActivityForResult

2011-05-20 Thread kypriakos
Research - and oh man, the times I heard that question ;) On May 20, 11:01 am, Nikolay Elenkov wrote: > On Fri, May 20, 2011 at 11:51 PM, kypriakos wrote: > > > Ah sleep is good ... > > > Ok revisiting this I can see the wrong path I went down to ... > > > I built a servlet for the ijetty web s

[android-developers] Re: startActivityForResult

2011-05-20 Thread kypriakos
He he - I hear ya, since I am in the context of a web server as well I need to be careful with my naming> Thanks Kostya ;) On May 20, 12:49 pm, Kostya Vasilyev wrote: > 20.05.2011 18:51, kypriakos ?: > > >> >  Oh, and I see that the intent you're trying to start is for a service. > >> > Usi

Re: [android-developers] Re: startActivityForResult

2011-05-20 Thread luiX_
Haven't read carefully all the responses but just a quick note: It's not a good idea to declare the request code as a local variable, I usually declare them as constants because you'll need it in the onActivityResult method :) 2011/5/20 Kostya Vasilyev > 20.05.2011 18:51, kypriakos пишет: > >

Re: [android-developers] Re: startActivityForResult

2011-05-20 Thread Kostya Vasilyev
20.05.2011 18:51, kypriakos ?: > Oh, and I see that the intent you're trying to start is for a service. Using > startActivity (for result or not) with a service intent just doesn't make > sense. Where do you see that? The intent I am starting is an Activity class. Can you explain please?

Re: [android-developers] Re: startActivityForResult

2011-05-20 Thread Nikolay Elenkov
On Fri, May 20, 2011 at 11:51 PM, kypriakos wrote: > > Ah sleep is good ... > > Ok revisiting this I can see the wrong path I went down to ... > > I built a servlet for the ijetty web server that launches an Activity > once > a particular remote request comes in. The ijetty code provides the > And

[android-developers] Re: startActivityForResult

2011-05-20 Thread kypriakos
Ah sleep is good ... Ok revisiting this I can see the wrong path I went down to ... I built a servlet for the ijetty web server that launches an Activity once a particular remote request comes in. The ijetty code provides the AndroidContext in all servlets through: Object o = config.get

[android-developers] Re: startActivityForResult

2011-05-19 Thread kypriakos
Thanks to all of you - I did mix up the startActivities in two different classes down the inheritance. The androidcontext is passed to the servlet I am running from the ijetty web server. It is defined as Context and thus he compiler error - silly mistake on my part not to see that in the first pl

[android-developers] Re: startActivityForResult

2011-05-19 Thread kypriakos
I think there is a startActivity method in the Context class and that's why I got a bit confused regarding the startActivityForResult - I think it makes a bit more sense now. I need to start an Activit for now and not a service and I think I intermixed the two. I do get the Activity to start with

Re: [android-developers] Re: startActivityForResult

2011-05-19 Thread Justin Anderson
*> startActivityForResult is only implemented for an Activity, not for a Context!* LOL... I should have noticed that before posting my comment Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Thu, May 19, 2011 at 3:50 PM, Kristopher Micinski wrote: > L

Re: [android-developers] Re: startActivityForResult

2011-05-19 Thread Kristopher Micinski
Look carefully at the API documentation. Context does *not* have startActivityForResult, Activity does. However, Context has startActivity... You're thinking too far down the inheritance line... Kris On Thu, May 19, 2011 at 5:40 PM, kypriakos wrote: > > That's what I said too - huh? ;) > >

[android-developers] Re: startActivityForResult

2011-05-19 Thread Streets Of Boston
startActivityForResult is only implemented for an Activity, not for a Context! If 'androidContext' in your code-snippet above is declared as a Context, trying to call 'startActivityForResult' will result in a compiler error. If 'androidContext' in your code-snippet is declared as an Activity, it

Re: [android-developers] Re: startActivityForResult

2011-05-19 Thread Kostya Vasilyev
StartActivityForResult is a method of Activity, not Context. You can typecast if appropriate. If not (i.e. your Context is a service or a receiver), then it doesn't make sense - because the result callback used by startActivityForResult is also a method of Activity. If this case, use a broadcast,

Re: [android-developers] Re: startActivityForResult

2011-05-19 Thread Justin Anderson
Where are you getting androidContext from? Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Thu, May 19, 2011 at 3:40 PM, kypriakos wrote: > androidContext -- You received this message because you are subscribed to the Google Groups "Android Developer

[android-developers] Re: startActivityForResult

2011-05-19 Thread kypriakos
That's what I said too - huh? ;) Intent intent = new Intent(); intent.setClass(androidContext, mysnapPic2ServiceImpl.class); intent.setFlags(intent.FLAG_ACTIVITY_NEW_TASK); intent.putExtra("from", "1"); final int result=1; // androidContext.startAct

Re: [android-developers] Re: startActivityForResult

2011-05-19 Thread Kostya Vasilyev
Huh? http://developer.android.com/reference/android/app/Activity.html#startActivityForResult(android.content.Intent, int) Since API level 1 - i.e. Android 1.0. Perhaps you could post a code snippet showing the compile error. -- Kostya 19.05.2011 22:04, kypriakos пишет: So the API level 4 (

[android-developers] Re: startActivityForResult

2011-05-19 Thread Nicholas Johnson
startActivityForResult has been in the API since level 1. 1.6 has it. Here's a link to the documentation. -- You received this message because you are subscribed to the Googl

[android-developers] Re: startActivityForResult

2011-05-19 Thread kypriakos
Excellent! Thanks. So the API level 4 (to which cupcake/1.6 is based on) does not have the startActivityForResult - which is in line with the fact that the compilation fails. Anyway knows as to what provision was available back then for allowing an activity to call back a calling class? Or no suc

[android-developers] Re: startActivityForResult

2011-05-19 Thread kypriakos
Great thanks - much appreciated it. But I was also asking as to whether the startActivityforResult() is part of the Android 1.6 API since the compilation fails there. Any idea? On May 19, 12:27 am, Our-Android wrote: > hi, > > find the link below you will get complete code for > startActivityfo

[android-developers] Re: startActivityForResult

2011-05-18 Thread Our-Android
hi, find the link below you will get complete code for startActivityforResult() http://our-android.blogspot.com/2011/05/passing-data-returning-data-between.html Thanks On May 19, 8:44 am, kypriakos wrote: > Hi all, > > I am writing apps for some old phones (Android 1.6). I can call > sta

[android-developers] Re: startActivityForResult error

2010-05-26 Thread Surendra
Intent i = new Intent(); i.setClass(this, PageTwo.class); startActivityForResult(i, ACTIVITY_CREATE); I would try this and it should work. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-develop

[android-developers] Re: startActivityForResult returns result BEFORE activity starts.

2010-05-11 Thread Nathan
It does say that it won't work if the activity is in the singleTask mode. I haven't tried to launch the activity in singleTask mode, and the API examples don't seem to have done anything special to make it *not* be singleTask mode. android:launchMode="standard" is in the manifest. But I'll try ha

[android-developers] Re: startActivityForResult returns result BEFORE activity starts.

2010-05-10 Thread Nathan
On May 9, 2:43 pm, TreKing wrote: > On Fri, May 7, 2010 at 12:51 PM, Nathan wrote: > > Can anyone make any suggestions? > > Check where your secondary activity is setting the result and double check > your logic there. > I did. This is all: Intent data = new Intent();

[android-developers] Re: startActivityForResult and setResult problems

2010-03-31 Thread patbenatar
Thanks so much Mark! Very enlightening. On Mar 31, 12:01 pm, Mark Murphy wrote: > patbenatar wrote: > > Mark- on a side note, how does one go about writing conditional code > > for different versions of android? Thanks! > > Reflection or conditional class loading are the two prevalent technique

Re: [android-developers] Re: startActivityForResult and setResult problems

2010-03-31 Thread Mark Murphy
patbenatar wrote: > Mark- on a side note, how does one go about writing conditional code > for different versions of android? Thanks! Reflection or conditional class loading are the two prevalent techniques. Here is a sample of conditional class loading to use different versions of the contacts c

[android-developers] Re: startActivityForResult and setResult problems

2010-03-31 Thread patbenatar
Mark- on a side note, how does one go about writing conditional code for different versions of android? Thanks! -Nick On Mar 31, 1:40 pm, Mark Murphy wrote: > Lordsaibat wrote: > > ok I have two classes my main class calls a menu class when the user > > gets done with that they press the back b

[android-developers] Re: startActivityForResult

2010-02-28 Thread jarnaud
Hi Pierre, I have release a set of video android tutorials on http://android.voxisland.com and the free/sample chapter is on Intents. It should answers your questions and provide you some guidance to go further with Intents. enjoy On Feb 27, 4:41 pm, Pierre Henry wrote: > Encoutered a tricky resu

[android-developers] Re: StartActivityForResult

2010-01-06 Thread Business Talk
Thanks Mark, it will work. I was considering this approach. I was hesitant for it establishes a dependency among the hierarchy activities. I thought I might have a need to reuse the activities in other scenarios in which I might have to select the artists/albums/ songs only without drilling down th

[android-developers] Re: startActivityForResult question

2009-12-31 Thread Lance Nanek
Those methods only have meaning to Android on Activity classes, not View classes. If you have a custom view that needs to know when startActivityForResult is being run on the activity that manages the view, then you would have to override the startActivityForResult method on that activity, call a

[android-developers] Re: startActivityForResult in onResume

2009-05-22 Thread skyman
Hi again, It looks like the problem is in translucent style :/ When I remove it in manifets everything is ok. I've noticed that problem occurs when Android is rendering screen i off-screen memory (when it shows the layout everything is ok but it tooks very long). Is there any way to speedup this

[android-developers] Re: startActivityForResult/onActivityResult question

2009-05-21 Thread skyman
I also have the same problem. Skyman --~--~-~--~~~---~--~~ 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,

[android-developers] Re: startActivityForResult on tab

2009-04-22 Thread DLaw
Hi Dianne can you clarify your statement a little bit? I have a TabActivity with 4 tabs and one of those, I call setResult and call finish(). The activity closes and returns to the activity which called the TabActivity but I'm losing my result (it always shows up as RESULT_CANCELED). I saw look

[android-developers] Re: startActivityForResult on tab

2009-04-06 Thread Dianne Hackborn
Tabs can't receive results, only the container (if that is what you are asking, it is really not clear). On Mon, Apr 6, 2009 at 9:19 AM, zeeshan wrote: > > any solution? > > On Apr 6, 10:44 am, zeeshan wrote: > > Hi Experts, > > > > i need to start startActivityForResult on a tab click, > > > >

[android-developers] Re: startActivityForResult on tab

2009-04-06 Thread zeeshan
any solution? On Apr 6, 10:44 am, zeeshan wrote: > Hi Experts, > > i need to start startActivityForResult on a tab click, > > here is my activity senario: > > Activity A  calling startActivityForResult -> B (tab activity) > startActivityForResult -> C onResult -> A > > -> D onResult -> A > > tab

[android-developers] Re: startActivityForResult problems

2009-03-11 Thread Geos
I found the problem. It's a singleInstance application launchMode. On Mar 11, 10:20 pm, Geos wrote: > Hello All > > I've use startActivityForResult as it described in many examples but > it return 0 result code after start new Activity. > > In main Activity I use such code for sub activity invoc

[android-developers] Re: startActivityForResult problems

2009-03-11 Thread droozen
Not sure if this is your problem, but I do notice you commented out the super.onActivityResult function in your onActivityResult function. I don't know all of what the parent method for that function does, but it's pretty good practice to always call the super method first when you override a met