[android-developers] Re: Regarding Process Context

2009-09-24 Thread Raghu

ok thank you. i will post to android posting group

On Sep 24, 2:12 pm, Dianne Hackborn hack...@android.com wrote:
 I think they are talking about modifying the platform (system service is the
 main process that runs the system services), in which case this should be
 moved to android-porting.

 Also processes do not have contexts, so if you post to android-porting it
 would be good to explain in more detail what you are asking.

 On Wed, Sep 23, 2009 at 9:34 PM, Mark Murphy mmur...@commonsware.comwrote:







   I have created a Separate Process in Android Java Framework Layer.

  Why? Processes are expensive and generally should not be needed, beyond
  the one Android allocates for you as part of your app instance.

   Now, I registered new receiver in System Server for my Process and
   calling my process methods from that receiver on intent received.

  What is System Server?

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

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.- 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] To Display Calendar ........

2009-09-24 Thread ragavendran s
i want to display calendar in screen ..when the user select the MM-DD-
from calendar.. it should
store in the database...

can u tell any source or any site to find this...

Thanks in advance...

With Regards,
Raghav.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] How to detect All Ram Memory?

2009-09-24 Thread Reznic Alexander

I can see free Ram memory, but how to see all ram 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 using remote service from other App

2009-09-24 Thread Rahul Bhagwat

I’ve implemented remote service using aidl  it is working fine if I’m
using its service from same package. But If I tried to use the service
from other application it gives me error

 as below

09-24 10:51:08.051: ERROR/dalvikvm(795): Could not find method
com.sasken.dlna.dmcRemService.IRemDlnaService$Stub.asInterface,
referenced from method com.sasken.TestDlnaApp.TestDlnaRemService
$5.onServiceConnected

09-24 10:51:08.051: WARN/dalvikvm(795): VFY: unable to resolve static
method 26: Lcom/sasken/dlna/dmcRemService/IRemDlnaService
$Stub;.asInterface (Landroid/os/IBinder;)Lcom/sasken/dlna/
dmcRemService/IRemDlnaService;

09-24 10:51:08.063: WARN/dalvikvm(795): VFY:  rejecting opcode 0x71 at
0x0002

09-24 10:51:08.063: WARN/dalvikvm(795): VFY:  rejected Lcom/sasken/
TestDlnaApp/TestDlnaRemService$5;.onServiceConnected (Landroid/content/
ComponentName;Landroid/os/IBinder;)V

09-24 10:51:08.063: WARN/dalvikvm(795): Verifier rejected class Lcom/
sasken/TestDlnaApp/TestDlnaRemService$5;

Pls suggest any solution
--~--~-~--~~~---~--~~
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 as a virtual PBX

2009-09-24 Thread JoaJP


Oh yeah Asterisk. I spent a few hours last year to build Asterisk for
ARM. On a Nokia N810, which runs proper Linux (Maemo), it ran right
out of the box, without any compromise. I am sure you can figure
what's on my holiday wish list. It'll be interesting to see how that
plays out on a carrier network. It's two, three years already that
orange kicked out a handful of MVNO's that sold SIP/RTP services on
orange's UMTS network, so it might actually work decent enough.
Personally, I've tried SIP/RTP on a UMTS network some three years ago,
and with limited testing only, I found pretty heavy latency.
   Roman - in TCP/IP terms Asterisk isn't a server, it connects to
VoIP providers like a SIP client. AFAIK NAT traversal is an issue only
in a few special cases. Using a provider that supports IAX2 should
help, too.

Meanwhile at the ranch... From what I've seen, SipDroid isn't, to put
it mildly, up to snuff. As much as I would like to tackle such a
project, there's no solid case to commit resources to develop a SIP
client, considering how Google keeps coming out with their own apps
and telco solutions.



On Sep 23, 7:17 pm, Chris Stratton cs07...@gmail.com wrote:
 On Sep 23, 6:18 am, Masoom Alam masoom.a...@gmail.com wrote:

  Can Android be used as Virtual PBX. This means that, it can work as a
  virtual attendant for playing specific music files, call fowarding,
  recording messages. SipDroid is already available but it is just a client
  soft phone.

 Not really clear if you mean android in the sense of currently
 available phone hardware running it, or in the sense of the software
 platform itself.

 If the former, then provided that you mean wifi and not 3g then its
 probably doable, though you might find it easier to just run asterisk
 on the hardware without android.  Doing it seriously via 3g is
 probably not worthwhile.  And bridging between voip and the cellular
 voice channel is not supported on any of the current phones (no access
 to in-call audio from the linux side).

 If you mean the software platform on some other hardware (beagle
 board?), maybe as a gui front end to configure something like
 asterisk, that could be interesting... probably more a topic for the
 android-porting list though.

 You do know about asterisk embedded linux pbx, right?
--~--~-~--~~~---~--~~
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] memory leak in activity

2009-09-24 Thread rukiman

In my app activity A creates activity B, however when the back key is
pressed it goes back to activity A. This is a simplified version of my
application.

I would expect memory to be reclaimed when going back to Activity A.
Going to activity B allocates more memory.

I am using dumpsys meminfo to get the allocated kbs.

How can I easily tell what memory is creeping? I do not keep any
references to activity B.

I know about the ddms allocation tracker, but wondering if there is a
more better tool to figure this out.

I read somewhere about someone during a heap dump. How do I do that?
--~--~-~--~~~---~--~~
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] Java heap outofmemory during dex

2009-09-24 Thread whitech

hi all, I've meeting a problem here:
When I use ant to package my program, in the dex step, it crash like
below:

dex:
 [echo] Converting compiled files and external libraries into
release/classes.dex...
[apply] UNEXPECTED TOP-LEVEL ERROR:
[apply] java.lang.OutOfMemoryError: Java heap space
[apply] at java.util.Arrays.copyOf(Unknown Source)
[apply] at java.util.Arrays.copyOf(Unknown Source)
[apply] at java.util.ArrayList.ensureCapacity(Unknown Source)
[apply] at java.util.ArrayList.add(Unknown Source)
[apply] at com.android.dx.ssa.SCCP.addUsersToWorklist(SCCP.java:
106)
[apply] at com.android.dx.ssa.SCCP.simulatePhi(SCCP.java:188)
[apply] at com.android.dx.ssa.SCCP.simulateBlock(SCCP.java:199)
[apply] at com.android.dx.ssa.SCCP.run(SCCP.java:402)
[apply] at com.android.dx.ssa.SCCP.process(SCCP.java:84)
[apply] at com.android.dx.ssa.Optimizer.runSsaFormSteps
(Optimizer.java:161)
[apply] at com.android.dx.ssa.Optimizer.optimize(Optimizer.java:
101)
[apply] at com.android.dx.ssa.Optimizer.optimize(Optimizer.java:
74)
[apply] at com.android.dx.dex.cf.CfTranslator.processMethods
(CfTranslator.java:269)
[apply] at com.android.dx.dex.cf.CfTranslator.translate0
(CfTranslator.java:131)
[apply] at com.android.dx.dex.cf.CfTranslator.translate
(CfTranslator.java:85)
[apply] at com.android.dx.command.dexer.Main.processClass
(Main.java:297)
[apply] at com.android.dx.command.dexer.Main.processFileBytes
(Main.java:276)
[apply] at com.android.dx.command.dexer.Main.access$100(Main.java:
56)
[apply] at com.android.dx.command.dexer.Main$1.processFileBytes
(Main.java:228)
[apply] at com.android.dx.cf.direct.ClassPathOpener.processOne
(ClassPathOpener.java:134)
[apply] at
com.android.dx.cf.direct.ClassPathOpener.processDirectory
(ClassPathOpener.java:190)
[apply] at com.android.dx.cf.direct.ClassPathOpener.processOne
(ClassPathOpener.java:122)
[apply] at
com.android.dx.cf.direct.ClassPathOpener.processDirectory
(ClassPathOpener.java:190)
[apply] at com.android.dx.cf.direct.ClassPathOpener.processOne
(ClassPathOpener.java:122)
[apply] at
com.android.dx.cf.direct.ClassPathOpener.processDirectory
(ClassPathOpener.java:190)
[apply] at com.android.dx.cf.direct.ClassPathOpener.processOne
(ClassPathOpener.java:122)
[apply] at
com.android.dx.cf.direct.ClassPathOpener.processDirectory
(ClassPathOpener.java:190)
[apply] at com.android.dx.cf.direct.ClassPathOpener.processOne
(ClassPathOpener.java:122)
[apply] at com.android.dx.cf.direct.ClassPathOpener.process
(ClassPathOpener.java:108)
[apply] at com.android.dx.command.dexer.Main.processOne(Main.java:
245)
[apply] at com.android.dx.command.dexer.Main.processAllFiles
(Main.java:183)
[apply] at com.android.dx.command.dexer.Main.run(Main.java:139)

BUILD FAILED
F:\build.xml:30: The following error occurred while executing this
line:
F:\\android_build.xml:185: apply returned: 3

the total size of all the .class files is about 1m(space 1.7m), and
the biggest .class file is 87kb.

I've set the ANT-OPTS, but no matter what I try, it's invalid. Is
there a tag or something I can set to increase the heap?
Thank you.

--~--~-~--~~~---~--~~
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: Hmm... at last ADC2 is out of our way ... tell about your app and experience

2009-09-24 Thread sheik

Name : iCommuteLess
Track commutes, Save time

Category : Lifestyle
By: Uttara Infosolutions
Website :http://www.commuteless.appspot.com/

Description :

iCommuteLess is an application to track your daily commutes.
 Based on  commutes, the application has intelligence built-in to give
users intuitive feedback that
can help them in saving time!

Features :

iCommuteLess tries to answer the following questions:

How much time do I spend commuting?
How much time do I spend in traffic?
Which route should I  take for a given time?
Should I leave 15 mins early or 15 mins later?
How is my commuting performance?

it also includes
 AutoStart, RouteSuggest and RouteTrace features!

To know more visit :
http://www.commuteless.appspot.com/

To view screen shots visit
http://www.androlib.com/android.application.com-uttara-and-icommute_less-qBpm.aspx


regards
Sheik Ahmed




On Sep 22, 7:34 pm, cooolmagic cooolma...@gmail.com wrote:
 CubeWorks

 Category - Productivity/Tools

 CubeWorks is a productivity tool that was created with the realization
 that completing a task often requires information from more than one
 source. It displays a cube containing six applications at a time, one
 on each cube face. This allows a user to access multiple sources
 quickly, helps them visualize the information and makes navigation
 easier.

 More info about app here -http://cubeworksmobile.com

 After Power Manager and Toggle Settings, we wanted to do something
 different this time. And we came up with an idea of a cube with
 various inter-connected apps on it. Developing CubeWorks was really
 challenging, mainly because of tight deadline and all the great
 features we wanted to include in this short time. Android's incomplete
 support of OpenGL made it even harder. But at last we were able to
 finish it well before final deadline.

 -abhi

 On Sep 1, 10:41 am, Lout lout.r...@googlemail.com wrote:

  While you developers relax... would you mind sharing what apps to
  expect through this challenge.. and anything else you wish to share
  aboutADC2submissions... well anything including the fact: 'thank
  God, no more sleep less nights'!

  Am collecting information about the challenge (ADC2) for a news
  article as am with cnet (and AP). Pitch your app if you have already
  published or would soon publish on the market too.

  Your app name and description, web link if any, experience withADC2, ... 
  anything would be useful for our article(s).

  And do you feel that there would have been more submissions than in
  ADC1?
  Is the competition going to be tougher or less profound as you were
  allowed to put up apps not published before 1st Aug only?

  Do you think that all apps that didn't try for ADC1 should have had a
  chance?

  Congratulations on your submissions while you wait for the next
  phase.
  Thanks,
  Lout Reilly
  ps: Moderators we request you to let this through so that you too get
  some feedback.
--~--~-~--~~~---~--~~
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 use hardware acceleration in OpenGL ES

2009-09-24 Thread String

Take a look at this thread:

http://groups.google.com/group/android-developers/browse_thread/thread/67b902d80713dc66/d240e83fb982d599

First, it gives some baseline FPS results from the APIDemos which you
can use for comparison.

Second, it mentions some specific issues (and a solution) which may be
applicable to you.

String


