Re: [android-developers] Transmitting signals at 433Mhz

2010-06-23 Thread Andy Savage
You would probably need to have a custom radio receiver and appropriate
driver, compile your own custom Android version and have an unlocked device
to load it in to would be my guess.

Perhaps a USB device to do such a job might be appropriate? You could use
the Google Development Phone 2 to do this if you loaded on 2.2 and used the
USB on the Go stuff to actually allow the phone to act as a host.

If you didn't have a USB device, you could use a Serial device and make your
phone talk to it. That would be my recommended path.

I'm sure it's possible, but surely not easy. Both of these options require a
custom device that can transmit/receieve at 433mhz

-- 
The greatest challenge to any thinker is stating the problem in a way that
will allow a solution
- Bertrand Russell

Andy Savage
Cell Phone: +852 936 34341
Skype ID: andy_savage
Linked In: http://www.linkedin.com/in/andysavage


On Wed, Jun 23, 2010 at 9:06 AM, Mark Murphy mmur...@commonsware.comwrote:

 On Tue, Jun 22, 2010 at 8:49 PM, aggie_hellcat2009
 lancaste...@gmail.com wrote:
   I am interested in transmitting to a device that only sends and
  receives on 433Mhz. Is it possible to make my program send and receive
  signals at this  frequency?

 No, sorry.

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com | http://github.com/commonsguy
 http://commonsware.com/blog | http://twitter.com/commonsguy

 Android Training...At Your Office: http://commonsware.com/training

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://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

Re: [android-developers] Re: Avoiding GPL

2010-06-23 Thread David Turner
On Tue, Jun 22, 2010 at 9:33 PM, HaMMeReD adamhamm...@gmail.com wrote:

 If you can use it without modifying the source then just do it, and
 provide credit to the library creator clearly in your app.

 this is wrong on many levels. As soon as you *distribute* the binaries
(e.g. through Market),
you must provide the sources of _all_ your program if you link against the
GPLed sources.
This is true of GPLv2 or GPLv3.

The LGPL is different, but conditions are very specific, and probably
corresponds more to
what you describe. However, this does not apply to the GPLv3.

Please read the GPL Faq, it contains useful information.



 If you need to modify the source, then you need to be able to provide
 the modifications. If you need to integrate it with your app deeply so
 that you can't use the modified version without your app, then you
 need to open source the entire thing.

 IANAL but using a open source library in a closed source project
 without any modification should not provide any serious legal issues
 as long as everyone is properly credited and there is no stipulations
 in the license or on the creators website.

 I wouldn't recommend doing complex workarounds, because it just
 increases the amount of changes and dependencies between your app and
 the open source app, and shows that you were trying to circumvent
 things. Just do your best to not change it, and check the creators
 site to see if they sell alternate licenses that might server your
 needs better, if you do need to modify the source in certain ways.


 Adam Hammer

 On Jun 22, 12:10 am, Naveen naveen...@gmail.com wrote:
  Hi!
  I need to use some open source code with GPL3.
 
  As usual I don't want to open source code for full application.
 
  Now what I understand is if I make two separate process one with my
  main application code and other as a service or something with Open
  source library  then in that case I have to open source code only for
  the other one.
 
  Now the question is what is the best way to do so in Android.
 
  Suppose
  My Main App  is  A
  Open Source code is  B
 
  So A will give some data to B. B will process this and sends data back
  to A. B may not need to have any UI.
 
  1. Is it possible to install 2 seperate applications / processes from
  one APK?
  2. What is the best way ?Should B be a service? How will be the
  communication between A and B ?
  3. Is it possible to run/call B from A?
 
  Pls. advice
 
  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
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://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

Re: [android-developers] Re: Avoiding GPL

2010-06-23 Thread Chi Kit Leung
I think david is very right about that.

On Wed, Jun 23, 2010 at 4:04 PM, David Turner di...@android.com wrote:



 On Tue, Jun 22, 2010 at 9:33 PM, HaMMeReD adamhamm...@gmail.com wrote:

 If you can use it without modifying the source then just do it, and
 provide credit to the library creator clearly in your app.

 this is wrong on many levels. As soon as you *distribute* the binaries
 (e.g. through Market),
 you must provide the sources of _all_ your program if you link against the
 GPLed sources.
 This is true of GPLv2 or GPLv3.

 The LGPL is different, but conditions are very specific, and probably
 corresponds more to
 what you describe. However, this does not apply to the GPLv3.

 Please read the GPL Faq, it contains useful information.



 If you need to modify the source, then you need to be able to provide
 the modifications. If you need to integrate it with your app deeply so
 that you can't use the modified version without your app, then you
 need to open source the entire thing.

 IANAL but using a open source library in a closed source project
 without any modification should not provide any serious legal issues
 as long as everyone is properly credited and there is no stipulations
 in the license or on the creators website.

 I wouldn't recommend doing complex workarounds, because it just
 increases the amount of changes and dependencies between your app and
 the open source app, and shows that you were trying to circumvent
 things. Just do your best to not change it, and check the creators
 site to see if they sell alternate licenses that might server your
 needs better, if you do need to modify the source in certain ways.


 Adam Hammer

 On Jun 22, 12:10 am, Naveen naveen...@gmail.com wrote:
  Hi!
  I need to use some open source code with GPL3.
 
  As usual I don't want to open source code for full application.
 
  Now what I understand is if I make two separate process one with my
  main application code and other as a service or something with Open
  source library  then in that case I have to open source code only for
  the other one.
 
  Now the question is what is the best way to do so in Android.
 
  Suppose
  My Main App  is  A
  Open Source code is  B
 
  So A will give some data to B. B will process this and sends data back
  to A. B may not need to have any UI.
 
  1. Is it possible to install 2 seperate applications / processes from
  one APK?
  2. What is the best way ?Should B be a service? How will be the
  communication between A and B ?
  3. Is it possible to run/call B from A?
 
  Pls. advice
 
  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
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Regards,
Michael Leung
http://www.itblogs.info
http://www.michaelleung.info

-- 
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: Game Stuttering

2010-06-23 Thread Zsolt Vasvari
Really?  The compiler is not smarting to turn the first into the
second?

On Jun 23, 5:48 am, Dan Sherman d...@nerd.com wrote:
 As far as I'm aware (someone correct me if I'm wrong), primitive types have
 no effect on garbage collection, especially local variables.

 A great example is:
 ListItem items;
 for (Item i : items) {
     // do something

 }

 When running will cause garbage collection, as each time that loop is
 called, it allocates an IteratorItem.  However the following would not.

 for (int i = 0; i  items.size(); i++) {
     Item it = items.get(i);



 }
 On Tue, Jun 22, 2010 at 5:31 PM, Neilz neilhorn...@gmail.com wrote:
  To discuss this point further...

  Does using Java primitive types still count in this scenario? Is it
  fine to create, for example, a number of int or boolean variables,
  within the game processing loop, or should these be created as static
  variables upon the class creation?

  To demonstrate, is:

  static int myVal;
  run(){
     myVal = x * y * z;
  }

  ...better than:

  run(){
     int myVal = x * y * z;
  }

  Thanks.

  On Jun 18, 8:37 pm, Dan Sherman d...@nerd.com wrote:
   Avoid allocations.

   Allocations = garbage collection.

  --
  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.comandroid-developers%2bunsubs­cr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en- Hide quoted text -

 - Show quoted text -

-- 
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] Problem with BaseAdapter on android2.2 SDK

2010-06-23 Thread vishu


Hi,

I am facing one issue with BaseAdapter , which is set to Gridview in
My application.

Issue here is: getView() method is calling again twice for the zeroth
index item. ...due to this i m facing severe bug in my application..

on Android2.1 SDK, the same application is working fine..i.e.
getView() is invoked only once for the zeroth item in the  adapter.

Can anyone please help..

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


Re: [android-developers] Problem with BaseAdapter on android2.2 SDK

2010-06-23 Thread Romain Guy
There is no guarantee on the ordering of the calls to getView, nor how
many times it will be called. Your application should NEVER depend on
this.

On Tue, Jun 22, 2010 at 11:19 PM, vishu viswanath1...@gmail.com wrote:


 Hi,

 I am facing one issue with BaseAdapter , which is set to Gridview in
 My application.

 Issue here is: getView() method is calling again twice for the zeroth
 index item. ...due to this i m facing severe bug in my application..

 on Android2.1 SDK, the same application is working fine..i.e.
 getView() is invoked only once for the zeroth item in the  adapter.

 Can anyone please help..

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




-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  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


Re: [android-developers] Re: Avoiding GPL

2010-06-23 Thread Naveen Maheshwari
Yeah David is right.If you link your application with open source libraries
you have to open your code.

That's  why what I am trying to do is the code that uses open source I make
it as separate module and run that as remote service.
Now since this service is running as a separate process so I am oblized to
open only source code for this service...

So the basic idea is
*A* my app has some data and it needs to process this data... When it needs
to process this data it runs a remote service *B*. This service process the
data and returns back to *A*.

*B* is the service that is using open source code and is running as a remote
service. which is different process than app *A*.
Source code for *B  *will be made open source.

So as far as I know there should not be any legal issues and all can go as
same .apk.

Thanks





On Wed, Jun 23, 2010 at 3:14 PM, Chi Kit Leung michaelchi...@gmail.comwrote:

 I think david is very right about that.


 On Wed, Jun 23, 2010 at 4:04 PM, David Turner di...@android.com wrote:



 On Tue, Jun 22, 2010 at 9:33 PM, HaMMeReD adamhamm...@gmail.com wrote:

 If you can use it without modifying the source then just do it, and
 provide credit to the library creator clearly in your app.

 this is wrong on many levels. As soon as you *distribute* the binaries
 (e.g. through Market),
 you must provide the sources of _all_ your program if you link against the
 GPLed sources.
 This is true of GPLv2 or GPLv3.

 The LGPL is different, but conditions are very specific, and probably
 corresponds more to
 what you describe. However, this does not apply to the GPLv3.

 Please read the GPL Faq, it contains useful information.



 If you need to modify the source, then you need to be able to provide
 the modifications. If you need to integrate it with your app deeply so
 that you can't use the modified version without your app, then you
 need to open source the entire thing.

 IANAL but using a open source library in a closed source project
 without any modification should not provide any serious legal issues
 as long as everyone is properly credited and there is no stipulations
 in the license or on the creators website.

 I wouldn't recommend doing complex workarounds, because it just
 increases the amount of changes and dependencies between your app and
 the open source app, and shows that you were trying to circumvent
 things. Just do your best to not change it, and check the creators
 site to see if they sell alternate licenses that might server your
 needs better, if you do need to modify the source in certain ways.


 Adam Hammer

 On Jun 22, 12:10 am, Naveen naveen...@gmail.com wrote:
  Hi!
  I need to use some open source code with GPL3.
 
  As usual I don't want to open source code for full application.
 
  Now what I understand is if I make two separate process one with my
  main application code and other as a service or something with Open
  source library  then in that case I have to open source code only for
  the other one.
 
  Now the question is what is the best way to do so in Android.
 
  Suppose
  My Main App  is  A
  Open Source code is  B
 
  So A will give some data to B. B will process this and sends data back
  to A. B may not need to have any UI.
 
  1. Is it possible to install 2 seperate applications / processes from
  one APK?
  2. What is the best way ?Should B be a service? How will be the
  communication between A and B ?
  3. Is it possible to run/call B from A?
 
  Pls. advice
 
  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
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




 --
 Regards,
 Michael Leung
 http://www.itblogs.info
 http://www.michaelleung.info

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://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 

Re: [android-developers] Re: Need help with a Java issue

2010-06-23 Thread Mariano Kamp
On Wed, Jun 23, 2010 at 1:23 AM, Indicator Veritatis mej1...@yahoo.comwrote:

 True, this is a Java question, not an Android question. SO it doesn't
 r-e-a-l-l-y belong here.

I am glad we cleared that up.


 1) no, the NPE does not imply that isMarkAllReadPossibleCache is the
 null variable. Rather, it implies that in the course of trying to
 execute the get method of isMarkAllReadPossibleCache, the DVM
 encountered a null pointer.

How so? Where do you see the get() method?


 2) the NPE occurred during the call to UpdateButtons(), which in turn
 took place during the call to the above get() method.

I am really puzzled by that.
You mean that looking at the stacktrace the NPE happens here:
com.newsrob.activities.AbstractNewsRobListActivity.updateButtons(AbstractNewsRobListActivity.java:236)
?
How do you come to this conclusion? In case of a non-wrapped exception isn't
the top stack frame the place where the exception occurs? An exception blows
up and the JVM provides the stacktrace up to this point. You think
otherwise?

3) to tell in any more detail where it came from, I would need the
 rest of your stack trace, which you chose not to show.

The stack trace is complete.


 But now you
 have a better idea how to narrow this down by yourself, without
 exposing the code to us, I hope.

I don't have a better idea and now you got me confused about how to read the
stack trace.

As this is kind of a last straw I would be delighted to learn something new
about exceptions. Maybe that's the cue that's missing.


 On Jun 22, 2:59 am, Mariano Kamp mariano.k...@gmail.com wrote:
  Hey guys.
 
  This is not an Android issue per-se, but I am puzzled about a Java issue
 and
  want to pick your brains.
 
  I recently got a couple of bug reports with a NPE that I don't understand
  and can't reproduce myself. Here is an abbreviated representation of the
  offending class. I tried to stay as close to the actual code as possible.
 
  public class EntryManager {
 
private static EntryManager instance;
private MapDBQuery, Boolean isMarkAllReadPossibleCache;
 
private EntryManager(Context ctx) {
  ..
  isMarkAllReadPossibleCache = new HashMapDBQuery, Boolean();
  ..
}
 
public static synchronized EntryManager getInstance(final Context
 context)
  {
 if (instance == null)
 instance = new EntryManager(context.getApplicationContext());
 return instance;
 }
 
 void fireModelUpdated(final String atomId) {
  ..
  isMarkAllReadPossibleCache.clear();
  ..
 }
 
public boolean isMarkAllReadPossible(final DBQuery dbq) {
  if (!isMarkAllReadPossibleCache.containsKey(dbq))
  isMarkAllReadPossibleCache.put(dbq,
  databaseHelper.isMarkAllReadPossible(dbq));
 
 return isMarkAllReadPossibleCache.get(dbq); !-- NPE is raised
 here
  }
 ..
 
  }
 
  In the last line from above a NPE is thrown. So the instance variable
  isMarkAllReadPossibleCache must be null, right? But I don't see where
 this
  could happen. It's initialized in the constructor and never set to null
  afterwards.
 
  For completeness here is a stack trace:
 
  java.lang.NullPointerException
  at com.newsrob.EntryManager.isMarkAllReadPossible(EntryManager.java:1529)
  at
 
 com.newsrob.activities.AbstractNewsRobListActivity.shouldMarkAllReadButtonBeEnabled(AbstractNewsRobListActivity.java:327)
  at
 
 com.newsrob.activities.AbstractNewsRobListActivity.updateButtons(AbstractNewsRobListActivity.java:236)
  at
 
 com.newsrob.activities.AbstractNewsRobListActivity.access$2(AbstractNewsRobListActivity.java:215)
  -- removed the private access modifier meanwhile
  at
 
 com.newsrob.activities.AbstractNewsRobListActivity$13.run(AbstractNewsRobListActivity.java:626)
  at android.os.Handler.handleCallback(Handler.java:587)
  at android.os.Handler.dispatchMessage(Handler.java:92)
  at android.os.Looper.loop(Looper.java:123)
  at android.app.ActivityThread.main(ActivityThread.java:4203)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:521)
  at
 
 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
  at dalvik.system.NativeStart.main(Native Method)
 
  Any ideas?
 
  Cheers,
  Mariano

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://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, 

