[android-developers] Re: In Map displaying a button inside InfoWindow

2010-03-21 Thread Nithin
Hi,

I want to display a button in infowindow and when clicking on the
button, it has to do some action.

any idea please..

Nithin

On Mar 19, 7:15 pm, Nithin nithin.war...@gmail.com wrote:
 Hi,

 InMap, I am drawing ainfoWindow(Round Rect) showing some data inside
 it. Can I insert a button inside theinfoWindow

 Nithin

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] How the implicit Intent works.

2010-03-21 Thread chetan
Hi All,
 Can somebody help me to understand the implicit intents by
example.

Thanks
Chetan

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: App not visible in Australia

2010-03-21 Thread brucko
String,

Its right about Optus. They will not support Android Market and at one
stage were talking of their own app store. Also drawn into this are
the vitrual carriers TPG (which I am on), Virgin Mobile and Dodo ( I
think). There is a forum on the problem at Whirlpool

http://forums.whirlpool.net.au/forum-replies.cfm?t=1248135p=5

Which mostly is a bit of a frustrated whinge at Google and anyone in
general before people realised Optus was not coming to the table. They
have launched their own app store

http://appstore.optusbusiness.com.au


On Mar 20, 8:20 pm, String sterling.ud...@googlemail.com wrote:

 IMHO, Google should just keep the 30% in this case. That'd give the
 carrier a clear incentive to get their act together. But nobody asks
 me. :^)

Couldn't agree more

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: SOLVED - Eclipse problem with Project contains errors and nothing is obviously wrong

2010-03-21 Thread raqz
Hi...even I have seen this error so I keep on deleting the code and
readding the same :)
it works!

On Mar 21, 12:02 am, Stephen Lebed srle...@gmail.com wrote:
 I haven't seen this mentioned anywhere so I'm posting it here if other
 people come across this issue.

 Somethings I'll have an ?.xml file selected when I compile a project,
 only to have a ?.out.xml generated.  Deleting the file doesn't clear
 the error, and Eclipse won't compile the project.  It just reports
 that your project contains errors.

 The solution is to go to Project/Clean.  This will clear the error in
 the project and allow it to compile.

 I hope this is helpful to someone.  It may have been obvious, but not
 to me.

 Best,
 Stephen Lebed

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] cannot see my own paid app on the market place?

2010-03-21 Thread rukiman
I have uploaded my paid app Legion and I can see that I am making
sales but why is this app not visible on my phone? I can see other
paid and free apps. The android platform of my Samsung Galaxy phone is
1.5 and here is part of my manifest:

uses-sdk android:minSdkVersion=3 android:targetSdkVersion=4 /
supports-screen anyDensity=true android:smallScreens=false
android:normalScreens=true android:largeScreens=true /
uses-permission android:name=android.permission.INTERNET /
uses-permission android:name=android.permission.READ_PHONE_STATE /


the app was built against the android 1.6 target as described on the
android developer's website. The app must be visible on some phones as
I am getting some sales. I also asked a friend in the US who has an
android phone and same deal, he cannot find it on the android market
app.

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Installing Eclipse Galileo (cocoa x86_64) and setting up Android ADT on OS X v10.6 Snow Leopard

2010-03-21 Thread Samuh
Hi,

I am trying to install Eclipse Galileo on my MacBook running OS X
v10.6 (Snow Leopard) and set it up with ADT plugin. I manually
downloaded 64-bit cocoa version of Eclipse Galileo for JEE
developers and ADT v0.9.6 from the respective offical sites. I
unzipped/untarred Eclipse on my mac at: /username/dev/ folder. Now
when I try to add this new plugin-archive in Eclipse, I get the
following error:

Cannot complete the install because one or more required items could
not be found missing requirement: ADT requires
'org.eclipse.wst.sse.core 0.0.0' but it could not be found

AFAIK, one gets this error when a required Eclipse-plugin is missing.
I checked the official site and saw that wst-plugin is actually
bundled with Eclipse for J2EE developers download package. Not sure
what I am missing here.

Note: My macbook is not connected to the internet so adding resource
URLs to the Available Software sites section wouldn't help. I would
have to download anything required on my PC and then copy it onto my
mac

Please help. 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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] How can I do it?

2010-03-21 Thread ReyLith
Hi!

I am developing an image editor for Android OS. I want to resize the
image and I know how can I do it. The problem is the way I want to do
it. I want two scrools in the screen representing the horizontal and
vertical size and initiality located in the middle of the scrools. If
I move any of them back, the image will become smaller in that
direction and if I move any of them forward the image will become high
in that direction. Is it possible?

Thank you very much. A greeting.

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Regarding CTS

2010-03-21 Thread navin kumar
Hi umang,

Thanks for the reply. I just got it working . I dont know what was wrong for
the first time. I just restarted my system and it worked flawlessly. Thanks
again.

Regards,
Navin.

On Thu, Mar 18, 2010 at 11:26 AM, Uander uandro...@gmail.com wrote:

 Navin ,

 Here is my explanation :

 . build/envsetup.sh

 It just setup environments for your Android  compilation , like on which arch 
 / host you are compiling and

 whats the target , which version of android file system you have .



 lunch 1
 Its shows you are compiling android for arm target , a generic build for 
 emulator .It printouts :
 PLATFORM_VERSION_CODENAME=Eclair

 PLATFORM_VERSION=Eclair
 TARGET_PRODUCT=generic
 TARGET_BUILD_VARIANT=eng
 TARGET_SIMULATOR=false
 TARGET_BUILD_TYPE=release
 TARGET_ARCH=arm
 HOST_ARCH=x86
 HOST_OS=linux
 HOST_BUILD_TYPE=release
 BUILD_ID=ECLAIR


 you can get into detail by looking into  $(BUILD_SYSTEM)/product_config.mk  
 and
 BUILD_SYSTEM)/version_defaults.mk  and envsetup.mk file .


 make cts .
 This will compile your cts code .
 make sure you have build/core/tasks/cts.mk  ( A make file for cts compilation 
 . )



 Where you are breaking actually ? Elaborate your error here .


 Thanks :
 Uander





 On Thu, Mar 18, 2010 at 11:11 AM, Uander uandro...@gmail.com wrote:

 Lets discuss it on groups so that others can  get benefits of it .

 - Umang

 -- Forwarded message --
 From: navin kumar celebna...@gmail.com
 Date: Wed, Mar 17, 2010 at 4:03 PM
 Subject: Regarding CTS
 To: uandro...@gmail.com


 Hi Umang,

 I saw your post on android developers site. It will be great if you could
 help me. I learnt from your posts that you have build and compiled CTS. I am
 stuck at that.

 You have mentioned the command

 . build/envsetup.sh; lunch 1; make cts

 the shell script runs but after that the two commands just dont. and there
 is no make file for CTS. Plzz tell me how to overcome this , so that i can
 build and compile cts.

 Looking forward for an early reply.

 Thanks and regards.
 Navin.




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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: CTS APK'S QUERIES

2010-03-21 Thread navin
Thanks Umang for the reply.  I just got it working . I dont know what
was wrong for the first time. I just restarted my system and it worked
flawlessly. Thanks again.
Regards.
Navin

On Mar 17, 5:24 pm, Uander uandro...@gmail.com wrote:
 Thanks abukustfan  . I am following the same here .

 Uander

 On Wed, Mar 17, 2010 at 3:39 PM, abukustfan abukust...@gmail.com wrote:
  First, prepare the apk.
  For emulator, I think you can create a new system.img and userdata.img
  after build cts.
  then you can specified those image when launch emulator.
  $ emulator -system new_system.img ..

  For target board, depends on how you mount your target board.

  Second, run the startcts scrip.
  Connect emulator or target board with adb, then run startcts.
  cts  start --plan Android
  will auto test all the packages define in Android plan.(total 5208
  tests)

  I test my target from my host machine with startcts.
  It is better to run cts from cts scripts as it can auto test all the
  test packages and easy get the result of test.

  Good luck!

  On Mar 17, 6:40 pm, Umang Gupta uandro...@gmail.com wrote:
   Thanks Abukustfan  .

   Running cts test cases using startcts script is known to me . but that
  are
   for host machine .
   like for running signature test  cases , I run :

    cts  start --plan Signature -t
   android.tests.sigtest.SignatureTest#signatureTest

   Since apk's of all such test cases are generated in
   $(ANDROID_BUILD_TOP)/out/
   target/product/generic/data/app .  I was impatient to know if I could run
   all these in emulator shell using adb  or on any device using minicom .

   I investigated this yesterday  and  found as follows :

   1 install all apk's into emulator shell . (using ./adb install )
   2 And I am able to run  TestDeviceSetup cts tests  using these command
  on
   emulator shell :
   am start -a android.intent.action.MAIN -n
   android.tests.devicesetup/android.tests.getinfo.DeviceInfoActivity

   It runs successfully .

   A icon in menu of emulator comes up which on clicking shows a screen with
   label DeviceInfoActivity. This corresponding to my TestDeviceSetup apk
  .

   So I want to know how to run in emulator all of other apk's ? or they can
   just be tested through cts test script only .

   Any light on this query will be appreciated .

   Thanks :
   Uander

   On Wed, Mar 17, 2010 at 2:03 PM, abukustfan abukust...@gmail.com
  wrote:
Use following command to start testing cts
 $ cd out/host/linux-x86/cts/android-cts/tools
 $ ./startcts

then you will get a cts command prompt,
cts 

type help to get how to run test.

Good luck!

On Mar 17, 12:52 pm, Umang Gupta uandro...@gmail.com wrote:
 Any help on how to test apk's generated by compiling cts tests  on
emulator
 or target ??

 Thanks :
 Uander

 On Tue, Mar 16, 2010 at 5:53 PM, Umang Gupta uandro...@gmail.com
wrote:
  Hi  All ,

  I am running cts test cases on eclair   . I've done with :
  . build/envsetup.sh; lunch 1; make cts

  That compiled my all cts test cases  .
  Apk's for that all have been installed in
  $(ANDROID_BUILD_TOP)/out/target/product/generic/data/app :

  few of these are : CtsDatabaseTestCases.apk , ApiDemos.apk  etc .

  Now I start my emulator  ::  ./emulator 

  I adb push  to all apk's to my  emulator .

  Now my query is how to run these apk's on device /emulator ??

   Thanks :
  Uander

--
unsubscribe: 
android-porting+unsubscr...@googlegroups.comandroid-porting%2bunsubscr...@googlegroups.com
  android-porting%2Bunsubscribe@ googlegroups.com
website:http://groups.google.com/group/android-porting

  --
  unsubscribe: 
  android-porting+unsubscr...@googlegroups.comandroid-porting%2bunsubscr...@googlegroups.com
  website:http://groups.google.com/group/android-porting

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Param in android

2010-03-21 Thread rizwan
I am working on an open source application which is build on old
version of sdk ,that's I am  unable to figure out what is prm is

Params prm = new Params() ;
it contain methods like
 prm.getParam(0);
prm.getCount()
Can anyone suggest what it's replacement in android latest sdk . I am
not whether it's built in class or user define class. please advise if
it's a android sdk class.


private void ProcessMode(char ch) {
if (ch = '0'  ch = '9') {
prm.setCurrentParam(prm.getCurrentParam() * 10 + (ch - 
'0'));
return;
}
if (ch == ';') {
prm.nextParam();
return;
}
switch (ts) {
case TerminalState.MODE:
CommandMode(ch);
break;
case TerminalState.CSI:
CommandCSI(ch);
break;
case TerminalState.G0:
CommandG0(ch);
break;
case TerminalState.G1:
CommandG1(ch);
break;

}
prm.Clear();
ts = TerminalState.REGULAR;
}

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Answer automatically to Incoming Call

2010-03-21 Thread saru
Hi Bibek,
 Is it possible by modifying code??? Are you sure
If possible can you give some hints actually what needed to do in
source code to answer call programatically.