On Sep 24, 5:09 am, LemonDev lem...@gmail.com wrote:
 i have download your demo, and run at approximate 14FPS.

 as methioned in you posts 
 at(http://www.javagaming.org/index.php/topic,20910.0.html
 )  , there is someone run you demo on Hero at 60 FPS ?

 maybe i should borrow the phone and verify the result, if it is real ,
 i have to contact HuaWei.

 On 9月24日, 上午11时00分, CraigsRace craig...@gmail.com wrote:



  It sounds like the HuaWei has the same problem as the Samsung,
  however, I am no hardware expert.  You'd need to contact HuaWei and
  ask them why it returns the Android PixelFlinger instead of the GPU
  when requesting the GL Renderer.  Or maybe someone from Google has
  some insite into this?

  On Sep 24, 12:15 pm, LemonDev lem...@gmail.com wrote:

   no, not samsung, but a device from T-Mobile manufactured by HuaWei .

   Log.v(, gl.glGetString(GL10.GL_RENDERER));
   i get Android  PixelFlinger  1.0 which is the same as emulator and
   also same as
   your samsung i7500 . that is the problem.

   this.getHolder().setType(SurfaceHolder.SURFACE_TYPE_HARDWARE);
   this call does a help to render faster a bit . from 10 to 14 FPS .

   On 9月23日, 下午5时32分, CraigsRace craig...@gmail.com wrote:

I've heard the Samsung i7500 has a bug where it doesn't use the GPU.
Is that the phone you are using?

It is discussed 
here:http://www.javagaming.org/index.php/topic,20910.0.html

In short, if you call Log.v(, gl.glGetString(GL10.GL_RENDERER));

On the HTC phones, it says Q3Dimension MSM7500 01.02.08 0 4.0.0,
while on the Samsung (and Android Emulator) it says Android
PixelFlinger 1.0.

On Sep 23, 6:58 pm, LemonDev lem...@gmail.com wrote:

 i draw a cube with two sides textured(320*430 png) and let it rotate
 between the two sides, but it's sad to get a 16 FPS on emulator and 9
 FPS on the real phone. i don't known whether i have used the hardware
 acceleration on my phone.
   so i tried many parameters in OpenGLES ,finally i found i can set a
 value in my CubeView(inherit from GLSurfaceView )'s constructor ,

  public CubeView(Context context)
  {
super(context);

this.getHolder().setType(SurfaceHolder.SURFACE_TYPE_HARDWARE);  //
 here is the crucial line

mRender = new CubeRender(this);
this.setRenderer(mRender);
  }

 setType with the value SURFACE_TYPE_HARDWARE  can improve the OpenGL
 rendering speed, and i get a rate of  14FPS on real phone, but has no
 effect on emulator( i guess emulator didn't use hardware to render)

 but the 14FPS also is  not  enough for me , 18 -- 20 may be
 acceptable . the qualcomm demo neocore can render  a complex arena on
 25-27 FPS in my phone.

 so what's the problem with me, is there another ways to use the
 hardware acceleration in OpenGL ES .

 my phone has a cell of qualcomm MSM7201A with a hardware 
 acceleration.- 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] How to access storage by using API?

2009-09-24 Thread bluestar

If I want to read/write external storage, like usb drive,
does Android provide this feature to do?

Or how do using Google API to read/write SDcard on Mobile?
Where to get sample code for this goal?

Thanks for your kindly 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
-~--~~~~--~~--~--~---



[android-developers] Re: How to force soft keyboard to be visible?

2009-09-24 Thread dwass

I don't think it is possible that this is not an interesting
question, based on the amount of activity in this and other similar
posts about how to hide or show the sofkeyboard programatically.
I've tested a lot of this behaviour on G1 and G2 (Hero) and the
behaviour is either very buggy or there are a lot of subtle
dependencies on other settings that either aren't documented or aren't
intuitively obvious. Let's hope that the experts can ring in with some
comments soon.

-DWass

On Sep 23, 8:51 pm, Mike Collins mike.d.coll...@gmail.com wrote:
 Should I take the lack of reply as not an interesting question,
 no idea or we're checking/thinking?

 I would like to have some ammunition when I go up against my
 QA people to explain this uncontrolled behavior.

 tia,
   mike
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



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

2009-09-24 Thread HandsomeboyIT

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

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

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

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 Android App Developer Books:http://commonsware.com/books.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Is audio stream analysis possible?

2009-09-24 Thread Ilya Shinkarenko
Thank you Chris,
Could you pls tell me where do I find API for that?

On Sep 24, 2009 4:11 AM, Chris Stratton cs07...@gmail.com wrote:


Definitely possible when not on a call, not sure if you can do it when
one is active.

The actual analysis would not be android specific, and I'm not even
sure that frequency-domain (audio stream spectrum) methods would be
needed, as you could probably do it all in the time domain more
simply.

On Sep 23, 7:16 pm, Ilya Shinkarenko shin...@gmail.com wrote:  Hi all, 
 I wonder if it is pos...

--~--~-~--~~~---~--~~
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: Get active context dynamically of an application

2009-09-24 Thread Atif Gulzar
bump. Thanks :)

--
Best Regards,
Atif Gulzar

I  Unicode, ɹɐzlnƃ ɟıʇɐ



On Fri, Sep 11, 2009 at 3:09 PM, Atif Gulzar atif.gul...@gmail.com wrote:

 Hi,

 How can get the active context of an application?

 The scenario is, I have an AsyncTask inside an activity_A. And on
 successful completion (means in onPostExecute) of this AsyncTask I want to
 show a dialog

 (AlertDialog.Builder builder = new AlertDialog.Builder(*Activity_A.this*);)



 But in the meanwhile(before completing this AsyncTask) if the application
 is moved to another activity_B. The above dialog context will not be the
 current Context so it will through an Exception.


 So is it possible to get the active Context dianamically? Thanks



 --
 Best Regards,
 Atif Gulzar

 I  Unicode, ɹɐzlnƃ ɟıʇɐ



--~--~-~--~~~---~--~~
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 configure the sampling rate/period while audio capture?

2009-09-24 Thread Vishal.Android

How to capture the audio data from mic into a buffer instead of a
file?

On Sep 23, 2:43 pm, Vishal Gaonkar vishal.andr...@gmail.com wrote:
 I am working on a VOIP based application. I need to capture the audio
 from mic at 8000 hz sampling rate, get the 20msec packets, encode and
 send the packets over the network.

 Can somebody tell me how to configure the mic for the desired sampling
 rate?
--~--~-~--~~~---~--~~
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: Accessing SharedPreferences in Services and non-Activities

2009-09-24 Thread Mark Murphy

 I have some shared preferences (user_id, email) that I want to access
 from services and classes that are not subclassed from Activity.  I
 have been trying to implement this today and keep hitting roadblocks.

 In particular, when I try to access getSharedPreferences, I get a null
 pointer exception.  My code is posted below

 My goal here is to allow read access the shared preferences to objects
 and (potentially) services that aren't going to be directly exposed to
 the user.  Any suggestions/examples that can help me along?


 Many thanks,

 Brooke

 snip
 public class MyPrefs extends Service {
 public static final String PREFS_NAME = MyPrefs;
 private int user_id;
 private String user_email;
 private String user_password;
 private Editor editor = null;

 private SharedPreferences settings = null;


 public MyPrefs () {

 settings = this.getSharedPreferences(PREFS_NAME,
 Context.MODE_PRIVATE);
 }

 /snip

 the this.getSharedPreferences line causes a null pointer exception.

First, do not implement a constructor. Move your code into onCreate() in
your service. Activities, services, etc. should not implement
constructors, or if they do, they should not expect Android API methods to
work from those constructors.

Second, if for some reason you do implement a constructor, please chain to
the superclass.

Third, I would switch to PreferenceManager.getDefaultSharedPreferences(),
particularly if you intend to use the preference API (PreferenceScreen) to
collect the preferences.

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



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Using Picasa Web Albums Data API in Android

2009-09-24 Thread Raman

I do not want to use an existing Activity for Picasa related tasks,
like showing the Picasa albums and creating new albums. Rather I want
to develop a new application where it would directly interact with
Picasa without a third application coming in between.
May be, you would have heard of Picasa Web Data API. I want to use
them. I know that using them in a normal PC application, I can
directly interact with Picasa Server. Now, I want to use the same with
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 at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: using tesseract on android

2009-09-24 Thread Mark Murphy

 Does anyone know if all android devices are ARM at the moment? It
 seems a bit of a risk to depend on this as an app developer.  Or
 should we just presume that any non-ARM tools/compilers would become
 available to us app developers as non-ARM handsets appear?

 Can anyone shed some light on the facts? I could really benefit from
 some native code without potentially alienating a subset of Android
 users. I'm sure there are people who have considered all this with
 respect to Native Code vs. Different Handset Manufacturers.

Questions about the NDK are best asked in the Google Group dedicated to
the NDK:

http://groups.google.com/group/android-ndk

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



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Remote Interface - Parcelables problem...

2009-09-24 Thread Ne0

Thanks, though it doesnt look like you are doing anything different to
i am. When you initialise an instance of your OnlineUser, would you do
it using OnlineUser.CREATOR.createFromParcel(p), after packing your
parcel?

If you can see a problem with my code in my original post, please
advise? The issue is the parcel gets packed with non-zero integers,
but when readFromParcel gets called only 0 integers get read out.

Liam

On Sep 23, 5:14 pm, Robert Green rbgrn@gmail.com wrote:
 Yes, I have done plenty of this now.  Here's how I do it:

 My Parcelable is called an OnlineUser.  Here's the important stuff:

         private OnlineUser(Parcel in) {
                 readFromParcel(in);
         }

         public void writeToParcel(Parcel out, int arg1) {
                 writeToParcel(out);
         }

         public void writeToParcel(Parcel out) {
                 out.writeInt(id);
                 out.writeString(userName);
                 out.writeString(dictionary);
                 out.writeInt(allowRandomGames ? 1 : 0);
         }

         public void readFromParcel(Parcel in) {
                 id = in.readInt();
                 userName = in.readString();
                 dictionary = in.readString();
                 allowRandomGames = in.readInt() == 1;
         }

         public int describeContents() {
                 return 0;
         }

         public static final Parcelable.CreatorOnlineUser CREATOR = new
 Parcelable.CreatorOnlineUser() {
                 public OnlineUser createFromParcel(Parcel in) {
                         return new OnlineUser(in);
                 }

                 public OnlineUser[] newArray(int size) {
                         return new OnlineUser[size];
                 }
         };

 On Sep 23, 9:52 am, Ne0 liamjamesalf...@googlemail.com wrote:

  Has anyone had experience with passing a pacelable class through an
  aidl interface?

  Just cant get it to work the way they describe 
  herehttp://developer.android.com/guide/developing/tools/aidl.html#impleme...

  cheers,

  Liam

  On Sep 23, 10:59 am, Ne0 liamjamesalf...@googlemail.com wrote:

   Been using remote interfaces for quite a while now, but the time has
   come to increase the amount of data i need to pass between processes.
   Following the Designing a Remote Interface using aidl examples/
   tutorial i have had some success but have now come to a problem.

   My activity binds to my service no problem, the callbacks work, but
   the data i send does not reach the client. My code is an extension of
   Pass by value Parameters using Parcelables from the  Designing a
   Remote Interface using aidl page. The only difference is the amount
   of data, it has 18 int's and 3 Doubles. As you will see below, once i
   have entered the data into the parcel, i create my Parcelable
   using .createFromParcel(p) this however does not seem to work, even
   when my Parcelable is reading from the parcel no data gets read.

   Here is my code for sending the data to the client.

   /*
        * Send the latest info to the bound apps
    */
       private void updateBoundApps(){

           if(mCallbacks.beginBroadcast()  0){
                   if(gLOG){Log.d(TAG,updateBoundApps  + mSMNI.int1);} // 
   Always
   shows int1 as corret value (non 0)

                   Parcel p = Parcel.obtain();
                   p.writeInt(mSMNI.int1);
                   p.writeInt(mSMNI.int2);
                   p.writeInt(mSMNI.int3);
                   p.writeInt(mSMNI.int4);
                   p.writeInt(mSMNI.int5);
                   p.writeInt(mSMNI.int6);

                   IteratorEntryObject, Object itNew = 
   mSMNI.intMap.entrySet
   ().iterator();
                   for(int i = 0 ; i  6; i++){
                           if(itNew.hasNext()){
                                   Map.EntryObject, Object eNew = 
   itNew.next();
                                   p.writeInt((Integer) eNew.getKey());
                                   p.writeInt((Integer) eNew.getValue());
                           }else{
                                   p.writeInt(0);
                                   p.writeInt(0);
                           }
                   }
                   p.writeDouble(mLastLoc.Double1);
                   p.writeDouble(mLastLoc.Double2);
                   p.writeDouble(mLastLoc.Double3);

               MPSData mpsd = MPSData.CREATOR.createFromParcel(p);
               // Send the message
               Message msg = mHandler.obtainMessage(REPORT_MSG, mpsd);
               mHandler.sendMessageDelayed(msg, 1*1000);
               p.recycle();
           }
           mCallbacks.finishBroadcast();
       }

   Here is my Parecelable:

   public class MPSData implements Parcelable{

           public int int1;
           public int int2;
           public int int3;
           public int int4;
           public int int5;
           public int int6;
           public int int7;
           public int 

[android-developers] Flash for android

2009-09-24 Thread Dantu

Hi
I want adobe flash to be enabled in android, Does android support
it , if so please help me out

Thanks in advance
Jyothi Swaroop Dantu

--~--~-~--~~~---~--~~
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: Flash for android

2009-09-24 Thread Mark Murphy

 I want adobe flash to be enabled in android, Does android support
 it , if so please help me out

Flash is a proprietary technology owned by Adobe. Certain Android handset
manufacturers license and ship some version of Flash, such as HTC does
with the Hero. AFAIK, there is no downloadable version of Flash that can
be applied to arbitrary Android devices the way you can download flash to
PCs.

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



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Recording WAV data from the /dev/msm_pcm_in device

2009-09-24 Thread Maarten Wijnants

Just for those interested: I was able to circumvent my problem by
using the
AudioRecord class ...


On 4 sep, 15:51, Maarten Wijnants maarten.wijna...@gmail.com wrote:
 Hi all,

 When browsing the Android source code, I discovered the system/extras/
 sound/playwav.c file which appears to contain code to directly access
 the Android audio capturing hardware. I converted the WAV recording
 code to an Android native library (.so file) which I linked to a Java
 implementation using JNI.

 When I run the code, I get a permission error. In particular,
 attempting to open the /dev/msm_pcm_in device returns a negative
 value. The open statement is as follows:

 int afd = open(/dev/msm_pcm_int, O_RDWR);

 Could this be due to a lack of root priviliges? If so, is there a
 possible solution?

 Kind regards, MaartenWijnants
--~--~-~--~~~---~--~~
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] can i use external fonts ?

2009-09-24 Thread zeeshan

Hi Dear,

i need to use my external font  .ttf file for button's text.
can anybody 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
-~--~~~~--~~--~--~---



[android-developers] Re: can i use external fonts ?

2009-09-24 Thread Mark Murphy

 i need to use my external font  .ttf file for button's text.
 can anybody help

http://developer.android.com/reference/android/graphics/Typeface.html

then, call setTypeface() on your Button.

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



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Android append 2 image source files

2009-09-24 Thread Isuru danagalle
Hi All,
 Anybody tried to append 2 jpeg files in android?
i.e: a.jpeg and b.jpeg sd be appended and sd give one c.jpeg image file
consist of both images.

Any idea?

Thanks
Isuru

--~--~-~--~~~---~--~~
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] Just for test, Please ignore