[android-developers] Track user location.

2010-06-23 Thread Sohan badaya
Hi All,

I am trying to develop a application LocationTracker. I have some
doubts

1.) Is it possible to find out location of your phone book friends
(current location based on his mobile number).

2.) How to get Longitute and Latitute Values based on current mobile
location.
(Actually i have code in which if i pass Longitute and Latitute
Values, it gives me Address. so from this i can find out current
location of a person).

3.) I am using a getFromLocation(double latitude, double longitude,
int maxResults) method of GeoCoder class. It gives me List of
Address.From this i get country and other details but getLocality()
method return null.
  so i am not being able to get exact location.

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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Disable scaling of ImageView

2010-06-23 Thread mbaroukh
Yes, it works !

Thanks a lot Mark 

Mike

On 22 juin, 19:57, Mark Murphy mmur...@commonsware.com wrote:
 On Tue, Jun 22, 2010 at 1:52 PM, mbaroukh mike.baro...@gmail.com wrote:
  Most of the time, Android scaling is nice but I have a case where I
  don't wan't any scaling and I can't find how to do this.

 Try putting the resource in res/drawable-nodpi/ and see if that helps.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 Android Training...At Your Office:http://commonsware.com/training

-- 
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] layout problem when orientation changed

2010-06-23 Thread KerlW
My activity use the same RelativeLayout as it's content view whatever
the orientation is.
In this RelativeLayout, there is a FrameLayout align to it's bottom,
and a TextView above this FrameLayout, just like :

RelativeLayout xmlns:android = http://schemas.android.com/apk/res/
android
android:layout_width=fill_parent
android:layout_height=fill_parent

   TextView android:id=@+id/tip_bar
android:layout_above=@+id/control_panel
android:layout_width=fill_parent
android:layout_height=20dip
android:layout_marginBottom=18dip
android:gravity=center_vertical
android:singleLine=true
android:layout_alignWithParentIfMissing=true
/

FrameLayout android:id=@+id/control_panel
android:layout_width=fill_parent
android:layout_height=wrap_content
android:layout_alignParentBottom=true

/FrameLayout
/RelativeLayout

on android 1.5 device
   when orientation changed, the TextView lies in the wrong place,
middle when portrait, bottom when landscape.
on android 1.6 device
   It is ok.

How could I make it lies in the place where it should be on 1.5
device?
Thanks and regards.

-- 
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: Can I send an image byte[] to ACTION_VIEW intent?

2010-06-23 Thread szeldon
I'd like to know that too...

On 13 Maj, 16:05, JimmyHoffa photos.d...@googlemail.com wrote:
 Hi all,

 Just wondering if its possible to use the built inimageviewerto
 display animagesourced from a database.

 I'm hoping I can pass the byte[] as an extra to the ACTION_VIEW
 intent, but can't find any docs on it so far.

 Alternatively I'll have to roll my ownvieweror first write theimage
 out to afileand pass that to the intent.

 Thanks

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group,sendemail to android-developers@googlegroups.com
 To unsubscribe from this group,sendemail 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: Disable scaling of ImageView

2010-06-23 Thread mbaroukh
An more : it works also on cupcake !

All images in the apk are really in folder drawable-nodpi but I
suppose there is a link to thoses files in resources.arsc ...

Mike

On 23 juin, 09:25, mbaroukh mike.baro...@gmail.com wrote:
 Yes, it works !

 Thanks a lot Mark 

 Mike

 On 22 juin, 19:57, Mark Murphy mmur...@commonsware.com wrote:



  On Tue, Jun 22, 2010 at 1:52 PM, mbaroukh mike.baro...@gmail.com wrote:
   Most of the time, Android scaling is nice but I have a case where I
   don't wan't any scaling and I can't find how to do this.

  Try putting the resource in res/drawable-nodpi/ and see if that helps.

  --
  Mark Murphy (a Commons 
  Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

  Android Training...At Your Office:http://commonsware.com/training

-- 
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] Resource linking / imports

2010-06-23 Thread Al Sutton
First off; I know the implementation of this should be discussed on
the framework list, but I'm putting this idea out on here to see if
there is a need for it.


I've recently worked on a project where the designer wanted a 2 x 3
grid of icons as the apps home page. This threw up an interesting
situation because to do this using the best resolution possible it
seems we would either need to copy the actual icons into multiple
directories, or create a resource alias file for each icon, neither of
which is ideal (think 30+ icons across the app which needed
duplicating).

What I'm wondering is if there is a need for a single file which
contains all of the resources to use within another resource
directory. To give you an idea of the problem I'll scale it down to 3
icons which have mdpi and hdpi variants;

drawables/icon1.png
drawables/icon2.png
drawables/icon3.png
drawables-hdpi/icon1.png
drawables-hdpi/icon2.png
drawables-hdpi/icon3.png

As the Dell Streak is a WVGA device that identifies itself as a large-
mdpi device we wanted to use the -hdpi icons for it, but this would
result in three new files containing resource aliases;

drawables-large-mdpi/icon1.xml
drawables-large-mdpi/icon2.xml
drawables-large-mdpi/icon3.xml

What I'm wondering is should this be a single file which contains a
list of all the imports. For example;

drawables-large-mdpi/imports.xml

which contains;

imports
 import source=drawables-hdpiicon1.png/import
 import source=drawables-hdpiicon2.png/import
 import source=drawables-hdpiicon3.png/import
 /imports

This does away with the file-per-resource requirements of the current
configuration and it allows resources for multiple other directories
to be included because the source could refer to any other resource
directory.

So, do people think this would be of use, or have I missed something
which makes this whole idea obsolete?

Al.

--
* Looking for Android Apps? - Try http://andappstore.com/ *
==
Funky Android Limited is registered in England  Wales with the
company number  6741909.
The views expressed in this email are those of the author and not
necessarily those of Funky Android Limited, it's associates, or it's
subsidiaries.

-- 
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: Poor roaming performance ! Is it an Android bug ?

2010-06-23 Thread Cydrike
Hi David,

I'm using Android 2.1 on an HTC Desire.

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


Re: [android-developers] Resource linking / imports

2010-06-23 Thread Gyan
Making the usage of .9png images compulsory!

Probably there is a smart way of installing only the required drawables on a
particular hardware, so that at least the installed application isn't
bloated!

A perfectly discerning!
-Gyan

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

Re: [android-developers] Re: Poor roaming performance ! Is it an Android bug ?

2010-06-23 Thread Gyan
@David this WAS and IS a present problem with Android. The cache doesn't
clear all the time!

Hope Google has something to say!

Gyan

-- 
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: Resource linking / imports

2010-06-23 Thread Mark Carter
In this particular case, I would just use drawable-nodpi (using naming
like icon1_72px.png, icon1_48px.png) and then handle it all manually.

On Jun 23, 9:47 am, Al Sutton a...@funkyandroid.com wrote:
 First off; I know the implementation of this should be discussed on
 the framework list, but I'm putting this idea out on here to see if
 there is a need for it.

 I've recently worked on a project where the designer wanted a 2 x 3
 grid of icons as the apps home page. This threw up an interesting
 situation because to do this using the best resolution possible it
 seems we would either need to copy the actual icons into multiple
 directories, or create a resource alias file for each icon, neither of
 which is ideal (think 30+ icons across the app which needed
 duplicating).

 What I'm wondering is if there is a need for a single file which
 contains all of the resources to use within another resource
 directory. To give you an idea of the problem I'll scale it down to 3
 icons which have mdpi and hdpi variants;

 drawables/icon1.png
 drawables/icon2.png
 drawables/icon3.png
 drawables-hdpi/icon1.png
 drawables-hdpi/icon2.png
 drawables-hdpi/icon3.png

 As the Dell Streak is a WVGA device that identifies itself as a large-
 mdpi device we wanted to use the -hdpi icons for it, but this would
 result in three new files containing resource aliases;

 drawables-large-mdpi/icon1.xml
 drawables-large-mdpi/icon2.xml
 drawables-large-mdpi/icon3.xml

 What I'm wondering is should this be a single file which contains a
 list of all the imports. For example;

 drawables-large-mdpi/imports.xml

 which contains;

 imports
  import source=drawables-hdpiicon1.png/import
  import source=drawables-hdpiicon2.png/import
  import source=drawables-hdpiicon3.png/import
  /imports

 This does away with the file-per-resource requirements of the current
 configuration and it allows resources for multiple other directories
 to be included because the source could refer to any other resource
 directory.

 So, do people think this would be of use, or have I missed something
 which makes this whole idea obsolete?

 Al.

 --
 * Looking for Android Apps? - Tryhttp://andappstore.com/*
 ==
 Funky Android Limited is registered in England  Wales with the
 company number  6741909.
 The views expressed in this email are those of the author and not
 necessarily those of Funky Android Limited, it's associates, or it's
 subsidiaries.

-- 
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: Resource linking / imports

2010-06-23 Thread Mark Carter
Second thoughts, a better workaround would probably be to just use
your highest resolution icons and put them in drawable. Scale them
(down) at runtime. If you have a load of users running normal-mdpi
screens, then you might want to put lower res icons in drawable-normal-
mdpi. For those users running small-hdpi, normal-ldpi etc, tough luck!

But anyway yes, in general, this import approach to indirection
would be useful...

On Jun 23, 10:06 am, Mark Carter mjc1...@googlemail.com wrote:
 In this particular case, I would just use drawable-nodpi (using naming
 like icon1_72px.png, icon1_48px.png) and then handle it all manually.

 On Jun 23, 9:47 am, Al Sutton a...@funkyandroid.com wrote:



  First off; I know the implementation of this should be discussed on
  the framework list, but I'm putting this idea out on here to see if
  there is a need for it.

  I've recently worked on a project where the designer wanted a 2 x 3
  grid of icons as the apps home page. This threw up an interesting
  situation because to do this using the best resolution possible it
  seems we would either need to copy the actual icons into multiple
  directories, or create a resource alias file for each icon, neither of
  which is ideal (think 30+ icons across the app which needed
  duplicating).

  What I'm wondering is if there is a need for a single file which
  contains all of the resources to use within another resource
  directory. To give you an idea of the problem I'll scale it down to 3
  icons which have mdpi and hdpi variants;

  drawables/icon1.png
  drawables/icon2.png
  drawables/icon3.png
  drawables-hdpi/icon1.png
  drawables-hdpi/icon2.png
  drawables-hdpi/icon3.png

  As the Dell Streak is a WVGA device that identifies itself as a large-
  mdpi device we wanted to use the -hdpi icons for it, but this would
  result in three new files containing resource aliases;

  drawables-large-mdpi/icon1.xml
  drawables-large-mdpi/icon2.xml
  drawables-large-mdpi/icon3.xml

  What I'm wondering is should this be a single file which contains a
  list of all the imports. For example;

  drawables-large-mdpi/imports.xml

  which contains;

  imports
   import source=drawables-hdpiicon1.png/import
   import source=drawables-hdpiicon2.png/import
   import source=drawables-hdpiicon3.png/import
   /imports

  This does away with the file-per-resource requirements of the current
  configuration and it allows resources for multiple other directories
  to be included because the source could refer to any other resource
  directory.

  So, do people think this would be of use, or have I missed something
  which makes this whole idea obsolete?

  Al.

  --
  * Looking for Android Apps? - Tryhttp://andappstore.com/*
  ==
  Funky Android Limited is registered in England  Wales with the
  company number  6741909.
  The views expressed in this email are those of the author and not
  necessarily those of Funky Android Limited, it's associates, or it's
  subsidiaries.

-- 
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] How to change background of activity and background of the application name at the top of your activity

2010-06-23 Thread rpelluru
Hi,
   How to change background of activity and background of the
application name at the top of your activity ?

--Rajesh

-- 
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 change background of activity and background of the application name at the top of your activity

2010-06-23 Thread KerlW


On 6月23日, 下午4时27分, rpelluru mail2pell...@gmail.com wrote:
 Hi,
How to change background of activity and

just change the activity's content view's background

background of the
 application name at the top of your activity ?


search custom title

 --Rajesh

-- 
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: Any chance to deactivate the lock pattern in Froyo from code?

2010-06-23 Thread LeveloKment
Come on.
No information? No opinion? No advice how to address this issue to the
Android development team?

Thanks from Germany
Lars


On 16 Jun., 08:16, LeveloKment levelokm...@googlemail.com wrote:
 just a small bump ... with the hope someone can answer my question.

 On 8 Jun., 09:46, LeveloKment levelokm...@googlemail.com wrote:

  Hello.

  I provide a small tool called PatternControl via the market that give
  the users the opportunity to temporary deactivate the Android lock
  pattern for a definable amount of time. With other words: After
  entering the pattern, the pattern becomes deactivated for i.e. 5mins
  and re activates it self afterwards.

  Until now (Android  2.2) this was only possible by changing the
  settings directly, because there was no related API provided.
  (i.e.with something like
  setBoolean(Settings.System.LOCK_PATTERN_ENABLED, enabled))
  It is clear that this in not a good way, but from my knowledge there
  was no alternative.

  My hope was, that Froyo would introduce a new API to handle things
  like that legally.
  With the new security model of Android 2.2 writing to this kind of
  settings is now disallowed and the PolicyManager class seems just to
  offer password complexity options.

  So here is my question:
  Is there still any way to temporary deactivate the lock pattern as
  long as Android does not support such a delay functions natively?

  Thanks for you answer  Best regards
  Lars

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


Re: [android-developers] Re: Avoiding GPL

