[android-developers] Re: How to access a AIDL service from different packages?

2010-06-18 Thread Joe Onorato
You will also have to include the .aidl as source in your other
project.  The two different apks don't link against each other or
anything like that.  Otherwise, the generated java class won't be
available.

-joe


On Jun 18, 7:44 am, Mark Murphy mmur...@commonsware.com wrote:
 On Fri, Jun 18, 2010 at 7:37 AM, Krishna Shetty

 krishna.shett...@gmail.com wrote:
  I have created a service which exposes few AIDL defined interfaces.
  I want to access this Service from an application with different
  package.
  I have no clue how to achieve this. I want to see an example on this.

 Step #1: Add an intent-filter on the service with some custom action.

 Step #2: Use that action String when constructing the Intent for
 binding to the service from the client.

 http://github.com/commonsguy/cw-advandroid/tree/master/AdvServices/Re...http://github.com/commonsguy/cw-advandroid/tree/master/AdvServices/Re...

 --
 Mark Murphy
 CommonsWare
 mmur...@commonsware.comhttp://commonsware.com

-- 
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 to open an App when the Android OS start up

2010-06-15 Thread Joe Onorato
No, don't do that.  If you're doing an embedded device, remove the
built-in launcher, and make your activity the default home.

intent-filter
action android:name=android.intent.action.MAIN /
category android:name=android.intent.category.HOME /

category
android:name=android.intent.category.DEFAULT /
/intent-filter

-- 
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 to programatically pause an application?

2010-06-15 Thread Joe Onorato
This is the intent that's launched when you press the home key:

mHomeIntent =  new Intent(Intent.ACTION_MAIN, null);
mHomeIntent.addCategory(Intent.CATEGORY_HOME);
mHomeIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_ACTIVITY_RESET_TASK_IF_NEEDED);

-joe




On Jun 15, 11:07 am, Mark Murphy mmur...@commonsware.com wrote:
 On Tue, Jun 15, 2010 at 10:42 AM, guich guiha...@gmail.com wrote:
  Thanks, but something went wrong.
  I can see the onPause and onResume being called for my app, but the
  screen is blank after the resume. This does not happen when i press
  the home key.

 Hmmm...the docs say that should have worked. Do a bit of searching --
 I am sure the question of how to open the home screen has come up
 before.

 --
 Mark Murphy
 CommonsWare
 mmur...@commonsware.comhttp://commonsware.com

-- 
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: Debugging the framework

2010-01-05 Thread Joe Onorato
The KeyInputQueue runs in the system process, and your test app runs
in its own process.  You need to connect two debuggers.  When I debug
this code, I usually use Log.d debugging instead, because while
possible, connecting two debuggers is kind of a pain.

-joe


On Jan 4, 6:46 am, Matan matanshap...@gmail.com wrote:
 Hi,

 I did the following:
 Modified frameworks/base/services/java/com/android/server/
 KeyInputQueue.java and flashed it to my G1.
 Rebuilt
 Deployed to the G1
 Created a demo test app
 Started debugging the demo app from Eclipse with one breakpoint in a
 central location in KeyInputQueue.java and another in my main activity
 in the demo app.

 The debugger stops at the breakpoint located in the activity but
 doesn't stop in KeyInputQueue.java although it's executing this row
 for sure when i touch the touchscreen.

 Did I do anything wrong ?
 How can i debug files in the framework like KeyInputQueue.java ? Is it
 possible ?

 Thanks a lot,
 Matan
-- 
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: Cant created non-interactive ListView

2008-04-02 Thread Joe Onorato
Hi,

If you don't need all of the features that ListView provides, you should use
LinearLayout instead.

-joe


On Wed, Apr 2, 2008 at 3:33 AM, Harsh Jain [EMAIL PROTECTED] wrote:

 Hi,
  I need to create a list view, which doesnt response to user interactions,
 it should be non-clickable, and user should not be able to scroll through
 it.
 I tried the following
 ListView lv = getListView();
 lv.setClickable(false);
 lv.setFocusable(false);
 lv.setDividerHeight(0);
 lv.setItemsCanFocus(false);

 But I am still able to navigate the list using key pad and am also able to
 click through it. I even tried lv.setEnabled(false), which only makes it
 grey but i am still able to scroll through it. Please advice.

 Regards,
 harsh

 


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: suggestion: the *relevant* context should be automatically accessible from any method

2008-04-02 Thread Joe Onorato
Hi Anil,

This is not correct.  Here are a few examples:  If your app has two
services, there will be two different contexts running at the same time.  If
your app has two activities, one will still have methods running after
onPause.  Messages sent may be handled while another activity is still
running, depending on timing.  It would not be correct for one activity to
use another's Context.

-joe

On Wed, Apr 2, 2008 at 8:47 PM, Anil [EMAIL PROTECTED] wrote:


 Again, please correct me:
 But unlike J2SE, here in Android, zero or one contexts are 'active' or
 relevant in a thread.
 The thread started life and meandered along touching different
 contexts along the way.
 In other words, it is possible to state which was the last context
 touched, and will be relevant
 to the getContext() call. Will a thread of execution ever need
 anything other than the last context touched?
 thanks,
 Anil



 On Mar 31, 11:25 am, hackbod [EMAIL PROTECTED] wrote:
  That is not true, all of the activities (and intent receivers and
  services) are called in the main thread of the process they are
  running in.  Also, calls to service interfaces and content providers
  are executed in the calling thread, not their own thread.
 
  On Mar 31, 8:51 am, Anil [EMAIL PROTECTED] wrote:
 
   NOTE: I could be mistaken in my facts below. Please correct me if I am
   wrong.
 
   As per my understanding, a running thread exists in only one Activity
   at a
   time. In other words, it is not shared by activities. Hence only one
   context applies, even if the method is in some other class. However it
   is
   convoluted to access the context - it has to be passed into each
   constructor of each class. There have been several gripes about this
   in the
   newsgroup.
   Suggestion: have a getContext() call, that at runtime senses which is
   the
   applicable context for that thread, and returns it to that thread.
   And more than one thread being spawned off should still map to one
   activity context.
   So depending on the thread (Activity) in which the method executes, a
   different context could be returned.
   thanks,
   Anil
 


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Notification ongoingEvent

2008-03-27 Thread Joe Onorato
There are two sections in the pull-down notification window shade, one for
ongoing events and one for latest events.  The ongoing ones are things
that are live, for example phone calls, playing music and downloads in the
web browser.  The latest events section is for discrete events, for example
upcoming calendar events, missed calls, incoming sms, etc.  Place a phone
call with the dialer app and pull down the window shade, and there should be
an entry for the phone call in it.

-joe




On Thu, Mar 27, 2008 at 9:35 PM, Dan U. [EMAIL PROTECTED] wrote:


 Oh, and I know what it says in the docs about it representing an event
 that is ongoing versus one that isn't, but I don't see the
 significance. Why would you even need this flag?

 On Mar 27, 9:34 pm, Dan U. [EMAIL PROTECTED] wrote:
  Could someone please explain what the ongoingEvent flag in a
  Notification means? I don't see how it affects the Notification at
  all. Thanks.
 


--~--~-~--~~~---~--~~
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
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---