2009-09-24 Thread Burne Xu
#123*234*3
95452334049545233404


#2
#0
902*23*53901
123*234*3*3*8*8*8
#23#234#22#23
#23*23423*2344



adf9545233404dasfe9545233442
adf9545233404dasfe#23df
adf9545233404  jxp...@motorola.com


9545233404  sdfsda9545233404
 adf9545233404dasfe
 9545233404 9545233404
 9545233404sdf9545233404
123129545233404

234*23*238  sdfsda234*23*238
adf234*23*238dasfe
234*23*238 234*23*238
234*23*238*234*23*238
#23sdf#23

#23  sdfsda#23
adf#23dasfe
#23 #23
#23#23
#23sdf#23

#239545233404 #23df9545233404

--~--~-~--~~~---~--~~
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: Flash for android

2009-09-24 Thread Casper Bang

 AFAIK, there is no downloadable version of Flash that can
 be applied to arbitrary Android devices the way you can download flash to
 PCs.

Which is funny. You can often dig into a sophisticated community ROM's
(i.e. Cyanogen's) and extract certain applications and put them on
your own handset. The legality and feasibility of this approach is a
gray zone AFAIK but that might be ok for you.

/Casper
--~--~-~--~~~---~--~~
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: Problem in using remote service from other App

2009-09-24 Thread Rahul Bhagwat

I found out the way. client should include aidl files in the project
creating same package.
Doing this above problem got solved but I'm facing one more problem.
I'm sending custom object in callback, So I've implemented it using
Parcelable. But client can not find the reference to this object ,
resulting following error
09-24 14:25:13.082: WARN/dalvikvm(1392): VFY: unable to find class
referenced in signature (Lcom/sasken/dlna/dmcRemService/DeviceList;)


On Sep 24, 11:30 am, Rahul Bhagwat rahul3...@gmail.com wrote:
 I’ve implemented remote service using aidl  it is working fine if I’m
 using its service from same package. But If I tried to use the service
 from other application it gives me error

  as below

 09-24 10:51:08.051: ERROR/dalvikvm(795): Could not find method
 com.sasken.dlna.dmcRemService.IRemDlnaService$Stub.asInterface,
 referenced from method com.sasken.TestDlnaApp.TestDlnaRemService
 $5.onServiceConnected

 09-24 10:51:08.051: WARN/dalvikvm(795): VFY: unable to resolve static
 method 26: Lcom/sasken/dlna/dmcRemService/IRemDlnaService
 $Stub;.asInterface (Landroid/os/IBinder;)Lcom/sasken/dlna/
 dmcRemService/IRemDlnaService;

 09-24 10:51:08.063: WARN/dalvikvm(795): VFY:  rejecting opcode 0x71 at
 0x0002

 09-24 10:51:08.063: WARN/dalvikvm(795): VFY:  rejected Lcom/sasken/
 TestDlnaApp/TestDlnaRemService$5;.onServiceConnected (Landroid/content/
 ComponentName;Landroid/os/IBinder;)V

 09-24 10:51:08.063: WARN/dalvikvm(795): Verifier rejected class Lcom/
 sasken/TestDlnaApp/TestDlnaRemService$5;

 Pls suggest any solution
--~--~-~--~~~---~--~~
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 use external fonts ?

2009-09-24 Thread Zeeshan Muhammad
thanks

On Thu, Sep 24, 2009 at 9:46 AM, Mark Murphy mmur...@commonsware.comwrote:


  i need to use my external font  .ttf file for button's text.
  can anybody help

 http://developer.android.com/reference/android/graphics/Typeface.html

 then, call setTypeface() on your Button.

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



 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: IME Preference in LocaleText

2009-09-24 Thread Bahadır Yağan
Thanks, I have already done that. And I can see a menu item to enable my
IME, it works fine. What I was trying to ask is how to add another menu item
below it to show Keyboard Preferences (I have already implemented my
preference screens, and I can launch it from the keyboard itself)

Please see attached screenshot. (Turkish Keyboard) The keyboards in the
emulator have this feature.


On Wed, Sep 23, 2009 at 10:02 PM, Dianne Hackborn hack...@android.comwrote:

 Just write your own IME:


 http://developer.android.com/reference/android/inputmethodservice/InputMethodService.html

 There is a sample code for one included in the SDK, and I am pretty sure
 there some developers have put up on market.

 2009/9/23 Bahadır Yağan bahadir.ya...@gmail.com

 Hello All,

 Is there a way to add my IME Preferences to the LocaleText menu, just
 like the Latin and Pinyin IME's. Or is this restricted to the keyboards that
 ship with the platform?

 Many thanks

 --
 Bahadır Yağan





 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.


 



-- 
Bahadır Yağan

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

attachment: enable_2.png

[android-developers] Please Help Urgent: Get active context dynamically of an application

2009-09-24 Thread Atif Gulzar

 I posted this questions twice. I will really appreciate your help. Am I
 asking very basic or vice versa? Or it is not possible in Android. Please
 help.



 On Fri, Sep 11, 2009 at 3:09 PM, Atif Gulzar atif.gul...@gmail.comwrote:

 Hi,

 How can get the active context of an application?

 The scenario is, I have an AsyncTask inside an activity_A. And on
 successful completion (means in onPostExecute) of this AsyncTask I want to
 show a dialog

 (AlertDialog.Builder builder = new AlertDialog.Builder(*Activity_A.this*);)



 But in the meanwhile(before completing this AsyncTask) if the application
 is moved to another activity_B. The above dialog context will not be the
 current Context so it will through an Exception.



 So is it possible to get the active Context dianamically? Thanks



 --
 Best Regards,
 Atif Gulzar

 I  Unicode, ɹɐzlnƃ ɟıʇɐ




--~--~-~--~~~---~--~~
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 display Dialog Box without showing the Activity!

2009-09-24 Thread Abdul Mateen
Hi,
I want to display Dialog Box when the application is launched before loading
and launching the activity.

or you can say I want to show the dialog on launcher after the launch of my
application.

--~--~-~--~~~---~--~~
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: Problem in using remote service from other App

2009-09-24 Thread Rahul Bhagwat

Again I got the solution for above problem.
If you are using custom object passing from service to client ,
implemented using Parcelable,
you have to provide source code of object to client.

On Sep 24, 2:08 pm, Rahul Bhagwat rahul3...@gmail.com wrote:
 I found out the way. client should include aidl files in the project
 creating same package.
 Doing this above problem got solved but I'm facing one more problem.
 I'm sending custom object in callback, So I've implemented it using
 Parcelable. But client can not find the reference to this object ,
 resulting following error
 09-24 14:25:13.082: WARN/dalvikvm(1392): VFY: unable to find class
 referenced in signature (Lcom/sasken/dlna/dmcRemService/DeviceList;)

 On Sep 24, 11:30 am, Rahul Bhagwat rahul3...@gmail.com wrote:



  I’ve implemented remote service using aidl  it is working fine if I’m
  using its service from same package. But If I tried to use the service
  from other application it gives me error

   as below

  09-24 10:51:08.051: ERROR/dalvikvm(795): Could not find method
  com.sasken.dlna.dmcRemService.IRemDlnaService$Stub.asInterface,
  referenced from method com.sasken.TestDlnaApp.TestDlnaRemService
  $5.onServiceConnected

  09-24 10:51:08.051: WARN/dalvikvm(795): VFY: unable to resolve static
  method 26: Lcom/sasken/dlna/dmcRemService/IRemDlnaService
  $Stub;.asInterface (Landroid/os/IBinder;)Lcom/sasken/dlna/
  dmcRemService/IRemDlnaService;

  09-24 10:51:08.063: WARN/dalvikvm(795): VFY:  rejecting opcode 0x71 at
  0x0002

  09-24 10:51:08.063: WARN/dalvikvm(795): VFY:  rejected Lcom/sasken/
  TestDlnaApp/TestDlnaRemService$5;.onServiceConnected (Landroid/content/
  ComponentName;Landroid/os/IBinder;)V

  09-24 10:51:08.063: WARN/dalvikvm(795): Verifier rejected class Lcom/
  sasken/TestDlnaApp/TestDlnaRemService$5;

  Pls suggest any solution- 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] Re: Google Maps Exception? : cross-loader access from pre-verified class

2009-09-24 Thread rinda

It works after updating to 1.6SDK from 1.5.
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] How to capture audio data from mic into a buffer?

2009-09-24 Thread Vishal Gaonkar

I am working on a packet switched network. I want to capture the audio
data from mic into a buffer at a desired sample rate.

How can I capture the audio data from mic into a buffer instead of a
file?
Also how can I control the audio capture rate as per the desired
sample rate?
--~--~-~--~~~---~--~~
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 display Dialog Box without showing the Activity!

2009-09-24 Thread Lee

There might be a better way, but this is how I do it:

- assign an ID to the root layout of your activity, and set it to
invisible
- do showDialog in the onCreate method of your activity
- in onDismissDialog of your activity, do rootLayout.setVisibility
(View.VISIBLE)

You get a black screen behind the dialog though. Guess you could
fiddle with
your activity background (e.g. transparent) to avoid this.

Lee

On Sep 24, 10:33 am, Abdul Mateen abmat...@gmail.com wrote:
 Hi,
 I want to display Dialog Box when the application is launched before loading
 and launching the activity.

 or you can say I want to show the dialog on launcher after the launch of my
 application.
--~--~-~--~~~---~--~~
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: Flash for android

2009-09-24 Thread Wenwei Cai