On Mar 19, 1:03 am, Kumar Bibek coomar@gmail.com wrote:
 This is simply not possible if you are not modifying the source code.
 Don't waste time.

 Thanks and Regards,
 Kumar Bibek

 On Mar 18, 11:52 am, Andreas andreas.bex...@gmail.com wrote:

  Hi,

  I have not tried this, but it seems to me that you use the
  ACTION_CALL_BUTTON in your code, rather than the ACTION_ANSWER, and
  you should probably broadcast it using Context.sendBroadcast rather
  than startActivity. Just my cents.

  Regards

  Andreas

  On Mar 18, 7:40 am, midoub elmehdi.benso...@gmail.com wrote:

   hello,
   I know this is not the good forum to post my question, but I need help
   and I spend 3 days to try to find solution ,but no way:(.
   I'm trying to develop application that can answer incoming call
   automatically.
   In my code I use the intent Action_Anwser  but it's seem not work.
   The snippet of my code
   :
           public void onCallStateChanged(int state, String incomingNumber) {
                           super.onCallStateChanged(state, incomingNumber);
   :
    Intent intent = new Intent(Intent.ACTION_CALL_BUTTON);
                               
   intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                                  startActivity(intent);
   
   Maybe I had forget the permission in manifest or somthing like this!!!
   Thanks for your help.
   best regards,



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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Problems accessing location data in emulator

2010-03-21 Thread Sven Jacobs
2010/3/20 Mark Murphy mmur...@commonsware.com

 DDMS/geo only sets a simulated GPS fix (AFAIK -- that's certainly DDMS'
 behavior), and you have not turned on the GPS radio. You need to
 requestLocationUpdates() to turn on GPS, then set the fix. Then, your
 LocationListener will be notified of the fix, and after that point
 getLastKnownLocation() can return it as well.


Hi Mark,

thanks for the hint! After applying requestLocationUpdates() it works. But I
still find this strange and it's not documented that a single call to
getLastKnownLocation() if I'm not interested in constant location
updates won't return a value.

Nevermind, thanks again!

Sven

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Sending/Saving/Retrieving gps location

2010-03-21 Thread raqz
Hi,

I have setup the code for fetching the gps location of the device when
the device's location changes. But I want to save this location on a
file or send this location information to my webserver.
I tried creating a class with setter and getter methods but its not
storing the info. When  I run the app, it closes with unxpected error.

Could some one please tell me how to go about this.

Thanks,
raqz

Note: I have declared myLocation as public in the main function.
[CODE]
public class MyLocation{
private double latitude;
private double longitude;
private long time;

public MyLocation(double latitude, double longitude, long time) 
{
this.latitude = latitude;
this.longitude = longitude;
this.time = time;
}

public double giveMyLatitude(){
return (latitude);
}
public double giveMyLongitude(){
return (longitude);
}
public double giveMyTime(){
return (time);
}
[/CODE]

[CODE]
public void onLocationChanged(Location arg0) {
Toast.LENGTH_SHORT).show();
myLocation = new
MyLocation(arg0.getLatitude(),arg0.getLongitude(),arg0.getTime());
GeoPoint p = new GeoPoint((int) 
(arg0.getLatitude()*1E6),(int)
(arg0.getLongitude()*1E6));
mc.animateTo(p);
mc.setZoom(16);
mapView.invalidate();
[/CODE]

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Plz help me with integrating 'login via facebook' functionality with android app

2010-03-21 Thread wahib.t...@gmail.com
dear experts !! i am trying to implement facebook account
authenticating in my app though its in dev phase. I downloaded the
fbconnect api [http://code.google.com/p/fbconnect-android/]and tried
to run it but all i get is a blank white screen when i try to connect
to facebook. I also created a sample application and added its secret
and api key into the code. I can expect many ppl have already done it
so kindly help me out if i need to do anything else with the api code
as there are many bugs which i found reviewing the issues section of
the project.
There are no exceptions shown in the log. furthermore i also found
this link [http://www.xeomax.net/fbrocket] and executed the code. It
is working but the code is not available so its tough to use it in my
way. kindly refer any other resources.

i posted this problem many times in beginners group but no one
responded so helplessly i am doing here with hope that some1 who has
already implemented this feature can help me out.

Regards,
wahib

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Modify the value of pixel

2010-03-21 Thread ReyLith
Hi!

I am trying to modify the value of the pixel of an imagen. I have
achieved it using the functions getPixel and setPixel of Bitmap. Now I
have a questions. I want to realise many operations with the pixels of
an image and I need that such operations are done quickly. What is
better to use the functions provided by the library or used bookstore
Bitmap image editing as jjil?

Thank you very much. A greeting.

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Sending/Saving/Retrieving gps location

2010-03-21 Thread raqz
I could write the location on to a file. Now I tried sending the
location information through a socket but the app crashed.
Could you please tell me if that's possible.

Thanks,
Raqeeb

On Mar 21, 6:05 am, raqz abdulraqee...@gmail.com wrote:
 Hi,

 I have setup the code for fetching the gps location of the device when
 the device's location changes. But I want to save this location on a
 file or send this location information to my webserver.
 I tried creating a class with setter and getter methods but its not
 storing the info. When  I run the app, it closes with unxpected error.

 Could some one please tell me how to go about this.

 Thanks,
 raqz

 Note: I have declared myLocation as public in the main function.
 [CODE]
 public class MyLocation{
                 private double latitude;
                 private double longitude;
                 private long time;

                 public MyLocation(double latitude, double longitude, long 
 time) {
                         this.latitude = latitude;
                         this.longitude = longitude;
                         this.time = time;
                 }

                 public double giveMyLatitude(){
                         return (latitude);
                 }
                 public double giveMyLongitude(){
                         return (longitude);
                 }
                 public double giveMyTime(){
                         return (time);
                 }
 [/CODE]

 [CODE]
 public void onLocationChanged(Location arg0) {
 Toast.LENGTH_SHORT).show();
                         myLocation = new
 MyLocation(arg0.getLatitude(),arg0.getLongitude(),arg0.getTime());
                         GeoPoint p = new GeoPoint((int) 
 (arg0.getLatitude()*1E6),(int)
 (arg0.getLongitude()*1E6));
                         mc.animateTo(p);
             mc.setZoom(16);
             mapView.invalidate();
 [/CODE]

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Proper way to update remote views in notifications?

2010-03-21 Thread Mariano Kamp
Hi,

when using the new Service.startForeground() method how do you do
updates to remote widgets? What is the right way? Updating the remote
views doesn't seem to work. Should I notify again with the same ID
instead?

I didn't see any documentation on that:
http://developer.android.com/intl/zh-CN/guide/topics/ui/notifiers/notifications.html
and 
http://developer.android.com/intl/zh-CN/reference/android/app/Service.html#startForeground(int,
android.app.Notification)

Cheers,
Mariano

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: send dtmf

2010-03-21 Thread saru
Murphy, expecting a reply about android dtmf and telephony feature

On Mar 16, 12:23 pm, saru sarucs...@gmail.com wrote:
 Thanks again Murphy.
 Look i need to pass dtmf tone over GSM (telephony line).

 Look it should be possible in android.

 From very beginning of my starting in android I followed that android
 has very silly telephony API
 than other OS like black berry, iphone and others.

 even People from other platform can not believe that in android
 telephony feature in unavailable.

 Here I want to quote All application in android are same. It is
 completely false.
 Android restricted their Phone application exclusively.They did not
 provide any advantage for developer.
 I think android developers r suffering for this. So hope in future
 version android will relax their telephony API and Phone application

 On Mar 15, 7:16 pm, Mark Murphy mmur...@commonsware.com wrote:

  saru wrote:
   Thanks Murphy for ur reply.

   I explored ToneGenerator class. Where i m seeing one function
    startTone(int toneType)
   This method starts the playback of a tone of the specified type.

   But i need a function like sendDtmf().

   Please can you help again???

  If you are looking to play DTMF tones over the speaker or headset, use
  startTone().

  If you are looking to play DTMF tones over the telephony connection
  (e.g., to control a voicemail menu), that is not possible in Android.

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

  Android App Developer Books:http://commonsware.com/books



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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Proper way to update remote views in notifications?

2010-03-21 Thread Mark Murphy
Mariano Kamp wrote:
 when using the new Service.startForeground() method how do you do
 updates to remote widgets?

Those two concepts are not strictly tied, AFAIK. A Service would update
the app widget the same way regardless of whether or not it called
startForeground().

BTW, I don't know what a remote widget is. I am just assuming you are
referring to home screen app widgets.

To update an app widget, a Service gets an AppWidgetManager and RemoteViews:

ComponentName me=new ComponentName(this, AppWidget.class);
RemoteViews updateViews=new RemoteViews(apt.tutorial,
R.layout.widget);
AppWidgetManager mgr=AppWidgetManager.getInstance(this);

then populates the RemoteViews and has the manager post those changes to
the home screen via mgr.updateAppWidget(me, updateViews).

You can see this used here:

http://github.com/commonsguy/cw-andtutorials/tree/master/36-AdvAppWidget/

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

Android App Developer Training: http://commonsware.com/training

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Problems accessing location data in emulator

2010-03-21 Thread Mark Murphy
Sven Jacobs wrote:
 2010/3/20 Mark Murphy mmur...@commonsware.com
 mailto:mmur...@commonsware.com
 
 DDMS/geo only sets a simulated GPS fix (AFAIK -- that's certainly DDMS'
 behavior), and you have not turned on the GPS radio. You need to
 requestLocationUpdates() to turn on GPS, then set the fix. Then, your
 LocationListener will be notified of the fix, and after that point
 getLastKnownLocation() can return it as well.
 
 
 Hi Mark,
 
 thanks for the hint! After applying requestLocationUpdates() it works.
 But I still find this strange and it's not documented that a single call
 to getLastKnownLocation() if I'm not interested in constant location
 updates won't return a value.

It's more that if the location technology is not on,
getLastKnownLocation() won't return a value. GPS is a battery hog, and
so it is off unless something in the system has said yo! I want GPS on,
please!.

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

Android App Developer Training: http://commonsware.com/training

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Cannot use third party library

2010-03-21 Thread ColletJb
Hi,

I'm currently trying to make an app using HTMLParser.

I developed the whole app in Eclipse and everything seemed to be fine
until I tried it on the emulator.

It seems that one of the class included into the provided jar file
(htmlparser.jar) is not found and thus rise a fatal exception.

I tryed to add this library on my build path (on the library tab,
before Android 1.5) but it didnt't work. I also tried to make a lib
directory with this jar file inside, but with no more success.

Every time I try to generate an APK file, the jar file is not
included...

Can someone tell me how to fix this issue ?

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] ListView with radio buttons defined in XML?

2010-03-21 Thread Viktor Bresan
I am trying to define single select ListView with radio buttons using
XML exclusively. Basically, I would like that my ListView has a layout
like it would have if I used the following:

listView.setAdapter(
new ArrayAdapterString(
this, android.R.layout.simple_list_item_single_choice,
VALUES));


android.R.layout.simple_list_item_single_choice is the key part.
I.e. I want list with radio buttons on the right hand side.

Using XML I can set choice mode through android:choiceMode and
I can populate list with values using android:entries, but I don't
know
how to get the radio buttons.

Is this possible using XML?

I know that I could add ButtonGroup and RadioButtons myself but
I would prefer to keep it as simple as possible.

Many thanks, Viktor.

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Problems accessing location data in emulator

2010-03-21 Thread Sven Jacobs
2010/3/21 Mark Murphy mmur...@commonsware.com

 It's more that if the location technology is not on,
 getLastKnownLocation() won't return a value. GPS is a battery hog, and
 so it is off unless something in the system has said yo! I want GPS on,
 please!.


I guess the situation is different on a real phone where more location
providers exists (WLAN, GSM/UTMS) that are enabled most of the time?

Greetings,
Sven

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Problems accessing location data in emulator

2010-03-21 Thread Mark Murphy
Sven Jacobs wrote:
 2010/3/21 Mark Murphy mmur...@commonsware.com
 mailto:mmur...@commonsware.com
 
 It's more that if the location technology is not on,
 getLastKnownLocation() won't return a value. GPS is a battery hog, and
 so it is off unless something in the system has said yo! I want GPS on,
 please!.
 
 
 I guess the situation is different on a real phone where more location
 providers exists (WLAN, GSM/UTMS) that are enabled most of the time?

Possibly. I have not tried getLastKnownLocation() for the NETWORK
provider on a device, to see if that is always on.

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

Android Development Wiki: http://wiki.andmob.org

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Default orientation of device

2010-03-21 Thread neha
How can i get the default orientation of a Android device.

DROID has portrait as the default orientation whereas many of the
android tablets have landscape as the default orientation. I want to
determine the default orientation of a android device through an OS
call and this orientation should be independent of the device position/
rotation.

I will be of great help if somebody can suggest a mechanism to achieve
the same.

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Problems accessing location data in emulator

2010-03-21 Thread Sven Jacobs
2010/3/21 Mark Murphy mmur...@commonsware.com

 Possibly. I have not tried getLastKnownLocation() for the NETWORK
 provider on a device, to see if that is always on.


I only need an approximate location and not a up-to-10m-precise GPS position
so WLAN or GSM/UMTS would be sufficient.

Greetings,
Sven

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Default orientation of device

2010-03-21 Thread Mark Murphy
neha wrote:
 How can i get the default orientation of a Android device.

There is no such concept in Android, AFAIK.

What is the business problem you are trying to solve?

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

Android Development Wiki: http://wiki.andmob.org

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Proper way to update remote views in notifications?

2010-03-21 Thread Mariano Kamp
Sorry. I meant to say remote views like in the subject ;-)

I currently update the remote views to which I kept a reference and then
notify again with the same Id.
That seems to work, but I would like to know if this is the right way to do
it.

Written on a mobile device

On Mar 21, 2010 12:58 PM, Mark Murphy mmur...@commonsware.com wrote:

Mariano Kamp wrote:
 when using the new Service.startForeground() method how do you do
 updates to...
Those two concepts are not strictly tied, AFAIK. A Service would update
the app widget the same way regardless of whether or not it called
startForeground().

BTW, I don't know what a remote widget is. I am just assuming you are
referring to home screen app widgets.

To update an app widget, a Service gets an AppWidgetManager and RemoteViews:

ComponentName me=new ComponentName(this, AppWidget.class);
RemoteViews updateViews=new RemoteViews(apt.tutorial,
   R.layout.widget);
AppWidgetManager mgr=AppWidgetManager.getInstance(this);

then populates the RemoteViews and has the manager post those changes to
the home screen via mgr.updateAppWidget(me, updateViews).

You can see this used here:

http://github.com/commonsguy/cw-andtutorials/tree/master/36-AdvAppWidget/

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

Android App Developer Training: http://commonsware.com/training

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

To unsubscribe from this group, send email to android-developers+
unsubscribegooglegroups.com or reply to this email with the words REMOVE
ME as the subject.

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Default orientation of device

2010-03-21 Thread neha
I want to write a application which should open in default orientation
of the device and should not change the orientation with device
rotation or slide-out keyboard opening/closing (if present).
i.e. I want to set the orientation of the application as portrait when
the default orientation of the Android device is portrait. And
landscape when the default orientation of the Android device is
landscape.

To achieve this i will be using setRequestedOrientation method with
portrait and landscape as the arguments. On any given device, i need
to determine which of these two argument should be passed to the
setRequestedOrientation metthod and for the same i need to have some
mechanism to determine default orientation of the device.

One way is to keep database of Android devices and their default
orientation, but it is not a feasible option considering the number of
Android devices that will be hitting the market.






On Mar 21, 5:39 pm, Mark Murphy mmur...@commonsware.com wrote:
 neha wrote:
  How can i get the default orientation of a Android device.

 There is no such concept in Android, AFAIK.

 What is the business problem you are trying to solve?

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

 Android Development Wiki:http://wiki.andmob.org

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Disable Home Key?

2010-03-21 Thread HackNone
On Feb 26, 4:47 pm, Sean Hodges seanhodge...@googlemail.com wrote:
 there are
 quite a few projects on Sourceforge and Google Code.

Hi, Sean Hodges.

Can you tell me the name of those projects?

thx:)

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Disable Home Key?

2010-03-21 Thread HackNone
Hi, DroidBy.

Do you solve this problem now? I also have this question.

I am trying my best to solve it.

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Re: Default orientation of device

2010-03-21 Thread Mark Murphy
neha wrote:
 I want to write a application which should open in default orientation
 of the device and should not change the orientation with device
 rotation or slide-out keyboard opening/closing (if present).
 i.e. I want to set the orientation of the application as portrait when
 the default orientation of the Android device is portrait. And
 landscape when the default orientation of the Android device is
 landscape.

FWIW, if I were a user, I'd give you a poor rating on the Market.

If you want to let the user keep things in one orientation, that's fine,
but let the user choose what that orientation is, and let the user
choose to have it change orientation based upon normal conditions
(accelerometer, keyboard slider, etc.).

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

Android App Developer Books: http://commonsware.com/books

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Re: Default orientation of device

2010-03-21 Thread Michael Thomas
Sounds like you want to initially set up a sensormanager to listen to 
orientation changes
and just clamp down the orientation to whatever the first orientation 
update shows you

as being.

Mike


neha wrote:

I want to write a application which should open in default orientation
of the device and should not change the orientation with device
rotation or slide-out keyboard opening/closing (if present).
i.e. I want to set the orientation of the application as portrait when
the default orientation of the Android device is portrait. And
landscape when the default orientation of the Android device is
landscape.

To achieve this i will be using setRequestedOrientation method with
portrait and landscape as the arguments. On any given device, i need
to determine which of these two argument should be passed to the
setRequestedOrientation metthod and for the same i need to have some
mechanism to determine default orientation of the device.

One way is to keep database of Android devices and their default
orientation, but it is not a feasible option considering the number of
Android devices that will be hitting the market.






On Mar 21, 5:39 pm, Mark Murphy mmur...@commonsware.com wrote:
  

neha wrote:


How can i get the default orientation of a Android device.
  

There is no such concept in Android, AFAIK.

What is the business problem you are trying to solve?

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

Android Development Wiki:http://wiki.andmob.org



  


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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the words 
REMOVE ME as the subject.


[android-developers] Re: Cannot use third party library

2010-03-21 Thread ColletJb
It seems that I have finally successfully added my lib into the build-
path...

But I receive this error now : Conversion to Dalvik format failed
with error 1

And my project is no longer compiling :(




On 21 mar, 13:02, ColletJb collet...@gmail.com wrote:
 Hi,

 I'm currently trying to make an app using HTMLParser.

 I developed the whole app in Eclipse and everything seemed to be fine
 until I tried it on the emulator.

 It seems that one of the class included into the provided jar file
 (htmlparser.jar) is not found and thus rise a fatal exception.

 I tryed to add this library on my build path (on the library tab,
 before Android 1.5) but it didnt't work. I also tried to make a lib
 directory with this jar file inside, but with no more success.

 Every time I try to generate an APK file, the jar file is not
 included...

 Can someone tell me how to fix this issue ?

 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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Re: Default orientation of device

2010-03-21 Thread Mark Murphy
Michael Thomas wrote:
 Sounds like you want to initially set up a sensormanager to listen to
 orientation changes
 and just clamp down the orientation to whatever the first orientation
 update shows you
 as being.

You can get the current orientation from the Configuration object, which
you can get from a Resources object, which you can get via
getResources() on a Context.

However, that is not some system-defined default orientation. It's
just the orientation your activity is starting with. So, if I hold my
Nexus One in landscape, and turn it on, activities will be in the
landscape orientation, even though the OP's notion is that the default
orientation of a Nexus One is presumably portrait.

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

Android Development Wiki: http://wiki.andmob.org

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Application losing SharedPreferences and Sqlite database on Droid

2010-03-21 Thread Matt (preinvent)
To discount any possibility of concurrency problems I've synchronized
the static getInstance on my singleton and every function that calls
the DB (be it read or write).  Makes no different though... it just
wiped it all again.

It must be a filesystem problem (delayed writes?), or something buggy
in the underlying sqlite code.

I'll gather all the info when I have time.. right now I just need to
find a working way of storing data - 65k+ angry users to appease!

This sucks :(

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Application losing SharedPreferences and Sqlite database on Droid

2010-03-21 Thread Matt (preinvent)
 Uh, have you considered changing out your flash chip just to disprove
 the notion that
 it's widespread? While sqlite certainly makes higher demand on the
 crappy underlying
 FAT file system, it also possible that it's just a hardware problem.

I have a lot of users reporting this issue.  All of them are using
Droid or Milestone, so I doubt it's individual devices, I think it's
more likely to be buggy implementation by Motorola.

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Cannot use third party library

2010-03-21 Thread Streets Of Boston
Big chance that the JAR file needs to use some Java classes that are
not part of the Android SDK.

In other words, if you would compile the classes in the JAR (instead
of just including it),  you would have gotten compiler errors.

On Mar 21, 9:39 am, ColletJb collet...@gmail.com wrote:
 It seems that I have finally successfully added my lib into the build-
 path...

 But I receive this error now : Conversion to Dalvik format failed
 with error 1

 And my project is no longer compiling :(

 On 21 mar, 13:02, ColletJb collet...@gmail.com wrote:



  Hi,

  I'm currently trying to make an app using HTMLParser.

  I developed the whole app in Eclipse and everything seemed to be fine
  until I tried it on the emulator.

  It seems that one of the class included into the provided jar file
  (htmlparser.jar) is not found and thus rise a fatal exception.

  I tryed to add this library on my build path (on the library tab,
  before Android 1.5) but it didnt't work. I also tried to make a lib
  directory with this jar file inside, but with no more success.

  Every time I try to generate an APK file, the jar file is not
  included...

  Can someone tell me how to fix this issue ?

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Re: Application losing SharedPreferences and Sqlite database on Droid

2010-03-21 Thread Mark Murphy
Matt (preinvent) wrote:
 To discount any possibility of concurrency problems I've synchronized
 the static getInstance on my singleton and every function that calls
 the DB (be it read or write).  Makes no different though... it just
 wiped it all again.

1. Have you been getting reports of problems from Nexus One owners? In
other words, is this a DROID/Milestone thing or a 2.0+ thing?

2. Are you writing other local files directly (e.g., using File objects
and java.io)? Are you sure you're not clobbering your files yourself by
accident?

3. Since you mentioned rooting the phone and looking at directories, I
assume these files are stored on the built-in flash, not the SD card --
right? That would eliminate Mr. Thomas' comments regarding FAT, because
the on-board flash is not FAT.

 It must be a filesystem problem (delayed writes?), or something buggy
 in the underlying sqlite code.

Can't be the latter, as that would not affect SharedPreferences.

 I'll gather all the info when I have time.. right now I just need to
 find a working way of storing data - 65k+ angry users to appease!

That probably won't help. Your reported symptoms indicate that multiple
file types (SQLite databases and shared preference XML files) are being
harmed. You could switch from SQLite to JSON files, and those will may
well get trashed too.

If you can get a database in the database disk image is malformed
state, we can examine it to figure out how it is damaged:

-- data OK but checksum wrong?
-- random bits of the file have invalid data (e.g., your delayed writes
concept)
-- the whole file was replaced by a PNG image that you downloaded and
saved to the wrong file by accident
-- something else

Similarly, if you do elect to switch to some other form of storage, and
that starts failing (e.g., JSON parse() exceptions), we can look at
those files and see what exactly is going on.

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

Android App Developer Training: http://commonsware.com/training

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: File operation in Android

2010-03-21 Thread AuxOne
The filepath used for the File class has to include a special prefix.
getFilesDir() or Environment.getExternalStorageDirectory() should get
it.
It's usually data/data/your package name/files/ for the phone
memory and sdcard/ for the SDcard.

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Cannot use third party library

2010-03-21 Thread ColletJb
I've tried HTMLParser and Jericho but I have the same issue... No way
to include the jars into the apk...

I've switched to Jericho parser and the issue is now that log4j is not
found (even if it is included next to jericho's jar into the build
path)




On 21 mar, 15:16, Streets Of Boston flyingdutc...@gmail.com wrote:
 Big chance that the JAR file needs to use some Java classes that are
 not part of the Android SDK.

 In other words, if you would compile the classes in the JAR (instead
 of just including it),  you would have gotten compiler errors.

 On Mar 21, 9:39 am, ColletJb collet...@gmail.com wrote:



  It seems that I have finally successfully added my lib into the build-
  path...

  But I receive this error now : Conversion to Dalvik format failed
  with error 1

  And my project is no longer compiling :(

  On 21 mar, 13:02, ColletJb collet...@gmail.com wrote:

   Hi,

   I'm currently trying to make an app using HTMLParser.

   I developed the whole app in Eclipse and everything seemed to be fine
   until I tried it on the emulator.

   It seems that one of the class included into the provided jar file
   (htmlparser.jar) is not found and thus rise a fatal exception.

   I tryed to add this library on my build path (on the library tab,
   before Android 1.5) but it didnt't work. I also tried to make a lib
   directory with this jar file inside, but with no more success.

   Every time I try to generate an APK file, the jar file is not
   included...

   Can someone tell me how to fix this issue ?

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] PendingIntents in Notifications

2010-03-21 Thread Mariano Kamp
I would like to show a notification that displays the progress of an
ongoing operation, but at the same time the remote view should contain
a cancel button to stop the ongoing operation.

I have to specify a contentIntent that is launched when clicking on
the notification: If I don't specify that I get something along those
lines:

E/ActivityManager(   62): Activity Manager Crash
E/ActivityManager(   62): java.lang.IllegalArgumentException:
contentIntent required: pkg=com.newsrob id=999
notification=Notification(vibrate=null,sound=null,defaults=0x0)
E/ActivityManager(   62):   at
com.android.server.NotificationManagerService.enqueueNotificationWithTag(NotificationManagerService.java:635)
E/ActivityManager(   62):   at
com.android.server.NotificationManagerService.enqueueNotification(NotificationManagerService.java:610)
E/ActivityManager(   62):   at
com.android.server.am.ServiceRecord.postNotification(ServiceRecord.java:256)
E/ActivityManager(   62):   at
com.android.server.am.ActivityManagerService.setServiceForeground(ActivityManagerService.java:10971)
E/ActivityManager(   62):   at
android.app.ActivityManagerNative.onTransact(ActivityManagerNative.java:596)
E/ActivityManager(   62):   at
com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:1539)
E/ActivityManager(   62):   at 
android.os.Binder.execTransact(Binder.java:287)
E/ActivityManager(   62):   at dalvik.system.NativeStart.run(Native Method)

For the cancel button I set another intent:

Intent cancelSyncIntent = new Intent(com.newsrob.CANCEL_SYNC);
contentView.setOnClickPendingIntent(R.id.cancel_sync,
PendingIntent.getBroadcast(context, 0,
cancelSyncIntent, 0));

But this never works. I always get the content intent when the button
is clicked. It looks like I cannot use buttons in remote views of
notifications?!

I could probably display a text:  Press to cancel operation ,
but that seems very heavy handed.

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Application losing SharedPreferences and Sqlite database on Droid

2010-03-21 Thread Marc
I was recently was doing some file io stuff and discovered that when
debugging the application gets killed in a more drastic way than is
not possible on the phone. What I found is that if a debug session is
started during a file io write the data file gets corrupted. On the
phone you have to pull out the battery which just does not happen that
often.


On Mar 19, 7:48 pm, Matt (preinvent) m...@preinvent.com wrote:
 Well there it is:

 03-19 22:43:02.624: ERROR/AndroidRuntime(2002): Caused by:
 android.database.sqlite.SQLiteDatabaseCorruptException: database disk
 image is malformed
 03-19 22:43:02.624: ERROR/AndroidRuntime(2002):     at
 android.database.sqlite.SQLiteQuery.native_fill_window(Native Method)
 03-19 22:43:02.624: ERROR/AndroidRuntime(2002):     at
 android.database.sqlite.SQLiteQuery.fillWindow(SQLiteQuery.java:75)
 03-19 22:43:02.624: ERROR/AndroidRuntime(2002):     at
 android.database.sqlite.SQLiteCursor.fillWindow(SQLiteCursor.java:288)
 03-19 22:43:02.624: ERROR/AndroidRuntime(2002):     at
 android.database.sqlite.SQLiteCursor.getCount(SQLiteCursor.java:269)
 03-19 22:43:02.624: ERROR/AndroidRuntime(2002):     at
 android.database.AbstractCursor.moveToPosition(AbstractCursor.java:
 171)
 03-19 22:43:02.624: ERROR/AndroidRuntime(2002):     at
 android.database.AbstractCursor.moveToFirst(AbstractCursor.java:248)

 Great.  Guess I'll be looking for another storage 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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Additional code generation after aapt runs?

2010-03-21 Thread HippoMan
I'd like to do some additional code generation after the R.java file
has been created by aapt. Specifically, I want to auto-generate some
helper methods to retrieve items from R.java.

Is there any way put my own, custom utility in place which will
generate this extra code as part of every Android build within
Eclipse?

Yes, I know that I can already do this:

String foobar = this.getString(R.string.foobar);

I just want to generate some extra code which will allow me to so
something like the following:

String foobar = something.getFoobar();

(where something is either a previously instantiated object or a
static class reference -- depending on how I ultimately decide to
implement this)

This way, I won't have to keep adding, changing, and deleting these
helper methods manually in my Activity class as I change the items in
strings.xml.

Thanks in advance for any suggestions.

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Re: Default orientation of device

2010-03-21 Thread TreKing
On Sun, Mar 21, 2010 at 8:11 AM, neha neha31gu...@gmail.com wrote:

 I want to write a application which should open in default orientation
 of the device and should not change the orientation with device
 rotation or slide-out keyboard opening/closing (if present).


Now I'm curious - why, exactly, do you want to lock to one orientation when
you apparently don't care which it is?

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers]

2010-03-21 Thread Yahel Bouaziz


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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: cannot see my own paid app on the market place?

2010-03-21 Thread Kevin Huber
On Mar 21, 3:13 am, rukiman ruksh...@optushome.com.au wrote:
 I have uploaded my paid app Legion and I can see that I am making
 sales but why is this app not visible on my phone? I can see other
 paid and free apps. The android platform of my Samsung Galaxy phone is
 1.5 and here is part of my manifest:

Can you see other copy-protected apps on your phone? Try to find
TestCopyProtected.

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Touch Event flood

2010-03-21 Thread Mario Zechner
I just coded up a simple performance for a project of mine and found
that the touch event flood problem is back in town albeit with a new
face. Here's a simple test case which:

pre lang=Java
package com.badlogic.gdx;

import javax.microedition.khronos.egl.EGLConfig;
import javax.microedition.khronos.opengles.GL10;

import android.app.Activity;
import android.opengl.GLSurfaceView;
import android.opengl.GLSurfaceView.Renderer;
import android.os.Bundle;
import android.util.Log;
import android.view.Window;
import android.view.WindowManager;

public class LagTest extends Activity implements Renderer
{
public void onCreate( Bundle bundle )
{
super.onCreate( bundle );
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN );
GLSurfaceView view = new GLSurfaceView( this );
view.setRenderer( this );
setContentView( view );
}

long startTime = 0;
int frames;

@Override
public void onDrawFrame(GL10 gl)
{
frames++;
if( System.nanoTime() - startTime  10 )
{
Log.d( Lag Test, fps:  + frames );
startTime = System.nanoTime();
frames = 0;
}
}

@Override
public void onSurfaceChanged(GL10 gl, int width, int height) {
// TODO Auto-generated method stub

}

@Override
public void onSurfaceCreated(GL10 gl, EGLConfig config)
{
startTime = System.nanoTime();
frames = 0;
}
}
/pre

What this does is simply setting up a GLSurfaceView and output the
frames per second each second. If you watch your LogCat output while
touching the screen and dragging your finger you'll see the fps
counter go crazy. On my Droid with Android 2.0.1 it changes between 55
frames and 59 frames. As soon as i lift the finger it's back to 60
frames per second. Setting an OnTouchListener and sleeping in the
onTouch method does not solve the problem. Can anyone confirm this?

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Default orientation of device

2010-03-21 Thread neha
Intention is to start the application in default orientation of device
rather than the initial/current device orientation.


On Mar 21, 6:42 pm, Mark Murphy mmur...@commonsware.com wrote:
 Michael Thomas wrote:
  Sounds like you want to initially set up a sensormanager to listen to
  orientation changes
  and just clamp down the orientation to whatever the first orientation
  update shows you
  as being.

 You can get the current orientation from the Configuration object, which
 you can get from a Resources object, which you can get via
 getResources() on a Context.

 However, that is not some system-defined default orientation. It's
 just the orientation your activity is starting with. So, if I hold my
 Nexus One in landscape, and turn it on, activities will be in the
 landscape orientation, even though the OP's notion is that the default
 orientation of a Nexus One is presumably portrait.

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

 Android Development Wiki:http://wiki.andmob.org

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: ListView not responding to Click or KeyPress

2010-03-21 Thread pentium10
Is there any solution on this problem? I ran into the same, and
looking for ways to get this done.

On Feb 4, 5:05 pm, chboing chbo...@gmail.com wrote:
 i have the exact same problem ...

 i have an Activity that contains a Listview which is used in a Dialog
 My ListView contains only TextViews. It's initialized in my own
 baseAdapter. Built from a txt file on the sd card.
 it's working nicely except the main goal for me, select one of those
 item in the ListView :(

 and same as Ted, in debugger mode, nothing happen when i click one
 item, it doesnt go into the onItemClick method

 anyone got an idea ? i lost some hours already on this ...

 did you find anything new about this Ted ?

 On 6 jan, 02:15, Ted ted.eker...@gmail.com wrote:



  Hey!
  I think I have the same problem, and I donothave any focusable
  children. My layout for a Row in the ListView contains:

  LinearLayout
     |
     +-- ImageView
     |
     +-- LinearLayout
             |
             +-- TextView
             |
             +-- TextView
             |
             +-- TextView

  and the Main activity is like this:

  code
  public class Main extends Activity
  {
          ArrayListNode nodes;

      /** Called when the activity is first created. */
      @Override
      public void onCreate(Bundle savedInstanceState)
      {
          requestWindowFeature(Window.FEATURE_NO_TITLE);
          super.onCreate(savedInstanceState);
          setContentView(R.layout.main);

          ArrayListNode nodes = new ArrayListNode();
          nodes.add(new Node(My name, My text, 13:10, 0));

          NodeRowAdapter nra = new NodeRowAdapter(this, nodes);

          ListView listView1 = (ListView) findViewById
  (R.id.ListViewNodes);
          listView1.setOnItemClickListener(newOnItemClickListener() {

                  public void onItemClick(AdapterView? parent,Viewview, int
  position, long id)
                  {
                          System.out.println (get onItem Click position=
  +position);
              }
                  });
          listView1.setAdapter(nra);
      }}

  /code

  It seems to me as nothing at all happens when I click the item in the
  ListView...

  On 4 Dec 2009, 19:43, Romain Guy romain...@android.com wrote:

   This is unnecessary. This problem will occur if your list item
   contains focusable children (like buttons, edittexts, etc.)

   On Thu, Dec 3, 2009 at 4:20 PM, hwii77 hwi...@gmail.com wrote:
maybe maybe try this: Add android:clickable=true  (and
android:focusable=true)

On Dec 2, 1:37 pm, n179911 n179...@gmail.com wrote:
Hi,

I have a simple ListView in my layout.xml file.

    ListView android:id=@+id/action_list
            android:layout_width=fill_parent
            android:layout_height=wrap_content
        /

And in my javacode, I add a setOnItemClickListener() to my listview:

listView.setOnItemClickListener(newOnItemClickListener() {

                public void onItemClick(AdapterView? parent,Viewview,
int position, long id) {
                    System.out.println (get onItem Click position=
+position);

                }
            });

But when I run on G1. I don't see any print out when I click an item 
on the
ListView on the phone.
Or when I select an item using track ball and press CENTER.

Can you please tell me why to resolve my problem?

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

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

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

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Problem with viewflipper animations and drawing cache

2010-03-21 Thread Ferm
Hello

I have a viewflipper which I use to animate between views. The in/out-
animations are TranlateAnimations.

During the animations, the views that are animated are covered by a
darker transparent foreground. How can I get rid of this?

Further, if the view thats being animated contains layout child with a
background image set, the image looks really bad during the animation.

I have tried calling the following methods on both the viewflipper and
it's child views, without success
setAnimationCacheEnabled(false);
setAlwaysDrawnWithCacheEnabled(false);
setDrawingCacheEnabled(false);
setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_HIGH);

Any hints would be appreciated.
btw: I had a similar problem when scrolling listviews but solved it
setting scrollingCache to false

I also have the same problem when animating with a TextSwitcher.
Strange thing is that the ApiDemos does not have this problem and I am
basically using that same code. Are these optimizations set on a
global level? Also, other examples using e.g. a ViewFlipper such as
this 
http://www.inter-fuser.com/2009/07/android-transistions-slide-in-and-slide.html,
does not have this problem. What am I missing?

thx

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] on text input, AVD unexpectedly displays logograms (perhaps hanzi)

2010-03-21 Thread greg
On some of the AVDs I've created, input text gets displayed as
logograms, even in the emulated Browser application (see the screen
shot at http://eduneer.com/screenshot_avd_text.png).  Has anyone else
experienced this or have a tip on fixing it?

OS: Vista
Eclipse version: 3.5.2
JDK version: 1.6.0.14


Thanks,
Greg

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] on text input, AVD unexpectedly displays logograms (perhaps hanzi)

2010-03-21 Thread Mark Murphy
greg wrote:
 On some of the AVDs I've created, input text gets displayed as
 logograms, even in the emulated Browser application (see the screen
 shot at http://eduneer.com/screenshot_avd_text.png).  Has anyone else
 experienced this or have a tip on fixing it?
 
 OS: Vista
 Eclipse version: 3.5.2
 JDK version: 1.6.0.14

You have the Japanese or Chinese IMEs enabled. Visit Settings  Language
and Keyboard, and toggle off the ones you do not need.

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

Android Training in US: 14-18 June 2010: http://bignerdranch.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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Touch Event flood

2010-03-21 Thread Robert Green
Ugh.  How is this not totally fixed in 2.0+?  I know it's not as bad
as 1.6- but properly implemented, touch events should have a
negligible impact on performance.

On Mar 21, 10:47 am, Mario Zechner badlogicga...@gmail.com wrote:
 I just coded up a simple performance for a project of mine and found
 that the touch event flood problem is back in town albeit with a new
 face. Here's a simple test case which:

 pre lang=Java
 package com.badlogic.gdx;

 import javax.microedition.khronos.egl.EGLConfig;
 import javax.microedition.khronos.opengles.GL10;

 import android.app.Activity;
 import android.opengl.GLSurfaceView;
 import android.opengl.GLSurfaceView.Renderer;
 import android.os.Bundle;
 import android.util.Log;
 import android.view.Window;
 import android.view.WindowManager;

 public class LagTest extends Activity implements Renderer
 {
         public void onCreate( Bundle bundle )
         {
                 super.onCreate( bundle );
                 requestWindowFeature(Window.FEATURE_NO_TITLE);
                 
 getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
 WindowManager.LayoutParams.FLAG_FULLSCREEN );
                 GLSurfaceView view = new GLSurfaceView( this );
                 view.setRenderer( this );
                 setContentView( view );
         }

         long startTime = 0;
         int frames;

         @Override
         public void onDrawFrame(GL10 gl)
         {
                 frames++;
                 if( System.nanoTime() - startTime  10 )
                 {
                         Log.d( Lag Test, fps:  + frames );
                         startTime = System.nanoTime();
                         frames = 0;
                 }
         }

         @Override
         public void onSurfaceChanged(GL10 gl, int width, int height) {
                 // TODO Auto-generated method stub

         }

         @Override
         public void onSurfaceCreated(GL10 gl, EGLConfig config)
         {
                 startTime = System.nanoTime();
                 frames = 0;
         }}

 /pre

 What this does is simply setting up a GLSurfaceView and output the
 frames per second each second. If you watch your LogCat output while
 touching the screen and dragging your finger you'll see the fps
 counter go crazy. On my Droid with Android 2.0.1 it changes between 55
 frames and 59 frames. As soon as i lift the finger it's back to 60
 frames per second. Setting an OnTouchListener and sleeping in the
 onTouch method does not solve the problem. Can anyone confirm this?

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Default orientation of device

2010-03-21 Thread neha

On Mar 21, 8:35 pm, TreKing treking...@gmail.com wrote:
 On Sun, Mar 21, 2010 at 8:11 AM, neha neha31gu...@gmail.com wrote:
  I want to write a application which should open in default orientation
  of the device and should not change the orientation with device
  rotation or slide-out keyboard opening/closing (if present).

 Now I'm curious - why, exactly, do you want to lock to one orientation when
 you apparently don't care which it is?


Lets take an example of map application like Google maps. Generally a
good map applications does not orientate with device, to allow the
user to view map from any angle they desire.
As this application does not want orientation to change, so we need to
lock the orientation of the application. On any given device, this
application should always display the same orientation irrespective of
orientation of device at start-up. Reason for restricting the
orientation to default orientation of device is that, it is the most
likely position in which the user will hold the device and start the
application. So on DROID this application would always be portrait but
it would not be a good idea to display this application as portrait on
tablets where device default orientation is landscape.




On Mar 21, 8:35 pm, TreKing treking...@gmail.com wrote:
 On Sun, Mar 21, 2010 at 8:11 AM, neha neha31gu...@gmail.com wrote:
  I want to write a application which should open in default orientation
  of the device and should not change the orientation with device
  rotation or slide-out keyboard opening/closing (if present).

 Now I'm curious - why, exactly, do you want to lock to one orientation when
 you apparently don't care which it is?

 -
 TreKing - Chicago transit tracking app for Android-powered 
 deviceshttp://sites.google.com/site/rezmobileapps/treking

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: on text input, AVD unexpectedly displays logograms (perhaps hanzi)

2010-03-21 Thread greg
Much better now.  Thanks.

On Mar 21, 12:20 pm, Mark Murphy mmur...@commonsware.com wrote:
 greg wrote:
  On some of the AVDs I've created, input text gets displayed as
  logograms, even in the emulated Browser application (see the screen
  shot athttp://eduneer.com/screenshot_avd_text.png).  Has anyone else
  experienced this or have a tip on fixing it?

  OS: Vista
  Eclipse version: 3.5.2
  JDK version: 1.6.0.14

 You have the Japanese or Chinese IMEs enabled. Visit Settings  Language
 and Keyboard, and toggle off the ones you do not need.

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

 Android Training in US: 14-18 June 2010:http://bignerdranch.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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] How to create graphical/advanced menus??

2010-03-21 Thread Kofa
I searched in google but didn't find anything about graphical or
advanced menus or contextmenu.
I'm building a game and I need to make a contextmenu with the units to
build. It should have an icon and a description of the unit, like HP,
attack, defense, etc.
I was trying to inflate the menu from xml, but the icon does not
appear and I don't know how to make the unit's info appear, now I have
something like that:

?xml version=1.0 encoding=utf-8?
menu xmlns:android=http://schemas.android.com/apk/res/android;
item android:id=@+id/build_menu
android:title=BUILD
android:icon=@drawable/build32/ --HERE IT SHOULD MAKE 
ICON
SHOWS
item android:id=@+id/train_menu
android:title=TRAIN/
item android:id=@+id/destroy_menu
android:title=DESTROY/
item android:id=@+id/stats_menu
android:title=STATS/
/menu

the menu appears, but the icon not and it's awfully standard... if
I could show a background image...

so pleease if you know of any tutorial of building nice menus/
advanced menus it would be great =)
thx!!!

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Additional code generation after aapt runs?

2010-03-21 Thread Kumar Bibek
I don't think so it is possible.

Thanks and Regards,
Kumar Bibek

On Mar 21, 8:34 pm, HippoMan hippo.mail...@gmail.com wrote:
 I'd like to do some additional code generation after the R.java file
 has been created by aapt. Specifically, I want to auto-generate some
 helper methods to retrieve items from R.java.

 Is there any way put my own, custom utility in place which will
 generate this extra code as part of every Android build within
 Eclipse?

 Yes, I know that I can already do this:

 String foobar = this.getString(R.string.foobar);

 I just want to generate some extra code which will allow me to so
 something like the following:

 String foobar = something.getFoobar();

 (where something is either a previously instantiated object or a
 static class reference -- depending on how I ultimately decide to
 implement this)

 This way, I won't have to keep adding, changing, and deleting these
 helper methods manually in my Activity class as I change the items in
 strings.xml.

 Thanks in advance for any suggestions.

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] How to create graphical/advanced menus??