2010-06-23 Thread Sean Hodges
You really need to consult a specialist on this subject, developers
(including me) have a tendency to give out I am not a lawyer type
advice, which is inherently unreliable.

In the strategy you describe, I believe putting A and B in the same
APK means you are distributing both components as a single piece of
software. A person cannot modify and distribute B without either
bundling closed-source A, or modifying the build process (which also
violates the GPL). You would be closer to a solution if you created 2
separate APK's, as long as A and B are completely independent of each
other.

The nature of the GPL is that the authors *do not want* their code
distributed in a closed-source solution, and this is exactly why it is
so difficult to find a legal way to do it. If you want to mix
licences; seek legal advice, and/or contact the authors about the
possibility of a dual-licence solution.


On Wed, Jun 23, 2010 at 7:32 AM, Naveen Maheshwari naveen...@gmail.com wrote:
 Yeah David is right.If you link your application with open source libraries
 you have to open your code.

 That's  why what I am trying to do is the code that uses open source I make
 it as separate module and run that as remote service.
 Now since this service is running as a separate process so I am oblized to
 open only source code for this service...

 So the basic idea is
 A my app has some data and it needs to process this data... When it needs to
 process this data it runs a remote service B. This service process the data
 and returns back to A.

 B is the service that is using open source code and is running as a remote
 service. which is different process than app A.
 Source code for B  will be made open source.

 So as far as I know there should not be any legal issues and all can go as
 same .apk.

 Thanks





 On Wed, Jun 23, 2010 at 3:14 PM, Chi Kit Leung michaelchi...@gmail.com
 wrote:

 I think david is very right about that.

 On Wed, Jun 23, 2010 at 4:04 PM, David Turner di...@android.com wrote:


 On Tue, Jun 22, 2010 at 9:33 PM, HaMMeReD adamhamm...@gmail.com wrote:

 If you can use it without modifying the source then just do it, and
 provide credit to the library creator clearly in your app.

 this is wrong on many levels. As soon as you *distribute* the binaries
 (e.g. through Market),
 you must provide the sources of _all_ your program if you link against
 the GPLed sources.
 This is true of GPLv2 or GPLv3.
 The LGPL is different, but conditions are very specific, and probably
 corresponds more to
 what you describe. However, this does not apply to the GPLv3.
 Please read the GPL Faq, it contains useful information.


 If you need to modify the source, then you need to be able to provide
 the modifications. If you need to integrate it with your app deeply so
 that you can't use the modified version without your app, then you
 need to open source the entire thing.

 IANAL but using a open source library in a closed source project
 without any modification should not provide any serious legal issues
 as long as everyone is properly credited and there is no stipulations
 in the license or on the creators website.

 I wouldn't recommend doing complex workarounds, because it just
 increases the amount of changes and dependencies between your app and
 the open source app, and shows that you were trying to circumvent
 things. Just do your best to not change it, and check the creators
 site to see if they sell alternate licenses that might server your
 needs better, if you do need to modify the source in certain ways.


 Adam Hammer

 On Jun 22, 12:10 am, Naveen naveen...@gmail.com wrote:
  Hi!
  I need to use some open source code with GPL3.
 
  As usual I don't want to open source code for full application.
 
  Now what I understand is if I make two separate process one with my
  main application code and other as a service or something with Open
  source library  then in that case I have to open source code only for
  the other one.
 
  Now the question is what is the best way to do so in Android.
 
  Suppose
  My Main App  is  A
  Open Source code is  B
 
  So A will give some data to B. B will process this and sends data back
  to A. B may not need to have any UI.
 
  1. Is it possible to install 2 seperate applications / processes from
  one APK?
  2. What is the best way ?Should B be a service? How will be the
  communication between A and B ?
  3. Is it possible to run/call B from A?
 
  Pls. advice
 
  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
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://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] Using SyncAdapter for syncing application data

2010-06-23 Thread Hugo Visser
Hi,

A little app design question: I was wondering if a custom sync adapter
would be appropriate when syncing normal application data that is
tied to a Google account. For example, I'd like to sync some data to a
Google docs spreadsheet in this case. Would a sync adapter be the
right choice for this use case or should I handle the sync in the app?

Thanks,

Hugo

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


Re: [android-developers] Using SyncAdapter for syncing application data

2010-06-23 Thread Gyan
Nice thought. But do you really think you need an adapter to answer this.
This is just a data sync functionality! If its tightly tied to UI
re-drawing/customization then you might go with writing SyncAdapter
otherwise you can, very well, stick with an interface!

Thanks
Gyan

-- 
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] Display a Dialog in non-Activity (simple Java) Class By passing Parameters

2010-06-23 Thread Nishant Kumar
Hi,
 I am trying to display a dialog box in a simple Java class that is
called from my main Activity but not successful.
Please help me to figure it out.

I am passing the required values as parametrs.


I have two class:

class MainActivity extends Activity  ::  Main *starting point *of
Application

class ShowMyDialog   ::  a simple java program In which I *generate an
URl* and *display a dialog with WebView*.
  I am passing the Acitivity from my
MainActivity to this class as a parameter in function.

But I am *unable to call* the onCreateDialog method that I have *defined in
the simple java class*.

However , If I define the *onCreateDialog method in MainActivity*, I am able
to display it* successfully.
*

*What Should I pass as Parameter to the non Activity class from MainActivity
class so that I am able to display the dialog as defined by showdialog
method in JAVA class ???*

My steps of source code is as follow:


class MainActivity extends Activity{

  onCreate{

Activity passingActivity =  this;//  THIS PASSING
PARAMETERS NEED TO BE CHANGED , getApplicationContext doesnot works for me
   ShowMyDialog showMyDialog = new ShowMyDialog(passingActivity);
   showMyDailog.displayMyDialog();

   }
}


class ShowMyDialog{

   public ShowMyDialog(Activity passingActivity){
this.passingActivity = passingActivity;
   }


public displayMyDialog (){
 int ID = 1;

passingActivity.showdialog(ID);
}

protected Dialog onCreateDialog(int position){

 Dialog dialog = new Dialog(callingActivity);
 dialog.setContentView(R.layout.dialogbrowser);
 WebView mWebView = (WebView) dialog.findViewById(R.id.webview);
 mWebView.loadUrl(http://www.google.com;);
 return dialog
   }

}

Thanks,
NIshant

-- 
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: app not working in background

2010-06-23 Thread pranay


On Jun 22, 9:18 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Tue, Jun 22, 2010 at 12:04 PM, pranay streetfi...@gmail.com wrote:
  hi, i have an app that responds to user the incoming sms via speech .
  The app seems to work perfectly when it is lauched or even when i
  press the back button on the emulator, however when i start a new
  app , then i receive the new message only as a Toast (as shown in the
  prgm below) but i cannnot hear any sound. I checked the logcat and
  found that in this situation i get the error that : null synthesis-
  can't speak .

 It is not safe to kick off anything that might take a while in a
 BroadcastReceiver, as it may cause your process to be terminated with
 the background equivalent of an application-not-responding error. At
 minimum, you need to move this to an IntentService and out of the
 BroadcastReceiver.

 It is also possible that speech synthesis can only be done by an
 Activity -- I have no idea if services can do it or not.

 Also, please bear in mind that the intent-filter you are presumably
 using for this application uses an action string that is not part of
 the Android SDK, and so your code may break in the future


i have tried the following ,

package com.example.TextSpeaker;

import java.util.Locale;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.speech.tts.TextToSpeech;
import android.speech.tts.TextToSpeech.OnInitListener;
import android.util.Log;
import android.widget.Toast;


public class SpeakerService extends Service implements OnInitListener{

//Receiver rv = new Receiver();
//TextSpeaker tspker = new TextSpeaker();
public static TextToSpeech mtts;
@Override
public IBinder onBind(Intent arg0) {
// TODO Auto-generated method stub
return null;
}

@Override
public void onCreate(){
//mtts =new TextToSpeech(getBaseContext(), null);
Log.d(SpeakerService,Service created successfully!);
mtts = new TextToSpeech(this,this);
mtts.setLanguage(Locale.ENGLISH);
//mtts.speak(rv.str, TextToSpeech.QUEUE_FLUSH,null);
//TextSpeaker.mtts.speak(Receiver.str,
TextToSpeech.QUEUE_FLUSH,null);

}
@Override
public void onStart(Intent intent,int startid)
{
Log.d(SpeakerService,Service started successfully!);
Log.d(SpeakerService,Service started successfully!);
//Log.d(SpeakerService,rv =  + rv.toString());
//Log.d(SpeakerService,tspker =  + tspker.toString());
Log.d(SpeakerService,tspker.mtts =  +
TextSpeaker.mtts.toString());
mtts = new TextToSpeech(this,this);
mtts.setLanguage(Locale.ENGLISH);
//TextSpeaker.mtts.speak(Service started,
TextToSpeech.QUEUE_FLUSH, null);
//TextSpeaker.mtts.speak(Receiver.str,
TextToSpeech.QUEUE_FLUSH,null);
mtts.speak(Receiver.str, TextToSpeech.QUEUE_FLUSH,null);
}
@Override
public void onDestroy(){
if(mtts!=null)
{
mtts.stop();
Toast.makeText(getApplicationContext(),The service has 
been
destroyed!, Toast.LENGTH_SHORT).show();
}

}

@Override
public void onInit(int arg0) {
// TODO Auto-generated method stub

}

}

Now i am not able to hear any sound. but only receive the Toast
messages. the logcat says ERROR/MediaPlayerService(30): Couldn't open
fd for content://settings/system/notification_sound  and also  unable
to create media player

-- 
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: Android libraries

2010-06-23 Thread deg
Thanks, that makes sense.

Also, what are the rules for AndroidManifest elements?
- Does the main package or an Android library (or both) need to
declare a uses-permission for something that happens in library code?
- If a library implements a BroadcastReceiver should it be declared in
its manifest, or that of the application (or both)?
- etc.

David


On Jun 22, 4:38 pm, Mike dg vinb...@gmail.com wrote:
 Android libraries can include resources. Java libraries can not.

 On Jun 22, 8:47 am, deg d...@degel.com wrote:



  Managing an Android project in Eclipse, which I need to divide into
  several libraries...

  What, exactly, are the differences between Android Libraries (made
  with Properties | Android | Library | Add) and Referenced
  libraries (made with Properties | Java Build Path | Libraries | Add
  JARs).

  I've already experimented and found out that:
  - Android Libraries cannot use other Android Libraries
  - Referenced libraries integrate less smoothly, requiring extra effort
  to build the .jar etc.
  - Both seem to be slightly unstable, sometimes not building everything
  and creating an ,apk that compiles correctly but is missing the
  library classes. (I'm not yet sure exactly when this happens, but I've
  seen it a few times -- usually fixed by closing and reopening the
  projects).

  But, I don't yet have a good picture of when I should be using which,
  nor any overall documentation. Anyone know the full story on these two
  kinds of library usages?

  Thanks,
  David- Hide quoted text -

 - Show quoted text -

-- 
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] install to sdcard failed

2010-06-23 Thread sleith
Hi,
I'm trying the feature android:installLocation=preferExternal
my asset files is 155MB and sdcard has around 2GB.
When trying to install, it seems the apk file is installing to the
internal phone storage instead to the sdcard.
This results : Unable to upload file: No space left on device
When i tried to remove some asset files to small size 20MB i think,
it can be installed to the sdcard.

Can anyone help me out why it's installing to the internal phone
storage instead to sdcard?
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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Eclipse Helios

2010-06-23 Thread Andrew Brampton
I've been using the Android SDK with the Helios release candidate with
no problems.

Andrew

On 23 June 2010 05:24, BuckeyeDroid bill.schric...@gmail.com wrote:
 As you're probably aware, the Helios release of Eclipse is released on
 June 23rd. Will this be supported by the Android SDK?

 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
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://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] adb over wifi

2010-06-23 Thread Olivier Guilyardi
Hi,

has anyone managed to connect to a device with adb over a wifi connection? I'd
like to stop plugging the device in and out if possible. Hackish solutions are
welcome too.

--
  Olivier

-- 
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: Android: Set selected icon in GridView

2010-06-23 Thread MobDev
Not sure about GridViews, I've used this for a ListView, but you might
want to look if the setTag() and getTag() methods are available for
the Gridview items, so yu can set (and get) a specific name/id/
description/whatever...

On 22 jun, 21:40, HJ hjenner...@gmail.com wrote:
 I'm trying to find a way to store the name of an icon in my database,
 then use that name to let a user select an icon from an ImageView.
 I've found various guides on ImageViews and Galleries, but none that
 show how to get/set the selected image by name. The list of available
 images won't change, but what's that best way to implement this?

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


Re: [android-developers] alternative to tabhost

2010-06-23 Thread Mark Murphy
On Tue, Jun 22, 2010 at 9:48 PM, shakeel shakeelaha...@tataelxsi.co.in wrote:
 I am getting stack overflow problem.

 My activity is working fine if I run it independently, but gives
 stackoverflow when I add it to tabhost.

 I am using sdk1.5 and I can't reduce my hierarchy.

 I am looking for alternative approach to tabhost.

Move all the logic that is common to the tab and the standalone
activity to a custom View class. Then use that View class as a tab in
the TabActivity and as the value for setContentView() in the
standalone activity.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_
Version 1.6 Available!

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


Re: [android-developers] Re: Any chance to deactivate the lock pattern in Froyo from code?

2010-06-23 Thread Mark Murphy
On Wed, Jun 23, 2010 at 4:46 AM, LeveloKment levelokm...@googlemail.com wrote:
 No information?

No, there is no way to deactivate the lock pattern that I am aware of.

 No opinion?

My opinion is that deactivating the lock pattern via a regular setting
was a security hole. If the user wants a lock pattern, apps should not
change that. If the user does not want a lock pattern, the user is
perfectly capable of disabling it using the Settings application. The
exception would be if an enterprise would want to mandate the lock
screen be on and not disable-able, which runs counter to your apparent
goals.

My hope is that eventually stuff like this and custom lock screens
will become part of the new device admin APIs.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6
Available!

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


Re: [android-developers] Re: app not working in background

2010-06-23 Thread Mark Murphy
On Wed, Jun 23, 2010 at 5:39 AM, pranay streetfi...@gmail.com wrote:
 Now i am not able to hear any sound. but only receive the Toast
 messages. the logcat says ERROR/MediaPlayerService(30): Couldn't open
 fd for content://settings/system/notification_sound  and also  unable
 to create media player

My guess is that speech synthesis is not designed to be used from the
background.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6
Available!

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


Re: [android-developers] how to bring up text to speech settings in my app?