I have no HTC hero. Did anyone try Adobe flash on it? If I remember
well, Android webkit supports windows-less plugin only. Was this
improved?

Thanks!

On Thu, Sep 24, 2009 at 4:26 PM, Mark Murphy mmur...@commonsware.com wrote:

     I want adobe flash to be enabled in android, Does android support
 it , if so please help me out

 Flash is a proprietary technology owned by Adobe. Certain Android handset
 manufacturers license and ship some version of Flash, such as HTC does
 with the Hero. AFAIK, there is no downloadable version of Flash that can
 be applied to arbitrary Android devices the way you can download flash to
 PCs.

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



 


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to display Dialog Box without showing the Activity!

2009-09-24 Thread Abdul Mateen
hmm thank you!

- assigning an ID to root layout and setting it to invisible fine! works
- but can you tell me how do I set the background of activity to be
transparent there is no attribute in Manifest as background!

On Thu, Sep 24, 2009 at 4:46 PM, Lee lee.wil...@googlemail.com wrote:


 There might be a better way, but this is how I do it:

 - assign an ID to the root layout of your activity, and set it to
 invisible
 - do showDialog in the onCreate method of your activity
 - in onDismissDialog of your activity, do rootLayout.setVisibility
 (View.VISIBLE)

 You get a black screen behind the dialog though. Guess you could
 fiddle with
 your activity background (e.g. transparent) to avoid this.

 Lee

 On Sep 24, 10:33 am, Abdul Mateen abmat...@gmail.com wrote:
  Hi,
  I want to display Dialog Box when the application is launched before
 loading
  and launching the activity.
 
  or you can say I want to show the dialog on launcher after the launch of
 my
  application.
 


--~--~-~--~~~---~--~~
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 use external fonts ?

2009-09-24 Thread cyril.at...@gmail.com

I don't remember exactly since I do not have my laptop with me but you
have to copy the font file inside res/raw/

You can then load the file with something like getResource(path)

If you still have an issu just wrote it and I will copy-paste my code
tonight at home.

C.

On 24 sep, 11:19, Zeeshan Muhammad genx...@gmail.com wrote:
 thanks

 On Thu, Sep 24, 2009 at 9:46 AM, Mark Murphy mmur...@commonsware.comwrote:





   i need to use my external font  .ttf file for button's text.
   can anybody help

 http://developer.android.com/reference/android/graphics/Typeface.html

  then, call setTypeface() on your Button.

  --
  Mark Murphy (a Commons Guy)
 http://commonsware.com
  Android App Developer Books:http://commonsware.com/books.html
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to launch my app if some one browses any xml file

2009-09-24 Thread manoj

HI all,

I want your help for my app. The following is my new requirement.

I have written a rss reader app. Now my requirement is to launch the
app when we browse any xml/rss link. I mean if I type the xml/rss link
in the phone browser, then instead of showing the content, my app
should be launched.

can you please suggest me how to achieve it?

Thanks,
Manoj.
--~--~-~--~~~---~--~~
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] Join here

2009-09-24 Thread Sasikumar.S
pls join this group


http://groups.google.com/group/mobile-application-developers


-- 
Thanks  Regards
Sasikumar.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: Just for test, Please ignore

2009-09-24 Thread Neil

There are test groups for testing.



On Sep 24, 10:58 am, Burne Xu burn...@gmail.com wrote:
 #123*234*3
 95452334049545233404

 #2
 #0
 902*23*53901
 123*234*3*3*8*8*8
 #23#234#22#23
 #23*23423*2344

 adf9545233404dasfe9545233442
 adf9545233404dasfe#23df
 adf9545233404  jxp...@motorola.com

 9545233404  sdfsda9545233404
  adf9545233404dasfe
  9545233404 9545233404
  9545233404sdf9545233404
 123129545233404

 234*23*238  sdfsda234*23*238
 adf234*23*238dasfe
 234*23*238 234*23*238
 234*23*238*234*23*238
 #23sdf#23

 #23  sdfsda#23
 adf#23dasfe
 #23 #23
 #23#23
 #23sdf#23

 #239545233404 #23df9545233404
--~--~-~--~~~---~--~~
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 launch my app if some one browses any xml file

2009-09-24 Thread Sujay Krishna Suresh
On Thu, Sep 24, 2009 at 5:00 PM, manoj manojkumar.m...@gmail.com wrote:


 HI all,

 I want your help for my app. The following is my new requirement.

 I have written a rss reader app. Now my requirement is to launch the
 app when we browse any xml/rss link. I mean if I type the xml/rss link
 in the phone browser, then instead of showing the content, my app
 should be launched.

I think wat u r speakin abt is wat a plugin can do.
I'm not sure if plugin development is even possible for android's browser.
But wat u can try is have an intent-filer in your manifest consisting of
action ACTION_VIEW and content-type application/xml.
But 'm not very sure tat it'd work.
U could chk its workin by using a file-browser(like the OI file manager)
app, trying to view a xml/rss file stored in ur phone/sdcard.


 can you please suggest me how to achieve it?

 Thanks,
 Manoj.
 



-- 
Regards,
Sujay
Jonathan Swifthttp://www.brainyquote.com/quotes/authors/j/jonathan_swift.html
- May you live every day of your life.

--~--~-~--~~~---~--~~
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: memory leak in activity

2009-09-24 Thread Felipe Silveira
Hi rukiman,

The best way to determine what is wrong in your scenario is  taking some
heap dumps and analysing them with MAT, for example.

Markus Kohler's blog have a good tutorial to do this:
http://kohlerm.blogspot.com/2009/04/analyzing-memory-usage-off-your-android.html

This Activity Leak is common when some reference to Context remains on
memory after the Activity destruction. Look for some static reference to it
(its just a guess)

Regards,

Felipe Silveira

On Thu, Sep 24, 2009 at 3:40 AM, rukiman ruksh...@optushome.com.au wrote:


 In my app activity A creates activity B, however when the back key is
 pressed it goes back to activity A. This is a simplified version of my
 application.

 I would expect memory to be reclaimed when going back to Activity A.
 Going to activity B allocates more memory.

 I am using dumpsys meminfo to get the allocated kbs.

 How can I easily tell what memory is creeping? I do not keep any
 references to activity B.

 I know about the ddms allocation tracker, but wondering if there is a
 more better tool to figure this out.

 I read somewhere about someone during a heap dump. How do I do that?
 



-- 
Felipe Silveira
Engenharia da Computação
Universidade Federal de Itajubá
http://www.felipesilveira.com.br
MSN: felipeuni...@hotmail.com
Skype: fsunifei
-

--~--~-~--~~~---~--~~
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 storage by using API?

2009-09-24 Thread Chris Stratton

On Sep 24, 3:15 am, bluestar bluestar8...@gmail.com wrote:
 If I want to read/write external storage, like usb drive,
 does Android provide this feature to do?

Not usb drives.  Current android phones are usb devices which can only
talk to usb  hosts, not to other usb devices such as usb drives.

 Or how do using Google API to read/write SDcard on Mobile?
 Where to get sample code for this goal?

You use normal java file access methods.
--~--~-~--~~~---~--~~
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: ListView....

2009-09-24 Thread Timothy Collins
You know - I believe that would work quite nicely... When I saw the name
Spinner I assumed (Yes, I know what that means but in this case only the
Me part applies!) that it was some sort of thing that iterated between a
few different values before looping back to the beginning...

On Thu, Sep 24, 2009 at 1:07 AM, amit amitkee...@gmail.com wrote:



 Does a Spinner take care of your requirement ? A spinner is not a
 scrollable list like a list activity but it does show you a drop down
 list.

 http://developer.android.com/guide/samples/ApiDemos/src/com/example/android/apis/view/Spinner1.html



 On Sep 22, 7:43 pm, furby wookie...@gmail.com wrote:
  Why does this type of thing always end up being so difficult?
 
  I want to have a scrolling list on the screen. Very simple... Except
  that the Android SDK seems to require that list to be a listview which
  is implemented in a completely different way from other programming
  languages... (Slight rant following, skip to the bottom to see my
  question, sorry...) Why is it so hard? Why can't I just say Here's a
  listview on the page and there is a method for adding options onto it
  and I'll iterate through my result set to add them?
 
  My question is simple - is there a simple way to use lists in Android?
  Or does one have to define entire screens every time just to display a
  list?
 


--~--~-~--~~~---~--~~
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 save a canvas to disk

2009-09-24 Thread gjs

Hi,

I made up the following to demonstrate what I meant.

In this example when you press the trackball/dpad center button the
view is written to a png file and also set as the wallpaper.

You can change it to save as jpeg file etc.

Hope that helps.

Regards

/

package com.testSaveView;

import android.app.Activity;
import android.os.Bundle;

import java.io.FileOutputStream;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;

public class testSaveView extends Activity
{
SomeView sv = null;

/** Called when the activity is first created. */

@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);

sv = new SomeView(this);

setContentView( sv );

}

@Override
public boolean onKeyDown( int keyCode, KeyEvent event)
{
switch( event.getKeyCode() )
{

case KeyEvent.KEYCODE_DPAD_CENTER:

if ( sv != null )
{
saveView( sv );

return true;
}

default:

}

return super.onKeyDown( keyCode, event );
}

private void saveView( View view )
{
   Bitmap  b = Bitmap.createBitmap( view.getWidth(), view.getHeight
(), Bitmap.Config.ARGB_);

   Canvas c = new Canvas( b );

   view.draw( c );

   FileOutputStream fos = null;

   try {

fos = new FileOutputStream( /sdcard/some_view_image_
+ System.currentTimeMillis() + .png );

if ( fos != null )
{
b.compress(Bitmap.CompressFormat.PNG, 100, fos );

fos.close();
}

setWallpaper( b );

} catch( Exception e )
{
Log.e(testSaveView, Exception:  + e.toString() );
}

}

class SomeView extends View
{
public SomeView( Context context )
{
  super( context );
}

public void onDraw( Canvas canvas )
{
canvas.drawARGB(0x80, 0xff, 0, 0 );

Paint paint = new Paint();

paint.setColor(Color.BLUE);

paint.setTextSize( 48 );

canvas.drawText(...Some view..., 10, canvas.getHeight() / 2,
paint);
}

}

}

//

 the manifest -

?xml version=1.0 encoding=utf-8?
manifest xmlns:android=http://schemas.android.com/apk/res/android;
  package=com.testSaveView
  android:versionCode=1
  android:versionName=1.0
application android:icon=@drawable/icon android:label=@string/
app_name
activity android:name=.testSaveView
  android:label=@string/app_name
intent-filter
action android:name=android.intent.action.MAIN /
category
android:name=android.intent.category.LAUNCHER /
/intent-filter
/activity
/application
uses-sdk android:minSdkVersion=3 /

uses-permission android:name=android.permission.SET_WALLPAPER/
uses-permission
/manifest



On Sep 23, 7:12 pm, limtc thyech...@gmail.com wrote:
 Mmm... I don't quite understand. The link you sent is the
 documentation for View?

 If I have a new canvas, what happened to the canvas in onDraw? And
 when should I call view.draw(canvas)?

 Do you have any sample codes? Appreciated.
--~--~-~--~~~---~--~~
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: Hmm... at last ADC2 is out of our way ... tell about your app and experience

2009-09-24 Thread Ilya Shinkarenko

Name: Tennis Math
Category: Misc
Website: http://www.tennis-math.com/

Tennis Math is a free tennis scoring and statistics software for
Android. We have designed it for tennis players, coaches or anyone
interested in analyzing of the strong and weak points of their tennis.