2010-03-21 Thread Mark Murphy
Kofa wrote:
 I searched in google but didn't find anything about graphical or
 advanced menus or contextmenu.
 I'm building a game and I need to make a contextmenu with the units to
 build. It should have an icon and a description of the unit, like HP,
 attack, defense, etc.

Context menus do not have icons.

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

Android Online Training: 26-30 April 2010: http://onlc.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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: How the implicit Intent works.

2010-03-21 Thread Kumar Bibek
What are you looking for exactly. The docs clearly explain their
usage. You can also search some examples.

Thanks and Regards,
Kumar Bibek

On Mar 21, 11:24 am, chetan chetanchauha...@gmail.com wrote:
 Hi All,
          Can somebody help me to understand the implicit intents by
 example.

 Thanks
 Chetan

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: ListView not responding to Click or KeyPress

2010-03-21 Thread Brion Emde
I'm pretty sure all these people found the answer to their problem, as
this is such a common need.

The minimum you should need to make a clickable list view is this:


@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.yourlistview);
setListAdapter(new YourAdapter());
}

protected void onListItemClick() {
}

should now be called.

On Mar 21, 8:55 am, pentium10 pentiu...@gmail.com wrote:
 Is there any solution on this problem? I ran into the same, and
 looking for ways to get this done.

 On Feb 4, 5:05 pm, chboing chbo...@gmail.com wrote:



  i have the exact same problem ...

  i have an Activity that contains a Listview which is used in a Dialog
  My ListView contains only TextViews. It's initialized in my own
  baseAdapter. Built from a txt file on the sd card.
  it's working nicely except the main goal for me, select one of those
  item in the ListView :(

  and same as Ted, in debugger mode, nothing happen when i click one
  item, it doesnt go into the onItemClick method

  anyone got an idea ? i lost some hours already on this ...

  did you find anything new about this Ted ?

  On 6 jan, 02:15, Ted ted.eker...@gmail.com wrote:

   Hey!
   I think I have the same problem, and I donothave any focusable
   children. My layout for a Row in the ListView contains:

   LinearLayout
      |
      +-- ImageView
      |
      +-- LinearLayout
              |
              +-- TextView
              |
              +-- TextView
              |
              +-- TextView

   and the Main activity is like this:

   code
   public class Main extends Activity
   {
           ArrayListNode nodes;

       /** Called when the activity is first created. */
       @Override
       public void onCreate(Bundle savedInstanceState)
       {
           requestWindowFeature(Window.FEATURE_NO_TITLE);
           super.onCreate(savedInstanceState);
           setContentView(R.layout.main);

           ArrayListNode nodes = new ArrayListNode();
           nodes.add(new Node(My name, My text, 13:10, 0));

           NodeRowAdapter nra = new NodeRowAdapter(this, nodes);

           ListView listView1 = (ListView) findViewById
   (R.id.ListViewNodes);
           listView1.setOnItemClickListener(newOnItemClickListener() {

                   public void onItemClick(AdapterView? parent,Viewview, 
   int
   position, long id)
                   {
                           System.out.println (get onItem Click position=
   +position);
               }
                   });
           listView1.setAdapter(nra);
       }}

   /code

   It seems to me as nothing at all happens when I click the item in the
   ListView...

   On 4 Dec 2009, 19:43, Romain Guy romain...@android.com wrote:

This is unnecessary. This problem will occur if your list item
contains focusable children (like buttons, edittexts, etc.)

On Thu, Dec 3, 2009 at 4:20 PM, hwii77 hwi...@gmail.com wrote:
 maybe maybe try this: Add android:clickable=true  (and
 android:focusable=true)

 On Dec 2, 1:37 pm, n179911 n179...@gmail.com wrote:
 Hi,

 I have a simple ListView in my layout.xml file.

     ListView android:id=@+id/action_list
             android:layout_width=fill_parent
             android:layout_height=wrap_content
         /

 And in my javacode, I add a setOnItemClickListener() to my listview:

 listView.setOnItemClickListener(newOnItemClickListener() {

                 public void onItemClick(AdapterView? 
 parent,Viewview,
 int position, long id) {
                     System.out.println (get onItem Click position=
 +position);

                 }
             });

 But when I run on G1. I don't see any print out when I click an item 
 on the
 ListView on the phone.
 Or when I select an item using track ball and press CENTER.

 Can you please tell me why to resolve my problem?

 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

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

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

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 

[android-developers] Re: SOLVED - Eclipse problem with Project contains errors and nothing is obviously wrong

2010-03-21 Thread DonFrench
This happens when the active file in the editor at the time you build
is an XML file.  You can avoid it by selecting a Java file in the
editor before you build.   Besides doing a ProjectClean, you can just
delete the .out file and then select a Java file and rebuild.

On Mar 20, 9:02 pm, Stephen Lebed srle...@gmail.com wrote:
 I haven't seen this mentioned anywhere so I'm posting it here if other
 people come across this issue.

 Somethings I'll have an ?.xml file selected when I compile a project,
 only to have a ?.out.xml generated.  Deleting the file doesn't clear
 the error, and Eclipse won't compile the project.  It just reports
 that your project contains errors.

 The solution is to go to Project/Clean.  This will clear the error in
 the project and allow it to compile.

 I hope this is helpful to someone.  It may have been obvious, but not
 to me.

 Best,
 Stephen Lebed

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Param in android

2010-03-21 Thread Bob Kerns
Why are you asking us this question?

You can go to the top of your file, and find package the Params class
lives in.

Then you can look at the Javadoc for that class. If it's in an old SDK
(I don't think it has EVER been in the Android SDK -- but that will be
apparent if you check the import), you should look in the
documentation for the specific version of the JDK.

More likely, it's a third party dependency. You can look in the maven
or ant script for the project, or whatever it uses to build it, to get
a clue as to the dependencies.

More likely still, if I infer correctly from the names in the code,
it's a part of the very package you're trying to build, and you'll
have to locate it yourself.

There's no way we can help you with this. If you draw a blank, you
should be able to Google the full package + class name and locate
something about it.

On Mar 21, 2:27 am, rizwan rizcs...@gmail.com wrote:
 I am working on an open source application which is build on old
 version of sdk ,that's I am  unable to figure out what is prm is

 Params prm = new Params() ;
 it contain methods like
  prm.getParam(0);
 prm.getCount()
 Can anyone suggest what it's replacement in android latest sdk . I am
 not whether it's built in class or user define class. please advise if
 it's a android sdk class.

 private void ProcessMode(char ch) {
                 if (ch = '0'  ch = '9') {
                         prm.setCurrentParam(prm.getCurrentParam() * 10 + (ch 
 - '0'));
                         return;
                 }
                 if (ch == ';') {
                         prm.nextParam();
                         return;
                 }
                 switch (ts) {
                 case TerminalState.MODE:
                         CommandMode(ch);
                         break;
                 case TerminalState.CSI:
                         CommandCSI(ch);
                         break;
                 case TerminalState.G0:
                     CommandG0(ch);
                     break;
                 case TerminalState.G1:
                         CommandG1(ch);
                         break;

                 }
                 prm.Clear();
                 ts = TerminalState.REGULAR;
         }

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: App not visible in Australia

2010-03-21 Thread Bob Kerns
begin bad typography
Select the APOlicationSTORE for your business.
/end bad typography
Select Small  Medium Business
Select Corporate  Government Enterprise

I guess they're not interested in anybody but businesses. Nor in
cooperation with the developers that enrich the platform.

Also, they have almost no apps, and their developer program is in
closed alpha, and they don't give any information at all about what it
will look like from a developer's standpoint, terms, etc.

FAIL

On Mar 20, 11:52 pm, brucko geoff.bruck...@gmail.com wrote:
 String,

 Its right about Optus. They will not support Android Market and at one
 stage were talking of their own app store. Also drawn into this are
 the vitrual carriers TPG (which I am on), Virgin Mobile and Dodo ( I
 think). There is a forum on the problem at Whirlpool

 http://forums.whirlpool.net.au/forum-replies.cfm?t=1248135p=5

 Which mostly is a bit of a frustrated whinge at Google and anyone in
 general before people realised Optus was not coming to the table. They
 have launched their own app store

 http://appstore.optusbusiness.com.au

 On Mar 20, 8:20 pm, String sterling.ud...@googlemail.com wrote:

  IMHO, Google should just keep the 30% in this case. That'd give the
  carrier a clear incentive to get their act together. But nobody asks
  me. :^)

 Couldn't agree more

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] libgdx - a game development library with a twist