2010-06-23 Thread Mark Murphy
On Tue, Jun 22, 2010 at 10:00 PM, pranay streetfi...@gmail.com wrote:
 how do i bring up the screen for text to speech library settings in my
 app on a button click?

There does not seem to be a published Intent action for that. Please
just give the users instructions for changing whatever settings you
want changed.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_
Version 1.6 Available!

-- 
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] starting text to speech synthesis from a service?

2010-06-23 Thread pranay
is it possible to start a text to speech instance from a service?
 i have tried the following but it doesn't seem to work:



package com.example.SmsSpeaker3;

import java.util.Locale;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.speech.tts.TextToSpeech;
import android.speech.tts.TextToSpeech.OnInitListener;
import android.util.Log;
import android.widget.Toast;


public class SmsSpeaker3 extends Service implements OnInitListener{


public static TextToSpeech mtts;
@Override
public IBinder onBind(Intent arg0) {
// TODO Auto-generated method stub
return null;
}

@Override
public void onCreate(){
Log.d(SpeakerService,Service created successfully!);
mtts = new TextToSpeech(getApplicationContext(),this);

//mtts.speak(rv.str, TextToSpeech.QUEUE_FLUSH,null);
//TextSpeaker.mtts.speak(Receiver.str,
TextToSpeech.QUEUE_FLUSH,null);

}
@Override
public void onStart(Intent intent,int startid)
{
Log.d(SpeakerService,Service started successfully!);

mtts = new TextToSpeech(getApplicationContext(),this);
mtts.setLanguage(Locale.ENGLISH);
Log.d(SmsSpeaker3,created mtts successfully);
//TextSpeaker.mtts.setLanguage(Locale.ENGLISH);
//TextSpeaker.mtts.speak(Receiver.str,
TextToSpeech.QUEUE_FLUSH,null);
mtts.speak(Receiver3.str, TextToSpeech.QUEUE_FLUSH,null);
Log.d(SmsSpeaker3,synthesis done successfully);
}
@Override
public void onDestroy(){
if(mtts!=null)
{
mtts.stop();
Toast.makeText(getApplicationContext(),The service has 
been
destroyed!, Toast.LENGTH_SHORT).show();
}

}

@Override
public void onInit(int arg0) {
// TODO Auto-generated method stub

}

}




and


package com.example.SmsSpeaker3;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
//import android.speech.tts.TextToSpeech;
import android.telephony.SmsMessage; // supports both gsm and cdma
import android.util.Log;
import android.widget.Toast;



public class Receiver3 extends BroadcastReceiver{


public static String str;
@Override
public void onReceive(Context context, Intent intent) {
Bundle bundle = intent.getExtras();
Log.d(Receiver,Message received successfully);

SmsMessage[] msgs = null;

if(bundle!=null)
{
// retrive the sms received

Object[] pdus = (Object[])bundle.get(pdus);
msgs = new SmsMessage[pdus.length];
for(int i=0;imsgs.length;i++)
{
str=;
msgs[i]=SmsMessage.createFromPdu((byte[]) 
pdus[i]);
str+=Message From 
+msgs[i].getOriginatingAddress()+.   ;
str+=The message is 
+msgs[i].getMessageBody().toString();

}
 context.startService(new Intent(context,SmsSpeaker3.class));
 Toast.makeText(context,str,Toast.LENGTH_LONG).show();



}
}
}


in the log i am getting all the messages in log.d but still i am
unable to receive any sound,only the toast is seen

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


Re: [android-developers] layout problem when orientation changed

2010-06-23 Thread Mark Murphy
You need to reverse the order of the child elements of RelativeLayout.

In Android 1.6+, you can have a widget (e.g., your TextView) refer to
a widget (e.g.,  your FrameLayout) that appears later in the XML.
Android 1.5 does not support this. Hence, you need your FrameLayout to
appear first in your XML, then the TextView. You do not need to change
any of your attributes. Your layout should then work as expected.

On Wed, Jun 23, 2010 at 3:41 AM, KerlW kerl@gmail.com wrote:
 My activity use the same RelativeLayout as it's content view whatever
 the orientation is.
 In this RelativeLayout, there is a FrameLayout align to it's bottom,
 and a TextView above this FrameLayout, just like :

 RelativeLayout xmlns:android = http://schemas.android.com/apk/res/
 android
    android:layout_width=fill_parent
    android:layout_height=fill_parent
    
   TextView android:id=@+id/tip_bar
                android:layout_above=@+id/control_panel
                android:layout_width=fill_parent
                android:layout_height=20dip
                android:layout_marginBottom=18dip
                android:gravity=center_vertical
                android:singleLine=true
                android:layout_alignWithParentIfMissing=true
                /

    FrameLayout android:id=@+id/control_panel
                android:layout_width=fill_parent
                        android:layout_height=wrap_content
                        android:layout_alignParentBottom=true
                
    /FrameLayout
 /RelativeLayout

 on android 1.5 device
   when orientation changed, the TextView lies in the wrong place,
 middle when portrait, bottom when landscape.
 on android 1.6 device
   It is ok.

 How could I make it lies in the place where it should be on 1.5
 device?
 Thanks and regards.

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




-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_
Version 1.6 Available!

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


Re: [android-developers] Resource linking / imports

2010-06-23 Thread Mark Murphy
Conceptually, the notion seems sound. However, I'm here to encourage
you to Just Do It.

On Wed, Jun 23, 2010 at 3:47 AM, Al Sutton a...@funkyandroid.com wrote:
 First off; I know the implementation of this should be discussed on
 the framework list, but I'm putting this idea out on here to see if
 there is a need for it.

This doesn't strictly need to be on the -framework list, since what
you want does not require any changes to the Android OS. You can
achieve your goals with zero modifications to anything in the AOSP.
Standardizing this would require changes to *tools*, and given a
working implementation, discussions on integrating the scheme into the
tools could probably just go straight to the -contrib list.

 imports
  import source=drawables-hdpiicon1.png/import
  import source=drawables-hdpiicon2.png/import
  import source=drawables-hdpiicon3.png/import
  /imports

Here's your AOSP-mod-free implementation:

Step #1: Modify the above XML format to be something that can live in
a resource directory but be ignored by the build tools. It might
qualify right now. It may require some tweaking. It is conceivable
that nothing will work, in which case toss it into an imports/
directory off the project root and add a target attribute to the root
element to indicate the resource directory you were originally
planning to have the file live in.

Step #2: Create the Android Image Importer (aii) tool. aii inject
finds the import file(s) and creates the alias XML files that you are
trying to avoid creating by hand. aii extract finds the import file(s)
and removes the alias XML files.

Step #3: Add aii inject to your toolchain as an early step in the
build, before the first aapt call.

Step #4: Add aii extract to your toolchain as a late step in the
build, probably at the end after the APK packaging/signing is complete

(for Ant, I'd do steps #3 and #4 by creating wrapper tasks around ant
debug and ant install and such that does the aii inject, chains to the
main task (e.g., debug), then does the aii extract)

(for Eclipse, you're on your own)

Net: you get your desired functionality without any changes to AOSP,
so you can see how well your plan works in practice.

Net++: you get a working implementation of the concept to use as a
basis for discussions with Xav and the tools team, because a real
implementation of the concept probably does pretty much the same
thing, just under the covers.

Writing the aii command should take somebody maybe an hour in Ruby, or
three months in Java. :-)

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6
Available!

-- 
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] Android Option Menu

2010-06-23 Thread Eason
I am trying to develop my app. and trying to write a settings page. I
found that all the apps on the market are with the same style of
settings. are there any default API for writing a setting page? It
would be great if some sample code can be provided =p

-- 
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: app not working in background

2010-06-23 Thread pranay


On Jun 23, 3:59 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Jun 23, 2010 at 5:39 AM, pranay streetfi...@gmail.com wrote:
  Now i am not able to hear any sound. but only receive the Toast
  messages. the logcat says ERROR/MediaPlayerService(30): Couldn't open
  fd for content://settings/system/notification_sound  and also  unable
  to create media player

 My guess is that speech synthesis is not designed to be used from the
 background.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6
 Available!


ok, then the app cannot be useful if one is already running some other
app, but it might be useful while driving though. Thanks anyways :)

-- 
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] Google reader api

2010-06-23 Thread Martin Wallgren
I would like to sync some content in my application with google
reader. I know that there are apps on the market that access google
reader so I know that it can be done.

Are there any built in java apis in android to access google reader,
if not, what do you think is the best approach to implementing this.

I've googled a bit on this and I have some ideas on how to implement
this, but I don't want to reinvent the wheel if there already is a
working solution available.

Any thoughts on this subject?

/Martin

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


Re: [android-developers] Google reader api

2010-06-23 Thread Mark Murphy
On Wed, Jun 23, 2010 at 7:36 AM, Martin Wallgren mar...@wallgren.it wrote:
 Are there any built in java apis in android to access google reader,

Nothing specific to Google Reader, no. There are no GData APIs that
are part of the Android SDK.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_
Version 1.6 Available!

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


Re: [android-developers] Android Option Menu

2010-06-23 Thread Mark Murphy
On Wed, Jun 23, 2010 at 7:26 AM, Eason dragonea...@gmail.com wrote:
 I am trying to develop my app. and trying to write a settings page. I
 found that all the apps on the market are with the same style of
 settings. are there any default API for writing a setting page?

Use a PreferenceActivity:

http://github.com/commonsguy/cw-android/tree/master/Prefs/

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_
Version 1.6 Available!

-- 
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] Problem in GLSurfaceView??

2010-06-23 Thread Geefer
Hi,
I have recently seeen a few cases of the following error from one
particular device (Archos 5 running Android 1.6).The stack trace does
not cover any code in my app but appears to be a problem within the
Google code for the  GLSurfaceView that I am using.

Stacktrace:
java.lang.IllegalArgumentException
at com.google.android.gles_jni.EGLImpl.eglSwapBuffers(Native Method)
at android.opengl.GLSurfaceView$EglHelper.swap(GLSurfaceView.java:
901)
at android.opengl.GLSurfaceView
$GLThread.guardedRun(GLSurfaceView.java:1114)
at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:968)

Is this something I am doing? I don't do anything special with the
GLSurfaceView so it should be responsible for setting up the OpenGL
surface correctly itself. The app works fine for several thousands of
users so I wonder why this error should pop up only on this device
type.

Any ideas how to debug?

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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: Any chance to deactivate the lock pattern in Froyo from code?

2010-06-23 Thread Sean Hodges
On Wed, Jun 23, 2010 at 9:46 AM, LeveloKment levelokm...@googlemail.com wrote:
 Come on.
 No information? No opinion? No advice how to address this issue to the
 Android development team?

This particular functionality belongs in the system layer, not user-space apps.

Log an enhancement ticket on b.android.com, and consider writing a
patch for the platform that provides the functionality in a privileged
app, most likely Settings.apk. However you decide to implement it,
make sure the mechanism is not exposed via the public API, so regular
apps cannot take advantage of it like yours used to.



 Thanks from Germany
 Lars


 On 16 Jun., 08:16, LeveloKment levelokm...@googlemail.com wrote:
 just a small bump ... with the hope someone can answer my question.

 On 8 Jun., 09:46, LeveloKment levelokm...@googlemail.com wrote:

  Hello.

  I provide a small tool called PatternControl via the market that give
  the users the opportunity to temporary deactivate the Android lock
  pattern for a definable amount of time. With other words: After
  entering the pattern, the pattern becomes deactivated for i.e. 5mins
  and re activates it self afterwards.

  Until now (Android  2.2) this was only possible by changing the
  settings directly, because there was no related API provided.
  (i.e.with something like
  setBoolean(Settings.System.LOCK_PATTERN_ENABLED, enabled))
  It is clear that this in not a good way, but from my knowledge there
  was no alternative.

  My hope was, that Froyo would introduce a new API to handle things
  like that legally.
  With the new security model of Android 2.2 writing to this kind of
  settings is now disallowed and the PolicyManager class seems just to
  offer password complexity options.

  So here is my question:
  Is there still any way to temporary deactivate the lock pattern as
  long as Android does not support such a delay functions natively?

  Thanks for you answer  Best regards
  Lars

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

-- 
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: New crash reporting - is it a function of the phone or the app?

2010-06-23 Thread Geefer
Thanks, that's a good point about the possible update route.

I did also wonder if my own crash reporting was somehow stopping the
google one ...

On Jun 22, 9:13 pm, TreKing treking...@gmail.com wrote:
 On Tue, Jun 15, 2010 at 2:41 PM, Geefer paul.gee...@googlemail.com wrote:
  Hi, unfortunately I know my app is occasionally crashing (though
  only rarely and only on Sony Xperia phones and only sometimes it seems)
  but I am not seeing any crash reports in the Developer Console.

 AFAIK, the crash reports in the Dev Console are dependent on
 a) the users having the feature enabled on their phone and
 b) the user actually taking the time to report the issues

  However I would like to replace this with the Google version if possible.

 If you already have something in place, I would suggest you keep it, since,
 again, the Dev Console is dependent on users taking action.

  So it appears that there ust be something I need to do to 'enable' this
  feature.

 I don't think so. This feature was enabled on my phone for, AFAICT, all
 apps, many of which have not been updated in quite some time. This is a
 function of another, built in, auto-updating app on devices, it appears.

  I can't really imagine a mechanism that Google could have automagically
  enabled this without me recompiling with a later library

  How about pushing an auto-update to the app / process that already handled
 force-closes and ANRs?

 -
 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 at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Re: New crash reporting - is it a function of the phone or the app?

2010-06-23 Thread Mark Murphy
On Wed, Jun 23, 2010 at 8:02 AM, Geefer paul.gee...@googlemail.com wrote:
 I did also wonder if my own crash reporting was somehow stopping the
 google one ...

It probably does. After all, if you are catching the exceptions (to
report them your own way), then you are not crashing.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_
Version 1.6 Available!

-- 
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: New crash reporting - is it a function of the phone or the app?

2010-06-23 Thread Geefer
Well except that I call the original handler after my code so my
expectation was that it would then continue as 'normal'



On Jun 23, 1:06 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Jun 23, 2010 at 8:02 AM, Geefer paul.gee...@googlemail.com wrote:
  I did also wonder if my own crash reporting was somehow stopping the
  google one ...

 It probably does. After all, if you are catching the exceptions (to
 report them your own way), then you are not crashing.

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 _The Busy Coder's Guide to *Advanced* Android Development_
 Version 1.6 Available!

-- 
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: Service unable to call Java Class Methods

2010-06-23 Thread MobDev
First, you debug a Service the same way you debug anything else. You
set breakpoints in the appropriate lifecycle methods, or in routines
called from those methods.
Done that...