2009/9/24 sheik sheik...@gmail.com:

 Name : iCommuteLess
 Track commutes, Save time

 Category : Lifestyle
 By: Uttara Infosolutions
 Website :http://www.commuteless.appspot.com/

 Description :

 iCommuteLess is an application to track your daily commutes.
  Based on  commutes, the application has intelligence built-in to give
 users intuitive feedback that
 can help them in saving time!

 Features :

 iCommuteLess tries to answer the following questions:

 How much time do I spend commuting?
 How much time do I spend in traffic?
 Which route should I  take for a given time?
 Should I leave 15 mins early or 15 mins later?
 How is my commuting performance?

 it also includes
  AutoStart, RouteSuggest and RouteTrace features!

 To know more visit :
 http://www.commuteless.appspot.com/

 To view screen shots visit
 http://www.androlib.com/android.application.com-uttara-and-icommute_less-qBpm.aspx


 regards
 Sheik Ahmed




 On Sep 22, 7:34 pm, cooolmagic cooolma...@gmail.com wrote:
 CubeWorks

 Category - Productivity/Tools

 CubeWorks is a productivity tool that was created with the realization
 that completing a task often requires information from more than one
 source. It displays a cube containing six applications at a time, one
 on each cube face. This allows a user to access multiple sources
 quickly, helps them visualize the information and makes navigation
 easier.

 More info about app here -http://cubeworksmobile.com

 After Power Manager and Toggle Settings, we wanted to do something
 different this time. And we came up with an idea of a cube with
 various inter-connected apps on it. Developing CubeWorks was really
 challenging, mainly because of tight deadline and all the great
 features we wanted to include in this short time. Android's incomplete
 support of OpenGL made it even harder. But at last we were able to
 finish it well before final deadline.

 -abhi

 On Sep 1, 10:41 am, Lout lout.r...@googlemail.com wrote:

  While you developers relax... would you mind sharing what apps to
  expect through this challenge.. and anything else you wish to share
  aboutADC2submissions... well anything including the fact: 'thank
  God, no more sleep less nights'!

  Am collecting information about the challenge (ADC2) for a news
  article as am with cnet (and AP). Pitch your app if you have already
  published or would soon publish on the market too.

  Your app name and description, web link if any, experience withADC2, ... 
  anything would be useful for our article(s).

  And do you feel that there would have been more submissions than in
  ADC1?
  Is the competition going to be tougher or less profound as you were
  allowed to put up apps not published before 1st Aug only?

  Do you think that all apps that didn't try for ADC1 should have had a
  chance?

  Congratulations on your submissions while you wait for the next
  phase.
  Thanks,
  Lout Reilly
  ps: Moderators we request you to let this through so that you too get
  some feedback.
 


--~--~-~--~~~---~--~~
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 display Dialog Box without showing the Activity!

2009-09-24 Thread Lee

You could have a look at different themes e.g.

android:theme=@android:style/Theme.Light.Panel

(but that one doesn't have a title bar)

You could try switching back to a normal theme afterwards, think it's
Context.setTheme.

Lee

On Sep 24, 11:54 am, Abdul Mateen abmat...@gmail.com wrote:
 hmm thank you!

 - assigning an ID to root layout and setting it to invisible fine! works
 - but can you tell me how do I set the background of activity to be
 transparent there is no attribute in Manifest as background!

 On Thu, Sep 24, 2009 at 4:46 PM, Lee lee.wil...@googlemail.com wrote:

  There might be a better way, but this is how I do it:

  - assign an ID to the root layout of your activity, and set it to
  invisible
  - do showDialog in the onCreate method of your activity
  - in onDismissDialog of your activity, do rootLayout.setVisibility
  (View.VISIBLE)

  You get a black screen behind the dialog though. Guess you could
  fiddle with
  your activity background (e.g. transparent) to avoid this.

  Lee

  On Sep 24, 10:33 am, Abdul Mateen abmat...@gmail.com wrote:
   Hi,
   I want to display Dialog Box when the application is launched before
  loading
   and launching the activity.

   or you can say I want to show the dialog on launcher after the launch of
  my
   application.


--~--~-~--~~~---~--~~
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] ACTION_GET_CONTENT and Gallery

2009-09-24 Thread Christine

My app takes a picture and stores it either on the flash card or in
the MediaStore. When retreiving the gallery content with an
ACTION_GET_CONTENT intent doesn't show the new picture in either case.
However, after switching the phone off and on again, they do show up.
How do I force the Gallery to show my new pic?


--~--~-~--~~~---~--~~
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] GC question.

2009-09-24 Thread Jiri

I have a simple question, in my ctivity i define a static private as so:

private final FileFetcher ff = new FileFetcher();

what happens when this activity is destroyed, is the reference to the 
FileFetcher completly gone, and can everything be marked for GC?

Or would it better to write

private FileFetcher ff;

and the in my onCreate instantiate the FileFetcher and nullify it in the 
onDestroy method?

Jiri

--~--~-~--~~~---~--~~
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 display Dialog Box without showing the Activity!

2009-09-24 Thread Abdul Mateen
Thank You, I found a way by either
android:theme=@android:style/Theme.Translucent
Or
android:theme=@android:style/Theme.Theme_Dialog

On Thu, Sep 24, 2009 at 7:49 PM, Lee lee.wil...@googlemail.com wrote:


 You could have a look at different themes e.g.

 android:theme=@android:style/Theme.Light.Panel

 (but that one doesn't have a title bar)

 You could try switching back to a normal theme afterwards, think it's
 Context.setTheme.

 Lee

 On Sep 24, 11:54 am, Abdul Mateen abmat...@gmail.com wrote:
  hmm thank you!
 
  - assigning an ID to root layout and setting it to invisible fine! works
  - but can you tell me how do I set the background of activity to be
  transparent there is no attribute in Manifest as background!
 
  On Thu, Sep 24, 2009 at 4:46 PM, Lee lee.wil...@googlemail.com wrote:
 
   There might be a better way, but this is how I do it:
 
   - assign an ID to the root layout of your activity, and set it to
   invisible
   - do showDialog in the onCreate method of your activity
   - in onDismissDialog of your activity, do rootLayout.setVisibility
   (View.VISIBLE)
 
   You get a black screen behind the dialog though. Guess you could
   fiddle with
   your activity background (e.g. transparent) to avoid this.
 
   Lee
 
   On Sep 24, 10:33 am, Abdul Mateen abmat...@gmail.com wrote:
Hi,
I want to display Dialog Box when the application is launched before
   loading
and launching the activity.
 
or you can say I want to show the dialog on launcher after the launch
 of
   my
application.
 
 
 


--~--~-~--~~~---~--~~
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: Using Picasa Web Albums Data API in Android

2009-09-24 Thread Christine

You can use httpclient to access any api.

On Sep 24, 10:00 am, Raman raman86...@gmail.com wrote:
 I do not want to use an existing Activity for Picasa related tasks,
 like showing the Picasa albums and creating new albums. Rather I want
 to develop a new application where it would directly interact with
 Picasa without a third application coming in between.
 May be, you would have heard of Picasa Web Data API. I want to use
 them. I know that using them in a normal PC application, I can
 directly interact with Picasa Server. Now, I want to use the same with
 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 at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Please Help Urgent: Get active context dynamically of an application

2009-09-24 Thread Smelly Eddie

Your question is no more 'urgent' than anyone elses.

Please respect etiquette and only post questions once.

On Sep 24, 5:22 am, Atif Gulzar atif.gul...@gmail.com wrote:
  I posted this questions twice. I will really appreciate your help. Am I
  asking very basic or vice versa? Or it is not possible in Android. Please
  help.

  On Fri, Sep 11, 2009 at 3:09 PM, Atif Gulzar atif.gul...@gmail.comwrote:

  Hi,

  How can get the active context of an application?

  The scenario is, I have an AsyncTask inside an activity_A. And on
  successful completion (means in onPostExecute) of this AsyncTask I want to
  show a dialog

  (AlertDialog.Builder builder = new AlertDialog.Builder(*Activity_A.this*);)

  But in the meanwhile(before completing this AsyncTask) if the application
  is moved to another activity_B. The above dialog context will not be the
  current Context so it will through an Exception.

  So is it possible to get the active Context dianamically? Thanks

  --
  Best Regards,
  Atif Gulzar

  I  Unicode, ɹɐzlnƃ ɟıʇɐ
--~--~-~--~~~---~--~~
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: GC question.

2009-09-24 Thread Felipe Silveira
Hi Jiri,

Static references remains on memory until the process where your activity is
running is destroyed.

So, in order to avoid memory leaks, point the reference to null in
onDestroy()

Regards,

Felipe Silveira

On Thu, Sep 24, 2009 at 10:58 AM, Jiri jiriheitla...@googlemail.com wrote:


 I have a simple question, in my ctivity i define a static private as so:

 private final FileFetcher ff = new FileFetcher();

 what happens when this activity is destroyed, is the reference to the
 FileFetcher completly gone, and can everything be marked for GC?

 Or would it better to write

 private FileFetcher ff;

 and the in my onCreate instantiate the FileFetcher and nullify it in the
 onDestroy method?

 Jiri

 



-- 
Felipe Silveira
Engenharia da Computação
Universidade Federal de Itajubá
http://www.felipesilveira.com.br
MSN: felipeuni...@hotmail.com
Skype: fsunifei
-

--~--~-~--~~~---~--~~
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: GC question.

2009-09-24 Thread Mark Murphy

Actually, the OP's example is final, not static.

Final references cannot be pointed to null, as they cannot be modified.
However, they are also not static, so they should be garbage collected
once the containing object (an activity in this case) itself is garbage
collected.

 Static references remains on memory until the process where your activity
 is
 running is destroyed.

 So, in order to avoid memory leaks, point the reference to null in
 onDestroy()

 Regards,

 Felipe Silveira

 On Thu, Sep 24, 2009 at 10:58 AM, Jiri jiriheitla...@googlemail.com
 wrote:


 I have a simple question, in my ctivity i define a static private as so:

 private final FileFetcher ff = new FileFetcher();

 what happens when this activity is destroyed, is the reference to the
 FileFetcher completly gone, and can everything be marked for GC?

 Or would it better to write

 private FileFetcher ff;

 and the in my onCreate instantiate the FileFetcher and nullify it in the
 onDestroy method?


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



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Android append 2 image source files

2009-09-24 Thread Streets Of Boston

What is 'append'?

Two images stitched together? One on the right, the other on the left?
Or one above the other?
Or one merged inside the other (overlay)
What if they are of different size?

You have to be more specific about what you ask :)

On Sep 24, 4:51 am, Isuru danagalle iisuru@gmail.com wrote:
 Hi All,
      Anybody tried to append 2 jpeg files in android?
 i.e: a.jpeg and b.jpeg sd be appended and sd give one c.jpeg image file
 consist of both images.

 Any idea?

 Thanks
 Isuru
--~--~-~--~~~---~--~~
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 save a canvas to disk

2009-09-24 Thread limtc

Thanks!

I think the part that I am confused is that I never used view.draw
(canvas) code in my program so I don't know when to call it... at this
moment, says I wanted to clear a screen, this is my code in the view:

public void clearScreen() {
gradient = false;
dots.clear();
invalidate(); // this will call the onDraw and pass in the
canvas
}

so I replace invalidate() by draw(canvas)?
--~--~-~--~~~---~--~~
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] Switch case on String

2009-09-24 Thread Abhi

Can I do a switch(String), case (compare with other string) and how?

I am trying to compare string results and perform actions...

Thanks,

Abhi
--~--~-~--~~~---~--~~
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 suggest Dev.android guide updates

2009-09-24 Thread Smelly Eddie

I have noticed a few minor things in the devguide that could be
updated, debugging and android device on Jaunty Jackalope for
instance.  Is there a manner to submit recommendations to these pages?
--~--~-~--~~~---~--~~
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 add external static libraries to Android.mk?

2009-09-24 Thread mmj

Hi,

I have a few pre-compiled static libraries,*.a files.How to add them
in Android.mk file?Finally i have to get a .so file .
Here is the Android.mk file I am having:

**
LOCAL_PATH:= $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE := abc
LOCAL_SRC_FILES := display.c
include $(BUILD_STATIC_LIBRARY)


include $(CLEAR_VARS)
LOCAL_PREBUILT_LIBS := lib1.a lib2.a lib3.a
include $(BUILD_MULTI_PREBUILT)


include $(CLEAR_VARS)
LOCAL_MODULE :=pqr
LOCAL_SRC_FILES := pqr_jni.c
LOCAL_STATIC_LIBRARIES = libabc lib1 lib2 lib3
include $(BUILD_SHARED_LIBRARY)
**
But i get error like:
make: *** No rule to make target `out/apps/app_name/android-1-5-arm/
lib1', needed by `out/apps/app_name/android-1-5-arm/pqr.so'. Stop

What changes should i make in Android.mk?
Please respond.

Thanks in advance.

--~--~-~--~~~---~--~~
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: Keystore tampered with or password incorrect

2009-09-24 Thread CaseyB

I had the same problem.  It happened right around the time I updated
to the 1.5 SDK.  I also updated Java around the same time.  I don't
know if either of those had anything to do with it but something
happened.  I tried for a day or so to figure out how to salvage the
keystore but ended up just deleting it and creating a new one.  This
lead to big problems when updating apps in the Android Market.  It
won't let you upload an update that has been signed with a different
certificate.  That's what I'm dealing with now.