2010-03-21 Thread Mario Zechner
Hi there,

I'm a bit hesitant to present this here already but today i put out
the first architecturally frozen release of my game development
library called libgdx. I go ahead and post the content of the
description page of libgdx here so you get an idea what it is all
about. A series of articles is currently in preparation at my blog at
http://apistudios.com/hosted/marzec/badlogic/wordpress/?cat=17. I will
continue extending the library in the near future and hope that some
of consider joining the effort. Without further ado, here's a simple
FAQ for libgdx.

=== What is libgdx? ===
Libgdx is my attempt at a cross-platform game development library
written in Java with some JNI code for performance hungry code. It
abstracts away the differences between writting an OpenGL application
for the desktop via Jogl and doing the same for the Android platform.
This allows you to prototype and develop your application entirely on
the desktop and only needing 6 lines of code to execute it on Android.
Neat, so what does it offer?

Libgdx offers modules for graphics via OpenGL ES, audio, input and
file i/o. All modules abstract away system specifics so you can
execute the same code on the desktop and Android. The graphics module
offers full bindings to OpenGL ES 1.0, 1.1 and 2.0. On the desktop
almost all of the OpenGL ES functionality is emulated. The audio
module features a native MP3Decoder and simple classes to playback
sound effects as well as stream music. The input module provides you
with information about the current state of all input devices
available. This includes the touch screen, the accelerometer and the
keyboard. On the desktop the touch screen is emulated via mouse input,
the accelerometer is of course not available and keyboard input is
mapped accordingly. The file i/o module offers you a unified way to
read application internal data which map to assets on Android and
files in the root directory of the application on the desktop.
Additionally the module allows you to read and write external data. On
Android this maps to the external storage device like the SD-card, on
the desktop all paths are relative to the user’s home directory.