If I recall correctly, this works even if
the Service is running in a different process, but you might need to
enable debugging on the specific process via DDMS.
Tried that, when my app is started in the DDMS it will show my app
(myprojects.android.controlCenter) and, I guess, my service
(myprojects.android.controlCenter:remote)... When I try to debug that
it the DDMS will throw an error : No opened project found for
myprojects.android.controlCenter:remote. Debug session failed !

You don't quite say what makes you think your method isn't being
called. On the face of it, this would seem to mean simply that the
code that calls it doesn't run. But later you talk about It just
simply seems like the Service doesn't see the Logger class, but
with nothing to indicate what that means or why it seems that way. 
Well I have logging to the System.err.println within the Logger class
method which is being called, and it doesn't print to screen, so to me
it seems like that method is not being called or executed... That's
why I think the service doesn't see the Logger class : it cannot
call it's method otherwise I would see that in my console because of
the System.err.println() call within the called method...
I do know the Logger class works, it is being called by other
Activities and it prints happily everything it needs to print :D

After a lot of debugging I guess this is the answer who might help me
out :
Note that you refer to it as a singleton, but that's only meaningful
within a process. 
It seems the Service will make it's own Logger Singleton, which makes
creating an architecture with (for example) a static management layer
impossible... After all that static management class would be a
singleton as well, but having the service being in another Process it
will create it's own management class... So is there some way to
define the service to be created inside the same porcess ?

On 22 jun, 21:38, Bob Kerns r...@acm.org wrote:
 (Yes, I've read the rest of the conversation, but I'm returning to
 your original message).

 First, you debug a Service the same way you debug anything else. You
 set breakpoints in the appropriate lifecycle methods, or in routines
 called from those methods. If I recall correctly, this works even if
 the Service is running in a different process, but you might need to
 enable debugging on the specific process via DDMS.

 You don't quite say what makes you think your method isn't being
 called. On the face of it, this would seem to mean simply that the
 code that calls it doesn't run. But later you talk about It just
 simply seems like the Service doesn't see the Logger class, but
 with nothing to indicate what that means or why it seems that way.

 There are four ways that this could happen. I doubt any of them
 actually apply to your situation, but it's worth listing:

 1) The class isn't found at compile time. The code won't compile, you
 won't actually be running the current code.

 2) The class isn't found at run time. Somehow it didn't get packaged
 up in the .apk. Since the classpath would be the same for both the
 Service and any Activities, you'd see the same ClassNotFound exception
 at runtime.

 3) The class is found, but gets an error while loading. This would
 give a ClassNotFoundError. The class will be successfully loaded once
 per process/.apk pair, so you'd normally get the problem for both, if
 in the same process, unless there's some initialization that happens
 between that allows it to load the second time. If in separate
 processes, if there's a dependency on things happening before the
 class loads, it might load in one process and not the other.

 Note that you refer to it as a singleton, but that's only meaningful
 within a process.

 4) The class is found, but loads, but the method itself is not found.
 This gets a MethodNotFoundException or other exception at runtime,
 depending on the exact behavior of the VM; I'm not sure it's fully
 specified. This situation only happens if code is successfully
 compiled against one version of the class, but finds a different
 version at runtime without the appropriate method. This would be
 similar to case #1 in origins. It is seldom found in practice, but
 usually doing a clean of the project and rebuilding will resolve it --
 often by turning into case #1.

 Anyway, your main solution is to actually debug the problem. Step
 through a call to your logger and see what happens and what doesn't
 happen.

 You should actually know if your Service is running in another process
 -- you'd have to set it up that way in the manifest. Just because
 you're using IPC doesn't mean it's in a separate process -- it just
 means you could set it up that way and the communication  would still
 work.

 On Jun 22, 6:42 am, MobDev developm...@mobilaria.com wrote:

  

[android-developers] Re: Using SyncAdapter for syncing application data

2010-06-23 Thread Hugo Visser
Let me clarify: In this case I don't need or want to have the sync be
very visible. I just want to enter some data on the device and sync it
to the server eventually, so when the network connection is available.
Batching would be OK too.
Because that's kind of like editing a contact or updating a calendar I
thought it would be suitable for a sync adapter, and I guess the sync
framework also takes care of some things that I otherwise have to
manage myself.

Could you elaborate on your statement that a sync adapter would be the
right choice when it's tied to UI redrawing? I'd guess that the
opposite would be true?

Hugo

On Jun 23, 11:34 am, Gyan gnanesh@gmail.com wrote:
 Nice thought. But do you really think you need an adapter to answer this.
 This is just a data sync functionality! If its tightly tied to UI
 re-drawing/customization then you might go with writing SyncAdapter
 otherwise you can, very well, stick with an interface!

 Thanks
 Gyan

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


Re: [android-developers] Re: Using SyncAdapter for syncing application data

2010-06-23 Thread Connick
I've been using a sync adapter for application data and it worked out really
well. The downside is that there is no API to set the sync interval unless
you're targeting froyo. (at least to my knowledge) Kind of defeats the
purpose. I've had to roll with alarm manager for pre-froyo clients. My main
reason for going the sync adapter route was to play nice with the users
ability to manage background sync globally.

-Stace


On Wed, Jun 23, 2010 at 8:18 AM, Hugo Visser botte...@gmail.com wrote:

 Let me clarify: In this case I don't need or want to have the sync be
 very visible. I just want to enter some data on the device and sync it
 to the server eventually, so when the network connection is available.
 Batching would be OK too.
 Because that's kind of like editing a contact or updating a calendar I
 thought it would be suitable for a sync adapter, and I guess the sync
 framework also takes care of some things that I otherwise have to
 manage myself.

 Could you elaborate on your statement that a sync adapter would be the
 right choice when it's tied to UI redrawing? I'd guess that the
 opposite would be true?

 Hugo

 On Jun 23, 11:34 am, Gyan gnanesh@gmail.com wrote:
  Nice thought. But do you really think you need an adapter to answer this.
  This is just a data sync functionality! If its tightly tied to UI
  re-drawing/customization then you might go with writing SyncAdapter
  otherwise you can, very well, stick with an interface!
 
  Thanks
  Gyan

 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://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: setParameters Failed

2010-06-23 Thread grace
thanks for ur reply,
I have gone through the link.
As i understand the fix for this problem is to give the supported
parameters to the camera object which we get from the list of
getSupportedPreviewSizes().

but my case is little different i guess,i just have the apk of the
application i downloaded not the source code to make the changes
accordingly.
I am trying to run it on N1 which has 2.1 update1.
so,how to use the above fix to solve this issue on my phone.

pls help..

On Jun 22, 5:49 pm, blindfold seeingwithso...@gmail.com wrote:
 See the declined issue discussion on setPreviewSize() 
 athttp://code.google.com/p/android/issues/detail?id=7909and the
 recommendations made there by Wu-Cheng (Comment 29).

 Regards

 The vOICe for Androidhttp://www.seeingwithsound.com/android.htm

 On Jun 22, 10:59 am,gracegrace.a...@wipro.com wrote:

  Hi,

  I have downloaded one open source ocr application.
  when i run it on the g1 phone it is working,but for  the nexus one its
  throwing up a exception telling
  E/QualcommCameraHardware(   52): Invalid preview size requested:
  533x310

  E/AndroidRuntime( 5038): java.lang.RuntimeException: setParameters
  failed

  hoe can i make this work on nexus too.

  thanks in advance..

 Grace.



-- 
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: Service unable to call Java Class Methods

2010-06-23 Thread MobDev
ok I have taken out the android:process=:remote tag in my service
tag within the androidmanifest and now it calls the Logger just
fine...

On 23 jun, 14:15, MobDev developm...@mobilaria.com wrote:
 First, you debug a Service the same way you debug anything else. You
 set breakpoints in the appropriate lifecycle methods, or in routines
 called from those methods.
 Done that...

 If I recall correctly, this works even if
 the Service is running in a different process, but you might need to
 enable debugging on the specific process via DDMS.
 Tried that, when my app is started in the DDMS it will show my app
 (myprojects.android.controlCenter) and, I guess, my service
 (myprojects.android.controlCenter:remote)... When I try to debug that
 it the DDMS will throw an error : No opened project found for
 myprojects.android.controlCenter:remote. Debug session failed !

 You don't quite say what makes you think your method isn't being
 called. On the face of it, this would seem to mean simply that the
 code that calls it doesn't run. But later you talk about It just
 simply seems like the Service doesn't see the Logger class, but
 with nothing to indicate what that means or why it seems that way. 
 Well I have logging to the System.err.println within the Logger class
 method which is being called, and it doesn't print to screen, so to me
 it seems like that method is not being called or executed... That's
 why I think the service doesn't see the Logger class : it cannot
 call it's method otherwise I would see that in my console because of
 the System.err.println() call within the called method...
 I do know the Logger class works, it is being called by other
 Activities and it prints happily everything it needs to print :D

 After a lot of debugging I guess this is the answer who might help me
 out :
 Note that you refer to it as a singleton, but that's only meaningful
 within a process. 
 It seems the Service will make it's own Logger Singleton, which makes
 creating an architecture with (for example) a static management layer
 impossible... After all that static management class would be a
 singleton as well, but having the service being in another Process it
 will create it's own management class... So is there some way to
 define the service to be created inside the same porcess ?

 On 22 jun, 21:38, Bob Kerns r...@acm.org wrote:

  (Yes, I've read the rest of the conversation, but I'm returning to
  your original message).

  First, you debug a Service the same way you debug anything else. You
  set breakpoints in the appropriate lifecycle methods, or in routines
  called from those methods. If I recall correctly, this works even if
  the Service is running in a different process, but you might need to
  enable debugging on the specific process via DDMS.

  You don't quite say what makes you think your method isn't being
  called. On the face of it, this would seem to mean simply that the
  code that calls it doesn't run. But later you talk about It just
  simply seems like the Service doesn't see the Logger class, but
  with nothing to indicate what that means or why it seems that way.

  There are four ways that this could happen. I doubt any of them
  actually apply to your situation, but it's worth listing:

  1) The class isn't found at compile time. The code won't compile, you
  won't actually be running the current code.

  2) The class isn't found at run time. Somehow it didn't get packaged
  up in the .apk. Since the classpath would be the same for both the
  Service and any Activities, you'd see the same ClassNotFound exception
  at runtime.

  3) The class is found, but gets an error while loading. This would
  give a ClassNotFoundError. The class will be successfully loaded once
  per process/.apk pair, so you'd normally get the problem for both, if
  in the same process, unless there's some initialization that happens
  between that allows it to load the second time. If in separate
  processes, if there's a dependency on things happening before the
  class loads, it might load in one process and not the other.

  Note that you refer to it as a singleton, but that's only meaningful
  within a process.

  4) The class is found, but loads, but the method itself is not found.
  This gets a MethodNotFoundException or other exception at runtime,
  depending on the exact behavior of the VM; I'm not sure it's fully
  specified. This situation only happens if code is successfully
  compiled against one version of the class, but finds a different
  version at runtime without the appropriate method. This would be
  similar to case #1 in origins. It is seldom found in practice, but
  usually doing a clean of the project and rebuilding will resolve it --
  often by turning into case #1.

  Anyway, your main solution is to actually debug the problem. Step
  through a call to your logger and see what happens and what doesn't
  happen.

  You should actually know if your Service is running in another process
  

[android-developers] Playing multiple audio files (mp3, 3gp) files concurrently

2010-06-23 Thread Samuh
What is the best way to play multiple audio files in mp3/3gp format
concurrently? These files can contain about 3-4 minutes of audio.

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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Display a Dialog in non-Activity (simple Java) Class By passing Parameters

2010-06-23 Thread Gyan
make the activity variable static and don't use this try
getApplicationContext or an instance created with new keyword

-- 
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 access a AIDL service from different packages?

2010-06-23 Thread Krishna Shetty
Thank you very much Mark, Joe.

But below call i.e., binding with the Interface name is not working. I
got the same error, not able to bind, service not found..
bindService(new Intent(IScript.class.getName()), svcConn,
Context.BIND_AUTO_CREATE);


But, below way of binding works. i.e., Binding with the exported
Service.
Intent i = new Intent();
i.setClassName(com.mt.TestRemoteService,
com.mt.TestRemoteService.MyService);
bindService(i, svcConn, Context.BIND_AUTO_CREATE);


Why bind with Interface name is not working for me?
( Note: I have added an intent-filter on the service with a
Interface action )

thanks,
Krishna

On Jun 18, 9:28 pm, Joe Onorato j...@google.com wrote:
 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..

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


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

2010-06-23 Thread Mark Murphy
On Wed, Jun 23, 2010 at 9:57 AM, Krishna Shetty
krishna.shett...@gmail.com wrote:
 Thank you very much Mark, Joe.

 But below call i.e., binding with the Interface name is not working. I
 got the same error, not able to bind, service not found..
 bindService(new Intent(IScript.class.getName()), svcConn,
 Context.BIND_AUTO_CREATE);

That means you have no service with an intent-filter containing an
action string that matches the value generated by
IScript.class.getName(). If you are taking that code from one of my
samples, the corresponding manifest from those samples is set up
properly:

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

 But, below way of binding works. i.e., Binding with the exported
 Service.
 Intent i = new Intent();
 i.setClassName(com.mt.TestRemoteService,
 com.mt.TestRemoteService.MyService);
 bindService(i, svcConn, Context.BIND_AUTO_CREATE);

This is extremely fragile. If the other application refactors its
code, your code will break.

 Why bind with Interface name is not working for me?
 ( Note: I have added an intent-filter on the service with a
 Interface action )

Whatever you think you did, it is not working.

Rather than use my IScript.class.getName() trick, it is probably
simpler for you to just use the literal string. Copy whatever string
is in your action and paste it as a string literal in your Intent
constructor.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6
Available!

-- 
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: Resource linking / imports

2010-06-23 Thread Al Sutton
If the idea gets some support I might do what you've suggested. Thanks
for the idea.

Al.