On Sep 23, 9:40 pm, rde8026 rde8...@gmail.com wrote:
 Hello,

 I'm having an issue with my keystore.  i crated it a while back and
 now I want to provide an update.  I know I'm providing the correct
 password but I keep getting the error  message that says the keystore
 has been tampered with or the password is incorrect...  Is it possible
 to generate a new keystore?  Has anyone else seen this issue?  Is
 there a way I can fix thisany guidance would be awesome..
--~--~-~--~~~---~--~~
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 suggest Dev.android guide updates

2009-09-24 Thread Mark Murphy

 I have noticed a few minor things in the devguide that could be
 updated, debugging and android device on Jaunty Jackalope for
 instance.  Is there a manner to submit recommendations to these pages?

Just filing an issue at http://b.android.com.

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



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] 关于eclipse和A DT的问题

2009-09-24 Thread ms99 ster
各位:

今天解压了eclipse以后添加ADT0.9.1,结果却不能用,创建project的菜单里边不能创建android的project,只好又找到0.8.0的也放了进去才可以。
   还有,performance-- android众SDK
Location选择android-sdk-windows-1.5_r3提示Could not find D:\Program
Files\ec...dk-windows-1.5_r3\tools\aapt.exe!
  是不是ADT和SDK升级时候都必须有老的版本才行?



Thanks Muchly

--~--~-~--~~~---~--~~
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 use hardware acceleration in OpenGL ES

2009-09-24 Thread CaseyB

If I use the line

mView.getHolder().setType(SurfaceHolder.SURFACE_TYPE_HARDWARE);

It just shows a black screen!  The only type that seems to work is the
GPU type and it's pretty slow.

On Sep 24, 3:15 am, String sterling.ud...@googlemail.com wrote:
 Take a look at this thread:

 http://groups.google.com/group/android-developers/browse_thread/threa...

 First, it gives some baseline FPS results from the APIDemos which you
 can use for comparison.

 Second, it mentions some specific issues (and a solution) which may be
 applicable to you.

 String

 On Sep 24, 5:09 am, LemonDev lem...@gmail.com wrote:

  i have download your demo, and run at approximate 14FPS.

  as methioned in you posts 
  at(http://www.javagaming.org/index.php/topic,20910.0.html
  )  , there is someone run you demo on Hero at 60 FPS ?

  maybe i should borrow the phone and verify the result, if it is real ,
  i have to contact HuaWei.

  On 9月24日, 上午11时00分, CraigsRace craig...@gmail.com wrote:

   It sounds like the HuaWei has the same problem as the Samsung,
   however, I am no hardware expert.  You'd need to contact HuaWei and
   ask them why it returns the Android PixelFlinger instead of the GPU
   when requesting the GL Renderer.  Or maybe someone from Google has
   some insite into this?

   On Sep 24, 12:15 pm, LemonDev lem...@gmail.com wrote:

no, not samsung, but a device from T-Mobile manufactured by HuaWei .

Log.v(, gl.glGetString(GL10.GL_RENDERER));
i get Android  PixelFlinger  1.0 which is the same as emulator and
also same as
your samsung i7500 . that is the problem.

this.getHolder().setType(SurfaceHolder.SURFACE_TYPE_HARDWARE);
this call does a help to render faster a bit . from 10 to 14 FPS .

On 9月23日, 下午5时32分, CraigsRace craig...@gmail.com wrote:

 I've heard the Samsung i7500 has a bug where it doesn't use the GPU.
 Is that the phone you are using?

 It is discussed 
 here:http://www.javagaming.org/index.php/topic,20910.0.html

 In short, if you call Log.v(, gl.glGetString(GL10.GL_RENDERER));

 On the HTC phones, it says Q3Dimension MSM7500 01.02.08 0 4.0.0,
 while on the Samsung (and Android Emulator) it says Android
 PixelFlinger 1.0.

 On Sep 23, 6:58 pm, LemonDev lem...@gmail.com wrote:

  i draw a cube with two sides textured(320*430 png) and let it rotate
  between the two sides, but it's sad to get a 16 FPS on emulator and 
  9
  FPS on the real phone. i don't known whether i have used the 
  hardware
  acceleration on my phone.
so i tried many parameters in OpenGLES ,finally i found i can set 
  a
  value in my CubeView(inherit from GLSurfaceView )'s constructor ,

   public CubeView(Context context)
   {
 super(context);

 this.getHolder().setType(SurfaceHolder.SURFACE_TYPE_HARDWARE);  
  //
  here is the crucial line

 mRender = new CubeRender(this);
 this.setRenderer(mRender);
   }

  setType with the value SURFACE_TYPE_HARDWARE  can improve the OpenGL
  rendering speed, and i get a rate of  14FPS on real phone, but has 
  no
  effect on emulator( i guess emulator didn't use hardware to render)

  but the 14FPS also is  not  enough for me , 18 -- 20 may be
  acceptable . the qualcomm demo neocore can render  a complex arena 
  on
  25-27 FPS in my phone.

  so what's the problem with me, is there another ways to use the
  hardware acceleration in OpenGL ES .

  my phone has a cell of qualcomm MSM7201A with a hardware 
  acceleration.- 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] Get Telephony Country code

2009-09-24 Thread rollbak

Hello,

I need to retrieve country info from the device.
And i found the following methods to retrieve that info:

android.telephony.TelephonyManager.getNetworkCountryIso()
android.telephony.TelephonyManager.getSimCountryIso()

I need to know if this ISO refers to: ISO 3166-1 alfa-2 country code
specification or what other ISO is using.

Also what's the difference between those to functions?

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: IME Preference in LocaleText

2009-09-24 Thread Dianne Hackborn
You need to specify the settings activity in your meta-data.  You can look
at the LatinIME code as an example.

2009/9/24 Bahadır Yağan bahadir.ya...@gmail.com

 Thanks, I have already done that. And I can see a menu item to enable my
 IME, it works fine. What I was trying to ask is how to add another menu item
 below it to show Keyboard Preferences (I have already implemented my
 preference screens, and I can launch it from the keyboard itself)

 Please see attached screenshot. (Turkish Keyboard) The keyboards in the
 emulator have this feature.


 On Wed, Sep 23, 2009 at 10:02 PM, Dianne Hackborn hack...@android.comwrote:

 Just write your own IME:


 http://developer.android.com/reference/android/inputmethodservice/InputMethodService.html

 There is a sample code for one included in the SDK, and I am pretty sure
 there some developers have put up on market.

 2009/9/23 Bahadır Yağan bahadir.ya...@gmail.com

 Hello All,

 Is there a way to add my IME Preferences to the LocaleText menu, just
 like the Latin and Pinyin IME's. Or is this restricted to the keyboards that
 ship with the platform?

 Many thanks

 --
 Bahadır Yağan





 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.






 --
 Bahadır Yağan

 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: IME Preference in LocaleText

2009-09-24 Thread Dianne Hackborn
Or the doc is here:

http://developer.android.com/reference/android/R.styleable.html#InputMethod

On Thu, Sep 24, 2009 at 9:15 AM, Dianne Hackborn hack...@android.comwrote:

 You need to specify the settings activity in your meta-data.  You can look
 at the LatinIME code as an example.

 2009/9/24 Bahadır Yağan bahadir.ya...@gmail.com

 Thanks, I have already done that. And I can see a menu item to enable my
 IME, it works fine. What I was trying to ask is how to add another menu item
 below it to show Keyboard Preferences (I have already implemented my
 preference screens, and I can launch it from the keyboard itself)

 Please see attached screenshot. (Turkish Keyboard) The keyboards in the
 emulator have this feature.


 On Wed, Sep 23, 2009 at 10:02 PM, Dianne Hackborn hack...@android.comwrote:

 Just write your own IME:


 http://developer.android.com/reference/android/inputmethodservice/InputMethodService.html

 There is a sample code for one included in the SDK, and I am pretty sure
 there some developers have put up on market.

 2009/9/23 Bahadır Yağan bahadir.ya...@gmail.com

 Hello All,

 Is there a way to add my IME Preferences to the LocaleText menu, just
 like the Latin and Pinyin IME's. Or is this restricted to the keyboards 
 that
 ship with the platform?

 Many thanks

 --
 Bahadır Yağan





 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.






 --
 Bahadır Yağan

 



 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Get active context dynamically of an application

2009-09-24 Thread Dianne Hackborn
There is no such concept as an active context.  You need to explicitly pass
the context you want to use to where you want it used.

On Thu, Sep 24, 2009 at 12:53 AM, Atif Gulzar atif.gul...@gmail.com wrote:


 bump. Thanks :)

 --
 Best Regards,
 Atif Gulzar

 I  Unicode, ɹɐzlnƃ ɟıʇɐ



 On Fri, Sep 11, 2009 at 3:09 PM, Atif Gulzar atif.gul...@gmail.comwrote:

 Hi,

 How can get the active context of an application?

 The scenario is, I have an AsyncTask inside an activity_A. And on
 successful completion (means in onPostExecute) of this AsyncTask I want to
 show a dialog

 (AlertDialog.Builder builder = new AlertDialog.Builder(*Activity_A.this*);)



 But in the meanwhile(before completing this AsyncTask) if the application
 is moved to another activity_B. The above dialog context will not be the
 current Context so it will through an Exception.


 So is it possible to get the active Context dianamically? Thanks



 --
 Best Regards,
 Atif Gulzar

 I  Unicode, ɹɐzlnƃ ɟıʇɐ



 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



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

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

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

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


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

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



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to force soft keyboard to be visible?

2009-09-24 Thread Dianne Hackborn
How about no time to get into long involved discussions.

On Wed, Sep 23, 2009 at 11:51 AM, Mike Collins mike.d.coll...@gmail.comwrote:



 Should I take the lack of reply as not an interesting question,
 no idea or we're checking/thinking?

 I would like to have some ammunition when I go up against my
 QA people to explain this uncontrolled behavior.

 tia,
  mike

 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: AsyncTask doesn't work with WebView (was Re: long-running loadUrl() JavaScript with a callback)

2009-09-24 Thread Miguel Paraz

I figured this out - I violated the The task instance must be created
on the UI thread rule stated in the Reference.

On Sep 22, 8:47 pm, Miguel Paraz mpa...@gmail.com wrote:
 On Sep 21, 6:11 pm, Mark Murphy mmur...@commonsware.com wrote:

   I made an example that sleeps inside the Runnable. The entire WebView
   becomes unresponsive! What is the proper way (if any) of implementing
   a long-running JavaScript call?

  Everything is fine except for sleeping in the Runnable. The Runnable is
  run on the UI thread -- sleeping on the UI thread, like sleeping on the
  job, is not a good idea.

  If you want something that will run for a long time, use a background
  thread, perhaps in the form of an AsyncTask.

 Thanks for the tip. I forgot that the Handler executes Runnables on
 the UI thread. I thought instead that it was like an Executor.

   Is it safe to call loadUrl() from multiple threads?

  I have not tried it, but I doubt it. If you use AsyncTask, do your
  loadUrl() in onPostExecute().

 I found that loadUrl() is not safe to be called using AsyncTask.
 onPostExecute() is not called by the main thread, but by
 WebViewCoreThread.
 This breaks if a text box is in use, which needs to run in main.

 The solution is to manually use a Handler.

 09-22 20:01:19.943: ERROR/AndroidRuntime(768): Uncaught handler:
 thread WebViewCoreThread exiting due to uncaught exception
 09-22 20:01:20.113: ERROR/AndroidRuntime(768): android.view.ViewRoot
 $CalledFromWrongThreadException: Only the original thread that created
 a view hierarchy can touch its views.
 09-22 20:01:20.113: ERROR/AndroidRuntime(768):     at
 android.view.ViewRoot.checkThread(ViewRoot.java:2440)
 09-22 20:01:20.113: ERROR/AndroidRuntime(768):     at
 android.view.ViewRoot.invalidateChild(ViewRoot.java:522)
 09-22 20:01:20.113: ERROR/AndroidRuntime(768):     at
 android.view.ViewRoot.invalidateChildInParent(ViewRoot.java:540)
 09-22 20:01:20.113: ERROR/AndroidRuntime(768):     at
 android.view.ViewGroup.invalidateChild(ViewGroup.java:2332)
 09-22 20:01:20.113: ERROR/AndroidRuntime(768):     at
 android.view.View.invalidate(View.java:4437)
 09-22 20:01:20.113: ERROR/AndroidRuntime(768):     at
 android.view.View.onFocusChanged(View.java:2428)
 09-22 20:01:20.113: ERROR/AndroidRuntime(768):     at
 android.widget.TextView.onFocusChanged(TextView.java:6211)
 09-22 20:01:20.113: ERROR/AndroidRuntime(768):     at
 android.widget.AutoCompleteTextView.onFocusChanged
 (AutoCompleteTextView.java:767)
 09-22 20:01:20.113: ERROR/AndroidRuntime(768):     at
 android.view.View.clearFocusForRemoval(View.java:2346)
 09-22 20:01:20.113: ERROR/AndroidRuntime(768):     at
 android.view.ViewGroup.removeViewInternal(ViewGroup.java:2034)
 09-22 20:01:20.113: ERROR/AndroidRuntime(768):     at
 android.view.ViewGroup.removeViewInternal(ViewGroup.java:2027)
 09-22 20:01:20.113: ERROR/AndroidRuntime(768):     at
 android.view.ViewGroup.removeView(ViewGroup.java:1975)
 09-22 20:01:20.113: ERROR/AndroidRuntime(768):     at
 android.webkit.TextDialog.remove(TextDialog.java:395)
 09-22 20:01:20.113: ERROR/AndroidRuntime(768):     at
 android.webkit.WebView.clearTextEntry(WebView.java:1374)
 09-22 20:01:20.113: ERROR/AndroidRuntime(768):     at
 android.webkit.WebView.loadUrl(WebView.java:1116)