In the future all of these modules will get extensions. For example,
classes for doing common 2D graphics like tile maps or animated
sprites will get included. Other additions will be bindings to 2D and
3D rigid body physics libraries like Box2D and Bullet.
Ok, but can i write commercial games with this?

Libgdx is licensed under the LGPL so there’s no problem when you want
to use it in your paid game.
Where can i find it?

You can either check out the code via SVN from
http://code.google.com/p/libgdx/source/browse/#svn/trunk/gdx/src/com/badlogic/gdx
or get the latest build from the download page at
http://code.google.com/p/libgdx/downloads/list. The build files
contain all the needed jars for the desktop version as well as the
shared libraries for the desktop and Android.

To get something setup fast you can simply download the gdx-
helloworld.zip from the download page above. It contains two eclipse
project, one for the desktop version and one for Android. All the jar
dependencies and shared libraries are in place and the inter project
dependencies are also setup properly. The Android project depends on
the desktop project which hosts all the code. The Android project only
houses a single class that is the Activity of the Android version of
the application. Of course you have to create a Run Configuration for
each project which starts the main class and activity respectively. On
the desktop you have to pass the VM argument “-
Djava.library.path=libs/” to the VM in order for libgdx to find the
shared library. On Android no special actions are needed.


=== That’s all nice and good, but is there any documentation? ===
Glad you ask! Everything in libgdx has extensive Java docs attached to
it. In the binary distribution you will find a file called gdx-version-
sources.jar. You can attach that to your Java projects to get the Java
doc info for all classes and methods that are offered to you by
libgdx. You can also browse the SVN repository to get to that
information. You can start at 
http://code.google.com/p/libgdx/source/browse/#svn/trunk/gdx/src/com/badlogic/gdx
and check out the main interfaces first, then move on to the packages
in that directory to see what else is available to you. Additionally
i’m writting a series of small blog posts that illustrate the various
functionalities libgdx offers you. You can find all of those at
http://apistudios.com/hosted/marzec/badlogic/wordpress/?cat=17.

=== I want to help! ===
Perfect! What’s needed is an understanding of Java, Eclipse and
subversion. Everything else you can learn on the way. What’s needed at
the moment is the following:

* Small examples that illustrate the the various classes
* Helper classes for 2D sprite and tilemap rendering
* Whatever comes to your mind!

=== Dude, you’re code is bugged ===

[android-developers] Re: Default orientation of device

2010-03-21 Thread Bob Kerns
I suggest you run Google Map, and turn the device, and observe what it
does. If it doesn't change, then you should go to your phone's
Settings / Sound and Display / Orientation, and check the checkbox
again (the default) and try again

You will find that your ideas about map applications and user
expectations are far off base.

I can tell you that if Google Map behaved like you say, I would be
rather pissed. I don't hold the device in some position, and then turn
my head around. If landscape mode serves better, I turn the phone --
and expect the map to stay oriented.

My recommendation is to do NOTHING. If the user wants to set a default
for his device, he can do so.

If you think your app is somehow different, you can do what I do --
offer a preference option in your application. But make the default be
ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED.

I only include the option because it solves a few problems with
interaction with other buggy apps.


On Mar 21, 9:27 am, neha neha31gu...@gmail.com wrote:
 On Mar 21, 8:35 pm, TreKing treking...@gmail.com wrote:

  On Sun, Mar 21, 2010 at 8:11 AM, neha neha31gu...@gmail.com wrote:
   I want to write a application which should open in default orientation
   of the device and should not change the orientation with device
   rotation or slide-out keyboard opening/closing (if present).

  Now I'm curious - why, exactly, do you want to lock to one orientation when
  you apparently don't care which it is?

 Lets take an example of map application like Google maps. Generally a
 good map applications does not orientate with device, to allow the
 user to view map from any angle they desire.
 As this application does not want orientation to change, so we need to
 lock the orientation of the application. On any given device, this
 application should always display the same orientation irrespective of
 orientation of device at start-up. Reason for restricting the
 orientation to default orientation of device is that, it is the most
 likely position in which the user will hold the device and start the
 application. So on DROID this application would always be portrait but
 it would not be a good idea to display this application as portrait on
 tablets where device default orientation is landscape.

 On Mar 21, 8:35 pm, TreKing treking...@gmail.com wrote:



  On Sun, Mar 21, 2010 at 8:11 AM, neha neha31gu...@gmail.com wrote:
   I want to write a application which should open in default orientation
   of the device and should not change the orientation with device
   rotation or slide-out keyboard opening/closing (if present).

  Now I'm curious - why, exactly, do you want to lock to one orientation when
  you apparently don't care which it is?

  --- 
  --
  TreKing - Chicago transit tracking app for Android-powered 
  deviceshttp://sites.google.com/site/rezmobileapps/treking

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Application losing SharedPreferences and Sqlite database on Droid