On Jun 23, 12:21 pm, Mark Murphy mmur...@commonsware.com wrote:
 Conceptually, the notion seems sound. However, I'm here to encourage
 you to Just Do It.

 On Wed, Jun 23, 2010 at 3:47 AM, Al Sutton a...@funkyandroid.com wrote:
  First off; I know the implementation of this should be discussed on
  the framework list, but I'm putting this idea out on here to see if
  there is a need for it.

 This doesn't strictly need to be on the -framework list, since what
 you want does not require any changes to the Android OS. You can
 achieve your goals with zero modifications to anything in the AOSP.
 Standardizing this would require changes to *tools*, and given a
 working implementation, discussions on integrating the scheme into the
 tools could probably just go straight to the -contrib list.

  imports
   import source=drawables-hdpiicon1.png/import
   import source=drawables-hdpiicon2.png/import
   import source=drawables-hdpiicon3.png/import
   /imports

 Here's your AOSP-mod-free implementation:

 Step #1: Modify the above XML format to be something that can live in
 a resource directory but be ignored by the build tools. It might
 qualify right now. It may require some tweaking. It is conceivable
 that nothing will work, in which case toss it into an imports/
 directory off the project root and add a target attribute to the root
 element to indicate the resource directory you were originally
 planning to have the file live in.

 Step #2: Create the Android Image Importer (aii) tool. aii inject
 finds the import file(s) and creates the alias XML files that you are
 trying to avoid creating by hand. aii extract finds the import file(s)
 and removes the alias XML files.

 Step #3: Add aii inject to your toolchain as an early step in the
 build, before the first aapt call.

 Step #4: Add aii extract to your toolchain as a late step in the
 build, probably at the end after the APK packaging/signing is complete

 (for Ant, I'd do steps #3 and #4 by creating wrapper tasks around ant
 debug and ant install and such that does the aii inject, chains to the
 main task (e.g., debug), then does the aii extract)

 (for Eclipse, you're on your own)

 Net: you get your desired functionality without any changes to AOSP,
 so you can see how well your plan works in practice.

 Net++: you get a working implementation of the concept to use as a
 basis for discussions with Xav and the tools team, because a real
 implementation of the concept probably does pretty much the same
 thing, just under the covers.

 Writing the aii command should take somebody maybe an hour in Ruby, or
 three months in Java. :-)

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 _The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6
 Available!

-- 
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] Save image on SD card

2010-06-23 Thread ReyLith
Hi!

I'm developing an image editor on android. I have a problem when I
have to save the image. If I save the image with a outputstream, I can
save the image but my program and android's gallery can't see the new
image. If I save the image with MediaStore.Images.Media.insertImage, I
can see the saved image but the problem it's that this function save a
little image called thumbnails which I don't know what to do.

Thank you. Regards,

Jesús

-- 
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: Resource linking / imports

2010-06-23 Thread Al Sutton
This is in no way specific to .9.png's, nor does it require their use.

Al.

On Jun 23, 8:53 am, Gyan gnanesh@gmail.com wrote:
 Making the usage of .9png images compulsory!

 Probably there is a smart way of installing only the required drawables on a
 particular hardware, so that at least the installed application isn't
 bloated!

 A perfectly discerning!
 -Gyan

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


Re: [android-developers] ListView - textrow not highlighted completely

2010-06-23 Thread TreKing
On Wed, Jun 16, 2010 at 6:13 AM, AndyDev myandroa...@gmail.com wrote:

 I want the whole textrow to be highlighted if its clicked anywhere else on
 the row.


How have you set up your click listener?

-
TreKing - Chicago transit tracking app for Android-powered devices
http://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 at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] ListView - textrow not highlighted completely

2010-06-23 Thread Nishant Kumar
Set the propert of width(both for the Listview and the TextBox of Content )
to fill_parent instead of wrap_content.

It should work.

On Wed, Jun 23, 2010 at 4:33 PM, TreKing treking...@gmail.com wrote:

 On Wed, Jun 16, 2010 at 6:13 AM, AndyDev myandroa...@gmail.com wrote:

 I want the whole textrow to be highlighted if its clicked anywhere else
 on the row.


 How have you set up your click listener?


 -
 TreKing - Chicago transit tracking app for Android-powered devices
 http://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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://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] SQlite Security

2010-06-23 Thread Bhavya Siddappa
Hi,

I want to know why SQLite doesn't support encryption! 
How to secure the SQlite db on a Android app?

./bhavya

-- 
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] How to on Gps in emulator

2010-06-23 Thread Sohan badaya
Hi,

How to start Gps in emulator.

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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Carousel like Gallery.

2010-06-23 Thread RANJAN BANIK
Please, answer please

Ranjan

On May 7, 1:57 am, Abdul Mateen abmat...@gmail.com wrote:
 Hi,
 Any body knows how to make a gallery circular and behave like carousel in
 Android ?

 --

 --
 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: setParameters Failed

2010-06-23 Thread blindfold
Sorry, this is a developer group, so members are expected to have
access to the source code. Best to contact the maker of your APK to
have the problem fixed.

Regards

On Jun 23, 2:36 pm, grace grace.a...@wipro.com wrote:
 thanks for ur reply,
 I have gone through the link.
 As i understand the fix for this problem is to give the supported
 parameters to the camera object which we get from the list of
 getSupportedPreviewSizes().

 but my case is little different i guess,i just have the apk of the
 application i downloaded not the source code to make the changes
 accordingly.
 I am trying to run it on N1 which has 2.1 update1.
 so,how to use the above fix to solve this issue on my phone.

 pls help..

 On Jun 22, 5:49 pm, blindfold seeingwithso...@gmail.com wrote:



  See the declined issue discussion on setPreviewSize() 
  athttp://code.google.com/p/android/issues/detail?id=7909andthe
  recommendations made there by Wu-Cheng (Comment 29).

  Regards

  The vOICe for Androidhttp://www.seeingwithsound.com/android.htm

  On Jun 22, 10:59 am,gracegrace.a...@wipro.com wrote:

   Hi,

   I have downloaded one open source ocr application.
   when i run it on the g1 phone it is working,but for  the nexus one its
   throwing up a exception telling
   E/QualcommCameraHardware(   52): Invalid preview size requested:
   533x310

   E/AndroidRuntime( 5038): java.lang.RuntimeException: setParameters
   failed

   hoe can i make this work on nexus too.

   thanks in advance..

  Grace.- Hide quoted text -

 - Show quoted text -

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


RE: [android-developers] Re: Carousel like Gallery.

2010-06-23 Thread Ericson, Anders
I don't think that is possible. You probably need to write your own gallery 
like view to do that.

/Anders

-Original Message-
From: android-developers@googlegroups.com 
[mailto:android-develop...@googlegroups.com] On Behalf Of RANJAN BANIK
Sent: den 23 juni 2010 17:05
To: Android Developers
Subject: [android-developers] Re: Carousel like Gallery.

Please, answer please

Ranjan

On May 7, 1:57 am, Abdul Mateen abmat...@gmail.com wrote:
 Hi,
 Any body knows how to make a gallery circular and behave like carousel in
 Android ?

 --

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

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


Re: [android-developers] Re: Need help with a Java issue

2010-06-23 Thread Mariano Kamp
Ok, meanwhile a coworker of mine pointed out that this is a known issue with
autoboxing (not showing up in the stacktrace), it was just unknown to me.

http://javahowto.blogspot.com/2006/07/not-your-typical-npe.html

Thanks for your help guys.

On Wed, Jun 23, 2010 at 8:39 AM, Mariano Kamp mariano.k...@gmail.comwrote:

 On Wed, Jun 23, 2010 at 1:23 AM, Indicator Veritatis mej1...@yahoo.comwrote:

 True, this is a Java question, not an Android question. SO it doesn't
 r-e-a-l-l-y belong here.

 I am glad we cleared that up.


 1) no, the NPE does not imply that isMarkAllReadPossibleCache is the
 null variable. Rather, it implies that in the course of trying to
 execute the get method of isMarkAllReadPossibleCache, the DVM
 encountered a null pointer.

 How so? Where do you see the get() method?


 2) the NPE occurred during the call to UpdateButtons(), which in turn
 took place during the call to the above get() method.

 I am really puzzled by that.
 You mean that looking at the stacktrace the NPE happens here:

 com.newsrob.activities.AbstractNewsRobListActivity.updateButtons(AbstractNewsRobListActivity.java:236)
 ?
 How do you come to this conclusion? In case of a non-wrapped exception
 isn't the top stack frame the place where the exception occurs? An exception
 blows up and the JVM provides the stacktrace up to this point. You think
 otherwise?

 3) to tell in any more detail where it came from, I would need the
 rest of your stack trace, which you chose not to show.

 The stack trace is complete.


 But now you
 have a better idea how to narrow this down by yourself, without
 exposing the code to us, I hope.

 I don't have a better idea and now you got me confused about how to read
 the stack trace.

 As this is kind of a last straw I would be delighted to learn something new
 about exceptions. Maybe that's the cue that's missing.


 On Jun 22, 2:59 am, Mariano Kamp mariano.k...@gmail.com wrote:
  Hey guys.
 
  This is not an Android issue per-se, but I am puzzled about a Java issue
 and
  want to pick your brains.
 
  I recently got a couple of bug reports with a NPE that I don't
 understand
  and can't reproduce myself. Here is an abbreviated representation of the
  offending class. I tried to stay as close to the actual code as
 possible.
 
  public class EntryManager {
 
private static EntryManager instance;
private MapDBQuery, Boolean isMarkAllReadPossibleCache;
 
private EntryManager(Context ctx) {
  ..
  isMarkAllReadPossibleCache = new HashMapDBQuery, Boolean();
  ..
}
 
public static synchronized EntryManager getInstance(final Context
 context)
  {
 if (instance == null)
 instance = new EntryManager(context.getApplicationContext());
 return instance;
 }
 
 void fireModelUpdated(final String atomId) {
  ..
  isMarkAllReadPossibleCache.clear();
  ..
 }
 
public boolean isMarkAllReadPossible(final DBQuery dbq) {
  if (!isMarkAllReadPossibleCache.containsKey(dbq))
  isMarkAllReadPossibleCache.put(dbq,
  databaseHelper.isMarkAllReadPossible(dbq));
 
 return isMarkAllReadPossibleCache.get(dbq); !-- NPE is raised
 here
  }
 ..
 
  }
 
  In the last line from above a NPE is thrown. So the instance variable
  isMarkAllReadPossibleCache must be null, right? But I don't see where
 this
  could happen. It's initialized in the constructor and never set to null
  afterwards.
 
  For completeness here is a stack trace:
 
  java.lang.NullPointerException
  at
 com.newsrob.EntryManager.isMarkAllReadPossible(EntryManager.java:1529)
  at
 
 com.newsrob.activities.AbstractNewsRobListActivity.shouldMarkAllReadButtonBeEnabled(AbstractNewsRobListActivity.java:327)
  at
 
 com.newsrob.activities.AbstractNewsRobListActivity.updateButtons(AbstractNewsRobListActivity.java:236)
  at
 
 com.newsrob.activities.AbstractNewsRobListActivity.access$2(AbstractNewsRobListActivity.java:215)
  -- removed the private access modifier meanwhile
  at
 
 com.newsrob.activities.AbstractNewsRobListActivity$13.run(AbstractNewsRobListActivity.java:626)
  at android.os.Handler.handleCallback(Handler.java:587)
  at android.os.Handler.dispatchMessage(Handler.java:92)
  at android.os.Looper.loop(Looper.java:123)
  at android.app.ActivityThread.main(ActivityThread.java:4203)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:521)
  at
 
 com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:791)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:549)
  at dalvik.system.NativeStart.main(Native Method)
 
  Any ideas?
 
  Cheers,
  Mariano

 --
 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] Re: Auto-completion/correction hints

2010-06-23 Thread Raymond Rodgers

On 06/20/2010 11:09 AM, Raymond Rodgers wrote:
I have an AutoCompleteTextView working with a ContentProvider that 
correctly pulls known information from a database when the user is 
typing and presents it. However, I would also like to support the 
automatic hints/word choice list you get when using apps like the 
Messaging app. I haven't figured out how to get that thin bar of word 
choices to appear. Can some one clue me in on how to use that in 
combination with my existing ContentProvider?


Thank you,
Raymond

No thoughts on this? I haven't checked but could it be that the hints 
only appear on normal edit text views?

Thanks,
Raymond

--
Raymond Rodgers
http://www.badlucksoft.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: The Lunar Lander bug

2010-06-23 Thread Cameron.M.Johnson

Hi Neilz,

I have recently posted my solution to this problem. This is the first
time i've posted a tutorial so if it doesn't make sense feel free to
email me and I will try to clarify.

http://wonton-games.blogspot.com/2010/06/lunar-lander-resume-game-workaround.html

wontonga...@gmail.com

Cameron


On Jun 6, 11:31 am, Neilz neilhorn...@gmail.com wrote:
 This bug seems to be quite famous, if you do a Google search on it.
 However, I still can't find the solution to it. After all this time,
 and after several android version releases, the bug still exists and
 no one has bothered to update it.

 Here's one website which offers a solution (and I've seen the same
 solution offered elsewhere...):

 http://android-er.blogspot.com/2010/06/illegalthreadstateexception-in...

 The solution is said to be to move the code:
        thread = new MySurfaceThread(getHolder(), this);
 ...from constructor of the SurfaceView to inside the surfaceCreated()
 method.

 Well I've tried it, and it just causes me further bugs, and before I
 know it I've got the code into a right mess trying to figure it out.

 If anyone can shed any light on this, and offer the code which sorts
 this example out once and for all, I for one would be very
 grateful :-)

 ps. The bug is where you press the 'home' key during play, and then
 return to the game, because you can't call thread().start twice.

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


Re: [android-developers] AlarmManager ceasing to function. Dropping single shot alarms.

2010-06-23 Thread Robert Macaulay
I swapped all the alarmManager set calls to setRepeating. The alarms
have been working perfectly since. I just added code to deal with the
extra alarms that get delivered on wakeup.

-- 
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: Android libraries

2010-06-23 Thread String
On Jun 23, 11:06 am, deg d...@degel.com wrote:

 Also, what are the rules for AndroidManifest elements?
 - Does the main package or an Android library (or both) need to
 declare a uses-permission for something that happens in library code?
 - If a library implements a BroadcastReceiver should it be declared in
 its manifest, or that of the application (or both)?
 - etc.

The library's manifest ONLY needs a manifest element with a
package=com.mylibrary.packagename attribute. This isn't in the docs
AFAIK, but was stated in a post on this group by the Android platform
dev responsible for libraries. I can attest that I've done mine this
way and it works fine.

String

-- 
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] Google support number for Droid's sent to Developers from Google?

2010-06-23 Thread pcm2a
A few months ago Google sent top market developers a feww phone (Droid
or Nexus).  I was one of them and received a Droid.  I just now called
in to activate the Droid on my Verizon account and was told that it is
not activatable.  They said that the ESN number is tied to a business
account and currently active.  Verizon said the only thing I can do is
to contact Google, who sent me the phone, and work it out with them.

The paperwork with the phone came with no numbers or email addresses.