--~--~-~--~~~---~--~~
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 update expandable view when adapter's data changed

2009-09-24 Thread lunatic


 1. What can I do to replace empty view with list view?

Ok, I've realized, that it is needed to requery cursor before calling
notifyDataSetChanged method of adapter.
--~--~-~--~~~---~--~~
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: Sampling data from the internal Mic, and from a headset Mic.

2009-09-24 Thread Julian Bunn

This turned out to be a non-problem. The audio data stream comes from
the headset Mic just
fine. What confused me was the relative levels between the two.


On Sep 23, 10:42 am, Julian Bunn jjb...@gmail.com wrote:
 My app takes audio samples from the Mic, and processes them. The app
 works fine with the internal Mic, but as soon as I plug in a headset,
 I seem to lose the Mic signal: I still receive data, but it is quiet.

 The headset is functioning correctly, because it works fine for e.g.
 phone calls. This suggests to me that my app is not doing something it
 should :-)

 I'm wondering if I need to do something in my code to change from
 receiving samples from the internal Mic to receiving them from the
 headset - but it seems a bit far-fetched.

 This is with Cupcake 1.5 on an ADP1, radio 2.22.19.26I

 I'd be most grateful for any advice/suggestions.

 Thanks,
 Julian
--~--~-~--~~~---~--~~
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: Switch case on String

2009-09-24 Thread Felipe Silveira
No, you can't.

In Java we don't have switch with Strings.

Regards,

Felipe Silveira

On Thu, Sep 24, 2009 at 11:56 AM, Abhi abhishek.r.sha...@gmail.com wrote:


 Can I do a switch(String), case (compare with other string) and how?

 I am trying to compare string results and perform actions...

 Thanks,

 Abhi
 



-- 
Felipe Silveira
Engenharia da Computação
Universidade Federal de Itajubá
http://www.felipesilveira.com.br
MSN: felipeuni...@hotmail.com
Skype: fsunifei
-

--~--~-~--~~~---~--~~
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 get back result of the Activity (setResult) in a test?

2009-09-24 Thread Gabor

Hi,

I would like to verify the result of the Activity (setResult) if it is
the expected one or not.(or maybe to check the returned bundle)

in the Activity I have the following lines:
setResult(RESULT_OK);
finish();

I would like to test this Activity. (using for example
ActivityInstrumentationTestCase)
How can I get back the result in the test?

Thanks in advance.

Gabor
--~--~-~--~~~---~--~~
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: Soft Keyboard

2009-09-24 Thread Eric Carman



Perhaps my previous question was not clear, so let me see if I can
boil it down to something simple.

Given:
- an Android device running 1.5
- No physical keyboard

Question:
- How does the user force the soft keyboard to display?
- Does long-press menu do this?

- What other conditions have to be true for this to work?
  - Settings | Locale  Data | Keyboard [Checked]?
  - Something else?

Best Regards,
Eric
--~--~-~--~~~---~--~~
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: IME Preference in LocaleText

2009-09-24 Thread Bahadır Yağan
Oh thats great. So it is in method.xml, not in androidmanfiest.

Thanks a lot.

On Thu, Sep 24, 2009 at 7:16 PM, Dianne Hackborn hack...@android.comwrote:

 Or the doc is here:

 http://developer.android.com/reference/android/R.styleable.html#InputMethod


 On Thu, Sep 24, 2009 at 9:15 AM, Dianne Hackborn hack...@android.comwrote:

 You need to specify the settings activity in your meta-data.  You can look
 at the LatinIME code as an example.

 2009/9/24 Bahadır Yağan bahadir.ya...@gmail.com

 Thanks, I have already done that. And I can see a menu item to enable my
 IME, it works fine. What I was trying to ask is how to add another menu item
 below it to show Keyboard Preferences (I have already implemented my
 preference screens, and I can launch it from the keyboard itself)

 Please see attached screenshot. (Turkish Keyboard) The keyboards in the
 emulator have this feature.


 On Wed, Sep 23, 2009 at 10:02 PM, Dianne Hackborn 
 hack...@android.comwrote:

 Just write your own IME:


 http://developer.android.com/reference/android/inputmethodservice/InputMethodService.html

 There is a sample code for one included in the SDK, and I am pretty sure
 there some developers have put up on market.

 2009/9/23 Bahadır Yağan bahadir.ya...@gmail.com

 Hello All,

 Is there a way to add my IME Preferences to the LocaleText menu,
 just like the Latin and Pinyin IME's. Or is this restricted to the 
 keyboards
 that ship with the platform?

 Many thanks

 --
 Bahadır Yağan





 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.






 --
 Bahadır Yağan





 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.




 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.


 



-- 
Bahadır Yağan

--~--~-~--~~~---~--~~
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: Switch case on String

2009-09-24 Thread Abhi

Ok. Thanks Felipe. I just figured that out.

Regards,

Abhi

On Sep 24, 12:47 pm, Felipe Silveira webfel...@gmail.com wrote:
 No, you can't.

 In Java we don't have switch with Strings.

 Regards,

 Felipe Silveira

 On Thu, Sep 24, 2009 at 11:56 AM, Abhi abhishek.r.sha...@gmail.com wrote:

  Can I do a switch(String), case (compare with other string) and how?

  I am trying to compare string results and perform actions...

  Thanks,

  Abhi

 --
 Felipe Silveira
 Engenharia da Computação
 Universidade Federal de Itajubáhttp://www.felipesilveira.com.br
 MSN: felipeuni...@hotmail.com
 Skype: fsunifei
 -
--~--~-~--~~~---~--~~
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: Soft Keyboard

2009-09-24 Thread Chris Stratton

On Sep 24, 1:03 pm, Eric Carman ewcarma...@gmail.com wrote:

 Question:
 - How does the user force the soft keyboard to display?
 - Does long-press menu do this?

Usually, however some means of catching key events will break this.

I agree with you that not having an emulator which behaves the same
way as the phone is exasperating - and in my case, I'm comparing the
emulator to the a physical (sapphire) phone in my hand, so I do have
recourse for testing at this stage, but suspect my conclusions will be
rendered totally invalid by the flood of 18 devices due by year end.
--~--~-~--~~~---~--~~
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: Soft Keyboard

2009-09-24 Thread Dianne Hackborn
Long press menu forces the keyboard to be displayed, as long as the app
doesn't completely consume that key event, and there is a keyboard selected
and it allows this (the default behavior is to allow it).
On Thu, Sep 24, 2009 at 10:03 AM, Eric Carman ewcarma...@gmail.com wrote:




 Perhaps my previous question was not clear, so let me see if I can
 boil it down to something simple.

 Given:
 - an Android device running 1.5
 - No physical keyboard

 Question:
 - How does the user force the soft keyboard to display?
 - Does long-press menu do this?

 - What other conditions have to be true for this to work?
  - Settings | Locale  Data | Keyboard [Checked]?
  - Something else?

 Best Regards,
 Eric
 



-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Get Telephony Country code

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

Which information do you exactly need?

There are static information like

- IMEI: (15 digit unique code, first 2 digits = country code of the
approval-country) is related to your mobile device
- IMSI International Mobile Subscriber Identity: first 3 digits
represent the mobile country code (3166-1 numeric  for the country
code):
- ICC-ID: 20 digits based on International Standard ISO/IEC 7812, you
can use API getSimSerialNumber() to retrieve this information
- getSimCountryIso(): SIM provider's country code: I assume it is
3166-1 alpha-2

Dynamic information

- getNetworkCountryIso(): dynamic information: current registered
operator's MCC (Mobile Country Code). I assume it is 3166-1 alpha-2


ISO 3166-1 alpha-2 — two-letter country codes which are the most
widely used.

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


On Sep 24, 8:53 am, rollbak roll...@gmail.com wrote:
 Hello,

 I need to retrieve country info from the device.
 And i found the following methods to retrieve that info:

     android.telephony.TelephonyManager.getNetworkCountryIso()
     android.telephony.TelephonyManager.getSimCountryIso()

 I need to know if this ISO refers to: ISO 3166-1 alfa-2 country code
 specification or what other ISO is using.

 Also what's the difference between those to functions?

 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] Extending a view class

2009-09-24 Thread jdekeij

Hoi

I try to create my custom view inside a linearlayout. For example

View  android:id=@+id/ViewPaint
class=com.example.android.helloactivity.HelloActivity$DrawingView/

In the java source I created a DrawingView class which extends View.
Unfortunatly it does not get instantiated. I tried to overwrite the
ondraw() but without success :-(

Help is very much appreciated.
Jasper

Java Code
   public static class DrawingView extends View
{
private final Paint mPaint;
/*
 * Constructor that is called when inflating a view from XML.
 */
DrawingView(Context context, AttributeSet attrs){
super(context,attrs);

mPaint = new Paint();
mPaint.setAntiAlias(true);
mPaint.setARGB(255, 255, 255, 255);
}

@Override
protected void onDraw(Canvas canvas) {
float yPos;
float xPos;
int   xOffset = 20;
int   yOffset = 50;
int   cxScreen = canvas.getWidth();
int   cyScreen = canvas.getHeight();
int   cx = cxScreen - (2*xOffset);
int   cy = cyScreen - (2*yOffset);
int   cxStepSize = cx/10 - 1;
int   cyStepSize = cy/10 - 1;

// Makes the complete screen white!
//canvas.drawColor(0x);
yPos = (float)yOffset;
xPos = (float)xOffset;
for (int i=0; i = 10; i++)
{   // xstart, ystrt,xend,yend
canvas.drawLine((float)xOffset, yPos, (float)cx, (float)
yPos, mPaint);
yPos += cyStepSize;
}
for (int i=0; i = 10; i++)
{   // xstart, ystrt,xend,yend

canvas.drawLine((float)xPos, (float)yOffset, (float)xPos,
(float)cy, mPaint);
xPos += cxStepSize;
}
}
}

XML:
LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:orientation=vertical
android:padding=10dip
android:layout_width=fill_parent
android:layout_height=wrap_content

TextView
android:layout_width=fill_parent
android:layout_height=wrap_content
android:layout_marginTop=10dip
android:text=Please select a planet:
/

Spinner
android:id=@+id/spinner
android:layout_width=fill_parent
android:layout_height=wrap_content
android:drawSelectorOnTop=true
android:prompt=@string/planet_prompt
/
 TextView android:id=@+id/dateDisplay
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=No date yet/

   Button android:id=@+id/pickDate
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=Change the date/

TextView android:id=@+id/timeDisplay
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=No time yet/

Button android:id=@+id/pickTime
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=Verander the time/

View  android:id=@+id/ViewPaint
class=com.example.android.helloactivity.HelloActivity$DrawingView/
/LinearLayout

--~--~-~--~~~---~--~~
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: SDK 1.6, ADT 0.9.3, Eclipse 3.4.2: Problem with Android Editors

2009-09-24 Thread Josch

Hi,
that has nothing to do with Android, but with the XML editor in
eclipse latest release. I have the exact same situation, after
updating yesterday. Some JSF is causing this :-(
I dont have a fix yet :-(


--~--~-~--~~~---~--~~
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: Hmm... at last ADC2 is out of our way ... tell about your app and experience

2009-09-24 Thread PG1

Name: Geolover
Category: Travel
Website: http://geolover.com/android/

Geolover is an app for tourist. It can help decide which tourist
attractions worth to visit. You can build an own list which can be
viewed offline.

--~--~-~--~~~---~--~~
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] Picasa intent return code

2009-09-24 Thread Zuli

Hi,
I use the standard Picasa upload activity in my application to send
images to the user Picasa account, but everytime the Picasa activity
returns in my onActivityResult function the return code is
RESULT_CANCELED, no matter if I cancel the upload, press the back
button or correctly upload the image, always RESULT_CANCELED,
can someone confirm this?
I need to check if the user correctly started to upload the image...


//Starting the intent
Intent temp=new Intent(Intent.ACTION_SEND);
temp.setType(image/jpeg);
temp.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
temp.putExtra(Intent.EXTRA_STREAM, mImageUri);
temp.setComponent(new ComponentName
(com.google.android.apps.uploader,
com.google.android.apps.uploader.picasa.PicasaUploadActivity));
startActivityForResult(temp, PICASA_INTENT)


//onActivityResult
case PICASA_INTENT:
   //resultCode is always RESULT_CANCELED
   break;

--~--~-~--~~~---~--~~
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: SDK 1.6, ADT 0.9.3, Eclipse 3.4.2: Problem with Android Editors

2009-09-24 Thread Josch

Hi again,
try following approach,
a) install an old package
b) do not use autoupdate, but manually update the packages in steps
and test.