2010-03-21 Thread Matt (preinvent)
 1. Have you been getting reports of problems from Nexus One owners? In
 other words, is this a DROID/Milestone thing or a 2.0+ thing?

Nope, Droid/Nilestone only, not Nexus One.  I had one possible report
from an HTC Hero owner, but have yet to confirm.  Will follow up.

 2. Are you writing other local files directly (e.g., using File objects
 and java.io)? Are you sure you're not clobbering your files yourself by
 accident?

Nope, SQLite and SharedPrefs only.


 3. Since you mentioned rooting the phone and looking at directories, I
 assume these files are stored on the built-in flash, not the SD card --
 right? That would eliminate Mr. Thomas' comments regarding FAT, because
 the on-board flash is not FAT.

Correct - internal storage only.  Gets stored in the standard app data
directory - /data/data/com.preinvent.batteryleft/

  It must be a filesystem problem (delayed writes?), or something buggy
  in the underlying sqlite code.

 Can't be the latter, as that would not affectSharedPreferences.

I now believe that the SharedPrefs issue was a red herring.  Since I
set all my app preferences to use persistent storage (I didn't realise
this was NOT the default) I only experience problems with the DB.  The
most recent DB failures have not affect my shared preferences.  The
reason they were both getting lost is that when the DB gets corrupted,
my process was killed, losing all non-persisitent shared prefs.  ie
lost SharedPrefs was a consequence of my process being killed which
was a consequence of the DB corruption problem.

 That probably won't help. Your reported symptoms indicate that multiple
 file types (SQLite databases and shared preference XML files) are being
 harmed. You could switch from SQLite to JSON files, and those will may
 well get trashed too.

As above - I don't think Shared Prefs are an issue now.

 If you can get a database in the database disk image is malformed
 state, we can examine it to figure out how it is damaged:

I can try.. problem is that Android deletes the DB file as soon as
that error occurs so I don't know how to get the malformed DB.

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: AlarmManager on droids

2010-03-21 Thread Derek
Refresh is every minute. We didn't get crash report from 2.x users
yet.
Here is the WakefulIntentService I'm using:

public abstract class WakefulIntentService extends IntentService
{
public static final String LOCK_NAME_STATIC =
my.app.Service.Static;
private static PowerManager.WakeLock lockStatic = null;
private static final String TAG =
WakefulIntentService.class.getName();

public WakefulIntentService(String name)
{
super(name);
}

public static void acquireStaticLock(Context context)
{
try
{
getLock(context).acquire();
LogHelper.i(TAG, Wake lock acquired);
}
catch (Throwable e)
{
LogHelper.e(TAG, Cannot acquire wake lock, e);
}
}

synchronized private static PowerManager.WakeLock getLock(Context
context)
{
if (lockStatic == null)
{
PowerManager mgr =
(PowerManager)context.getSystemService(Context.POWER_SERVICE);
lockStatic = 
mgr.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
LOCK_NAME_STATIC);
lockStatic.setReferenceCounted(true);
}
return(lockStatic);
}


/* (non-Javadoc)
 * @see
android.app.IntentService#onHandleIntent(android.content.Intent)
 */
protected void onHandleIntent(Intent intent)
{
CrashReportHandler.getInstance().init(this);
LogHelper.i(TAG, Service onHandleIntent started ( + this + )
(+Thread.currentThread()+) ( + intent + ));
try
{
processWakefulWork(intent);
}
catch (Throwable e)
{
LogHelper.e(TAG, Service Cannot perform 
onHandleIntent, e);
}
finally
{
try
{
if (getLock(this).isHeld())
{
getLock(this).release();
LogHelper.i(TAG, Wake lock released);
}
}
catch (Throwable e)
{
LogHelper.e(TAG, Cannot release wake lock, e);
}
LogHelper.i(TAG, Service onHandleIntent completed ( + 
this + )
(+Thread.currentThread()+) );
}
}

public abstract void processWakefulWork(Intent intent);
}


On Mar 20, 12:56 pm, Mark Murphy mmur...@commonsware.com wrote:
 Derek wrote:
  I've implemented it and I got the crash report from the end user. See
  details below.
  The error report is VerifyError when the broadcastReceiver tries to
  start the WakefulIntentService.
  It happens on Cupcake/Samsumg. I've tested under emulator with 1.5
  (minSDK=3) and it works perfect.
  It seems that a WakefulIntentService field or class is not valid. What
  could be the problem ?
  The service was working before without extending WakefulIntentService
  under the same device.

 Well, WakefulIntentService has a static data member for a WakeLock, but
 that's about it.

 First, make sure you're using a fairly recent version of
 WakefulIntentService -- if you had to override doWakefulWork(), that's
 recent enough.

 Also, what period are you using for the AlarmManager? I can try to
 reproduce the problem on other 1.5 equipment I have here in my Secret
 Mountain Lair.

 Also also, your earlier post mentioned you were also getting it on 2.1.
 Let me know if you get a crash report for it.

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

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

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Additional code generation after aapt runs?

2010-03-21 Thread Bob Kerns
Sure.

I wouldn't recommend messing with the actual code that generates
R.java. Too many potential compatibility problems, etc.

Instead, I'd just use an xslt ant task to generate your helper class
-- call it X -- and make it import R. If you like, you can even make
it a subclass (and give it inner classes that are subclasses of R's
inner classes).

So write your XSLT script, call it from an at task in an ant target.
XSLT can generate arbitrary text if you use the text output format.

In your ant build, just use the target.

In your Eclipse build, you'll need to add an Ant builder to invoke
your ant task. Under the Refresh tab, you'll want to tell it to
refresh the 'gen' directory after your task runs, and under the Build
Options tab, you'll want to specify a working set that refers to the
'res' directory and its  descendants, so it'll only run when they
change. Under the Targets tab, pick your generator target for  Manual
Build', 'After a Cleann', and 'Auto Build'. I don't think you'll need
'During a Clean' for this (which would be a different, 'Clean' target)
because Eclipse will be cleaning the gen directory for you anyway.

That should do it.


On Mar 21, 8:34 am, HippoMan hippo.mail...@gmail.com wrote:
 I'd like to do some additional code generation after the R.java file
 has been created by aapt. Specifically, I want to auto-generate some
 helper methods to retrieve items from R.java.

 Is there any way put my own, custom utility in place which will
 generate this extra code as part of every Android build within
 Eclipse?

 Yes, I know that I can already do this:

 String foobar = this.getString(R.string.foobar);

 I just want to generate some extra code which will allow me to so
 something like the following:

 String foobar = something.getFoobar();

 (where something is either a previously instantiated object or a
 static class reference -- depending on how I ultimately decide to
 implement this)

 This way, I won't have to keep adding, changing, and deleting these
 helper methods manually in my Activity class as I change the items in
 strings.xml.

 Thanks in advance for any suggestions.

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Additional code generation after aapt runs?

2010-03-21 Thread HippoMan
On Mar 21, 1:28 pm, Kumar Bibek coomar@gmail.com wrote:
 I don't think so it is possible.

Thank you, but after much digging around, I figured out that this is
indeed possible.

Here's what I did (under MacOSX; it should work the same under Linux,
but there
will no doubt be slight differences under Windows):

1. Write a script to read gen/package.name/R.java and res/values/
strings.xml and
then generate an extra helper class as I described above. Make sure
that the script
is chmod-ed to be executable.

2. Go to [current project]-Properties-Builders.

3. Select New.

4. Select Program (I guess this can also be done via an Ant script,
but I
didn't try it).

5. Give the builder a name in the Name field of the Main tab, and
then
fill in Location,  Working Directory, and Arguments as
appropriate. The
Location field is the full pathname of my script.

6. Optionally fill in any appropriate data in the Refresh,
Environment,
and Build Options tabs. I just kept the defaults in each of these
tabs,
but you may want to tweak some of these options, depending on how
you want your builder to run.

7. Select OK.

8. Make sure that this new builder appears after all the other ones by
the use of the Up and Down buttons.

9. Select OK again.

This works for me. Now, every time my project gets rebuilt, my helper
class
gets automatically generated.

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Re: Application losing SharedPreferences and Sqlite database on Droid

2010-03-21 Thread Mark Murphy
Matt (preinvent) wrote:
 I now believe that the SharedPrefs issue was a red herring.  Since I
 set all my app preferences to use persistent storage (I didn't realise
 this was NOT the default) I only experience problems with the DB.

AFAIK, SharedPreferences always use persistent storage. You just have
to call commit() on your SharedPreferences.Editor object.

 I can try.. problem is that Android deletes the DB file as soon as
 that error occurs so I don't know how to get the malformed DB.

Well, that's even odder.

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

Android 2.0 Programming Books: http://commonsware.com/books

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Additional code generation after aapt runs?

2010-03-21 Thread HippoMan
On Mar 21, 4:13 pm, Bob Kerns r...@acm.org wrote:
 [  ... ]

 Instead, I'd just use an xslt ant task to generate your helper class
 -- call it X -- and make it import R. If you like, you can even make
 it a subclass (and give it inner classes that are subclasses of R's
 inner classes).

 [ ... etc. ... ]

Thank you. Yes, I see how this would work, as well.

The advantage of my method (adding a new builder in the chain) is that
I don't need
to run ant or create a special target. My builder runs as part of the
normal build process.

But I don't mean to disparage your excellent suggestion. I'm just
contrasting it with
what I came up with. Different people might want to run things in
different ways to
suit their individual needs.

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Re: AlarmManager on droids

2010-03-21 Thread Mark Murphy
Derek wrote:
 Refresh is every minute. 

:: blink, blink ::

Every *minute*?

That's not really a good idea.

If you have a short-term need for an every-minute bit of work, you may
as well use a regular Service and a Timer/TimerTask. This would, by
definition, eliminate your classloading problem, because you wouldn't be
starting and stopping the service.

If you have a long-term need for an every-minute bit of work, you might
want to switch to developing for things that don't run on really small
batteries and have very little RAM. :-)

While my WakefulIntentService sample uses a five-minute period, even
that's kinda frequent -- I only use that to limit frustration for people
testing the code.

 Here is the WakefulIntentService I'm using:

That resembles one I wrote. Releasing the lock in finally {} is a good
move -- I need to fix mine for that.

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

Android 2.0 Programming Books: http://commonsware.com/books

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Big difficult to develop in Android :( (I'm italian)

2010-03-21 Thread massimo
For example I have this problem now. I have wrote this code:

package com.Prova;

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

public class prova extends Activity {


/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//setContentView(R.layout.main);
}

Paint paint;
protected void onDraw(Canvas canvas){

Bitmap
bitmap=BitmapFactory.decodeResource(getResources(),R.drawable.divano3);
canvas.drawBitmap(bitmap, 0, 0, paint);
}
}

But it doesn't work like if the onDraw method don't work. How is
possible?

On 20 Mar, 12:45, Mark Murphy mmur...@commonsware.com wrote:
 massimo wrote:
  For example, I have try to use the demo files of Lunar. But there
  isn't a file inside di example. There isn't R.java file.

 R.java is generated as part of the compile process. You will find it in
 the gen/ directory tree after your first build.

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

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

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Apps not shown in 2.1 Market

2010-03-21 Thread tjlian616
Dear all,

I published several free and paid app in the Market. I recently get
several complains from customers about not finding my app in the 2.1
Market. Even if they have bought them before, they can't find it in
the market or their download list after updating to 2.1.

Can anyone tell me what the problem is?

Thanks a lot!!

P.S. all in north america market.

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers]

2010-03-21 Thread جنوبي مهاجر


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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Problem launching my own (camera) application on press of Camera-button (part 2)

2010-03-21 Thread DulcetTone
I am trying the same thing, and failing as you are to use
abortBroadcast() to avoid having Camera launch.

One thing you should note:  999 is apparently the highest priority a
non-system app should use on its intent filters.  However, 999 did not
help me get there before Camera (apparently).

I will note that Button Shortcut apparently does this successfully.  I
wonder if Button Shortcut is alphabetically less than Camera.  My
app it alphabetically greater.

Are you sure that this is an unordered broadcast?

tone

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: ListView not responding to Click or KeyPress

2010-03-21 Thread Brion Emde
Actually, I could be more clear.

I think that every Android beginner at least build the sample programs
that have stuff in them they are interested in. For example, the
APIDemos sample contains many example of ListViews.

If you don't want to build the APIDemos sample, most of what is there,
including many ListView-based programs (and lots of other interesting
stuff) in the Resources Tab, under Sample Programs, here:

http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/List1.html

The full index for the APIDemos sample in the Resources is:

http://developer.android.com/resources/samples/ApiDemos/index.html