I have tried calling the Nexus support line, they could not direct me
anywhere.

I have tried emailing the automated robots that sent me emails about
the phone.

Is there anyone at Google that I can contact that would be able to
help with this?

-- 
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: Google support number for Droid's sent to Developers from Google?

2010-06-23 Thread Maps.Huge.Info (Maps API Guru)
There is a thread that details what you have to do to get your phone
activated, essentially it entails moving beyond the dumb bunnies who
answer the phone at Verizon and getting to one who can actually think,
a tough thing to do. Be persistent, ask for a supervisor and don't
take no for an answer. Once you get a thinking person on the phone, it
only takes a few seconds to get past this problem.

-John Coryat

-- 
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] Background apps (Instant Messaging) being killed without user notification

2010-06-23 Thread Simon Broenner
Hello everyone!

I'm having another problem with my milestone that I'd like to share
with developers and Android coders: Whenever I run memory-intensive
applications while I have an IM app running in the background, the IM
app is often killed without any user notification whatsoever.

Take this scenario for instance (works every time on my Milestone):

1. A few background apps are already running: Sipdroid, Locale,
Titanium Backup's service...
2. Launch Nimbuzz (or Fring, eBuddy or Meebo - it's reproducible on
all of them)
3. Use lots of memory - for instance with a browser (open lots of
windows will full desktop sites), or by launching multiple memory-
intensive applications at once (Maps Navigation or other navigation
apps work well)

Sure enough, the logs show the following:


06-23 17:39:44.542: INFO/ActivityManager(1286): Displayed activity
com.nimbuzz/.MainScreen: 705 ms (total 705 ms)
06-23 17:39:44.558: WARN/InputManagerService(1286): Client not active,
ignoring focus gain of: com.android.internal.view.IInputMethodClient
$stub$pr...@4514e388
06-23 17:39:45.402: WARN/KeyCharacterMap(12195): Can't open keycharmap
file
06-23 17:39:45.410: WARN/KeyCharacterMap(12195): Error loading
keycharmap file '/system/usr/keychars/qtouch-touchscreen.kcm.bin'.
hw.keyboards.65538.devname='qtouch-touchscreen'
06-23 17:39:45.410: WARN/KeyCharacterMap(12195): Using default
keymap: /system/usr/keychars/qwerty.kcm.bin
06-23 17:39:45.456: INFO/ActivityManager(1286): Starting activity:
Intent { act=android.intent.action.MAIN
cat=[android.intent.category.HOME] cmp=com.fede.launcher/.Launcher }
06-23 17:39:45.628: WARN/IInputConnectionWrapper(12195):
showStatusIcon on inactive InputConnection
06-23 17:39:47.331: INFO/ActivityManager(1286): Starting activity:
Intent { act=android.intent.action.MAIN
cat=[android.intent.category.LAUNCHER] flg=0x1000
cmp=mobi.mgeek.TunnyBrowser/.BrowserActivity }
06-23 17:39:53.941: WARN/InputManagerService(1286): Window already
focused, ignoring focus gain of:
com.android.internal.view.iinputmethodclient$stub$pr...@44f9bbf0
06-23 17:39:55.777: WARN/webcore(13158): Can't get the viewWidth after
the first layout
06-23 17:39:58.652: WARN/InputManagerService(1286): Window already
focused, ignoring focus gain of:
com.android.internal.view.iinputmethodclient$stub$pr...@451162b0
06-23 17:40:02.886: WARN/webcore(13158): Can't get the viewWidth after
the first layout
06-23 17:40:04.277: INFO/ActivityManager(1286): Process
com.motorola.worldclock (pid 13198) has died.
06-23 17:40:04.277: INFO/ActivityManager(1286): Low Memory: No more
background processes.
06-23 17:40:51.339: INFO/ActivityManager(1286): Process com.nimbuzz
(pid 12195) has died.
06-23 17:40:51.347: WARN/ActivityManager(1286): Scheduling restart of
crashed service com.nimbuzz/.services.NimbuzzService in 5000ms
06-23 17:40:51.347: INFO/ActivityManager(1286): Low Memory: No more
background processes.
06-23 17:40:51.355: INFO/WindowManager(1286): WIN DEATH:
Window{44fad130 com.nimbuzz/com.nimbuzz.MainScreen paused=false}
06-23 17:40:51.355: INFO/WindowManager(1286): WIN DEATH:
Window{452b9728 com.nimbuzz/com.nimbuzz.InitScreen paused=false}
06-23 17:40:56.371: INFO/ActivityManager(1286): Start proc com.nimbuzz
for service com.nimbuzz/.services.NimbuzzService: pid=13215 uid=10122
gids={1006, 3003, 1015}
06-23 17:40:57.839: INFO/ActivityThread(13215): Publishing provider
com.nimbuzz.contactlistsearchprovider:
com.nimbuzz.services.ContactListSearchProvider
06-23 17:40:57.870: WARN/Service(13215): setForeground: ignoring old
API call on com.nimbuzz.services.NimbuzzService
06-23 17:41:00.097: INFO/ActivityManager(1286): Start proc
com.motorola.worldclock for broadcast
com.motorola.worldclock/.WorldClockWidgetProvider: pid=13221 uid=10029
gids={}
06-23 17:41:00.222: INFO/dalvikvm(13221): Debugger thread not active,
ignoring DDM send (t=0x41504e4d l=38)
06-23 17:41:00.245: INFO/dalvikvm(13221): Debugger thread not active,
ignoring DDM send (t=0x41504e4d l=50)
06-23 17:41:00.753: INFO/ActivityManager(1286): Process
com.motorola.worldclock (pid 13221) has died.
06-23 17:41:00.753: INFO/ActivityManager(1286): Low Memory: No more
background processes.
06-23 17:41:03.941: INFO/NotificationService(1286): enqueueToast
pkg=mobi.mgeek.TunnyBrowser callback=android.app.ITransientNotification
$stub$pr...@45260c28 duration=0
06-23 17:41:58.808: INFO/ActivityManager(1286): Starting activity:
Intent { act=android.intent.action.MAIN
cat=[android.intent.category.LAUNCHER] flg=0x1020
cmp=com.nimbuzz/.InitScreen }
06-23 17:41:58.824: WARN/ActivityManager(1286): Activity
HistoryRecord{44ec7da0 com.nimbuzz/.MainScreen} being finished, but
not in LRU list
06-23 17:41:59.324: WARN/ActivityManager(1286): Activity pause timeout
for HistoryRecord{45345898 mobi.mgeek.TunnyBrowser/.BrowserActivity}
06-23 17:42:00.003: INFO/ActivityManager(1286): Start proc
com.motorola.worldclock for broadcast
com.motorola.worldclock/.WorldClockWidgetProvider: pid=13231 uid=10029

Re: [android-developers] Background apps (Instant Messaging) being killed without user notification

2010-06-23 Thread Kostya Vasilyev

Simon,

I think this should be taken up with developers of these apps.

In particular, my recommendations to them would be:

- Use a startForeground / setForeground call to mark the service as 
being important to the user, do it only while the user is logged in.


- Display a notification the phone's status bar, so the user knows if 
the service is still kicked out of memory.


- Consider using AlarmManager to restart the service and re-login if 
there is an active logged in session.


-- Kostya


23.06.2010 20:07, Simon Broenner пишет:

1. Why am I, the user, not informed the the application has died, and
hence, the connection has been lost?
2. Why are all the IM apps being killed, and not my other background
apps? Sipdroid and Locale have NEVER been killed in this fashion.
   



--
Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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 on Gps in emulator

2010-06-23 Thread HeHe
DDMS perspective  Emulator Control  Location Control  Send

On Jun 23, 7:59 am, Sohan badaya sohan.bad...@gmail.com wrote:
 Hi,

 How to start Gps in emulator.

 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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Background apps (Instant Messaging) being killed without user notification

2010-06-23 Thread Simon Broenner
Hello Kostya,

Do you think that they really all just made a mistake with their
programming? I thought that since it happens with all four apps, it
must be a general Android problem...

I'll post on their forums though.

Thanks for your advice so far. :)

Kind regards,
Simon

Kostya Vasilyev wrote:
 Simon,

 I think this should be taken up with developers of these apps.

 In particular, my recommendations to them would be:

 - Use a startForeground / setForeground call to mark the service as
 being important to the user, do it only while the user is logged in.

 - Display a notification the phone's status bar, so the user knows if
 the service is still kicked out of memory.

 - Consider using AlarmManager to restart the service and re-login if
 there is an active logged in session.

 -- Kostya


 23.06.2010 20:07, Simon Broenner пишет:
  1. Why am I, the user, not informed the the application has died, and
  hence, the connection has been lost?
  2. Why are all the IM apps being killed, and not my other background
  apps? Sipdroid and Locale have NEVER been killed in this fashion.
 


 --
 Kostya Vasilev -- WiFi Manager + pretty widget -- 
 http://kmansoft.wordpress.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


Re: [android-developers] Background apps (Instant Messaging) being killed without user notification

2010-06-23 Thread Sean Hodges
What Kostya said.

When memory is critically low on the device, apps are killed outright
to regain user control. Android was originally designed for mobile
phones, and nobody wants to miss an incoming call because they have
run out of memory. No notification is passed to the user, because well
written apps should handle this themselves. Some will want to alert
the user, others will want to carry on where they left off without
bothering the user about the event.

As a user, you can do the following:

A) Contact the developers of Nimbuzz and explain the problem you are
having. They have probably not benchmarked against such high load, and
as a long-running service the app should really have a recovery
process for when it is killed. An alarm manager could periodically
check an is logged in flag, and automatically log the user back in
if the background service was killed.

B) Don't try to run so many tasks at once, or purchase a phone with
more available memory (depending on your individual requirements).



On Wed, Jun 23, 2010 at 5:13 PM, Kostya Vasilyev kmans...@gmail.com wrote:
 Simon,

 I think this should be taken up with developers of these apps.

 In particular, my recommendations to them would be:

 - Use a startForeground / setForeground call to mark the service as being
 important to the user, do it only while the user is logged in.

 - Display a notification the phone's status bar, so the user knows if the
 service is still kicked out of memory.

 - Consider using AlarmManager to restart the service and re-login if there
 is an active logged in session.

 -- Kostya


 23.06.2010 20:07, Simon Broenner пишет:

 1. Why am I, the user, not informed the the application has died, and
 hence, the connection has been lost?
 2. Why are all the IM apps being killed, and not my other background
 apps? Sipdroid and Locale have NEVER been killed in this fashion.



 --
 Kostya Vasilev -- WiFi Manager + pretty widget --
 http://kmansoft.wordpress.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

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


Re: [android-developers] Background apps (Instant Messaging) being killed without user notification

2010-06-23 Thread Simon Broenner
By the way: All the apps have already implemented the notifcation icon
in the status bar. The problem is, it doesn't change when the app is
killed in the background, so the user doesn't know that it's been
killed.

