[android-developers] Re: How can I get Activity object from Intent object or something else

2009-09-24 Thread HandsomeboyIT

So, There is only one remain method that using ADB deamon on devices/
emulator to keep track of other applications's informations. Now I can
start ADBD service using adb shell service , port forward and
telnet command to connect to adbd and get informations. But there is
another problem in this situation is that we must set ro.secure
property to 0. This property is 0 on emulator but 1 on real devices;
and I can not change to 0 on real devices. Is anybody know anything
about this ???

On Sep 23, 5:32 pm, Mark Murphy mmur...@commonsware.com wrote:
  Perhap it no way to continue my work... I just write 1 application
  that keep track of others.

 Generally, that sort of application is difficult on Android. You can use
 the PackageManager and related APIs to find out what else is on the
 device, and you can use public APIs made available by the other
 applications. Other than that, each application is protected from the
 others.

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 Android App Developer Books:http://commonsware.com/books.html
--~--~-~--~~~---~--~~
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: How can I get Activity object from Intent object or something else

2009-09-24 Thread Dianne Hackborn
You can't do this on production devices.

It might be more productive if you describe more about what you are trying
to accomplish, rather than how you are getting there.

On Thu, Sep 24, 2009 at 12:38 AM, HandsomeboyIT handsomebo...@gmail.comwrote:


 So, There is only one remain method that using ADB deamon on devices/
 emulator to keep track of other applications's informations. Now I can
 start ADBD service using adb shell service , port forward and
 telnet command to connect to adbd and get informations. But there is
 another problem in this situation is that we must set ro.secure
 property to 0. This property is 0 on emulator but 1 on real devices;
 and I can not change to 0 on real devices. Is anybody know anything
 about this ???

 On Sep 23, 5:32 pm, Mark Murphy mmur...@commonsware.com wrote:
   Perhap it no way to continue my work... I just write 1 application
   that keep track of others.
 
  Generally, that sort of application is difficult on Android. You can use
  the PackageManager and related APIs to find out what else is on the
  device, and you can use public APIs made available by the other
  applications. Other than that, each application is protected from the
  others.
 
  --
  Mark Murphy (a Commons Guy)http://commonsware.com
  Android App Developer Books:http://commonsware.com/books.html
 



-- 
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: How can I get Activity object from Intent object or something else

2009-09-21 Thread Roman ( T-Mobile USA)

When you are able to get the handle for the intent, you should be able
to use

 intent.getExtras();

The API returns a bundle object which you should have used to send
your complex object.

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.

On Sep 21, 1:02 am, HandsomeboyIT handsomebo...@gmail.com wrote:
 I have an Activity that running on system. I can get the Intent that
 is used to start the activity. But i don't know how to get the
 Activity object from the Intent object or something else. Can anyone
 tell me how to do this??? Note that, I don't use Instrumentation
 object. Thanks so much...
--~--~-~--~~~---~--~~
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: How can I get Activity object from Intent object or something else

2009-09-21 Thread HandsomeboyIT

hi Roman,
Thanks for your reply. But your answer is not thing as I expected.
Suppose that my friend has written an activity called A1. And then I
install it in my phone and run the application. I don't know what he
has done in that Activity. I just have runtime Intent object that used
to start A1. But I need to obtain the Activity object for doing some
thing on that screen. How can I obtain the reference to that
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] Re: How can I get Activity object from Intent object or something else

2009-09-21 Thread Mark Murphy

 Suppose that my friend has written an activity called A1. And then I
 install it in my phone and run the application. I don't know what he
 has done in that Activity. I just have runtime Intent object that used
 to start A1. But I need to obtain the Activity object for doing some
 thing on that screen. How can I obtain the reference to that
 Activity???

You can't. That would be a security violation.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html



--~--~-~--~~~---~--~~
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: How can I get Activity object from Intent object or something else

2009-09-21 Thread Dianne Hackborn
In fact they are two different applications, running in two different
processes, with two different VMs.  It is just physically impossible to
access each others' objects like that.

On Mon, Sep 21, 2009 at 8:59 PM, Mark Murphy mmur...@commonsware.comwrote:


  Suppose that my friend has written an activity called A1. And then I
  install it in my phone and run the application. I don't know what he
  has done in that Activity. I just have runtime Intent object that used
  to start A1. But I need to obtain the Activity object for doing some
  thing on that screen. How can I obtain the reference to that
  Activity???

 You can't. That would be a security violation.

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com
 Android App Developer Books: http://commonsware.com/books.html



 



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