On Mar 21, 9:55 am, pentium10 pentiu...@gmail.com wrote:
 Is there any solution on this problem? I ran into the same, and
 looking for ways to get this done.

 On Feb 4, 5:05 pm, chboing chbo...@gmail.com wrote:



  i have the exact same problem ...

  i have an Activity that contains a Listview which is used in a Dialog
  My ListView contains only TextViews. It's initialized in my own
  baseAdapter. Built from a txt file on the sd card.
  it's working nicely except the main goal for me, select one of those
  item in the ListView :(

  and same as Ted, in debugger mode, nothing happen when i click one
  item, it doesnt go into the onItemClick method

  anyone got an idea ? i lost some hours already on this ...

  did you find anything new about this Ted ?

  On 6 jan, 02:15, Ted ted.eker...@gmail.com wrote:

   Hey!
   I think I have the same problem, and I donothave any focusable
   children. My layout for a Row in the ListView contains:

   LinearLayout
      |
      +-- ImageView
      |
      +-- LinearLayout
              |
              +-- TextView
              |
              +-- TextView
              |
              +-- TextView

   and the Main activity is like this:

   code
   public class Main extends Activity
   {
           ArrayListNode nodes;

       /** Called when the activity is first created. */
       @Override
       public void onCreate(Bundle savedInstanceState)
       {
           requestWindowFeature(Window.FEATURE_NO_TITLE);
           super.onCreate(savedInstanceState);
           setContentView(R.layout.main);

           ArrayListNode nodes = new ArrayListNode();
           nodes.add(new Node(My name, My text, 13:10, 0));

           NodeRowAdapter nra = new NodeRowAdapter(this, nodes);

           ListView listView1 = (ListView) findViewById
   (R.id.ListViewNodes);
           listView1.setOnItemClickListener(newOnItemClickListener() {

                   public void onItemClick(AdapterView? parent,Viewview, 
   int
   position, long id)
                   {
                           System.out.println (get onItem Click position=
   +position);
               }
                   });
           listView1.setAdapter(nra);
       }}

   /code

   It seems to me as nothing at all happens when I click the item in the
   ListView...

   On 4 Dec 2009, 19:43, Romain Guy romain...@android.com wrote:

This is unnecessary. This problem will occur if your list item
contains focusable children (like buttons, edittexts, etc.)

On Thu, Dec 3, 2009 at 4:20 PM, hwii77 hwi...@gmail.com wrote:
 maybe maybe try this: Add android:clickable=true  (and
 android:focusable=true)

 On Dec 2, 1:37 pm, n179911 n179...@gmail.com wrote:
 Hi,

 I have a simple ListView in my layout.xml file.

     ListView android:id=@+id/action_list
             android:layout_width=fill_parent
             android:layout_height=wrap_content
         /

 And in my javacode, I add a setOnItemClickListener() to my listview:

 listView.setOnItemClickListener(newOnItemClickListener() {

                 public void onItemClick(AdapterView? 
 parent,Viewview,
 int position, long id) {
                     System.out.println (get onItem Click position=
 +position);

                 }
             });

 But when I run on G1. I don't see any print out when I click an item 
 on the
 ListView on the phone.
 Or when I select an item using track ball and press CENTER.

 Can you please tell me why to resolve my problem?

 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

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

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

-- 
You received this message because you are 

[android-developers] Re: Audio Flickering - my code, my computer or android emulator?

2010-03-21 Thread Gabriel Simões
Another conclusion:

I´ve coded another app which only uses AudioTrack and it works
perfectly!
So, the only thing left to blame is the emulator.

On 20 mar, 16:30, Gabriel Simões gsim...@gmail.com wrote:
 In this case no news = bad news ...

 Based on Mario´s post and the possibilities I could think about in the
 last days I have modified the code trying to isolate the issues like
 calling blocking methods and as a consequence loosing part of the
 audio stream, having buffer overflows, etc, as this could be the
 reason for the bad audio playback.

 Here is the code:

 package com.example.test;

 import android.app.Activity;
 import android.media.AudioFormat;
 import android.media.AudioManager;
 import android.media.AudioRecord;
 import android.media.AudioTrack;
 import android.media.MediaRecorder;
 import android.os.Bundle;

 public class test extends Activity {

    /** Called when the activity is first created. */
   �...@override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        Record record = new Record();
        record.run();
    }

       public class Record extends Thread
       {
               public void run() {
                 android.os.Process.setThreadPriority
                 (android.os.Process.THREAD_PRIORITY_URGENT_AUDIO);

                                AudioRecord arec = new
 AudioRecord(MediaRecorder.AudioSource.MIC,
                                                8000,

 AudioFormat.CHANNEL_CONFIGURATION_MONO,

 AudioFormat.ENCODING_PCM_16BIT,
                                                32000);

                                AudioTrack atrack = new
 AudioTrack(AudioManager.STREAM_MUSIC,
                                                8000,

 AudioFormat.CHANNEL_CONFIGURATION_MONO,

 AudioFormat.ENCODING_PCM_16BIT,
                                                56000,

 AudioTrack.MODE_STREAM);

                                short[] buffer = new short[64000];

                                int t = 0;
                                arec.startRecording();
                                while(t  64000)
                                    t += arec.read(buffer, t, 8000);
                                arec.stop();

 arec.release();
                                t = 0;
                                atrack.play();
                                while(t  64000)
                                    t += atrack.write(buffer, t, 8000);
                                atrack.stop();
                                atrack.release();
               }
       }

 }

 As you can see, first I record the audio and just after stop recording
 I start playing it. As expected there was no AudioRecord buffer
 overflow messages and I´ve indexed the buffers by the return values
 received by calling read() and write().
 The sonic result was the same: chopped audio with a sensation of a
 slow playback, and distorted. The impression I have also is that it´s
 not recording for the whole 6 seconds, or at least the playback doesn
 ´t last it all.

 Could anyone try this simple code on a real device and check if it
 works ok?

 Thanks,
 Gabriel Simões

 On 17 mar, 22:58, Gabriel Simões gsim...@gmail.com wrote:



  Thanks for your answer Mario!

  Yes, I wrote it wrong ... should have been AudioTrack.write() instead
  of AudioTrack.play().
  The same idea came to my mind a couple of hours ago. Since AudioTrack
  when set
  as stream will only start playing at the time it´s internal buffer
  gets full, write()
  could block if the buffer is full to prevent an overflow.

  To quick test it, I have instantiated AudioTrack with an internal
  buffer a lot
  bigger than the one I used to read and write the audio streams. This
  way my app should
  take longer to start playing and get a pretty big delay, but the
  audio
  should not chop nor present any artfacts at least for the first
  seconds.

  The results I got presented the same problems, but based on that I
  will try it again.

  One other thing that came to my mind is, once a buffer overflow
  happens, does AudioRecord handle the problem and reorganize the buffer
  or
  should I flush it and start from 0 (the buffer gets messed and this
  ends giving a bad audio signal with chops, delay, etc...)?

  Gabriel

  On 17 mar, 21:07, Mario Zechner badlogicga...@gmail.com wrote:

   Hi there,

   not sure whether i can help but you stated that you couldn't find
   anywhere that AudioTrack.play()  (which should probably read
   AudioTrack.write()) does not block. Well, it does. And if you do the
   following in your thread:

   AudioRecord.read(sampels)
   AudioTrack.write(samples)

   i can imagine that the write will block long enough for the
   AudioRecord to overflow as you don't read in the next buffer of
   samples early enough. You could try decreasing the number of samples
   you read and write so the write will not block as long. No idea
   whether 

[android-developers] Documentation on SMS Content Provider?

2010-03-21 Thread Ali Chousein
Hi,

Does anyone know if there is documentation explaining the SMS content
provider?

-Ali

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Documentation on SMS Content Provider?

2010-03-21 Thread Mark Murphy
Ali Chousein wrote:
 Does anyone know if there is documentation explaining the SMS content
 provider?

The SMS content provider is not part of the Android SDK at this time --
sorry!

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

Warescription: Three Android Books, Plus Updates, One Low Price!

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Documentation on SMS Content Provider?

2010-03-21 Thread Ali Chousein
Clear, thanks for the answer.

-Ali

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Re: Application losing SharedPreferences and Sqlite database on Droid

2010-03-21 Thread Michael Thomas
So I haven't been following this thread very closely so apologies in 
advance if you've already

been over this.

The SQLite thing kind of has the stench about it like there are possibly 
multiple writers. AFAIK,
SQLite is very single threaded and multiple writers is a big no-no. So 
let me toss something out
that I just noticed about the app lifecycle: it seems that there is the 
possibility that you can have
multiple running versions of the same app. This seems to be especially 
true when you have the
screen orientation follow-me switch on. If you're doing some finish up 
db io on the old orientation,
and the new orientation fires up, you might be setting yourself up for a 
collision. There are other
ways that this can happen, but the orientation follow-me switch seems to 
really up the likelihood

by exercising that window a lot more.

Mike

Mark Murphy wrote:

Matt (preinvent) wrote:
  

To discount any possibility of concurrency problems I've synchronized
the static getInstance on my singleton and every function that calls
the DB (be it read or write).  Makes no different though... it just
wiped it all again.



1. Have you been getting reports of problems from Nexus One owners? In
other words, is this a DROID/Milestone thing or a 2.0+ thing?

2. Are you writing other local files directly (e.g., using File objects
and java.io)? Are you sure you're not clobbering your files yourself by
accident?

3. Since you mentioned rooting the phone and looking at directories, I
assume these files are stored on the built-in flash, not the SD card --
right? That would eliminate Mr. Thomas' comments regarding FAT, because
the on-board flash is not FAT.

  

It must be a filesystem problem (delayed writes?), or something buggy
in the underlying sqlite code.



Can't be the latter, as that would not affect SharedPreferences.

  

I'll gather all the info when I have time.. right now I just need to
find a working way of storing data - 65k+ angry users to appease!



That probably won't help. Your reported symptoms indicate that multiple
file types (SQLite databases and shared preference XML files) are being
harmed. You could switch from SQLite to JSON files, and those will may
well get trashed too.

If you can get a database in the database disk image is malformed
state, we can examine it to figure out how it is damaged:

-- data OK but checksum wrong?
-- random bits of the file have invalid data (e.g., your delayed writes
concept)
-- the whole file was replaced by a PNG image that you downloaded and
saved to the wrong file by accident
-- something else

Similarly, if you do elect to switch to some other form of storage, and
that starts failing (e.g., JSON parse() exceptions), we can look at
those files and see what exactly is going on.

  


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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the words 
REMOVE ME as the subject.


Re: [android-developers] Re: Default orientation of device

2010-03-21 Thread Michael Thomas

Mark Murphy wrote:

Michael Thomas wrote:
  

Sounds like you want to initially set up a sensormanager to listen to
orientation changes
and just clamp down the orientation to whatever the first orientation
update shows you
as being.



You can get the current orientation from the Configuration object, which
you can get from a Resources object, which you can get via
getResources() on a Context.
  


Oh, ok... even easier :)

However, that is not some system-defined default orientation. It's
just the orientation your activity is starting with. So, if I hold my
Nexus One in landscape, and turn it on, activities will be in the
landscape orientation, even though the OP's notion is that the default
orientation of a Nexus One is presumably portrait.

  


Right, I was only guessing that that's what they meant by default 
orientation.



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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the words 
REMOVE ME as the subject.


[android-developers] Re: SOLVED - Eclipse problem with Project contains errors and nothing is obviously wrong

2010-03-21 Thread Stephen Lebed
Unfortunately this hasn't worked for me since I updated either eclipse
or the android sdk.  I'm not sure which one, but in the past I could
just delete the file and select the java file and recompile.  Now it
doesn't work and the only way to make it work is by Cleaning the
project.

On Mar 21, 11:05 am, DonFrench dcfre...@gmail.com wrote:
 This happens when the active file in the editor at the time you build
 is an XML file.  You can avoid it by selecting a Java file in the
 editor before you build.   Besides doing a ProjectClean, you can just
 delete the .out file and then select a Java file and rebuild.

 On Mar 20, 9:02 pm, Stephen Lebed srle...@gmail.com wrote:



  I haven't seen this mentioned anywhere so I'm posting it here if other
  people come across this issue.

  Somethings I'll have an ?.xml file selected when I compile a project,
  only to have a ?.out.xml generated.  Deleting the file doesn't clear
  the error, and Eclipse won't compile the project.  It just reports
  that your project contains errors.

  The solution is to go to Project/Clean.  This will clear the error in
  the project and allow it to compile.

  I hope this is helpful to someone.  It may have been obvious, but not
  to me.

  Best,
  Stephen Lebed

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Additional code generation after aapt runs?

2010-03-21 Thread Bob Kerns
Actually, mine runs as part of the normal build process too. Using ant
builder instead of a program builder gives you full cross-platform
compatibility. We're both adding builders, just different types.

Either one will work fine. But I recommend an ant builder over a
program builder, because there are always other reasons that come
along to have an ant script -- for example, production builds with
tagging, etc. You can also set up other tasks to perform besides
builds.

But that's a relatively mild recommendation, especially if you only
develop or need to develop on one platform.

i suspect that by leaving off a .cmd extension, and putting a bit of
script in the.'toollcmd' file to run the main script in a 'tool' file,
you could set up program builders to work on both Unixoid and non-
unixoid platforms, but I've not tried it.

Another nice little advantage of an ant script is you don't need to
fuss with your revision control system or scripts getting execute
permission set on Unixoid systems.


On Mar 21, 1:19 pm, HippoMan hippo.mail...@gmail.com wrote:
 On Mar 21, 4:13 pm, Bob Kerns r...@acm.org wrote:

  [  ... ]

  Instead, I'd just use an xslt ant task to generate your helper class
  -- call it X -- and make it import R. If you like, you can even make
  it a subclass (and give it inner classes that are subclasses of R's
  inner classes).

  [ ... etc. ... ]

 Thank you. Yes, I see how this would work, as well.

 The advantage of my method (adding a new builder in the chain) is that
 I don't need
 to run ant or create a special target. My builder runs as part of the
 normal build process.

 But I don't mean to disparage your excellent suggestion. I'm just
 contrasting it with
 what I came up with. Different people might want to run things in
 different ways to
 suit their individual needs.

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Additional code generation after aapt runs?

2010-03-21 Thread HippoMan
On Mar 21, 7:34 pm, Bob Kerns r...@acm.org wrote:
 Actually, mine runs as part of the normal build process too. Using ant
 builder instead of a program builder gives you full cross-platform
 compatibility. We're both adding builders, just different types.

 Either one will work fine. But I recommend an ant builder over a
 program builder, because there are always other reasons that come
 along to have an ant script -- for example, production builds with
 tagging, etc. You can also set up other tasks to perform besides
 builds.

 [ ... ]

Thanks. I'll take your advice. When I have some time, I'll try to redo
my procedure under ant, if for no other reason than to learn how to do
it
in an Eclipse environment (I've used ant before, but never under
Eclipse).

By the way, one thing I noticed is that in the non-ant enviroment,
it's
hard (impossible?) for me to get the dependencies right. I only want
my class to get auto-generated when strings.xml has changed. I know
that managing dependencies like that is trivial under ant.

Also, I can't figure out how to get my auto-generated class to refresh
in the IDE after it gets re-created. I have to select Refresh or hit
F5
in order for any changes to be noticed. If I use ant, will I be able
to
force the refresh as part of the build?

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Additional code generation after aapt runs?

2010-03-21 Thread HippoMan
On Mar 21, 8:48 pm, HippoMan hippo.mail...@gmail.com wrote:
 Also, I can't figure out how to get my auto-generated class to refresh
 in the IDE after it gets re-created. I have to select Refresh or hit
 F5 in order for any changes to be noticed. If I use ant, will I be able
 to force the refresh as part of the build?

I noticed the same problem when running my script under ant. Once my
java class gets auto-generated, I have to manually refresh it in the
IDE.

But that doesn't occur when R.java gets auto-generated in a similar
fashion. Is there a way to tell the IDE to auto-refresh my generated
file every time this script runs?

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Any Bluetooth experts care to take a stab at this puzzle?