I could just revert to my old configuration and everything worked
again.

--~--~-~--~~~---~--~~
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: Utility class for database query

2009-09-24 Thread null
That's a good ideal.What can i do for you?I am a new one


在2009-09-24,Sudeep sudeep.neti...@gmail.com 写道:

Thanks Jefferey.
I don't want to extend the android.database.* package but  I just want
to simplify it.
The idea is to build a utility package to help developers for
easier,faster and robust programming.

On Sep 23, 7:00 pm, Jeffrey Blattman 
--~--~-~--~~~---~--~~
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: Changing application label from code

2009-09-24 Thread Gustavo Lima

Sorry Dianne but the link you provided has several samples like values-
mcc262-cs, values-mcc260, values-mcc204-de ... but none of them makes
use of MNC.

I'm having the same problem with with i18n for a specific carrier and
values-mcc724-mnc005 are not working on the real device. I have tried
several combinations like values-mcc724-mnc05, values-mcc724-mnc5,
values-mcc724-mnc005-pt and others.

Only the use of MCC alone values-mcc724 is working as expected.

thanks
Gustavo

On 22 set, 18:04, Dianne Hackborn hack...@android.com wrote:
 There are lots of examples in the framework here:

 http://android.git.kernel.org/?p=platform/frameworks/base.git;a=tree;...





 On Tue, Sep 22, 2009 at 7:43 AM, Tsu rse...@gmail.com wrote:

  Hi,

  I need to change application label based on the SIM Card carrier. I'm
  trying to work around the above by adding values folders with mcc and
  mnc information as stated on the following link.

 http://developer.android.com/guide/topics/resources/resources-i18n.ht...

  On my sample application Im adding a values folder in the following
  way values-mccxxx-mncyyy but this is also not working. Is there a
  problem in the format Im using? Is any twikis on code needed?

  Thanks a lot,
  Renato

  On 27 ago, 23:07, Dianne Hackborn hack...@android.com wrote:
   Sorry, there is currently no way to change the label dynamically.

   On Thu, Aug 27, 2009 at 11:06 AM, Taísa Cristina taisa.san...@gmail.com
  wrote:

Hi all,

I have a Service which enables/disables an application launcher
activity as follows. Can I change the application label from my code,
while enabling the application launcher?


ComponentName cName = new ComponentName(my.package.name,
my.launcher.activity);
int state = install ? PackageManager.COMPONENT_ENABLED_STATE_ENABLED
               : PackageManager.COMPONENT_ENABLED_STATE_DISABLED;
try {
       pm.setComponentEnabledSetting(cName, state,
PackageManager.DONT_KILL_APP);
} catch (Exception e) {
       Log.d(TAG, Could not change my app state);
}


Thanks,
Taísa

   --
   Dianne Hackborn
   Android framework engineer
   hack...@android.com

   Note: please don't send private questions to me, as I don't have time to
   provide private support, and so won't reply to such e-mails.  All such
   questions should be posted on public forums, where I and others can see
  and
   answer them.

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.- Ocultar texto das mensagens anteriores -

 - Mostrar texto das mensagens anteriores -

--~--~-~--~~~---~--~~
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: Trouble in Printing Unicode Male Character

2009-09-24 Thread j.hadley

On Sep 23, 6:18 am, Gopal Biyani gopalbiy...@gmail.com wrote:
 At present, I am using emulator. And I don't know how to change font from
 Droid Sans Fallback to Droid Sans.

Android automatically switches to the Droid Sans Fallback font when a
currently selected font does not contain a character found in a
string, and it sounds like that's what's happening in this case: you
have selected Droid Sans, but Droid Sans does not contain U+2642. So
Android substitutes U+2642 from Droid Sans Fallback, which does
contain this character (and many, many others). So I think everything
is working as intended.

Droid Sans Fallback is indeed a real font on the device (system/fonts/
DroidSansFallback.ttf). It contains upwards of 40,000 characters, and
was envisioned for exactly this purpose: to be able to show
*something* when a character is encountered which does not exist in
the selected font.

As to the original question: The glyph shape for U+2642 in Droid Sans
Fallback is a circle with an arrow pointing upward (12 o' clock).
This shape does vary from the typical representation of the Male sign,
which has the arrow coming from the upper-right quadrant...but I'm not
sure that the Fallback font representation is necessarily wrong. I am
not certain why it is drawn the way it is in Droid Sans Fallback, but
I will check in with the font designers for more information on that.

I am not sure whether the font fallback mechanism can be overridden,
but even if it could I don't think you'd want to, as the alternative
would be even worse: you'd simply get rectangular boxes for characters
that don't exist (as you'll get when you call for characters that
don't exist even in the Fallback font).


Josh (from Ascender Corporation, developers of the Droid fonts)
http://ascendercorp.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: Hmm... at last ADC2 is out of our way ... tell about your app and experience

2009-09-24 Thread tao1

App Name: tWakeUpCallMaker
Category: Lifestyle
URL: http://www.taosoftware.co.jp/en/android/wakeupcallmaker/
Description:
--
tWakeUpCallMaker is an alarm clock creator application.

Let's present an alarm clock with your original ringtone to your
friends!
Let's wake up feeling refreshed with your child's or wife's voice!

tWakeUpCallMaker is new software that can create an android
application on your android phone only.

You don't need PC and software development skills.
You simply entering name and recording alarm ringtone to complete one
and only original alarm clock in the world.

Of course! Your original alarm clock is freely distributable.
--

Best Regards
Taosoftware
http://www.taosoftware.co.jp/en/android/

On 9月1日, 午後11:41, Lout lout.r...@googlemail.com wrote:
 While you developers relax... would you mind sharing what apps to
 expect through this challenge.. and anything else you wish to share
 about ADC2 submissions... well anything including the fact: 'thank
 God, no more sleep less nights'!

 Am collecting information about the challenge (ADC2) for a news
 article as am with cnet (and AP). Pitch your app if you have already
 published or would soon publish on the market too.

 Your app name and description, web link if any, experience with
 ADC2, ... anything would be useful for our article(s).

 And do you feel that there would have been more submissions than in
 ADC1?
 Is the competition going to be tougher or less profound as you were
 allowed to put up apps not published before 1st Aug only?

 Do you think that all apps that didn't try for ADC1 should have had a
 chance?

 Congratulations on your submissions while you wait for the next
 phase.
 Thanks,
 Lout Reilly
 ps: Moderators we request you to let this through so that you too get
 some feedback.

--~--~-~--~~~---~--~~
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] Having multiple gridviews in a activity

2009-09-24 Thread pavan

hi guys,

I am tyring to get many gridview of images in an activity. The problem
is i will get scrollbar for each such gridview. So is there anyway i
can get a single scrollbar for entire activity and still smoothly
scroll from one gridview to another (with some demarcation between 2
grids ).

I tried having gridviews inside a ScrollView but there is that same
problem.
do i need to create customview or something..??

Thanks in advance

--~--~-~--~~~---~--~~
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] SMS Database with new Hero ROM

2009-09-24 Thread Markus

Hello

I've developed an sms application. With the new Hero rom, the app
doesen't work anymore. It seems as if the database has changed.

I use the following approach to get the data I need:

private String[] mProjection = new String[]
{thread_id,address,body,read,date,m_type,type};
private Uri mUri = Uri.parse(content://mms-sms/conversations);

Cursor smsCursor= context.getContentResolver().query
(mUri,mProjection,null, null,DATE DESC);

This code now suddenly crashes on HTC Hero phones, complaining about
missing tables (thread_id for instance).


How can I fix this? Where do I get additional information about new
db design? And more generally: How in gods name am I supposed to
handle different behaviour on different phones when I develop my apps
on the standard SDK???

--~--~-~--~~~---~--~~
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] About tab icon

2009-09-24 Thread setomits

I have a question about a tab icon.

According to TabHost.TabSpec
  
http://developer.android.com/intl/ja/reference/android/widget/TabHost.TabSpec.html
I can set only one icon for each tab with setIndicator(), but also
according to Icon Design Guidelines
  
http://developer.android.com/intl/ja/guide/practices/ui_guidelines/icon_design.html#tabstructure
tab icon have two states.  Can PNG image have two states?

--~--~-~--~~~---~--~~
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] Traceview: Error previous time!

2009-09-24 Thread alex-unstable

Hi all!
I'm working with an OpenGL ES app in Android, but when I want to use
traceview to profile my code, I always obtain the following error:

ThreadData: 'android/XX/XX' call time () is less than previous
time (xxx) for thread '[3] main'

I've tried to call Debug.startMethodTracing() and stopMethodTracing()
in different places of my code but it never works, anyone can help?

Thank you in advance

--~--~-~--~~~---~--~~
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] ADT pluging for MyEclipse

2009-09-24 Thread rajveerg
Hi all,

Iam working on MyEclipse 6.0
can any one suggest me how can i set ADT plugin for MyEclipse 6.0

Thanks in Advance
-- 
RajveerG
Heritage America
http://bujjiaward.blogspot.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] Activity be destroyed after press home key.

2009-09-24 Thread play_net

My manifest:
activity android:label=@string/app_name android:name=MainUI
android:screenOrientation=landscape
android:configChanges=orientation|keyboardHidden
android:launchMode=singleTask
intent-filter
action android:name=android.intent.action.MAIN /
category
android:name=android.intent.category.LAUNCHER /
/intent-filter
/activity

activity android:label=@string/settings_label
android:name=.view.Settings  android:screenOrientation=landscape
android:configChanges=orientation|keyboardHidden
/activity

I launch my app through program' icon, and then I open settings
activity(startActivityForResult(intent, SETTINGS);). At this time I
press Home key and re-launch my app through program's icon, the
settings activity will run OnDestroy() and settings activity is
closed. Why the settings is destroyed and how can I make the settings
activity still exist when users come back.

Thanks for your 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
-~--~~~~--~~--~--~---



[android-developers] canvas.drawbitmap antialiasing

2009-09-24 Thread Blackpool

Hi There,

I have a problem. I'm using a canvas to layer bitmaps on top of each
other. I am doing a clock where I first draw the face using
canvas.drawbitmap then I place the hands using canvas.rotate and
canvas.drawbitmap. I use a Paint with anialiasing set but the hands
are very jagged as soon as they begin to rotate. Changing the
antialiasing flag makes no difference.
Any ideas what I could be doing wrong?

BR

--~--~-~--~~~---~--~~
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: Flash for android

2009-09-24 Thread James Slater
I have a T-Mobile G2 Touch, which is the same thing. Flash works on some
sites, but not others. Ironically, when you go to Adobe's site promoting
Flash on the HTC Hero, the Flash video doesn't work on that site (at least
for me).

-- 
James Slater

--~--~-~--~~~---~--~~
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] Is it necessary to introduce an Object Pool for our application

2009-09-24 Thread Larry.Liu

Hi,

General speaking, is it necessary to introduce an Object Pool for
common sense android applications?

It would be better of course, but will there be any chance for common
use applications to become unstable or cause memory leakage because of
too many object creation?

Let's have a discussion about this topic.

Thanks.

Regards

Larry/Xiangqian.liu

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