:(

Kostya Vasilyev wrote:
 Simon,

 I think this should be taken up with developers of these apps.

 In particular, my recommendations to them would be:

 - Use a startForeground / setForeground call to mark the service as
 being important to the user, do it only while the user is logged in.

 - Display a notification the phone's status bar, so the user knows if
 the service is still kicked out of memory.

 - Consider using AlarmManager to restart the service and re-login if
 there is an active logged in session.

 -- Kostya


 23.06.2010 20:07, Simon Broenner пишет:
  1. Why am I, the user, not informed the the application has died, and
  hence, the connection has been lost?
  2. Why are all the IM apps being killed, and not my other background
  apps? Sipdroid and Locale have NEVER been killed in this fashion.
 


 --
 Kostya Vasilev -- WiFi Manager + pretty widget -- 
 http://kmansoft.wordpress.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: Spinner selection dialog without spinner

2010-06-23 Thread maik
Ah OK,
learned something new... Thanks Mark.
Where do I get the source code you mentioned?
I guess they are not included in the SDK because I wasn't able to find
them there.
Sorry for all this newbie questions, but I'm still working on getting
into the platform (I'm coming from Windows Mobile)...



On 22 Jun., 23:19, Mark Murphy mmur...@commonsware.com wrote:
 On Tue, Jun 22, 2010 at 4:56 PM, maik maik.wi...@googlemail.com wrote:
  What is the predefined layout
  android.R.layout.simple_list_item_single_choice good for if it uses
  the same color for text and background?

 That's for ListView. ListView is not AlertDialog.

 AlertDialog uses android.R.layout.select_dialog_multichoice for its
 rows (after spending a few minutes hunting through the source code for
 the answer).

 --
 Mark Murphy (a Commons 
 Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

 Android Training...At Your Office:http://commonsware.com/training

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


Re: [android-developers] Re: Spinner selection dialog without spinner

2010-06-23 Thread Mark Murphy
On Wed, Jun 23, 2010 at 12:40 PM, maik maik.wi...@googlemail.com wrote:
 Where do I get the source code you mentioned?

I used Google Code Search:

http://www.google.com/codesearch

Include the package:android clause in there, and it will restrict your
search to Android-related code. Otherwise, it's pretty much the
standard Google search syntax, from what I can tell.

You can download all the source here:

http://source.android.com

But it's rather big.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_
Version 1.6 Available!

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


Re: [android-developers] SQlite Security

2010-06-23 Thread Raymond Rodgers

On 06/23/2010 10:48 AM, Bhavya Siddappa wrote:

Hi,

I want to know why SQLite doesn't support encryption! 
How to secure the SQlite db on a Android app?

./bhavya
As far as I know, unless you deliberately create a SQLite database on 
the SD card, the databases are created in a protected area of the 
phone/device's storage. Other applications don't have access to them at 
all unless your app has a shared key if I remember correctly, and I 
think they (the attacking apps) have to be signed with the same key 
that your app is as well.


Raymond

--
Raymond Rodgers
http://www.badlucksoft.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


Re: [android-developers] Re: Android libraries

2010-06-23 Thread Xavier Ducrohet
That's correct.

At the moment the manifest of the library is only used to compile the
resource of the library and figure out its package name, so it doesn't
need to contain permissions, activities, services, etc... used by the
library.

However, all projects using the library must include those in their
own manifest.

In the future (hopefully not too distant) we'll be able to merge the
content of the library manifest so that you don't have to do it
manually for all projects using the library.

Xav

On Wed, Jun 23, 2010 at 8:52 AM, String sterling.ud...@googlemail.com wrote:
 On Jun 23, 11:06 am, deg d...@degel.com wrote:

 Also, what are the rules for AndroidManifest elements?
 - Does the main package or an Android library (or both) need to
 declare a uses-permission for something that happens in library code?
 - If a library implements a BroadcastReceiver should it be declared in
 its manifest, or that of the application (or both)?
 - etc.

 The library's manifest ONLY needs a manifest element with a
 package=com.mylibrary.packagename attribute. This isn't in the docs
 AFAIK, but was stated in a post on this group by the Android platform
 dev responsible for libraries. I can attest that I've done mine this
 way and it works fine.

 String

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




-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.

Please do not send me questions directly. 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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Background apps (Instant Messaging) being killed without user notification

2010-06-23 Thread Kostya Vasilyev

Simon,

Android 2.x framework has an important change in this area, trying to 
nudge developers towards better behaving services.


Since 2.x, marking a service as foreground requires a status bar 
notification, so the user knows that a service is running.


Regarding lingering status bar notifications - I just verified that if a 
notification is displayed using the new 2.x API, it disappears when the 
service is killed.


-- Kostya

23.06.2010 20:36, Simon Broenner пишет:

By the way: All the apps have already implemented the notifcation icon
in the status bar. The problem is, it doesn't change when the app is
killed in the background, so the user doesn't know that it's been
killed.

:(

Kostya Vasilyev wrote:
   

Simon,

I think this should be taken up with developers of these apps.

In particular, my recommendations to them would be:

- Use a startForeground / setForeground call to mark the service as
being important to the user, do it only while the user is logged in.

- Display a notification the phone's status bar, so the user knows if
the service is still kicked out of memory.

- Consider using AlarmManager to restart the service and re-login if
there is an active logged in session.

-- Kostya


23.06.2010 20:07, Simon Broenner пишет:
 

1. Why am I, the user, not informed the the application has died, and
hence, the connection has been lost?
2. Why are all the IM apps being killed, and not my other background
apps? Sipdroid and Locale have NEVER been killed in this fashion.

   


--
Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.com
 
   



--
Kostya Vasilev -- WiFi Manager + pretty widget -- http://kmansoft.wordpress.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] ListView Groups? Please

2010-06-23 Thread Tommy
Hey everyone,

Is there a way to do groups in a listview? Like I have a list of
certain states, each state has its own sublist. I'd sort of like to
replicate the HTML optgroup/option setup where you have a parent group
then child groups. Is there a way to do this built in or would I have
to do something tricky with a custom view for Parent elements then
switch the view back to the child element style?

Thanks for the help and input and your time,

Tommy

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


Re: [android-developers] ListView Groups? Please

2010-06-23 Thread Mark Murphy
On Wed, Jun 23, 2010 at 1:34 PM, Tommy droi...@gmail.com wrote:
 Is there a way to do groups in a listview? Like I have a list of
 certain states, each state has its own sublist. I'd sort of like to
 replicate the HTML optgroup/option setup where you have a parent group
 then child groups. Is there a way to do this built in or would I have
 to do something tricky with a custom view for Parent elements then
 switch the view back to the child element style?

You have different rows return different View types, one for headings
and one for the main rows. To do this, in addition to having the
appropriate smarts in getView() or newView()/bindView() in your custom
Adapter, you need to make sure you properly override getItemViewType()
and getViewTypeCount(). You may also wish to deal with isItemEnabled()
so people do not click on your headings if those are not meant to be
clickable.

Here is a reusable component that can wrap a lot of this up for some
sorts of lists:

http://github.com/commonsguy/cwac-merge

And a sample project showing using it for section headings:

http://github.com/commonsguy/cw-advandroid/tree/master/ListView/Sections/

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_
Version 1.6 Available!

-- 
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: notifyDataSetChanged() not updating listview after orientation change

2010-06-23 Thread Streets Of Boston
thisListView.setAdapter(r_adapter);
r_adapter.notifyDataSetChanged();

If you do 'setAdapter', calling notifyDataSetChanged() is not
necessary, if i'm not mistaken. But calling an extra
notifyDataSetChanged() should hurt.

Override the adapter's getItem and getCount methods and put a break-
point in these methods. See if these get hit and, if they do, see what
values they return.

On Jun 22, 11:55 pm, Bara bara.kath...@gmail.com wrote:
 Hmm... could it be my ArrayAdapter class causing the problem?

 This is how I call it:

 r_adapter = new ReminderAdapater(rData.getCurrentActivity(),
 remindersList, thisListView);
 thisListView.setAdapter(r_adapter);
 r_adapter.notifyDataSetChanged();

 And this is ReminderAdapater itself:

     public class ReminderAdapater extends ArrayAdapterClass_Reminder
 {
         ArrayListClass_Reminder items = new
 ArrayListClass_Reminder();
         private ListView listView;

         public ReminderAdapater(Activity activity, ArrayListClass_Reminder
 items, ListView listView) {
             super(activity, 0, items);
             this.listView = listView;
             this.items = items;

             Log.i(ReminderAdapater, Constructor; Size:  + items.size());
         }

         @Override
         public void add(Class_Reminder object)
         {
             Log.i(ReminderAdapater.add, Item count =  + items.size());
             super.add(object);
         }

         @Override
         public View getView(int position, View convertView, ViewGroup parent)
 {
             //... some view related stuff here, but it never actually gets to
 this point
         }
     }

 Do you guys see anything wrong with that?

 On Jun 22, 11:47 pm, Streets Of Boston flyingdutc...@gmail.com
 wrote:



  The call to onRetainConfigurationChange and
  getLastNonConfigurationInstance always works, if you have your
  activity declared not to handle configuration changes by itself (which
  it doesn't by default).

  On Jun 22, 10:51 am, Gyan gnanesh@gmail.com wrote:

   Classic problem!

   Use a static variable rather than onRetainConfigurationChange() lot of 
   state
   data to be saved  doesn't work all the time!!

   Gyan- Hide quoted text -

 - Show quoted text -

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


RE: [android-developers] ListView Groups? Please

2010-06-23 Thread Tommy
Mark,

Thank you for these links, I'll take a look and see if I can make it work on
my end.

-Original Message-
From: android-developers@googlegroups.com
[mailto:android-develop...@googlegroups.com] On Behalf Of Mark Murphy
Sent: Wednesday, June 23, 2010 1:40 PM
To: android-developers@googlegroups.com
Subject: Re: [android-developers] ListView Groups? Please

On Wed, Jun 23, 2010 at 1:34 PM, Tommy droi...@gmail.com wrote:
 Is there a way to do groups in a listview? Like I have a list of
 certain states, each state has its own sublist. I'd sort of like to
 replicate the HTML optgroup/option setup where you have a parent group
 then child groups. Is there a way to do this built in or would I have
 to do something tricky with a custom view for Parent elements then
 switch the view back to the child element style?

You have different rows return different View types, one for headings
and one for the main rows. To do this, in addition to having the
appropriate smarts in getView() or newView()/bindView() in your custom
Adapter, you need to make sure you properly override getItemViewType()
and getViewTypeCount(). You may also wish to deal with isItemEnabled()
so people do not click on your headings if those are not meant to be
clickable.

Here is a reusable component that can wrap a lot of this up for some
sorts of lists:

http://github.com/commonsguy/cwac-merge

And a sample project showing using it for section headings:

http://github.com/commonsguy/cw-advandroid/tree/master/ListView/Sections/

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_
Version 1.6 Available!

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

-- 
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: UI Stack over flow

2010-06-23 Thread DonFrench
Try swapping in a different keyboard just to eliminate a possible
hardware problem.

On Jun 22, 8:15 pm, Gabriel Simões gsim...@gmail.com wrote:
 Please help!
 Reinstaling the SDK tools hasn´t solved the problem.
 Right now I can´t work :(

 On 22 jun, 22:57, Gabriel Simões gsim...@gmail.com wrote:

  Could you please open another thread and let this one for the original
  discussion?

  On 22 jun, 22:48, shakeel shakeelaha...@tataelxsi.co.in wrote:

   Will you please send me example of how to use views with tabs.

   It will be of great help.

   Thanks
   Shakeel

   -Original Message-
   From: android-developers@googlegroups.com

   [mailto:android-develop...@googlegroups.com] On Behalf Of Mark Murphy
   Sent: Tuesday, June 22, 2010 5:02 PM
   To: android-developers@googlegroups.com
   Subject: Re: [android-developers] UI Stack over flow

   On Mon, Jun 21, 2010 at 11:47 PM, shakeel shakeelaha...@tataelxsi.co.in
   wrote:
My application works fine if launch independently, but gives stack over
   flow
when I use add my class to tabhost.

Please suggest

   Don't use activities as the contents of tabs. Use views as the
   contents of tabs. As I have been saying, again and again and again,
   for a year or so.

   You can also use hierarchyviewer to see if there are other
   optimizations you can make, to shorten the depth of your View
   hierarchy.

   --
   Mark Murphy (a Commons 
   Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy

   _Android Programming Tutorials_ Version 2.1 Available!

   --
   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: SQlite Security

2010-06-23 Thread vineet
has anyone tried http://www.zetetic.net/code/sqlcipher

What do you say about this and how to implement this

On Jun 23, 9:53 pm, Raymond Rodgers raym...@badlucksoft.com wrote:
 On 06/23/2010 10:48 AM, Bhavya Siddappa wrote: Hi,

  I want to know why SQLite doesn't support encryption! 
  How to secure the SQlite db on a Android app?

  ./bhavya

 As far as I know, unless you deliberately create a SQLite database on
 the SD card, the databases are created in a protected area of the
 phone/device's storage. Other applications don't have access to them at
 all unless your app has a shared key if I remember correctly, and I
 think they (the attacking apps) have to be signed with the same key
 that your app is as well.

 Raymond

 --
 Raymond Rodgershttp://www.badlucksoft.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] playing simple tones

2010-06-23 Thread guich
Hi,

Is it possible to play simple tones in Android? Something like
playTone(frequence, timeInMS).

thanks

guich

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


Re: [android-developers] playing simple tones

2010-06-23 Thread Mark Murphy
On Wed, Jun 23, 2010 at 2:35 PM, guich guiha...@gmail.com wrote:
 Is it possible to play simple tones in Android? Something like
 playTone(frequence, timeInMS).

There is ToneGenerator:

http://developer.android.com/reference/android/media/ToneGenerator.html

You cannot specify arbitrary frequencies, but perhaps the tones you
need can be found in there.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_
Version 1.6 Available!

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


Re: [android-developers] Background apps (Instant Messaging) being killed without user notification

2010-06-23 Thread Simon Broenner
Hi Kostya,

Thanks for the tips.

I'll forward that to the developers...

:)

Kostya Vasilyev wrote:
 Simon,

 Android 2.x framework has an important change in this area, trying to
 nudge developers towards better behaving services.

 Since 2.x, marking a service as foreground requires a status bar
 notification, so the user knows that a service is running.

 Regarding lingering status bar notifications - I just verified that if a
 notification is displayed using the new 2.x API, it disappears when the
 service is killed.

 -- Kostya

 23.06.2010 20:36, Simon Broenner пишет:
  By the way: All the apps have already implemented the notifcation icon
  in the status bar. The problem is, it doesn't change when the app is
  killed in the background, so the user doesn't know that it's been
  killed.
 
  :(
 
  Kostya Vasilyev wrote:
 
  Simon,
 
  I think this should be taken up with developers of these apps.
 
  In particular, my recommendations to them would be:
 
  - Use a startForeground / setForeground call to mark the service as
  being important to the user, do it only while the user is logged in.
 
  - Display a notification the phone's status bar, so the user knows if
  the service is still kicked out of memory.
 
  - Consider using AlarmManager to restart the service and re-login if
  there is an active logged in session.
 
  -- Kostya
 
 
  23.06.2010 20:07, Simon Broenner пишет:
 
  1. Why am I, the user, not informed the the application has died, and
  hence, the connection has been lost?
  2. Why are all the IM apps being killed, and not my other background
  apps? Sipdroid and Locale have NEVER been killed in this fashion.
 
 
 
  --
  Kostya Vasilev -- WiFi Manager + pretty widget -- 
  http://kmansoft.wordpress.com
 
 


 --
 Kostya Vasilev -- WiFi Manager + pretty widget -- 
 http://kmansoft.wordpress.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] Android 2.2, Stagefright, and HTTP Progressive Streaming

2010-06-23 Thread dindin
Hi:

http://developer.android.com/sdk/android-2.2-highlights.html



On above URL page, there is mention of a new API (Stagefright) for the
MediaPlayer to source from a local file or HTTP for progressive
playback. I was wondering if anyone has used this new API and any code
they can share. Is this HTTP streaming of the similar mold as Apple
Adaptive HTTP streaming?Are there any support for formats such as MPEG-
TS?

Thanks.

-D

-- 
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] Any api for mapview callout/bubble for tapped pins?

2010-06-23 Thread Mark Wyszomierski
Hi,

There's no method available to us to display a callout / bubble above
an ItemizedOverlay item when, tapped, right? I don't think there is,
just wondering if I'm missing this in the docs before I start my own,

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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Any api for mapview callout/bubble for tapped pins?

2010-06-23 Thread Mark Murphy
On Wed, Jun 23, 2010 at 4:33 PM, Mark Wyszomierski mar...@gmail.com wrote:
 There's no method available to us to display a callout / bubble above
 an ItemizedOverlay item when, tapped, right?

Nothing built in.

 I don't think there is,
 just wondering if I'm missing this in the docs before I start my own,

Biggest challenge is in figuring out the placement relative to the
point, taking into account the desired size of the bubble. For the
book sample I did for this, I cheated and had popup panels just on
either the top or bottom of the screen, shown on the side opposite
that of the point itself.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 1.6
Available!

-- 
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] Android friendly PDF library

2010-06-23 Thread Kasra Rahjerdi
Hi there,

I have a template PDF and I want to be able to insert some information
into the textboxes and save it as a new pdf. I've tried using the
iText library but if I try to edit the PDF file at all I get a bunch
of class not found errors and my application force closes. From what
I've read on other sites it seems that this is because iText relies on
things not available in Android. Is there any Android friendly PDF
editing library?

Thanks,
Kasra

-- 
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] OpenGL works incorrectly when projection matrix is set to identity?

2010-06-23 Thread satlan esh
I have an OpenGL app that manipulates it's geometry in screen space to
acheive some effects, and therefore bypasses OpenGL's matrices by
setting modelview and projection to identity. For some reason,
Android's OpenGL implementation seems to be unhappy with this, and
doesn't draw anything.

The same app, compiled from the same code base, works fine on windows
and on iPhone. If I load the app's projection matrix into GL's matrix,
and multiply it's inverse with the final geometry prior to drawing it
(which is effectively a no-op) it displays correctly.

App is native and OpenGL is 1.x if it matters.

Any ideas why is that so?

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


  1   2   >