2010-03-21 Thread DonFrench
I have an Android 2.0 app that successfully sends messages to another
device via Bluetooth SPP, using a slightly modifed version of
BluetoothChat.   I only had to change the UUID to make the Chat
example work.  Here is the puzzle:  My app successfully and
consistently connects to one of two supposedly identical devices.
However, it consistently fails to connect to the other one, giving a
Service Discovery Failed message.  Yet, a similar program running on a
Windows Mobile device can connect to either of the two devices.  What
could possibly be causing the Android program to fail to connect to
one of the two devices while successfully connecting to the other,
especially since the WM program can connect to either one?  Note that
I manufacture the two devices and they have identical hardware and
software.  The program on the WM devices uses a Windows system process
for making the connection and so unfortunately I don't have access to
the actual code that they use to make the connection.

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Problem launching my own (camera) application on press of Camera-button (part 2)

2010-03-21 Thread Streets Of Boston
I think it's un-ordered, since abortBroadcast() is called, when i
debug my app, but it doesn't abort anything.

Since my code is reached (i.e. no abortion by the default camera app
earlier) and my app's call to abortBroadcast doesn't help (default
camera still starting up), i'm assuming it's an un-ordered broadcast.

I gave up on this and just do not implement the 'Camera' key.

On Mar 21, 5:07 pm, DulcetTone dulcett...@gmail.com wrote:
 I am trying the same thing, and failing as you are to use
 abortBroadcast() to avoid having Camera launch.

 One thing you should note:  999 is apparently the highest priority a
 non-system app should use on its intent filters.  However, 999 did not
 help me get there before Camera (apparently).

 I will note that Button Shortcut apparently does this successfully.  I
 wonder if Button Shortcut is alphabetically less than Camera.  My
 app it alphabetically greater.

 Are you sure that this is an unordered broadcast?

 tone

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Additional code generation after aapt runs?

2010-03-21 Thread HippoMan
Never mind. I just didn't have proper Refresh settings. I fixed them,
and now everything refreshes the way it's supposed to.

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] How create LatinIME's binary dictionary(why get the child node address by the same address)

2010-03-21 Thread a a
Dear All,
 I met a big difficiult problem, i have researched more then 5
day's. Of course i read the LatinIME's algorithm for the suggestion.
It following like that

getSuggestions--getWordsRec, and getWordsRec invoke itself when it
have a child. So the key algorithm is where is it's child.And it is:
intDictionary::getAddress(int *pos) // the pos is a father node
{
int address = 0;
if ((mDict[*pos]  FLAG_ADDRESS_MASK) == 0) {  The bit that
decides if an address follows in the next 22 bits

//   #define FLAG_ADDRESS_MASK 0x40

// 22-bit address = ~4MB dictionary size
limit, which on average would be about 200k-300k words

*pos += 1;  // so it looks never go into this branch when the
dictionay is less then 4MB, and my dictionary is only 500KB
} else {
address += (mDict[*pos]  (ADDRESS_MASK  16))  16;  //
address += (mDict[*pos + 1]  0xFF)  8;
  //
address += (mDict[*pos + 2]  0xFF);
  //
*pos += 3;
}
return address; //the address is child node's
}
For example, we typed as, the first node is find the a at the root
layler, and then find s on the a child.
Anyone can tell me what's the getAddress() meanings? i really can't
understand it well. My question is why
the child address is always :

address += (mDict[*pos]  (ADDRESS_MASK  16))  16;  //
address += (mDict[*pos + 1]  0xFF)  8;
  //
address += (mDict[*pos + 2]  0xFF);
  //

If the a have more then two child, it will only get one child,
because it always get it's child address like above.

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] How Display list of all video files on android system?

2010-03-21 Thread sri
hi guys,
i want to display all video files on system. how can i do it?
any support will be 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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Problem in read() for Bluetooth

2010-03-21 Thread madmax
I tried the InputStream.available() before reading from the device but
then it gave me the Failed to Connect; [10051] A Socket Operation was
attempted to an unreachable network.  exception.. I really cant
fathom what the problem could be!! Can you please give me pointers in
which direction i should proceed so as to actually find the real
problem??


   Peace,
 Praful.

On Mar 17, 1:20 am, moneytoo m...@seznam.cz wrote:
 Try checking InputStream.available() before reading.

 On Mar 15, 12:13 pm, Praful Sanas madmax.1...@gmail.com wrote:



  Hey guys,
                 I'm having problems during the read call of the
  InputStream. The call gives me a IOException: Software Caused Abort
  exception. I'm able to get the BluetoothSocket and also the able to
  connect to the device. My app. is in the client mode and sends in a x
  byte command to the device which is then supposed to send me a response.
  The expected response is also of x bytes. This is where the error
  arises.. While reading the response i'm getting the above mentioned error.
  Can anyone help me and tell me what i'm doing wrong?
                 Thanks.

     Peace,
        Prafull.

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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


Re: [android-developers] Re: Can't dynamically update ListAdapter for ListView

2010-03-21 Thread kavitha
Even I have same problem

Cant clear all list view items,,when i add new items,,it will add to old
ones

Can anybody help please

On Sat, Mar 20, 2010 at 7:32 PM, Tatyana Ulyanova levkat...@gmail.comwrote:

 Hello, Kumar!

 I have a problem when I try to add items to my custom adapter.
 Everytime when i add new item to adapter

  for(int i=0;im_orders.size();i++)
m_adapter.add(m_orders.get(i));

 the size of m_orders (ArrayList joined to ListAdapter) also increase
 and application hangs.

 For example, i add to m_oders 20 items i need to display, than i must
 add this items to adapter. Everytime when I add new item to adapter,
 size of m_orders becomes 21, 22, 23, ... I don't understand why.

 If i don't add items to adapter, i have empty listview.

 I hope i explain my problem :)

 Much appreciate for your time, Kumar :)))

 On 19 Бер, 20:06, Kumar Bibek coomar@gmail.com wrote:
  What errors or problem do you get?
 
  Thanks and Regards,
  Kumar Bibek
 
  On Mar 19, 8:07 pm, Tatyana Ulyanova levkat...@gmail.com wrote:
 
   Hello, friends!
 
   I have a problem with adding new items to ListView.
 
   I use custom adapter MyListAdapter. I do that way:
 
   public class MyView extends ListActivity{
 
   private ArrayListOrder m_orders = null;
   privateMyListAdapter m_adapter;
   private Runnable viewOrders;
 
   @Override
   public void onCreate(Bundle savedInstanceState) {
   super.onCreate(savedInstanceState);
   setContentView(R.layout.main);
   m_orders = new ArrayListOrder();
   this.m_adapter = new OrderAdapter(this, R.layout.row,
   m_orders);
   setListAdapter(this.m_adapter);
 
   viewOrders = new Runnable(){
   @Override
   public void run() {
   getOrders();
   }
   };
   Thread thread =  new Thread(null, viewOrders,
   MagentoBackground);
   thread.start();
   m_ProgressDialog = ProgressDialog.show(MyView.this,
 Please wait..., Retrieving data ..., true);
   }
   private Runnable returnRes = new Runnable() {
 
   @Override
   public void run() {
   if(m_orders != null  m_orders.size()  0){
   m_adapter.notifyDataSetChanged();
   for(int i=0;im_orders.size();i++)
   m_adapter.add(m_orders.get(i));
   }
   m_adapter.notifyDataSetChanged();
   }
   };
 
   private void getOrders(){
 try{
   m_orders.addAll(/*some order collection*/)
   runOnUiThread(returnRes);
   }
 
   private class OrderAdapter extends ArrayAdapterOrder {
   //code about how to get view
 
   }
   }
 
   But when I add items to my adapter:
for(int i=0;im_orders.size();i++)
   m_adapter.add(m_orders.get(i));
   the application hangs because of m_orders increase there size,
   everytime where new item adds to adapter.
 
   Friends, do you have any ideas how to implement dynamically adding
   items to custom ListAdapter? Do you see any errors in my code?
 
   Thank you very much :)))

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

 To unsubscribe from this group, send email to android-developers+
 unsubscribegooglegroups.com or reply to this email with the words REMOVE
 ME as the subject.


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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Can a image rotate 90 in YUVMonochromeBitmapSource Zxing?

2010-03-21 Thread paultwa
hi

 I have a demo based on Android1.5 and Zxing,

 our alteration is as follow:

 activity android:name=.MainActivity
   android:screenOrientation=portrait
   android:configChanges=orientation|keyboardHidden
  android:theme=@android:style/
Theme.NoTitleBar.Fullscreen

 MainActivity is a subClass of TabActivity,
 Intent captureIntent = new Intent(this, CaptureActivity.class);
 tabHost.addTab(tabHost.newTabSpec(tab_autoscan)
 .setIndicator(getString(R.string.tab_autoscan),
 getResources().getDrawable (R.drawable.tab_autoscan)).setContent
(captureIntent));

 In the class CameraManager,
   private void setCameraParameters() {
 Camera.Parameters parameters = mCamera.getParameters();
 parameters.set(orientation, portrait);
 parameters.set(rotation, 90);
 parameters.setPreviewSize(mScreenResolution.x,
mScreenResolution.y);
 mCamera.setParameters(parameters);
   }

 I am testing at 1.5 now,
 In the class DecodeThread, running the method decode, the result is
 R.id.decode_failed.
 I look up the sourcecode zxing,

   YUVMonochromeBitmapSource source = new
 
YUVMonochromeBitmapSource(data,width,height,CameraManager.get().getFramingRect());

   YUVMonochromeBitmapSource don't support  rotate function.

 Could you share a idea for solving this problem?

 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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Can a image rotate 90 in YUVMonochromeBitmapSource Zxing?

2010-03-21 Thread paultwa
hi

 I have a demo based on Android1.5 and Zxing,

 our alteration is as follow:

 activity android:name=.MainActivity
   android:screenOrientation=portrait
   android:configChanges=orientation|keyboardHidden
  android:theme=@android:style/
Theme.NoTitleBar.Fullscreen

 MainActivity is a subClass of TabActivity,
 Intent captureIntent = new Intent(this, CaptureActivity.class);
 tabHost.addTab(tabHost.newTabSpec(tab_autoscan)
 .setIndicator(getString(R.string.tab_autoscan),
 getResources().getDrawable (R.drawable.tab_autoscan)).setContent
(captureIntent));

 In the class CameraManager,
   private void setCameraParameters() {
 Camera.Parameters parameters = mCamera.getParameters();
 parameters.set(orientation, portrait);
 parameters.set(rotation, 90);
 parameters.setPreviewSize(mScreenResolution.x,
mScreenResolution.y);
 mCamera.setParameters(parameters);
   }

 I am testing at 1.5 now,
 In the class DecodeThread, running the method decode, the result is
 R.id.decode_failed.
 I look up the sourcecode zxing,

   YUVMonochromeBitmapSource source = new
 
YUVMonochromeBitmapSource(data,width,height,CameraManager.get().getFramingRect());

   YUVMonochromeBitmapSource don't support  rotate function.

 Could you share a idea for solving this problem?

 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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: onFling

2010-03-21 Thread Ajay
I did not try passing onFling and onScroll. But, I figured out the
reason for it.

I have a lot of text views in my layout. The app has to launch another
view when the user clicks on the text view.

Passing onTouch events was working perfectly earlier, but after I set
the property clickable as true, again the two HorizontalScrollViews
were out of sync and acted weirdly. I guess I will have to extend the
standard TextView widget and customize it to suit my requirement.

Thank you,
AJ

On Mar 19, 6:42 pm, social hub shubem...@gmail.com wrote:
 have u tried passing onfling and onscroll events also. that might solve some
 of ur problems.

 On Fri, Mar 19, 2010 at 8:40 AM, Ajay aja...@gmail.com wrote:
  Oops!! I still have the problem. Any thoughts anyone?

  Thank you,
  AJ

  On Mar 19, 11:54 am, Ajay aja...@gmail.com wrote:
   Finally I found a way to synchronize the scrolls. I was using a
   gesture listener to listen for scrolls/flings which did not give me
   accurate results. Now I simply pass the onTouch events from one view
   to the other view. This makes both the views to scroll perfectly in
   sync.

   On Mar 18, 5:26 pm, Ajay aja...@gmail.com wrote:

Hi,
   I am having two horizontal scroll views in my app. If I do a scroll/
fling in one view, I have to scroll/fling the other view. It does
work, but it has a minor mismatch sometimes in the amount of scroll. I
suspect this might be because theonFlinglistener callback has a
float velocity, whereas the call method fling() takes an integer
parameter. Any idea why is this mismatch?

Thank you,
AJ

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

  To unsubscribe from this group, send email to android-developers+
  unsubscribegooglegroups.com or reply to this email with the words REMOVE
  ME as the subject.



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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Re: Problem launching my own (camera) application on press of Camera-button (part 2)

2010-03-21 Thread DulcetTone
I looked at the source code for Android, and the only place I see this
Intent sent, it is indeed sent as ordered.

It's perplexing why the camera button is handled so clumsily in the
code, with apps vying for priority, and you better pray any asking
for a higher one than you offer the user a preference to NOT use the
camera button.  And even then, the app coders and user have to
implement and use (respectively) these preferences.  By contrast, the
apps wanting to launch from the Call button just sign up for it, and
the user enjoys a natural drive-by management of who will get the
sticky binding.

Way Hard for all vs Way Easy for all, respectively.

I do not know why this is not working for us.  It seems to work for
Button Shortcut.

tone


On Mar 21, 10:32 pm, Streets Of Boston flyingdutc...@gmail.com
wrote:
 I think it's un-ordered, since abortBroadcast() is called, when i
 debug my app, but it doesn't abort anything.

 Since my code is reached (i.e. no abortion by the default camera app
 earlier) and my app's call to abortBroadcast doesn't help (default
 camera still starting up), i'm assuming it's an un-ordered broadcast.

 I gave up on this and just do not implement the 'Camera' key.

 On Mar 21, 5:07 pm, DulcetTone dulcett...@gmail.com wrote:

  I am trying the same thing, and failing as you are to use
  abortBroadcast() to avoid having Camera launch.

  One thing you should note:  999 is apparently the highest priority a
  non-system app should use on its intent filters.  However, 999 did not
  help me get there before Camera (apparently).

  I will note that Button Shortcut apparently does this successfully.  I
  wonder if Button Shortcut is alphabetically less than Camera.  My
  app it alphabetically greater.

  Are you sure that this is an unordered broadcast?

  tone



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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.