[android-developers] Re: WebSerivce Integration

2011-06-22 Thread Per
I think there's a video for exactly this topic on the developer site.
/Per

On Jun 21, 5:35 pm, Sivaprakash sivaprakashshanmu...@gmail.com
wrote:
 Any sample ? Even if you respond back with stream how does my front end
 under stand the structure and behave?

 On Tue, Jun 21, 2011 at 7:11 PM, jjoe64 g.jjo...@googlemail.com wrote:
  parse it in background and as a stream. never read it with a buffer, don't
  create objects for every node/attribute ...

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

 --
 - Prakash.

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


[android-developers] Notification for a specific Device

2011-06-22 Thread Stefan S
Hi.
I'm trying to implement an Application in which you can buy some
stuff.
I've got in mind that after placing the order, the user gets a
notification when his order has passed to a delivery service.
Is it possible to push a notification to just his device?
If yes. How should this be done?

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


[android-developers] Re: UI issues

2011-06-22 Thread Stefan S
What do you wanna know?
Some specific problems?

On 22 Jun., 06:29, Zsolt Vasvari zvasv...@gmail.com wrote:
 Yes.  But won't tell you.

 On Jun 22, 12:20 pm,  νιנαソkum@r iamvijayaku...@gmail.com wrote:



  Hi,

   anyone know how to handle UI issue in different device ...

  Thanks,
  vijayakumar

  --

  Nobody can go back and start a new beginning, but anyone can start today
  and make a new ending
  -
  Thanks,
  Regards,
  νιנαソαkum@r M
  BloG:http://iamvijayakumar.blogspot.com/
  Mob.No:09048382536(Kerala)
  Mob.No:09751076707(TN)- Zitierten Text ausblenden -

 - Zitierten Text anzeigen -

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


[android-developers] GLSurfaceView show slow?

2011-06-22 Thread xuxiake2...@gmail.com
Dear all:
I  have a GLSurfaceView   in a layout, it's invisible.   After I chick
a button, I call method  GLSurfaceView.setVisibility(View.VISIBLE) to
show it .  But I  it cost 3 seconds to init the  GLSurfaceView.  T'he
time between button's onClick and GLSurfaceView.Renderer’s
onSurfaceCreated is 3 seconds. I think it's  slow .

   Any idea can speed up the init?

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


[android-developers] Fullscreen surface view

2011-06-22 Thread Martin Wallgren
Hi,

I'm trying to create a SurfaceView that covers the screen and that
does not have any scaling.

In My AndroidManifest I have

supports-screens
android:smallScreens=true
android:normalScreens=true
android:largeScreens=true
android:anyDensity=false /

and in the constructor of my surfaceView I do
  getHolder().setFixedSize(screenWidth, screenHeight); // 480, 800 in
my current emulator

The call I get to surfaceChanged is indeed the correct dimensions
  06-22 06:37:28.889: DEBUG/AnimatorThread(690): surfaceChanged
width=480 heigth=800

But when I lock the canvas I get a canvas that is only 320, 533
  06-22 06:37:28.969: DEBUG/AnimatorThread(690): Canvas[w=320, h=533]

I believe this has to do with dpi scaling. When I draw a bitmap that
is 480x800 to that canvas it will only get painted within the bounds
of the canvas (of course), and the pixels outside the canvas does not
get painter.

What can I do to get a fullscreen SurfaceView that has the same size
on the canvas as the pixel dimensions of the screen?

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


[android-developers] Re: permission for PowerManager.goToSleep

2011-06-22 Thread Pent
I guess lockNow() in DevicePolicyManager is the 'official' way.

Pent

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


Re: [android-developers] BT transfer data issue

2011-06-22 Thread wu mark
Dear :

 Thanks.

 Sorry, I'm a new learner for Android. Should I add this command in
BTServer or BTClient?

Best Regards,
Mark

2011/6/22 shailesh mistry shailesh.mistry@gmail.com

 use buffer.flush to clear last msg
 Regards,
 *Shailesh Mistry*
 +91 9974148507




 On Wed, Jun 22, 2011 at 10:53 AM, mark2011 androidmark2...@gmail.comwrote:

 Dear All :

I write a BTClient.java on a ViewPad  a BTServer.java on a ACER
 A500. I hope to tranfer data through the Bluetooth devices. When I
 input some data on Viewpad, the same data will be displayed on A500.

 My problem is that A500 will display the old buffer + replaced data.
 For example:

 BTClient input  BTServer
 display
 1.  abcdefghijklmnop  abcdefghijklmnop
 2.  12345
 12345fghijklmnop

 How do I to clear the output buffer before it display the new-coming
 data?

 Thanks.

 Best Regards,
 Mark

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


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


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

[android-developers] Re: Problem streaming radio on Android 2.2 and up

2011-06-22 Thread Kumar Bibek
For streaming, you should be using prepareAsync(). I am not sure why
the behaviour is different in pre-2.2 devices, but at-least the docs
say that for streaming, the prepare() method will not return
immediately.

http://techdroid.kbeanie.com/2011/06/streaming-radio-stations-on-android.html


On Jun 21, 2:12 am, Chandler Bennett mcbennett0...@yahoo.com wrote:
 I am currently designing an android application that incorporates
 radio streaming. The app works as it should with devices below Android
 2.2, but works slowly if the device is 2.2 or above. I am using the
 MediaPlayer object, and I am calling the 'setDataSource(mylink.com/
 radio.mp3)' method as well as the 'prepare()' method. The problem
 seems to occur when the MediaPlayer is being prepared. It just takes a
 very long time to ready itself for the play state. And again, this
 issue doesn't arise on devices below Android 2.2. Any ideas?

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


Re: [android-developers] BT transfer data issue

2011-06-22 Thread Shashidhar
Every time you read the data that you want call flush.
In your example on client side after reading abcdefghijklmnop  call flush.
You can do this every time you are done with reading.


On Wed, Jun 22, 2011 at 1:09 PM, wu mark androidmark2...@gmail.com wrote:

 Dear :

  Thanks.

  Sorry, I'm a new learner for Android. Should I add this command in
 BTServer or BTClient?

 Best Regards,
 Mark

 2011/6/22 shailesh mistry shailesh.mistry@gmail.com

 use buffer.flush to clear last msg
 Regards,
 *Shailesh Mistry*
 +91 9974148507




 On Wed, Jun 22, 2011 at 10:53 AM, mark2011 androidmark2...@gmail.comwrote:

 Dear All :

I write a BTClient.java on a ViewPad  a BTServer.java on a ACER
 A500. I hope to tranfer data through the Bluetooth devices. When I
 input some data on Viewpad, the same data will be displayed on A500.

 My problem is that A500 will display the old buffer + replaced data.
 For example:

 BTClient input  BTServer
 display
 1.  abcdefghijklmnop  abcdefghijklmnop
 2.  12345
 12345fghijklmnop

 How do I to clear the output buffer before it display the new-coming
 data?

 Thanks.

 Best Regards,
 Mark

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


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


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


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

Re: [android-developers] BT transfer data issue

2011-06-22 Thread wu mark
Dear Shailesh :

   I had added buffer.flush in the BTClient alreay. But It displays an error
if I add it in the BTServer.

Best Regards,
Mark

2011/6/22 shailesh mistry shailesh.mistry@gmail.com

 use buffer.flush to clear last msg
 Regards,
 *Shailesh Mistry*
 +91 9974148507




 On Wed, Jun 22, 2011 at 10:53 AM, mark2011 androidmark2...@gmail.comwrote:

 Dear All :

I write a BTClient.java on a ViewPad  a BTServer.java on a ACER
 A500. I hope to tranfer data through the Bluetooth devices. When I
 input some data on Viewpad, the same data will be displayed on A500.

 My problem is that A500 will display the old buffer + replaced data.
 For example:

 BTClient input  BTServer
 display
 1.  abcdefghijklmnop  abcdefghijklmnop
 2.  12345
 12345fghijklmnop

 How do I to clear the output buffer before it display the new-coming
 data?

 Thanks.

 Best Regards,
 Mark

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


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


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

[android-developers] Re: memory problem with EditText

2011-06-22 Thread Kumar Bibek
@Override
protected void onStop() {
super.onStop();
setContentView(new View(this));
}

What exactly are you trying to do here?


On Jun 21, 1:37 pm, mladen mlade...@gmail.com wrote:
 Hello,
    I am trying to optimize the memory usage of my application on Xoom. I
 have an activity, which contains large images, so I decided to remove the
 whole layout in onStop method and restore it in onStart. But the memory is
 not released. I used MAT tool to detect the memory leak. It seems like a
 reference to EditText is hold by Android system. How can I clear this
 reference? I attached a simple example. I am curios how the problem can be
 solved, I know that I can use different images for specific screen sizes. I
 also tested with Nexus S, but the problem doesn't exists on it.

  example.zip
 2954KViewDownload

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


[android-developers] Re: integrate my android app with twitter.

2011-06-22 Thread Kumar Bibek
What all options have you looked at?

On Jun 20, 7:21 pm, Rasheed rasheed.abuei...@gmail.com wrote:
 i need to integrate my app with twitter, there is a lot of
 implementations, but i need simple and easy one.

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


[android-developers] Incorrect size for views with mm or inch dimensions

2011-06-22 Thread noriato
I've got a button having a layout_height of 10mm which looks correct
on most devices, but on for instance the Lg Optimus 2X and on the
Motorola Defy the buttons have about half the size:

I retrieved the DisplayMetrics info on those devices and here's a
short overview:

HTC Desire Z:   480x800, density : HIGH, xdpi: 254.0, ydpi: 254.0
Motorola Defy: 480x854, density : HIGH, xdpi: 96.0, ydpi: 96.0
Samsung Galaxy S2: 480x800, density : HIGH, xdpi: 217.71428, ydpi:
218.49463
LG Optimus 2X: 480x800, density : HIGH, xdpi: 160.0, ydpi: 160.0

As you can see the Desire Z and the Samsung have a reasonable looking
x/y-dpi value. the defy and the optimus deliver obsiously incorrect
values that I assume are the reason for the wrong size.

Is there any other way to get around that hardware bug/behaviour?
(Since the density delivers HIGH in all cases i cannot differentiate
the layout files via density / dimension.)

Or is it recommended not using mm/inch sizes at all?

TIA

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


Re: [android-developers] Incorrect size for views with mm or inch dimensions

2011-06-22 Thread Kumar Bibek
Use dip and sp, as recommended in the docs and not mm/inches.

*Thanks and Regards,
Kumar Bibek*
*
http://techdroid.kbeanie.com
http://www.kbeanie.com*



On Wed, Jun 22, 2011 at 1:25 PM, noriato fabri...@gmail.com wrote:

 I've got a button having a layout_height of 10mm which looks correct
 on most devices, but on for instance the Lg Optimus 2X and on the
 Motorola Defy the buttons have about half the size:

 I retrieved the DisplayMetrics info on those devices and here's a
 short overview:

 HTC Desire Z:   480x800, density : HIGH, xdpi: 254.0, ydpi: 254.0
 Motorola Defy: 480x854, density : HIGH, xdpi: 96.0, ydpi: 96.0
 Samsung Galaxy S2: 480x800, density : HIGH, xdpi: 217.71428, ydpi:
 218.49463
 LG Optimus 2X: 480x800, density : HIGH, xdpi: 160.0, ydpi: 160.0

 As you can see the Desire Z and the Samsung have a reasonable looking
 x/y-dpi value. the defy and the optimus deliver obsiously incorrect
 values that I assume are the reason for the wrong size.

 Is there any other way to get around that hardware bug/behaviour?
 (Since the density delivers HIGH in all cases i cannot differentiate
 the layout files via density / dimension.)

 Or is it recommended not using mm/inch sizes at all?

 TIA

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

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

[android-developers] Re: Update activity UI from service using observer pattern

2011-06-22 Thread Kumar Bibek
Have you tried logging your listener calls? See if those are actually
being called.


On Jun 19, 4:46 am, Vadim S. Khondar vadim.khon...@gmail.com
wrote:
 Hello to everyone.

 I have an application with service doing background work by
 instantiating AsyncTasks and activity displaying progress of that
 work.

 As soon as updates are expected to be quite often I preferred to make
 connection between service and activity through listener rather than
 via broadcast intents/receiver.
 General lifecycle of application as intended by design I've tried is
 the following:
 Activity starts - binds to service in onCreate - registers listener
 to the particular AsyncTask within service after bind succedes -
 receives updates - unregisters listener in onPause - unbinds in
 onDestroy
 This works fine (log shows it works as expected) but I've got a
 problem with updating UI in activity.

 I understand that activity UI updates must be performed on UI-thread.
 And that I've checked first and it seem to be ok, as soon as code with
 updates within listener runs on main thread just like activity's on*()
 methods. To ensure this I've also tried to wrap code in listener with
 posting runnable to runOnUiThread() of my activity. That also gives
 nothing (UI updates happen in one instance of emulator and do not
 happen in another and also on real device, however screen is updated
 if I scroll contents down and back).

 So the question is whether described scenario is possible on Android
 or should I just use broadcast receiver as the only way to accomplish
 my goal?

 Thanks in advance.

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


[android-developers] Re: crash launching a sub activity

2011-06-22 Thread Kumar Bibek
Your logs don't say much, there would be more in the log cat.


On Jun 21, 3:10 am, jbww ja...@cox.net wrote:
 I am crashing trying to launch a sub-activity. I have a small app to
 demonstrate the problem. The main part of the app is a list view, and
 when you click on an item in the list view it is supposed to launch an
 activity which brings up a gallery view. The app crashes before
 onCreate() is called for the TestGallery class, so I suspect I have
 omitted some necessary thing in the xml for the activity description.

 manifest:

     ?xml version=1.0 encoding=utf-8?
     manifest xmlns:android=http://schemas.android.com/apk/res/
 android
           package=randombrand.ListGallery
           android:versionCode=1
           android:versionName=1.0
         uses-sdk android:minSdkVersion=7 /

         application android:icon=@drawable/icon
 android:label=@string/app_name
             activity android:label=@string/app_name
 android:name=.ListGallery
                 intent-filter
                     action android:name=android.intent.action.MAIN /

                     category
 android:name=android.intent.category.LAUNCHER /
                 /intent-filter
             /activity

             activity android:label=Manual Top
 android:name=.TestGallery
             /activity

         /application
     /manifest

 java:

     public class ListGallery extends ListActivity
     {
         private static final String[] astrMainMenu = { List Item 1,
 List Item 2 };

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

             setListAdapter(new ArrayAdapterString(this,
 R.layout.main,
                     astrMainMenu));

             ListView lView = getListView();
             lView.setTextFilterEnabled(true);
         }

         @Override
         protected void onListItemClick(ListView l, View v, int
 position, long id)
         {
             Intent intent = new Intent(this, TestGallery.class);

             startActivity(intent);
         }
     }
 stack trace for crash when I call startActivity():

 ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord,
 Intent) line: 2417
 ActivityThread.handleLaunchActivity(ActivityThread$ActivityRecord,
 Intent) line: 2512
 ActivityThread.access$2200(ActivityThread, ActivityThread
 $ActivityRecord, Intent) line: 119
 ActivityThread$H.handleMessage(Message) line: 1863
 ActivityThread$H(Handler).dispatchMessage(Message) line: 99
 Looper.loop() line: 123
 ActivityThread.main(String[]) line: 4363
 Method.invokeNative(Object, Object[], Class, Class[], Class, int,
 boolean) line: not available [native method]
 Method.invoke(Object, Object...) line: 521
 ZygoteInit$MethodAndArgsCaller.run() line: 860
 ZygoteInit.main(String[]) line: 618
 NativeStart.main(String[]) line: not available [native method]
 thanks in advance,

 Jay

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


[android-developers] Image scaling on Sony Ericsson Xperia phone

2011-06-22 Thread Johan Abramsson
Hi,

Hard to get images scaled correctly for your application? Are your
images too large and causing memory problems? Or are they scaled
incorrectly with a poor user experience as a result?
To find a good solution for this, we asked Andreas Agvard from the
Sony Ericsson software department to help shed some light on this
topic.

More data and a good sample project are found here:
http://blogs.sonyericsson.com/wp/2011/06/13/how-to-scale-images-for-your-android%E2%84%A2-application/#more-2596

Comments and question ? Please direct them to this news thread.
Kind regards
  /Johan

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


Re: [android-developers] Fullscreen surface view

2011-06-22 Thread Dianne Hackborn
Why are you setting anyDensity to false?  Don't do that.

And really, it's 2011.  Just set android:targetSdkVersion to = 4 and let
the default modern values for these be used. :)

On Tue, Jun 21, 2011 at 11:46 PM, Martin Wallgren martin.wallgren.it@
gmail.com wrote:

 Hi,

 I'm trying to create a SurfaceView that covers the screen and that
 does not have any scaling.

 In My AndroidManifest I have

supports-screens
android:smallScreens=true
android:normalScreens=true
android:largeScreens=true
android:anyDensity=false /

 and in the constructor of my surfaceView I do
  getHolder().setFixedSize(screenWidth, screenHeight); // 480, 800 in
 my current emulator

 The call I get to surfaceChanged is indeed the correct dimensions
  06-22 06:37:28.889: DEBUG/AnimatorThread(690): surfaceChanged
 width=480 heigth=800

 But when I lock the canvas I get a canvas that is only 320, 533
  06-22 06:37:28.969: DEBUG/AnimatorThread(690): Canvas[w=320, h=533]

 I believe this has to do with dpi scaling. When I draw a bitmap that
 is 480x800 to that canvas it will only get painted within the bounds
 of the canvas (of course), and the pixels outside the canvas does not
 get painter.

 What can I do to get a fullscreen SurfaceView that has the same size
 on the canvas as the pixel dimensions of the screen?

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




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

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

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

[android-developers] Re: memory problem with EditText

2011-06-22 Thread mladen
In onStop method I am trying to remove all references to my view hierarchy 
so garbage collector to reclaim the memory of layout. Setting content view 
to null throws Exception so I set contentView to something that doesn't use 
much memory, while the activity is not visible.

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

[android-developers] Re: recognize text in images on opening the camera

2011-06-22 Thread Sapna Srivastav
thanks all, now I am taking a look on ABBYY , Tesseract and GOCR .

On Jun 21, 7:07 pm, blindfold seeingwithso...@gmail.com wrote:
 That is correct. The recognition quality of free open source OCR
 engines like Tesseract and GOCR is unfortunately still a far cry from
 what ABBYY delivers. Most OCR engines were developed for flatbed
 scanners with controlled light conditions, a flat surface, no lens
 distortion and little skew, and recognition robustness suffers
 dramatically when using them with a mobile hand-held device such as an
 Android smartphone.

 Regards

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

 On Jun 21, 2:56 pm, Mark Murphy mmur...@commonsware.com wrote:

  Converting images to text is called OCR. There are no APIs in Android for 
  OCR.

  You are welcome to attempt to find a working OCR solution -- the only
  one I can think of that works well (ABBYY) is probably more expensive
  than you can afford. There have been attempts to port open source OCR
  engines to Android (e.g., Tesseract), but I was under the impression
  that recognition quality was not that good.

  On Tue, Jun 21, 2011 at 8:50 AM, Sapna Srivastav sapna.ari...@gmail.com 
  wrote:
   Hi everyone

   I need some help to recognize text in image when a user opens his/her
   camera then the application can detect the text in the image and show
   it in an edit text.
   Please suggest me which APIs or classes are used for developing this
   kind of application and also is there any example/tutorial available
   on net then please provide this also.

   Thanks and Regards
   Sapna Srivastav

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

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

  Android Training in London:http://bit.ly/smand1,http://bit.ly/smand2



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


[android-developers] Shared preference

2011-06-22 Thread Jayanthi
Hi,
 I am working for GPS alert my spot , here whenever I touch the map I
get the respective lat and longitude now I use shared preference to
save the lat and loc put whenever I save the old value is replace by
new value . I have to show all the GeoPoint in a listview how to do
that please share your Ideas

Thanks in Advance

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


[android-developers] Re: Fullscreen surface view

2011-06-22 Thread Martin Wallgren
That was just my panic trial and error, I have changed those values
again and again :)

I replaced them with android:targetSdkVersion=8 but I still get the
same behavior.

--
Martin Wallgren


On Jun 22, 10:07 am, Dianne Hackborn hack...@android.com wrote:
 Why are you setting anyDensity to false?  Don't do that.

 And really, it's 2011.  Just set android:targetSdkVersion to = 4 and let
 the default modern values for these be used. :)

 On Tue, Jun 21, 2011 at 11:46 PM, Martin Wallgren martin.wallgren.it@









 gmail.com wrote:
  Hi,

  I'm trying to create a SurfaceView that covers the screen and that
  does not have any scaling.

  In My AndroidManifest I have

     supports-screens
         android:smallScreens=true
         android:normalScreens=true
         android:largeScreens=true
         android:anyDensity=false /

  and in the constructor of my surfaceView I do
   getHolder().setFixedSize(screenWidth, screenHeight); // 480, 800 in
  my current emulator

  The call I get to surfaceChanged is indeed the correct dimensions
   06-22 06:37:28.889: DEBUG/AnimatorThread(690): surfaceChanged
  width=480 heigth=800

  But when I lock the canvas I get a canvas that is only 320, 533
   06-22 06:37:28.969: DEBUG/AnimatorThread(690): Canvas[w=320, h=533]

  I believe this has to do with dpi scaling. When I draw a bitmap that
  is 480x800 to that canvas it will only get painted within the bounds
  of the canvas (of course), and the pixels outside the canvas does not
  get painter.

  What can I do to get a fullscreen SurfaceView that has the same size
  on the canvas as the pixel dimensions of the screen?

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

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

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

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


[android-developers] Persistent

2011-06-22 Thread Sivaprakash
Hi

I have a requirement where I've to take list of inputs from user and in next
screen summary should be shown. And also user will be provided and option to
go back and edit the data. During this transition where the data should be
kept ? In-Memory or need to persist in SQLite (since I am already using) and
bring it back when needed?

-- 
- Prakash.

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

Re: [android-developers] Shared preference

2011-06-22 Thread Sivasankar K
Try to store all the values in an array and then list out those value in
listview.

On Wed, Jun 22, 2011 at 2:23 PM, Jayanthi jaia...@gmail.com wrote:

 Hi,
  I am working for GPS alert my spot , here whenever I touch the map I
 get the respective lat and longitude now I use shared preference to
 save the lat and loc put whenever I save the old value is replace by
 new value . I have to show all the GeoPoint in a listview how to do
 that please share your Ideas

 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




-- 
K Siva Sankar

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

[android-developers] Re: AnimationDrawable on ItemizedOverlay

2011-06-22 Thread Felix Garcia Lainez
Ok i have done animating myself using a handler and it works. Thanks!

On 21 jun, 20:55, TreKing treking...@gmail.com wrote:
 On Tue, Jun 21, 2011 at 1:38 PM, Felix Garcia Lainez 

 fgarcialai...@gmail.com wrote:
  Yes i did, and just tested doing before and after adding ItemizedOverlay to
  the map overlays array.

 Well, I'm out of ideas. If you don't get an answer to make this work the way
 it should, perhaps make you own animator for this case.
 It shouldn't be terribly difficult to make your own animated ItemizedOverlay
 by using the AnimationDrawable functions to get each frame with a timer in
 between as necessary.

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

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


[android-developers] Resizable appwidgets and backward compatibility

2011-06-22 Thread String
I've got 3 apps on the market now with appwidgets, and in each one I've 
historically used the common pattern of multiple appwidget-providers that 
differ only in size. IOW, in order to provide 4 different sizes of a square 
widget (1x1, 2x2, 3x3, and 4x4) I had 4 separate widgets, and the user just 
picks the size they want. It worked, but it was kludgey, so I was pleased to 
see support for resizable widgets in 3.1.

Problem is, how do I provide any backward-compatibility here? In the above 
case, I really only need one widget on 3.1, with a 
resizeMode=horizontal|vertical attibute. But I need to keep the other 4 
around, both in my manifest and my /xml resources, for the other 99.7% of my 
users who aren't on 3.1. I can hide the new resizable widget from the older 
OS versions by just putting it in an /xml-v12 directory, but I can't come up 
with a way to hide the 4 old-style widgets from 3.1.

Any ideas, or other ways I might approach this problem? This seems like it'd 
be a very common issue for any app with widgets - practically all of us went 
this route of providing multiple sizes - but I can't see that the platform 
provides any solution. Have I just missed it?

String

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

[android-developers] Unable to get Latitude, Longitude of Current location

2011-06-22 Thread Md.Fazla Rabbi OPU
Hi all,

I want to develope an app in which-- When i start the app it will first
give me Latitude and Longitude of my current location. Here is my code:

*LocationListener locLis=new LocationListener() {

@Override
public void onStatusChanged(String provider, int status, Bundle extras)
{}
@Override
public void onProviderEnabled(String provider) {}
@Override
public void onProviderDisabled(String provider) {}
@Override
public void onLocationChanged(Location location)
{
// TODO Auto-generated method stub
   Double lat=location.getLatitude();
   Double lon=location.getLongitude();
   Log.i(Latitude==+lat,==+lon);

 }
};
 locationManager = (LocationManager)
getSystemService(Context.LOCATION_SERVICE);
 locationManager.requestLocationUpdates(
LocationManager.GPS_PROVIDER,0,0, locLis);*

I use *ACCESS_FINE_LOCATION* in the manifest file.
But when i start the app there is no latitude and longitude it found. Why?
If i change the location's latitude longitude from the command prompt then
it will show the updated latitude and longitude. Please anyone help me

Best Wishes
Md. Fazla Rabbi

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

Re: [android-developers] constructor problem

2011-06-22 Thread אריאל
so what can i do?

2011/6/21 Kostya Vasilyev kmans...@gmail.com

 Ariel,

 Pass an existing instance of Activity / Service / whatever extending
 Context to your class, as needed. Call getApplicationContext as necessary,
 to avoid keeping a reference to something which may go away (such as an
 activity).


 As a rule, never instantiate Activity or Service subclasses yourself:
 Android does that for you, and hooks them up with the rest of the system for
 proper functioning.

 Another tempting thing, subclassing Context also requires special care so
 it's hooked into the rest of the framework.


 -- Kostya



 2011/6/21 אריאל arielgordon...@gmail.com

 yes because SharedPreferences must to extract Activity or Context
 how i repair this?
 2011/6/21 Kostya Vasilyev kmans...@gmail.com

 It just depends on what class settingM is.

 I somehow have a feeling it's a subclass of Activity or Context, and you
 instantiate it yourself with new settingM - is that true?

 -- Kostya

   2011/6/21 אריאל arielgordon...@gmail.com

 yes i know this but how i used this from some activities?


 2011/6/21 TreKing treking...@gmail.com

  On Mon, Jun 20, 2011 at 5:15 PM, אריאל arielgordon...@gmail.comwrote:

 so how i can to save setting with SharedPreferences and to get and set
 from other activity?


 Read the documentation. Using SharedPreferences is very straight
 forward and well-documented.



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

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

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


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

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


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


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

[android-developers] Re: Resizable appwidgets and backward compatibility

2011-06-22 Thread String
OK, here's an absolute kludge but one which seems to work.

In my resources/xml directory, I still have the four existing 
AppWidgetProviderInfo metadata files for backward compatibility:

mywidget_1x1.xml
mywidget_2x2.xml
mywidget_3x3.xml
mywidget_4x4.xml


Each of these is for a different size of widget as used pre-3.1, with a 
pretty basic XML, like this:

?xml version=1.0 encoding=utf-8?
appwidget-provider 
xmlns:android=http://schemas.android.com/apk/res/android; 
android:initialLayout=@layout/mywidget_1x1
android:minWidth=72dp
android:minHeight=72dp
/appwidget-provider


Then for 3.1, my resources/xml-v12 directory looks like this:

mywidget_1x1.xml
mywidget_2x2.xml
mywidget_3x3.xml
mywidget_4x4.xml
*mywidget_resizable.xml*


The key is that mywidget_resizable.xml is the only live one here, defining 
the single resizable widget for 3.1. The other four are all dummy XML files 
like this:

?xml version=1.0 encoding=utf-8?
foo /


It doesn't matter what you put in them as long as they're valid XML but *not
* a valid AppWidgetProviderInfo structure. That way, they'll override the 
earlier-version XMLs, but the OS will be unable to parse appwidgets out of 
them, so won't show them to the user in the appwidget picker. Naturally, all 
five need to be defined in your manifest.

Like I said, it's a horrible kludge, but I'm not seeing any actual problems 
with it If anyone has a better idea, I'd still like to hear it.

String

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

[android-developers] ListView setting item highlight drawable programmatically

2011-06-22 Thread Rutton
  Hello there,
I am playing with backgrounds for an app with some listviews.
What I want is a custom highlight programmatically on pressing a list item. 
It needs to be done programmatically, as this app creates some background 
drawables programmatically. That seams to be easy with just creating an 
appropriate StateListDrawable, but still something is wrong with my 
implementation. I experimented with state attributes of different kinds, but 
it still doesn't work. The effect atm is that the background in a listview 
item is just black, regardless if pressed or not.

I use the following code to create the StateListDrawable:

public StateListDrawable createSelectedUnSelectedDrawable(
Drawable normalDrawable, Drawable selectedDrawable) {
int[] notMarked = new int[] { - R.attr.state_selected, - 
R.attr.state_pressed };
int[] pressed = new int[] { R.attr.state_pressed };
int[] selected = new int[] { R.attr.state_selected, - 
R.attr.state_pressed };

StateListDrawable sld = new StateListDrawable();
sld.addState( notMarked, normalDrawable );
sld.addState( pressed, selectedDrawable);
sld.addState( selected, selectedDrawable );
return sld;
}

Can someone tell me whats wrong with this and how to fix it?

R.

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

[android-developers] Re: Unable to get Latitude, Longitude of Current location

2011-06-22 Thread Kim Ras
Hi,
You should use the getLastKnownLocation.. It will return the last
location from any of the Location providers..
I have build a Method (Based on some initial code from the Forums) to
get the best and most precise Location (Less than 10meters),
It will look through all Location provides and get the most accurate
Locating with in 5 Minutes, if that do not exists then get the newest
(Normally the Network Location)..

You will need to change the oLog.txt call to Log.v or remove them.. I
have another logging system in my projects.

/

 *
 * This is a fast code to get the last known location of the
phone. It will first attempt to get the most
 * accurate position the last 5 minutes. If that is not available
then it will get the newest location.
 *
 
*/
private static final int FIVE_MINUTES = 1000 * 60 * 5;
private String[] getLastGoodPos() {
LocationManager lm = (LocationManager)
getSystemService(Context.LOCATION_SERVICE);
ListString providers = lm.getProviders(true);
Integer iId = -1;
Long lTime = (long) -1;
Long lNow = System.currentTimeMillis();
Float fAccuracy = (float) 10.0;
Location l = null;

// First find the best Accuracy for the last 3 minutes
oLog.txt(5,In good location last 5 minutes... Getting latest);
for (int i=providers.size()-1; i=0; i--) {
l = lm.getLastKnownLocation(providers.get(i));
if (l != null) {
oLog.txt(5,-- last good pos: + l.toString());

if (l.getTime()  lNow - FIVE_MINUTES  
l.getAccuracy() 
fAccuracy) {
oLog.txt(5,- Better accuracy..);
iId = i;
lTime = l.getTime();
fAccuracy = l.getAccuracy();
}
}
}

//If no Location within 5 minutes find the newest one
if (iId == -1) {
oLog.txt(5,No good location last 5 minutes... Getting latest);
l = null;
for (int i=providers.size()-1; i=0; i--) {
l = lm.getLastKnownLocation(providers.get(i));
if (l != null) {
oLog.txt(5,in Get last good pos: + 
l.toString());

if (l.getTime()  lTime) {
oLog.txt(5,- Newer Location..);
iId = i;
lTime = l.getTime();
fAccuracy = l.getAccuracy();
}
}
}
}

//Now get the best lastKnownLocation
String[] gps = new String[4];

if (iId  -1) {
gps[0] =  +
lm.getLastKnownLocation(providers.get(iId)).getLatitude();
gps[1] =  +
lm.getLastKnownLocation(providers.get(iId)).getLongitude();
gps[2] =  +
lm.getLastKnownLocation(providers.get(iId)).getProvider();
gps[3] =  +
lm.getLastKnownLocation(providers.get(iId)).getAccuracy();
}
else {
gps[0] = ;
gps[1] = ;
gps[2] = ;
gps[3] = ;
}

return gps;
}

Hope it helps
Kim

On Jun 22, 11:33 am, Md.Fazla Rabbi OPU md.fazlara...@gmail.com
wrote:
 Hi all,

 I want to develope an app in which-- When i start the app it will first
 give me Latitude and Longitude of my current location. Here is my code:

 *    LocationListener locLis=new LocationListener() {

     @Override
     public void onStatusChanged(String provider, int status, Bundle extras)
 {}
     @Override
     public void onProviderEnabled(String provider) {}
     @Override
     public void onProviderDisabled(String provider) {}
     @Override
     public void onLocationChanged(Location location)
     {
     // TODO Auto-generated method stub
        Double lat=location.getLatitude();
        Double lon=location.getLongitude();
        Log.i(Latitude==+lat,==+lon);

      }
     };
      locationManager = (LocationManager)
 getSystemService(Context.LOCATION_SERVICE);
      locationManager.requestLocationUpdates(
 LocationManager.GPS_PROVIDER,0,0, locLis);*

 I use *ACCESS_FINE_LOCATION* in the manifest file.
 But when i start the app there is no latitude and longitude it found. Why?
 If i change the location's latitude longitude from the command prompt then
 it will show the updated latitude and longitude. Please anyone help me

 Best Wishes
 Md. Fazla Rabbi

-- 
You received this message because you are subscribed to the Google
Groups Android Developers 

[android-developers] Re: Unable to get Latitude, Longitude of Current location

2011-06-22 Thread Kim Ras
Sorry Wrong Code...
Use this in the quote...
Also it will be the best accurracy with in 5 Minutes else the Newest..
SORRY for the messup
Kim
 

On Wednesday, June 22, 2011 12:03:09 PM UTC+2, Kim Ras wrote: 

 Hi, 
 You should use the getLastKnownLocation.. It will return the last 
 location from any of the Location providers.. 
 I have build a Method (Based on some initial code from the Forums) to 
 get the best and most precise Location (Less than 10meters), 
 It will look through all Location provides and get the most accurate 
 Locating with in 5 Minutes, if that do not exists then get the newest 
 (Normally the Network Location).. 

 You will need to change the oLog.txt call to Log.v or remove them.. I 
 have another logging system in my projects. 

 / 
 
  

  * 
  * This is a fast code to get the last known location of the 
 phone. It will first attempt to get the most 
  * accurate position the last 5 minutes. If that is not available 
 then it will get the newest location. 
  * 
   
 */
  

 private static final int FIVE_MINUTES = 1000 * 60 * 5; 
 private String[] getLastGoodPos() { 
 LocationManager lm = (LocationManager) 
 getSystemService(Context.LOCATION_SERVICE); 
 ListString providers = lm.getProviders(true); 
 Integer iId = -1; 
 Long lTime = (long) -1; 
 Long lNow = System.currentTimeMillis(); 
 Float fAccuracy = (float) 1.0; 
 Location l = null; 

 // First find the best Accuracy for the last 3 minutes 
 oLog.txt(5,In good location last 5 minutes... Getting latest); 
 for (int i=providers.size()-1; i=0; i--) { 
 l = lm.getLastKnownLocation(providers.get(i)); 
 if (l != null) { 
 oLog.txt(5,-- last good pos: + l.toString()); 

 if (l.getTime()  lNow - FIVE_MINUTES  l.getAccuracy()  
 fAccuracy) { 
 oLog.txt(5,- Better accuracy..); 
 iId = i; 
 lTime = l.getTime(); 
 fAccuracy = l.getAccuracy(); 
 } 
 } 
 } 

 //If no Location within 5 minutes find the newest one 
 if (iId == -1) { 
 oLog.txt(5,No good location last 5 minutes... Getting latest); 
 l = null; 
 for (int i=providers.size()-1; i=0; i--) { 
 l = lm.getLastKnownLocation(providers.get(i)); 
 if (l != null) { 
 oLog.txt(5,in Get last good pos: + l.toString()); 

 if (l.getTime()  lTime) { 
 oLog.txt(5,- Newer Location..); 
 iId = i; 
 lTime = l.getTime(); 
 fAccuracy = l.getAccuracy(); 
 } 
 } 
 } 
 } 

 //Now get the best lastKnownLocation 
 String[] gps = new String[4]; 

 if (iId  -1) { 
 gps[0] =  + 
 lm.getLastKnownLocation(providers.get(iId)).getLatitude(); 
 gps[1] =  + 
 lm.getLastKnownLocation(providers.get(iId)).getLongitude(); 
 gps[2] =  + 
 lm.getLastKnownLocation(providers.get(iId)).getProvider(); 
 gps[3] =  + 
 lm.getLastKnownLocation(providers.get(iId)).getAccuracy(); 
 } 
 else { 
 gps[0] = ; 
 gps[1] = ; 
 gps[2] = ; 
 gps[3] = ; 
 } 

 return gps; 
 } 

 Hope it helps 
 Kim 

 On Jun 22, 11:33 am, Md.Fazla Rabbi OPU md.faz...@gmail.com 
 wrote: 
  Hi all, 
  
  I want to develope an app in which-- When i start the app it will first 

  give me Latitude and Longitude of my current location. Here is my code: 
  
  *LocationListener locLis=new LocationListener() { 
  
  @Override 
  public void onStatusChanged(String provider, int status, Bundle 
 extras) 
  {} 
  @Override 
  public void onProviderEnabled(String provider) {} 
  @Override 
  public void onProviderDisabled(String provider) {} 
  @Override 
  public void onLocationChanged(Location location) 
  { 
  // TODO Auto-generated method stub 
 Double lat=location.getLatitude(); 
 Double lon=location.getLongitude(); 
 Log.i(Latitude==+lat,==+lon); 
  
   } 
  }; 
   locationManager = (LocationManager) 
  getSystemService(Context.LOCATION_SERVICE); 
   locationManager.requestLocationUpdates( 
  LocationManager.GPS_PROVIDER,0,0, locLis);* 
  
  I use *ACCESS_FINE_LOCATION* in the manifest file. 
  But when i start the app there is no latitude and longitude it found. 
 Why? 
  If i change the location's latitude longitude from the command prompt 
 then 
  it will show the updated latitude and longitude. Please anyone help me 
  
  Best Wishes 
  Md. Fazla Rabbi

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

[android-developers] Aw: Persistent

2011-06-22 Thread jjoe64
just hold these data in memory, or if this is much data or you want to be 
sure that they persist, you can cache it, see documentation:

*Saving cache files*
If you'd like to cache some data, rather than store it persistently, you 
should use 
getCacheDir()http://developer.android.com/reference/android/content/Context.html#getCacheDir()
 to 
open a File http://developer.android.com/reference/java/io/File.html that 
represents the internal directory where your application should save 
temporary cache files.
When the device is low on internal storage space, Android may delete these 
cache files to recover space. However, you should not rely on the system to 
clean up these files for you. You should always maintain the cache files 
yourself and stay within a reasonable limit of space consumed, such as 1MB. 
When the user uninstalls your application, these files are removed.

http://developer.android.com/guide/topics/data/data-storage.html#filesInternal

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

[android-developers] Aw: Shared preference

2011-06-22 Thread jjoe64
the best practice whould be, if you create a custom content provider (with 
sqlite). then you can insert every new lat/lng dataset. and the listview 
gets the data from the content provider (listadapter)

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

[android-developers] Arrange widgets in a circle

2011-06-22 Thread Zarah
Hi guys,

This is such a n00b question but I hope someone helps me. :)

I have always made apps that make use of traditional widgets so when
it comes to things like this I am totally at a loss. :(

Anyhooo, my aim is to display a set of images of beads into a circle
(sort of forming a bracelet), with each bead being clickable. Some of
the beads are not perfect spheres (some are oblong-ish), so I would
have to rotate the images by some degrees to either left or right to
make them look like they are stringed together.

I don't have an idea how to start doing this because I don't know how
I should tell the OS where to place the images. Should I use a Canvas?
Learn OpenGL?

If I use a Canvas, I would end up having a bitmap with all the images,
right? Can I still make the images clickable?

If I use OpenGL, is it an overkill? The main animation I would have to
do is simply have the circle rotate when the user clicks and drags on
a bead.

Thank you in advance!


- Zarah.

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


[android-developers] Re: memory problem with EditText

2011-06-22 Thread m.andrew
Try to dynamically create the ImaveView. The snippet code is listed
below. It's not the solution just a hint. For testing you can call
also System.gc() after setContentView(new View(this)); But using it in
your code is not a good way. Read this
http://blog.javia.org/android-allocation-free-code-avoids-the-gc-freeze/

@Override
protected void onStart() {
super.onStart();
Log.v(TAG, onStart);
setContentView(R.layout.main);
ImageView iv = new ImageView(this);
iv.setBackgroundResource(R.drawable.forest);
iv.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
startActivity(new Intent(FirstActivity.this,
SecondActivity.class));
}
});
LinearLayout ll = (LinearLayout)findViewById(R.id.first_ll);
ll.addView(iv);
}

?xml version=1.0 encoding=utf-8?
LinearLayout
android:id=@+id/first_ll
xmlns:android=http://schemas.android.com/apk/res/android;
android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=fill_parent
EditText
android:id=@+id/text
android:layout_width=match_parent
android:layout_height=wrap_content
/EditText
/LinearLayout

More links to read:
http://android-developers.blogspot.com/2009/01/avoiding-memory-leaks.html
http://developer.android.com/guide/practices/design/performance.html

On 21 июн, 12:37, mladen mlade...@gmail.com wrote:
 Hello,
    I am trying to optimize the memory usage of my application on Xoom. I
 have an activity, which contains large images, so I decided to remove the
 whole layout in onStop method and restore it in onStart. But the memory is
 not released. I used MAT tool to detect the memory leak. It seems like a
 reference to EditText is hold by Android system. How can I clear this
 reference? I attached a simple example. I am curios how the problem can be
 solved, I know that I can use different images for specific screen sizes. I
 also tested with Nexus S, but the problem doesn't exists on it.

  example.zip
 2954KПросмотретьЗагрузить

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


[android-developers] setHintTextColor

2011-06-22 Thread Honest
I have View in which there is two text box and user can select text
color from another view on the same screen through dialog box. So when
user change color via dialog box i am changing color of EditText text
and its hint. But when there is some text is available in EditText
after that user select other color then that text is coming in that
color but if i remove all that text then the color of HintText is
coming previous color.  For example now i have red color in text box
now user select green color so text is there in green color but if i
remove that text then hint text are coming in red even if i change
hint color in code. This problem only comes when there is some text
there. if it is blank and hint  text is there then problem is not
coming.

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


[android-developers] Re: Arrange widgets in a circle

2011-06-22 Thread Zsolt Vasvari
Use an AbsoluteLayout

On Jun 22, 6:33 pm, Zarah zarahj...@gmail.com wrote:
 Hi guys,

 This is such a n00b question but I hope someone helps me. :)

 I have always made apps that make use of traditional widgets so when
 it comes to things like this I am totally at a loss. :(

 Anyhooo, my aim is to display a set of images of beads into a circle
 (sort of forming a bracelet), with each bead being clickable. Some of
 the beads are not perfect spheres (some are oblong-ish), so I would
 have to rotate the images by some degrees to either left or right to
 make them look like they are stringed together.

 I don't have an idea how to start doing this because I don't know how
 I should tell the OS where to place the images. Should I use a Canvas?
 Learn OpenGL?

 If I use a Canvas, I would end up having a bitmap with all the images,
 right? Can I still make the images clickable?

 If I use OpenGL, is it an overkill? The main animation I would have to
 do is simply have the circle rotate when the user clicks and drags on
 a bead.

 Thank you in advance!

 - Zarah.

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


[android-developers] Re: setHintTextColor

2011-06-22 Thread Zsolt Vasvari
Sounds like a bug.  I'd search b.android.com if there is an existing
bug report for this, and if not, create the simplest project possible
you can and create a bug report and attach the project to it.  In my
experience, if you did that, it would be looked at fairly quickly.

On Jun 22, 6:34 pm, Honest honestsucc...@gmail.com wrote:
 I have View in which there is two text box and user can select text
 color from another view on the same screen through dialog box. So when
 user change color via dialog box i am changing color of EditText text
 and its hint. But when there is some text is available in EditText
 after that user select other color then that text is coming in that
 color but if i remove all that text then the color of HintText is
 coming previous color.  For example now i have red color in text box
 now user select green color so text is there in green color but if i
 remove that text then hint text are coming in red even if i change
 hint color in code. This problem only comes when there is some text
 there. if it is blank and hint  text is there then problem is not
 coming.

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


[android-developers] Re: Eclipse Layout Editor news

2011-06-22 Thread Zarah
Hi!

Does anybody else has a problem editing RelativeLayouts? I can't seem
to reference other widgets when choosing anchor points. It works if I
type the attributes manually though. But if I go to the GUI editor,
scroll down to Layout properties and bring up the reference chooser, I
can't seem to find the IDs of the other widgets in the project. I'm
pretty sure it was there before I upgraded my ADT.

Do I have to set something up?

Thanks!
- Zarah.


On Jun 3, 7:36 am, Xavier Ducrohet x...@android.com wrote:
 hey all,

 We are preparing the final version ofADT11which includes a lot of
 the features demoed at I/O.

 Some of these features requires a new rendering library which is
 packaged with each version of the Android platform SDK component.
 We have also fixed a lot of rendering issues in the rendering library,
 and we are looking to release them soon(ish).

 In the meantime, we have made release candidate builds ofADT11and
 the rendering libraries for 2.2 / 2.3.3 / 3.0 / 3.1 
 athttp://tools.android.com/download

 We would love if some of you could install them and send us feedback
 throughhttp://b.android.com/

 thanks!
 Xav
 --
 Xavier Ducrohet
 Android SDK Tech Lead
 Google Inc.http://developer.android.com|http://tools.android.com

 Please do not send me questions directly. Thanks!

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


[android-developers] Re: Arrange widgets in a circle

2011-06-22 Thread Zarah
Hi Zsolt!

But isn't that deprecated already?


- Zarah.


On Jun 22, 6:40 pm, Zsolt Vasvari zvasv...@gmail.com wrote:
 Use an AbsoluteLayout

 On Jun 22, 6:33 pm, Zarah zarahj...@gmail.com wrote:







  Hi guys,

  This is such a n00b question but I hope someone helps me. :)

  I have always made apps that make use of traditional widgets so when
  it comes to things like this I am totally at a loss. :(

  Anyhooo, my aim is to display a set of images of beads into a circle
  (sort of forming a bracelet), with each bead being clickable. Some of
  the beads are not perfect spheres (some are oblong-ish), so I would
  have to rotate the images by some degrees to either left or right to
  make them look like they are stringed together.

  I don't have an idea how to start doing this because I don't know how
  I should tell the OS where to place the images. Should I use a Canvas?
  Learn OpenGL?

  If I use a Canvas, I would end up having a bitmap with all the images,
  right? Can I still make the images clickable?

  If I use OpenGL, is it an overkill? The main animation I would have to
  do is simply have the circle rotate when the user clicks and drags on
  a bead.

  Thank you in advance!

  - Zarah.

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


[android-developers] Re: Resizable appwidgets and backward compatibility

2011-06-22 Thread Zsolt Vasvari
The receiver element has an enabled attribute.  Have your tried
setting that to from a boolean resources that you can define in as
true in values and false in values-v12?

By the way, I would use V11, why restrict it to V12?

On Jun 22, 5:49 pm, String sterling.ud...@googlemail.com wrote:
 OK, here's an absolute kludge but one which seems to work.

 In my resources/xml directory, I still have the four existing
 AppWidgetProviderInfo metadata files for backward compatibility:

 mywidget_1x1.xml
 mywidget_2x2.xml
 mywidget_3x3.xml
 mywidget_4x4.xml

 Each of these is for a different size of widget as used pre-3.1, with a
 pretty basic XML, like this:

 ?xml version=1.0 encoding=utf-8?
 appwidget-provider
 xmlns:android=http://schemas.android.com/apk/res/android;
     android:initialLayout=@layout/mywidget_1x1
     android:minWidth=72dp
     android:minHeight=72dp
 /appwidget-provider

 Then for 3.1, my resources/xml-v12 directory looks like this:

 mywidget_1x1.xml
 mywidget_2x2.xml
 mywidget_3x3.xml
 mywidget_4x4.xml
 *mywidget_resizable.xml*

 The key is that mywidget_resizable.xml is the only live one here, defining
 the single resizable widget for 3.1. The other four are all dummy XML files
 like this:

 ?xml version=1.0 encoding=utf-8?
 foo /

 It doesn't matter what you put in them as long as they're valid XML but *not
 * a valid AppWidgetProviderInfo structure. That way, they'll override the
 earlier-version XMLs, but the OS will be unable to parse appwidgets out of
 them, so won't show them to the user in the appwidget picker. Naturally, all
 five need to be defined in your manifest.

 Like I said, it's a horrible kludge, but I'm not seeing any actual problems
 with it If anyone has a better idea, I'd still like to hear it.

 String

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


[android-developers] Re: Arrange widgets in a circle

2011-06-22 Thread Zsolt Vasvari
Yes, looks like it is.  Sorry, I didn't know that as I've never used
AbsoluteLayout.

I guess you could use FrameLayout and then give each view an
appropriate layout_marginLeft and layout_marginTop.



On Jun 22, 6:44 pm, Zarah zarahj...@gmail.com wrote:
 Hi Zsolt!

 But isn't that deprecated already?

 - Zarah.

 On Jun 22, 6:40 pm, Zsolt Vasvari zvasv...@gmail.com wrote:



  Use an AbsoluteLayout

  On Jun 22, 6:33 pm, Zarah zarahj...@gmail.com wrote:

   Hi guys,

   This is such a n00b question but I hope someone helps me. :)

   I have always made apps that make use of traditional widgets so when
   it comes to things like this I am totally at a loss. :(

   Anyhooo, my aim is to display a set of images of beads into a circle
   (sort of forming a bracelet), with each bead being clickable. Some of
   the beads are not perfect spheres (some are oblong-ish), so I would
   have to rotate the images by some degrees to either left or right to
   make them look like they are stringed together.

   I don't have an idea how to start doing this because I don't know how
   I should tell the OS where to place the images. Should I use a Canvas?
   Learn OpenGL?

   If I use a Canvas, I would end up having a bitmap with all the images,
   right? Can I still make the images clickable?

   If I use OpenGL, is it an overkill? The main animation I would have to
   do is simply have the circle rotate when the user clicks and drags on
   a bead.

   Thank you in advance!

   - Zarah.- Hide quoted text -

 - Show quoted text -

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


Re: [android-developers] Re: Why two fragments instead of one?

2011-06-22 Thread Mark Murphy
On Wed, Jun 22, 2011 at 5:54 AM, nadam a...@anyro.se wrote:
 if you want to take advantage of defining the ListView once
 and using it across multiple activities (e.g., one with the content
 fragment for tablets/TVs and one without the content fragment for
 phones), using a ListFragment is a good idea.
 The examples usually only have one Activity for the list view, for
 instance the one called Activity A in
 http://developer.android.com/guide/topics/fundamentals/fragments.html
 or the unnamed activity i assume would be called TitlesActivity in
 http://android-developers.blogspot.com/2011/02/android-30-fragments-api.html.

Here is a sample application using a ListFragment for both phones and tablets:

https://github.com/commonsguy/cw-advandroid/tree/master/Honeycomb/FeedFragments

 The separation between tablets/TVs and phones are made using layout
 xml files and I guess this could be done with include instead if we
 have the ListView in a separate file and include it in one layout file
 for xlarge and another layout for normal. The benefit of ListFragment
 seems to be limited to the same benefits you have with a ListActivity.

You are welcome to your opinion. I am welcome to mine.

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

Android Training in London: http://bit.ly/smand1, http://bit.ly/smand2

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


Re: [android-developers] permission for PowerManager.goToSleep

2011-06-22 Thread Mark Murphy
On Wed, Jun 22, 2011 at 1:19 AM, wasabee18 wasabe...@gmail.com wrote:
 I am trying to lock the screen with the following code:

 PowerManager pm = (PowerManager)
 getSystemService(Context.POWER_SERVICE);
 pm.goToSleep(10);

 Even though I added the android.permission.DEVICE_POWER permission in
 the manifest file, I get error:

 java.lang.SecurityException: Neither user 10024 nor current process
 has android.permission.DEVICE_POWER.
 I have tested only in emulator.

 This issue has been discussed already here (http://comments.gmane.org/
 gmane.comp.handhelds.android.devel/100254) but no probing answer has
 been given.

 Can anyone help now ?

Ordinary Android SDK applications cannot hold that permission, AFAIK.

 If it is not possible to lock the screen/ the entire device this way,
 what is the preferred way to do it ?

Let the device lock on its own after user inactivity.

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

Android Training in London: http://bit.ly/smand1, http://bit.ly/smand2

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


Re: [android-developers] Notification for a specific Device

2011-06-22 Thread Mark Murphy
Look at services like C2DM, Urban Airship, and Xtify. Or, send the
user an email. Or, send the user an SMS.

On Wed, Jun 22, 2011 at 2:35 AM, Stefan S shogu...@gmail.com wrote:
 Hi.
 I'm trying to implement an Application in which you can buy some
 stuff.
 I've got in mind that after placing the order, the user gets a
 notification when his order has passed to a delivery service.
 Is it possible to push a notification to just his device?
 If yes. How should this be done?

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




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

Android Training in London: http://bit.ly/smand1, http://bit.ly/smand2

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


[android-developers] Re: Resizable appwidgets and backward compatibility

2011-06-22 Thread String
Hey, that works, thanks! Good idea.

As for the version number, resizable appwidgets were only added in v12.

String


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

[android-developers] Accessing Assets

2011-06-22 Thread Sivaprakash
Hi

I am writing custom content provider for my application. When I try to
access a file which is present under assets using the following statement

getContext().getAssets().openFd(demo.xml)

It always throws file not found, I really dont understand what I am doing
wrong. Any advice? - Do I need to add any property or permission ?


-- 
- Prakash.

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

[android-developers] Application not found in android market

2011-06-22 Thread Sudeep Jha
Hi All,

I have one application in android market.
You can search it on android market in devices like Samsung galaxy S ,
Samsung-Google Nexus S but cannot search the same on Sony Ericsson xperia
,HTC Wildfire and Samsung galaxy  Fit.

Android OS version doesn't seem to be a problem.

The only issue that I can see is different screen sizes support.

Why the application is not searchable on Android Market on few devices but
on others ?

Quick Help is needed from you guys.

Thanks and Regards,
Sudeep

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

[android-developers] TabActivity and NewIntent (with NFC read tag)

2011-06-22 Thread benza
Dear all,

I am working on an application that implements a TabActivity with two
different Activities.

The application uses NFC and in order to manage the tag_discover I
have the two methods onNewIntent and onResume.

When I open the interface and I use the first Activity everything
works well, I am able to read a tag and do some action onNewIntent
when the tag is read.

When I switch to the second tab and I come back in the first Activity
the application doesn't work correctly. It seems that onNewIntent is
not called.

Any idea why?
thank 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


Re: [android-developers] Application not found in android market

2011-06-22 Thread Mark Murphy
Please do not cross-post to multiple lists, particularly ones that are
no longer in service.

On Wed, Jun 22, 2011 at 7:13 AM, Sudeep Jha sudeep.neti...@gmail.com wrote:
 I have one application in android market.
 You can search it on android market in devices like Samsung galaxy S ,
 Samsung-Google Nexus S but cannot search the same on Sony Ericsson xperia
 ,HTC Wildfire and Samsung galaxy  Fit.

There are several devices under the Xperia brand.

 Android OS version doesn't seem to be a problem.
 The only issue that I can see is different screen sizes support.

The Wildfire is a small screen device IIRC. Some of the Xperias are
small screen devices (e.g., X10 Mini). I am not familiar with the
Galaxy Fit.

 Why the application is not searchable on Android Market on few devices but
 on others ?

Because your application is incompatible with those devices. For
example, perhaps you do not support small screens via the
supports-screens element in your manifest.

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

Android Training in London: http://bit.ly/smand1, http://bit.ly/smand2

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


[android-developers] paid apps not visible in some countries

2011-06-22 Thread DraganA
I was in Serbia last week and checked a local Android phone for my
apps. Only the free versions of my apps were listed. I do have Rest
of the world checked in Android console, not sure why this is
happening.

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


[android-developers] Re: Why two fragments instead of one?

2011-06-22 Thread nadam
Thanks Mark, I don't have much of an opinion yet though :)
Just trying to understand. I'll have a look at the code and make some
more experimentation.

Would have been great to see the source code of ListFragment to see
what's there in addition to the stuff it has in common with
ListActivity. But the “Android Compatibility package” hasn't been open
sourced yet, right?

On 22 Juni, 12:57, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Jun 22, 2011 at 5:54 AM, nadam a...@anyro.se wrote:
  if you want to take advantage of defining the ListView once
  and using it across multiple activities (e.g., one with the content
  fragment for tablets/TVs and one without the content fragment for
  phones), using a ListFragment is a good idea.
  The examples usually only have one Activity for the list view, for
  instance the one called Activity A in
 http://developer.android.com/guide/topics/fundamentals/fragments.html
  or the unnamed activity i assume would be called TitlesActivity in
 http://android-developers.blogspot.com/2011/02/android-30-fragments-a

 Here is a sample application using a ListFragment for both phones and tablets:

 https://github.com/commonsguy/cw-advandroid/tree/master/Honeycomb/Fee...

  The separation between tablets/TVs and phones are made using layout
  xml files and I guess this could be done with include instead if we
  have the ListView in a separate file and include it in one layout file
  for xlarge and another layout for normal. The benefit of ListFragment
  seems to be limited to the same benefits you have with a ListActivity.

 You are welcome to your opinion. I am welcome to mine.

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

 Android Training in London:http://bit.ly/smand1,http://bit.ly/smand2

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


[android-developers] Re: paid apps not visible in some countries

2011-06-22 Thread Zsolt Vasvari
Because not all countries that are show to have paid apps available
have paid apps.  I know of another example.

On Jun 22, 7:40 pm, DraganA dand...@gmail.com wrote:
 I was in Serbia last week and checked a local Android phone for my
 apps. Only the free versions of my apps were listed. I do have Rest
 of the world checked in Android console, not sure why this is
 happening.

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


Re: [android-developers] Re: Why two fragments instead of one?

2011-06-22 Thread Mark Murphy
On Wed, Jun 22, 2011 at 7:46 AM, nadam a...@anyro.se wrote:
 Would have been great to see the source code of ListFragment to see
 what's there in addition to the stuff it has in common with
 ListActivity. But the “Android Compatibility package” hasn't been open
 sourced yet, right?

Sure it has. The source code ships with the library itself. If you
have the ACL downloaded from the SDK and AVD Manager, the source code
is on your hard drive.

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

Android Training in London: http://bit.ly/smand1, http://bit.ly/smand2

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


[android-developers] Re: Why two fragments instead of one?

2011-06-22 Thread Streets Of Boston
Yes, the compatibility package is open source. When you get it, you get full 
sources as well:
android-sdk-root\android-compatibility\v4\src
 
About ListActivity vs ListFragment.
In my opinion, Fragments are all about re-use. It is fairly easy to dropt a 
Fragment into any activity and it will save you from re-coding it for each 
activity. Dropping in sub-activities (e.g. a ListActivity) into a main 
activity is not impossible, but hard to manage.
 
Of course, you could just use a List*View* as well (e.g through an 
include, but that is just re-using the view, not any extra code supporting 
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

[android-developers] Re: Accessing Assets

2011-06-22 Thread Sivaprakash
Some more input to help me better when I tried

getAssets().open(demo.xml);

I am getting response. But when I say this

getContext().getAssets().openFd(demo.xml);

I am getting exception (from Trace) java.io.FileNotFoundException: This
file can not be opened as a file descriptor; it is probably compressed

But I haven't compress anything.

Thanks
Siva

On Wed, Jun 22, 2011 at 4:43 PM, Sivaprakash sivaprakashshanmu...@gmail.com
 wrote:

 Hi

 I am writing custom content provider for my application. When I try to
 access a file which is present under assets using the following statement

 getContext().getAssets().openFd(demo.xml)

 It always throws file not found, I really dont understand what I am doing
 wrong. Any advice? - Do I need to add any property or permission ?


 --
 - Prakash.




-- 
- Prakash.

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

[android-developers] Re: permission for PowerManager.goToSleep

2011-06-22 Thread Pent

  If it is not possible to lock the screen/ the entire device this way,
  what is the preferred way to do it ?

 Let the device lock on its own after user inactivity.

'Preferred' is probably subjective in this case :-)

Pent

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


Re: [android-developers] Re: Accessing Assets

2011-06-22 Thread Mark Murphy
Assets are automatically compressed as part of putting them in the APK file.

On Wed, Jun 22, 2011 at 8:23 AM, Sivaprakash
sivaprakashshanmu...@gmail.com wrote:
 Some more input to help me better when I tried

 getAssets().open(demo.xml);

 I am getting response. But when I say this

 getContext().getAssets().openFd(demo.xml);

 I am getting exception (from Trace) java.io.FileNotFoundException: This
 file can not be opened as a file descriptor; it is probably compressed

 But I haven't compress anything.

 Thanks
 Siva

 On Wed, Jun 22, 2011 at 4:43 PM, Sivaprakash
 sivaprakashshanmu...@gmail.com wrote:

 Hi

 I am writing custom content provider for my application. When I try to
 access a file which is present under assets using the following statement

 getContext().getAssets().openFd(demo.xml)

 It always throws file not found, I really dont understand what I am doing
 wrong. Any advice? - Do I need to add any property or permission ?


 --
 - Prakash.



 --
 - Prakash.

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



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

Android Training in London: http://bit.ly/smand1, http://bit.ly/smand2

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


Re: [android-developers] Re: Accessing Assets

2011-06-22 Thread Sivaprakash
Oops !! If that being the case I should read the file in content provider
class itself and send the bytes back to Activity class ? What is the best
way to read file through content provider.

On Wed, Jun 22, 2011 at 6:01 PM, Mark Murphy mmur...@commonsware.comwrote:

 Assets are automatically compressed as part of putting them in the APK
 file.

 On Wed, Jun 22, 2011 at 8:23 AM, Sivaprakash
 sivaprakashshanmu...@gmail.com wrote:
  Some more input to help me better when I tried
 
  getAssets().open(demo.xml);
 
  I am getting response. But when I say this
 
  getContext().getAssets().openFd(demo.xml);
 
  I am getting exception (from Trace) java.io.FileNotFoundException: This
  file can not be opened as a file descriptor; it is probably compressed
 
  But I haven't compress anything.
 
  Thanks
  Siva
 
  On Wed, Jun 22, 2011 at 4:43 PM, Sivaprakash
  sivaprakashshanmu...@gmail.com wrote:
 
  Hi
 
  I am writing custom content provider for my application. When I try to
  access a file which is present under assets using the following
 statement
 
  getContext().getAssets().openFd(demo.xml)
 
  It always throws file not found, I really dont understand what I am
 doing
  wrong. Any advice? - Do I need to add any property or permission ?
 
 
  --
  - Prakash.
 
 
 
  --
  - Prakash.
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en



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

 Android Training in London: http://bit.ly/smand1, http://bit.ly/smand2

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




-- 
- Prakash.

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

[android-developers] how to implement UniqueFieldValueConstraint in db4o on Android ?

2011-06-22 Thread imran ali
 Hi All,

in one of my application i have been downloading lots of data from
server and then saving in to db4o.

in my case i am saving 200 objects of Recipe class in loops, and on
every  200 store, i am using commit().

in Recipe Class i have define id as unique as follows

configuration.common().add(new
UniqueFieldValueConstraint(Recipe.class, id));
when i have been commiting after 200 stor,e it has been throwing
exception,code at comit is as follows

  public void commitdb()

  {

 try

 {

oc.commit(); // oc is object of objectContainer

  }

catch(UniqueFieldValueConstraintViolationException exp)

{ oc.rollback(); }

}
Still i am getting exception as follows, (i am using db4o on Android)

06-22 18:30:41.568: ERROR/AndroidRuntime(14823):
com.db4o.events.EventException
06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at
com.db4o.internal.events.EventRegistryImpl.withExceptionHandlingInCallback(EventRegistryImpl.java:
283)

06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at
com.db4o.internal.events.EventRegistryImpl.commitOnStarted(EventRegistryImpl.java:
121)

06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at
com.db4o.internal.LocalTransaction.dispatchCommittingCallback(LocalTransaction.java:
90)

06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at
com.db4o.internal.LocalTransaction.commit(LocalTransaction.java:65)

06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at
com.db4o.internal.LocalTransaction.commit(LocalTransaction.java:59)

06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at
com.db4o.internal.LocalObjectContainer.commit1(LocalObjectContainer.java:
104)

06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at
com.db4o.internal.IoAdaptedObjectContainer.commit1(IoAdaptedObjectContainer.java:
171)

06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at
com.db4o.internal.ObjectContainerBase$3.apply(ObjectContainerBase.java:
403)

06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at
com.db4o.internal.ObjectContainerBase$3.apply(ObjectContainerBase.java:
401)

06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at
com.db4o.internal.ObjectContainerBase.asTopLevelCall(ObjectContainerBase.java:
427)

06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at
com.db4o.internal.ObjectContainerBase.commit(ObjectContainerBase.java:
401)

06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at
com.db4o.internal.ExternalObjectContainer.commit(ExternalObjectContainer.java:
39)

06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at
com.altaworks.kokaihop.db4o.RecipeProvider.commitdb(RecipeProvider.java:
42)

06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at
com.altaworks.kokaihop.ui.TakeoffActivity$4.run(TakeoffActivity.java:
707)

06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at
java.lang.Thread.run(Thread.java:1096)

06-22 18:30:41.568: ERROR/AndroidRuntime(14823): Caused by:
java.lang.NullPointerException

06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at
com.db4o.constraints.UniqueFieldValueConstraint
$1.ensureSingleOccurence(UniqueFieldValueConstraint.java:59)

06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at
com.db4o.constraints.UniqueFieldValueConstraint
$1.onEvent(UniqueFieldValueConstraint.java:96)

06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at
com.db4o.internal.events.Event4Impl.trigger(Event4Impl.java:78)

06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at
com.db4o.internal.events.EventRegistryImpl
$4.run(EventRegistryImpl.java:123)

06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at
com.db4o.foundation.DynamicVariable.with(DynamicVariable.java:54)

06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at
com.db4o.internal.InCallback.run(InCallback.java:24)

06-22 18:30:41.568: ERROR/AndroidRuntime(14823): at
com.db4o.internal.events.EventRegistryImpl.withExceptionHandlingInCallback(EventRegistryImpl.java:
279)


What should be solution, i have to store all 200 objects, and if
already object is present with same id, then over-write with new
object?

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


[android-developers] onCreate and onNewIntent sequence

2011-06-22 Thread Sudeep Sharma
Hi,

I have two activities A and B

activity android:name=.A
  android:label=@string/A
  android:launchMode=singleTask
  android:clearTaskOnLaunch=true
  android:taskAffinity=.A
  android:configChanges=keyboardHidden|orientation|locale
  android:theme=@android:style/Theme.Dialog
  android:excludeFromRecents=true 
intent-filter android:priority=101
action android:name=android.intent.action.MAIN /
category android:name=android.intent.category.HOME /
category android:name=android.intent.category.DEFAULT /
/intent-filter

A is of category home with higher priority than normal Home Screen activity.
This is basically done
to launch this A as soon as phone powers up.

From A i launch B using startActivity.

Now press Home key, i see that A which was already there gets destroyed and
again A's onCreate is called immediately followed
by onNewIntent.

I was of the view that if already activity is there then only onNewIntent is
called.

Can anybody please help me in this? I want to understand why pressing home
key caused A to destroy first and then
onCreate and onNewIntent are called simultaneously.

How ever this happens only the first time Home key is *pressed after power
up*, after that if A is already there
control goes to onNewIntent properly.

Thanks

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

[android-developers] How to play large size video from sdcard in android

2011-06-22 Thread naveen kumar
Hello sir,

Good evening,

I am playing video from sdcard and also getting meta data for that
video by this code

==video playing code==


 video.setVideoPath(path);


 video.setVisibility(1);
 video.canSeekBackward();
 video.canSeekForward();
 video.setMediaController(new MediaController(this));
 video.requestFocus();

 video.start();


when i am trying to play large video then getting exception
outofmemory.

Please help me how to resolve this issue in android, i am trying from
two days, but not greeting any related solution on developer site.


Please help me
Thanks,


Naveen Kumar shrivastva

9555674501

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


Re: [android-developers] constructor problem

2011-06-22 Thread TreKing
On Wed, Jun 22, 2011 at 4:36 AM, אריאל arielgordon...@gmail.com wrote:

 so what can i do?


Did you read Kostya's post? 'Cause your question was answered quite well.

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

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

[android-developers] How to handle large HTTPS server XML-RPC response

2011-06-22 Thread naveen kumar
i am getting large response of https server. i am not able to store
complete response in string variable, there fore i am witting the file
by using fileoutputstrem, it's takes more time for write on file and
parse them.

Please fix this issue in android also.


thanks,
Naveen Kumar

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


[android-developers] Handling radio button of the single choice List

2011-06-22 Thread Manish Garg
Hi all,

I want to get the handle of the Single choice list, so that I can
select/unselect a particular item.

My requirement is it that when I click on the radio button its state
should get reverted. Currently when we click on radio button it get
selected and it will be unselected only if we click on other items.

I can customized this behaviour by using onListItemClickListener but
my requirement is also to display detail of the list item when clicked
on that particular row. So I can't implement onListItemClickListener
to select/unselect radio button.

So is there some way to get the handle of the radio button or view of
the radio button so that I can implement onClickListener of the radio
button.

Or is there any other solution.

Thanks,
Manish Garg

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


[android-developers] Back Button

2011-06-22 Thread New Developer
You can press the  Android Back Button  and go back from  Screen B  - Screen 
A  or Activity B back to Activity A

Is there anyway to catch that and get an Are You Sure ?? dialog before just 
going back and losing all data on screen B ?

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


Re: [android-developers] How to handle large HTTPS server XML-RPC response

2011-06-22 Thread Kumar Bibek
Parse the stream using XMLPullParser if it's an XML.

If not, then, there is not other way. Saving to string first for such a
large response is not good.

*Thanks and Regards,
Kumar Bibek*
*
http://techdroid.kbeanie.com
http://www.kbeanie.com*



On Wed, Jun 22, 2011 at 7:35 PM, naveen kumar
kumarnaveen.si...@gmail.comwrote:

 i am getting large response of https server. i am not able to store
 complete response in string variable, there fore i am witting the file
 by using fileoutputstrem, it's takes more time for write on file and
 parse them.

 Please fix this issue in android also.


 thanks,
 Naveen Kumar

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

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

Re: [android-developers] Back Button

2011-06-22 Thread Kumar Bibek
Yes, on Activity's onBackPressed() method. Although it is available beyond
API level 5 (ie, 2.0) and up.

*Thanks and Regards,
Kumar Bibek*
*
http://techdroid.kbeanie.com
http://www.kbeanie.com*



On Wed, Jun 22, 2011 at 7:36 PM, New Developer secur...@isscp.com wrote:

 You can press the  Android Back Button  and go back from  Screen B  -
 Screen A  or Activity B back to Activity A

 Is there anyway to catch that and get an Are You Sure ?? dialog before just
 going back and losing all data on screen B ?

 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

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

Re: [android-developers] Back Button

2011-06-22 Thread Kumar Bibek
For lesser SDKs, you can hook onto the KeyListener and do some stuff.

*Thanks and Regards,
Kumar Bibek*
*
http://techdroid.kbeanie.com
http://www.kbeanie.com*



On Wed, Jun 22, 2011 at 7:40 PM, Kumar Bibek coomar@gmail.com wrote:

 Yes, on Activity's onBackPressed() method. Although it is available beyond
 API level 5 (ie, 2.0) and up.

 *Thanks and Regards,
 Kumar Bibek*
 *
 http://techdroid.kbeanie.com
 http://www.kbeanie.com*




 On Wed, Jun 22, 2011 at 7:36 PM, New Developer secur...@isscp.com wrote:

 You can press the  Android Back Button  and go back from  Screen B  -
 Screen A  or Activity B back to Activity A

 Is there anyway to catch that and get an Are You Sure ?? dialog before
 just going back and losing all data on screen B ?

 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




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

[android-developers] Re: How to play large size video from sdcard in android

2011-06-22 Thread niko20
How are we supposed to answer this? We have no idea what the video
object is?

Ugh why do we get like 20 posts a day from clearly outsourced coders
that have no idea of what they are doing, much less how to ask a
proper question?



On Jun 22, 8:41 am, naveen kumar kumarnaveen.si...@gmail.com wrote:
 Hello sir,

 Good evening,

 I am playing video from sdcard and also getting meta data for that
 video by this code

 ==video playing code==

  video.setVideoPath(path);

      video.setVisibility(1);
      video.canSeekBackward();
      video.canSeekForward();
      video.setMediaController(new MediaController(this));
      video.requestFocus();

      video.start();

 when i am trying to play large video then getting exception
 outofmemory.

 Please help me how to resolve this issue in android, i am trying from
 two days, but not greeting any related solution on developer site.

 Please help me
 Thanks,

 Naveen Kumar shrivastva

 9555674501

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


[android-developers] to check the combination of pressed buttons

2011-06-22 Thread nika-...@ya.ru
I have 4 buttons (a1, a2, b1, b2). They can combinate: a1-b1; a1-b2;
a2-b1; a2-b2.It means that a1 and a2 cann't be chosen together. So
after clicking a1 I need to block a2.And depends on what 2 buttons
were pressed, it will be differenet actions.I tried something like
this

if(a1.isPressed()){
a2.setEnabled(false);
a2.invalidate();}
else if (b1.isPressed()){
b2.setEnabled(false);
b2.invalidate();}

but it didn't work.Does anyone have an idea how I can do it? Thank you
in advance!

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


[android-developers] Re: Arrange widgets in a circle

2011-06-22 Thread niko20
I would suggest using a Canvas and just drawing yourself. Then in the
onTouch handler just do the match to find which circle was clicked.
You could use RelativeLayout too if you wanted to use views.

-nik

On Jun 22, 5:56 am, Zsolt Vasvari zvasv...@gmail.com wrote:
 Yes, looks like it is.  Sorry, I didn't know that as I've never used
 AbsoluteLayout.

 I guess you could use FrameLayout and then give each view an
 appropriate layout_marginLeft and layout_marginTop.

 On Jun 22, 6:44 pm, Zarah zarahj...@gmail.com wrote:







  Hi Zsolt!

  But isn't that deprecated already?

  - Zarah.

  On Jun 22, 6:40 pm, Zsolt Vasvari zvasv...@gmail.com wrote:

   Use an AbsoluteLayout

   On Jun 22, 6:33 pm, Zarah zarahj...@gmail.com wrote:

Hi guys,

This is such a n00b question but I hope someone helps me. :)

I have always made apps that make use of traditional widgets so when
it comes to things like this I am totally at a loss. :(

Anyhooo, my aim is to display a set of images of beads into a circle
(sort of forming a bracelet), with each bead being clickable. Some of
the beads are not perfect spheres (some are oblong-ish), so I would
have to rotate the images by some degrees to either left or right to
make them look like they are stringed together.

I don't have an idea how to start doing this because I don't know how
I should tell the OS where to place the images. Should I use a Canvas?
Learn OpenGL?

If I use a Canvas, I would end up having a bitmap with all the images,
right? Can I still make the images clickable?

If I use OpenGL, is it an overkill? The main animation I would have to
do is simply have the circle rotate when the user clicks and drags on
a bead.

Thank you in advance!

- Zarah.- Hide quoted text -

  - Show quoted text -

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


Re: [android-developers] How to handle large HTTPS server XML-RPC response

2011-06-22 Thread NaveenShrivastva
On Wed, Jun 22, 2011 at 7:37 PM, Kumar Bibek coomar@gmail.com wrote:

 Parse the stream using XMLPullParser if it's an XML.

 If not, then, there is not other way. Saving to string first for such a
 large response is not good.

 *Thanks and Regards,
 Kumar Bibek*
 *
 http://techdroid.kbeanie.com
 http://www.kbeanie.com*



 On Wed, Jun 22, 2011 at 7:35 PM, naveen kumar kumarnaveen.si...@gmail.com
  wrote:

 i am getting large response of https server. i am not able to store
 complete response in string variable, there fore i am witting the file
 by using fileoutputstrem, it's takes more time for write on file and
 parse them.

 Please fix this issue in android also.


 thanks,
 Naveen Kumar

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


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


i am Parsing file by XMLPullParser.it's take approx 10mints, i want time
perforate, when tring to store in string then outofmemory exception,so
writing in file, then parsing the file, give me idea for imporve the time
performance ,

-- 
Naveen Shrivastava
BCA+MCA(LAST SEM)+O/A/B Level(DOEACC SOCITY IT GOVT INDIA)

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

Re: [android-developers] How to handle large HTTPS server XML-RPC response

2011-06-22 Thread Kumar Bibek
Are you parsing stream or string?

*Thanks and Regards,
Kumar Bibek*
*
http://techdroid.kbeanie.com
http://www.kbeanie.com*



On Wed, Jun 22, 2011 at 7:45 PM, NaveenShrivastva 
kumarnaveen.si...@gmail.com wrote:



 On Wed, Jun 22, 2011 at 7:37 PM, Kumar Bibek coomar@gmail.com wrote:

 Parse the stream using XMLPullParser if it's an XML.

 If not, then, there is not other way. Saving to string first for such a
 large response is not good.

 *Thanks and Regards,
 Kumar Bibek*
 *
 http://techdroid.kbeanie.com
 http://www.kbeanie.com*



 On Wed, Jun 22, 2011 at 7:35 PM, naveen kumar 
 kumarnaveen.si...@gmail.com wrote:

 i am getting large response of https server. i am not able to store
 complete response in string variable, there fore i am witting the file
 by using fileoutputstrem, it's takes more time for write on file and
 parse them.

 Please fix this issue in android also.


 thanks,
 Naveen Kumar

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


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


 i am Parsing file by XMLPullParser.it's take approx 10mints, i want time
 perforate, when tring to store in string then outofmemory exception,so
 writing in file, then parsing the file, give me idea for imporve the time
 performance ,

 --
 Naveen Shrivastava
 BCA+MCA(LAST SEM)+O/A/B Level(DOEACC SOCITY IT GOVT INDIA)

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


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

Re: [android-developers] Re: How to play large size video from sdcard in android

2011-06-22 Thread NaveenShrivastva
On Wed, Jun 22, 2011 at 7:43 PM, niko20 nikolatesl...@yahoo.com wrote:

 How are we supposed to answer this? We have no idea what the video
 object is?

 Ugh why do we get like 20 posts a day from clearly outsourced coders
 that have no idea of what they are doing, much less how to ask a
 proper question?



 On Jun 22, 8:41 am, naveen kumar kumarnaveen.si...@gmail.com wrote:
  Hello sir,
 
  Good evening,
 
  I am playing video from sdcard and also getting meta data for that
  video by this code
 
  ==video playing code==
 
   video.setVideoPath(path);
 
   video.setVisibility(1);
   video.canSeekBackward();
   video.canSeekForward();
   video.setMediaController(new MediaController(this));
   video.requestFocus();
 
   video.start();
 
  when i am trying to play large video then getting exception
  outofmemory.
 
  Please help me how to resolve this issue in android, i am trying from
  two days, but not greeting any related solution on developer site.
 
  Please help me
  Thanks,
 
  Naveen Kumar shrivastva
 
  9555674501

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



Sir,

This is  objective of my project to play large video file  movie (1 GB ) mp4
from sdcard.

I am able to play this file from server ftp url parse  but objective is play
from sdcard.

Please give me idea sir, this is very urgent need for me.


Thanks in advance, Please help me.
-- 
Naveen Shrivastava
BCA+MCA(LAST SEM)+O/A/B Level(DOEACC SOCITY IT GOVT INDIA)

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

Re: [android-developers] How to handle large HTTPS server XML-RPC response

2011-06-22 Thread NaveenShrivastva
On Wed, Jun 22, 2011 at 7:48 PM, Kumar Bibek coomar@gmail.com wrote:

 Are you parsing stream or string?


 *Thanks and Regards,
 Kumar Bibek*
 *
 http://techdroid.kbeanie.com
 http://www.kbeanie.com*



 On Wed, Jun 22, 2011 at 7:45 PM, NaveenShrivastva 
 kumarnaveen.si...@gmail.com wrote:



 On Wed, Jun 22, 2011 at 7:37 PM, Kumar Bibek coomar@gmail.comwrote:

 Parse the stream using XMLPullParser if it's an XML.

 If not, then, there is not other way. Saving to string first for such a
 large response is not good.

 *Thanks and Regards,
 Kumar Bibek*
 *
 http://techdroid.kbeanie.com
 http://www.kbeanie.com*



 On Wed, Jun 22, 2011 at 7:35 PM, naveen kumar 
 kumarnaveen.si...@gmail.com wrote:

 i am getting large response of https server. i am not able to store
 complete response in string variable, there fore i am witting the file
 by using fileoutputstrem, it's takes more time for write on file and
 parse them.

 Please fix this issue in android also.


 thanks,
 Naveen Kumar

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


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


 i am Parsing file by XMLPullParser.it's take approx 10mints, i want time
 perforate, when tring to store in string then outofmemory exception,so
 writing in file, then parsing the file, give me idea for imporve the time
 performance ,

 --
 Naveen Shrivastava
 BCA+MCA(LAST SEM)+O/A/B Level(DOEACC SOCITY IT GOVT INDIA)

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


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



Sir,

writing server response using fileoutputstream

FileOutputStream fileOutputStream = null;
try {
fileOutputStream = new FileOutputStream(
sdImageMainDirectory.toString() + / + test.xml,
true);
// fileOutputStream =null;
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
BufferedOutputStream bos = new BufferedOutputStream(
fileOutputStream);

try {
InputStreamReader resultInputStream = new InputStreamReader(
conn.getInputStream());
BufferedReader rd = new BufferedReader(resultInputStream);
String line;

while ((line = rd.readLine()) != null) {
by_new = line.getBytes();
// st=st+new String(line);

try {
fileOutputStream.write(by_new, 0, by_new.length);
fileOutputStream.flush();

} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

Log.i(Huzza, RES Message:  + line);
}
fileOutputStream.close();
rd.close();
resultInputStream.close();
} catch (IOException ioex) {

Log.e(Huzza, error:  + ioex.getMessage(), ioex);
}


then parsing the file
public Object ParsingResponse(String responsData) throws XMLRPCException {
System.out.print(##);
String path = Environment.getExternalStorageDirectory() +
/test.xml;
File file = new File(path);
XMLRPCCommon obj1 = new XMLRPCCommon();

try {
fis = new FileInputStream(file);
// setup pull parser
XmlPullParser pullParser =
XmlPullParserFactory.newInstance().newPullParser();
Reader reader;
responsData = ;

Re: [android-developers] Re: How to play large size video from sdcard in android

2011-06-22 Thread NaveenShrivastva
On Wed, Jun 22, 2011 at 7:53 PM, NaveenShrivastva 
kumarnaveen.si...@gmail.com wrote:



 On Wed, Jun 22, 2011 at 7:43 PM, niko20 nikolatesl...@yahoo.com wrote:

 How are we supposed to answer this? We have no idea what the video
 object is?

 Ugh why do we get like 20 posts a day from clearly outsourced coders
 that have no idea of what they are doing, much less how to ask a
 proper question?



 On Jun 22, 8:41 am, naveen kumar kumarnaveen.si...@gmail.com wrote:
  Hello sir,
 
  Good evening,
 
  I am playing video from sdcard and also getting meta data for that
  video by this code
 
  ==video playing code==
 
   video.setVideoPath(path);
 
   video.setVisibility(1);
   video.canSeekBackward();
   video.canSeekForward();
   video.setMediaController(new MediaController(this));
   video.requestFocus();
 
   video.start();
 
  when i am trying to play large video then getting exception
  outofmemory.
 
  Please help me how to resolve this issue in android, i am trying from
  two days, but not greeting any related solution on developer site.
 
  Please help me
  Thanks,
 
  Naveen Kumar shrivastva
 
  9555674501

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



 Sir,

 This is  objective of my project to play large video file  movie (1 GB )
 mp4 from sdcard.

 I am able to play this file from server ftp url parse  but objective is
 play from sdcard.

 Please give me idea sir, this is very urgent need for me.


 Thanks in advance, Please help me.
 --
 Naveen Shrivastava
 BCA+MCA(LAST SEM)+O/A/B Level(DOEACC SOCITY IT GOVT INDIA)



Any android developer please help me, thanks in advance,please help me...



-- 
Naveen Shrivastava
BCA+MCA(LAST SEM)+O/A/B Level(DOEACC SOCITY IT GOVT INDIA)

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

Re: [android-developers] How to handle large HTTPS server XML-RPC response

2011-06-22 Thread Kumar Bibek
IF the data is big, it would of course take time.

You could do some debugging, to figure out which part of your code is taking
so much time.

That would help you in figuring out the actual problem.

*Thanks and Regards,
Kumar Bibek*
*
http://techdroid.kbeanie.com
http://www.kbeanie.com*



On Wed, Jun 22, 2011 at 7:57 PM, NaveenShrivastva 
kumarnaveen.si...@gmail.com wrote:



 On Wed, Jun 22, 2011 at 7:48 PM, Kumar Bibek coomar@gmail.com wrote:

 Are you parsing stream or string?


 *Thanks and Regards,
 Kumar Bibek*
 *
 http://techdroid.kbeanie.com
 http://www.kbeanie.com*



 On Wed, Jun 22, 2011 at 7:45 PM, NaveenShrivastva 
 kumarnaveen.si...@gmail.com wrote:



 On Wed, Jun 22, 2011 at 7:37 PM, Kumar Bibek coomar@gmail.comwrote:

 Parse the stream using XMLPullParser if it's an XML.

 If not, then, there is not other way. Saving to string first for such a
 large response is not good.

 *Thanks and Regards,
 Kumar Bibek*
 *
 http://techdroid.kbeanie.com
 http://www.kbeanie.com*



 On Wed, Jun 22, 2011 at 7:35 PM, naveen kumar 
 kumarnaveen.si...@gmail.com wrote:

 i am getting large response of https server. i am not able to store
 complete response in string variable, there fore i am witting the file
 by using fileoutputstrem, it's takes more time for write on file and
 parse them.

 Please fix this issue in android also.


 thanks,
 Naveen Kumar

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


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


 i am Parsing file by XMLPullParser.it's take approx 10mints, i want time
 perforate, when tring to store in string then outofmemory exception,so
 writing in file, then parsing the file, give me idea for imporve the time
 performance ,

 --
 Naveen Shrivastava
 BCA+MCA(LAST SEM)+O/A/B Level(DOEACC SOCITY IT GOVT INDIA)

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


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



 Sir,

 writing server response using fileoutputstream

 FileOutputStream fileOutputStream = null;
 try {
 fileOutputStream = new FileOutputStream(
 sdImageMainDirectory.toString() + / + test.xml,
 true);
 // fileOutputStream =null;
 } catch (FileNotFoundException e) {
 // TODO Auto-generated catch block
 e.printStackTrace();
 }
 BufferedOutputStream bos = new BufferedOutputStream(
 fileOutputStream);

 try {
 InputStreamReader resultInputStream = new
 InputStreamReader(
 conn.getInputStream());
 BufferedReader rd = new BufferedReader(resultInputStream);
 String line;

 while ((line = rd.readLine()) != null) {
 by_new = line.getBytes();
 // st=st+new String(line);

 try {
 fileOutputStream.write(by_new, 0, by_new.length);
 fileOutputStream.flush();

 } catch (IOException e) {
 // TODO Auto-generated catch block
 e.printStackTrace();
 }

 Log.i(Huzza, RES Message:  + line);
 }
 fileOutputStream.close();
 rd.close();
 resultInputStream.close();
 } catch (IOException ioex) {

 Log.e(Huzza, error:  + ioex.getMessage(), ioex);
 }


 then parsing the file
 public Object ParsingResponse(String responsData) throws XMLRPCException {
 System.out.print(##);
 

Re: [android-developers] to check the combination of pressed buttons

2011-06-22 Thread Kostya Vasilyev
Are the buttons actually check boxes?

If so, use CheckBox methods:

setOnCheckedChangeListener
isChecked
setChecked

http://developer.android.com/reference/android/widget/CompoundButton.html#setOnCheckedChangeListener(android.widget.CompoundButton.OnCheckedChangeListener
)

-- Kostya

2011/6/22 nika-...@ya.ru nika-...@ya.ru

 I have 4 buttons (a1, a2, b1, b2). They can combinate: a1-b1; a1-b2;
 a2-b1; a2-b2.It means that a1 and a2 cann't be chosen together. So
 after clicking a1 I need to block a2.And depends on what 2 buttons
 were pressed, it will be differenet actions.I tried something like
 this

 if(a1.isPressed()){
a2.setEnabled(false);
a2.invalidate();}
else if (b1.isPressed()){
b2.setEnabled(false);
b2.invalidate();}

 but it didn't work.Does anyone have an idea how I can do it? Thank you
 in advance!

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

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

[android-developers] Re: to check the combination of pressed buttons

2011-06-22 Thread nika-...@ya.ru
I cann't use CheckBox, cause it'll be image inside my buttons

On 22 июн, 17:39, Kostya Vasilyev kmans...@gmail.com wrote:
 Are the buttons actually check boxes?

 If so, use CheckBox methods:

 setOnCheckedChangeListener
 isChecked
 setChecked

 http://developer.android.com/reference/android/widget/CompoundButton
 )

 -- Kostya

 2011/6/22 nika-...@ya.ru nika-...@ya.ru







  I have 4 buttons (a1, a2, b1, b2). They can combinate: a1-b1; a1-b2;
  a2-b1; a2-b2.It means that a1 and a2 cann't be chosen together. So
  after clicking a1 I need to block a2.And depends on what 2 buttons
  were pressed, it will be differenet actions.I tried something like
  this

  if(a1.isPressed()){
                         a2.setEnabled(false);
                         a2.invalidate();}
                         else if (b1.isPressed()){
                         b2.setEnabled(false);
                         b2.invalidate();}

  but it didn't work.Does anyone have an idea how I can do it? Thank you
  in advance!

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

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


Re: [android-developers] Re: How to play large size video from sdcard in android

2011-06-22 Thread Fred Niggle
Try this like for your answer : http://bit.ly/ORtV

On 22/06/2011, NaveenShrivastva kumarnaveen.si...@gmail.com wrote:
 On Wed, Jun 22, 2011 at 7:53 PM, NaveenShrivastva 
 kumarnaveen.si...@gmail.com wrote:



 On Wed, Jun 22, 2011 at 7:43 PM, niko20 nikolatesl...@yahoo.com wrote:

 How are we supposed to answer this? We have no idea what the video
 object is?

 Ugh why do we get like 20 posts a day from clearly outsourced coders
 that have no idea of what they are doing, much less how to ask a
 proper question?



 On Jun 22, 8:41 am, naveen kumar kumarnaveen.si...@gmail.com wrote:
  Hello sir,
 
  Good evening,
 
  I am playing video from sdcard and also getting meta data for that
  video by this code
 
  ==video playing code==
 
   video.setVideoPath(path);
 
   video.setVisibility(1);
   video.canSeekBackward();
   video.canSeekForward();
   video.setMediaController(new MediaController(this));
   video.requestFocus();
 
   video.start();
 
  when i am trying to play large video then getting exception
  outofmemory.
 
  Please help me how to resolve this issue in android, i am trying from
  two days, but not greeting any related solution on developer site.
 
  Please help me
  Thanks,
 
  Naveen Kumar shrivastva
 
  9555674501

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



 Sir,

 This is  objective of my project to play large video file  movie (1 GB )
 mp4 from sdcard.

 I am able to play this file from server ftp url parse  but objective is
 play from sdcard.

 Please give me idea sir, this is very urgent need for me.


 Thanks in advance, Please help me.
 --
 Naveen Shrivastava
 BCA+MCA(LAST SEM)+O/A/B Level(DOEACC SOCITY IT GOVT INDIA)



 Any android developer please help me, thanks in advance,please help me...



 --
 Naveen Shrivastava
 BCA+MCA(LAST SEM)+O/A/B Level(DOEACC SOCITY IT GOVT INDIA)

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

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


[android-developers] Re: to check the combination of pressed buttons

2011-06-22 Thread nika-...@ya.ru
I cann't use CheckBox, cause it'll be image inside my buttons.:(

On 22 июн, 17:39, Kostya Vasilyev kmans...@gmail.com wrote:
 Are the buttons actually check boxes?

 If so, use CheckBox methods:

 setOnCheckedChangeListener
 isChecked
 setChecked

 http://developer.android.com/reference/android/widget/CompoundButton
 )

 -- Kostya

 2011/6/22 nika-...@ya.ru nika-...@ya.ru







  I have 4 buttons (a1, a2, b1, b2). They can combinate: a1-b1; a1-b2;
  a2-b1; a2-b2.It means that a1 and a2 cann't be chosen together. So
  after clicking a1 I need to block a2.And depends on what 2 buttons
  were pressed, it will be differenet actions.I tried something like
  this

  if(a1.isPressed()){
                         a2.setEnabled(false);
                         a2.invalidate();}
                         else if (b1.isPressed()){
                         b2.setEnabled(false);
                         b2.invalidate();}

  but it didn't work.Does anyone have an idea how I can do it? Thank you
  in advance!

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

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


Re: [android-developers] Re: to check the combination of pressed buttons

2011-06-22 Thread Kostya Vasilyev
I see.

If by didn't work you mean that the visual state didn't change - you need
to use state-list drawables that include 'android:state_enabled=false'

http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList

-- Kostya

2011/6/22 nika-...@ya.ru nika-...@ya.ru

 I cann't use CheckBox, cause it'll be image inside my buttons.:(

 On 22 июн, 17:39, Kostya Vasilyev kmans...@gmail.com wrote:
  Are the buttons actually check boxes?
 
  If so, use CheckBox methods:
 
  setOnCheckedChangeListener
  isChecked
  setChecked
 
  http://developer.android.com/reference/android/widget/CompoundButton
  )
 
  -- Kostya
 
  2011/6/22 nika-...@ya.ru nika-...@ya.ru
 
 
 
 
 
 
 
   I have 4 buttons (a1, a2, b1, b2). They can combinate: a1-b1; a1-b2;
   a2-b1; a2-b2.It means that a1 and a2 cann't be chosen together. So
   after clicking a1 I need to block a2.And depends on what 2 buttons
   were pressed, it will be differenet actions.I tried something like
   this
 
   if(a1.isPressed()){
  a2.setEnabled(false);
  a2.invalidate();}
  else if (b1.isPressed()){
  b2.setEnabled(false);
  b2.invalidate();}
 
   but it didn't work.Does anyone have an idea how I can do it? Thank you
   in advance!
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

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


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

Re: [android-developers] Re: How to play large size video from sdcard in android

2011-06-22 Thread NaveenShrivastva
On Wed, Jun 22, 2011 at 8:18 PM, Fred Niggle fred.nig...@googlemail.comwrote:

 Try this like for your answer : http://bit.ly/ORtV

 On 22/06/2011, NaveenShrivastva kumarnaveen.si...@gmail.com wrote:
  On Wed, Jun 22, 2011 at 7:53 PM, NaveenShrivastva 
  kumarnaveen.si...@gmail.com wrote:
 
 
 
  On Wed, Jun 22, 2011 at 7:43 PM, niko20 nikolatesl...@yahoo.com
 wrote:
 
  How are we supposed to answer this? We have no idea what the video
  object is?
 
  Ugh why do we get like 20 posts a day from clearly outsourced coders
  that have no idea of what they are doing, much less how to ask a
  proper question?
 
 
 
  On Jun 22, 8:41 am, naveen kumar kumarnaveen.si...@gmail.com wrote:
   Hello sir,
  
   Good evening,
  
   I am playing video from sdcard and also getting meta data for that
   video by this code
  
   ==video playing code==
  
video.setVideoPath(path);
  
video.setVisibility(1);
video.canSeekBackward();
video.canSeekForward();
video.setMediaController(new MediaController(this));
video.requestFocus();
  
video.start();
  
   when i am trying to play large video then getting exception
   outofmemory.
  
   Please help me how to resolve this issue in android, i am trying from
   two days, but not greeting any related solution on developer site.
  
   Please help me
   Thanks,
  
   Naveen Kumar shrivastva
  
   9555674501
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to
 android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
 
 
  Sir,
 
  This is  objective of my project to play large video file  movie (1 GB )
  mp4 from sdcard.
 
  I am able to play this file from server ftp url parse  but objective is
  play from sdcard.
 
  Please give me idea sir, this is very urgent need for me.
 
 
  Thanks in advance, Please help me.
  --
  Naveen Shrivastava
  BCA+MCA(LAST SEM)+O/A/B Level(DOEACC SOCITY IT GOVT INDIA)
 
 
 
  Any android developer please help me, thanks in advance,please help me...
 
 
 
  --
  Naveen Shrivastava
  BCA+MCA(LAST SEM)+O/A/B Level(DOEACC SOCITY IT GOVT INDIA)
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

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


Hello sir,

Good evening,

Please give me idea how to play(handle) large video file android code.

i am trying but not getting success.when trying to divide data in chunk then
video file this

difficult to handle header.

GOOGLE Android developer please help me please.

-- 
Naveen Shrivastava
BCA+MCA(LAST SEM)+O/A/B Level(DOEACC SOCITY IT GOVT INDIA)

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

[android-developers] Re: to check the combination of pressed buttons

2011-06-22 Thread nika-...@ya.ru
by didn't work I mean that I still can click both of buttons

On 22 июн, 17:52, Kostya Vasilyev kmans...@gmail.com wrote:
 I see.

 If by didn't work you mean that the visual state didn't change - you need
 to use state-list drawables that include 'android:state_enabled=false'

 http://developer.android.com/guide/topics/resources/drawable-resource...

 -- Kostya

 2011/6/22 nika-...@ya.ru nika-...@ya.ru







  I cann't use CheckBox, cause it'll be image inside my buttons.:(

  On 22 июн, 17:39, Kostya Vasilyev kmans...@gmail.com wrote:
   Are the buttons actually check boxes?

   If so, use CheckBox methods:

   setOnCheckedChangeListener
   isChecked
   setChecked

  http://developer.android.com/reference/android/widget/CompoundButton
   )

   -- Kostya

   2011/6/22 nika-...@ya.ru nika-...@ya.ru

I have 4 buttons (a1, a2, b1, b2). They can combinate: a1-b1; a1-b2;
a2-b1; a2-b2.It means that a1 and a2 cann't be chosen together. So
after clicking a1 I need to block a2.And depends on what 2 buttons
were pressed, it will be differenet actions.I tried something like
this

if(a1.isPressed()){
                       a2.setEnabled(false);
                       a2.invalidate();}
                       else if (b1.isPressed()){
                       b2.setEnabled(false);
                       b2.invalidate();}

but it didn't work.Does anyone have an idea how I can do it? Thank you
in advance!

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

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

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


[android-developers] NIO interface with android HTTPs server response

2011-06-22 Thread naveen kumar
How to use java NIO api for android HTTPS(SSL server)- XMLRPC server
response.


Thanks,
Naveen Kumar shrivastva

9555674501

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


Re: [android-developers] Re: How to play large size video from sdcard in android

2011-06-22 Thread NaveenShrivastva
On Wed, Jun 22, 2011 at 8:25 PM, NaveenShrivastva 
kumarnaveen.si...@gmail.com wrote:



 On Wed, Jun 22, 2011 at 8:18 PM, Fred Niggle 
 fred.nig...@googlemail.comwrote:

 Try this like for your answer : http://bit.ly/ORtV

 On 22/06/2011, NaveenShrivastva kumarnaveen.si...@gmail.com wrote:
  On Wed, Jun 22, 2011 at 7:53 PM, NaveenShrivastva 
  kumarnaveen.si...@gmail.com wrote:
 
 
 
  On Wed, Jun 22, 2011 at 7:43 PM, niko20 nikolatesl...@yahoo.com
 wrote:
 
  How are we supposed to answer this? We have no idea what the video
  object is?
 
  Ugh why do we get like 20 posts a day from clearly outsourced coders
  that have no idea of what they are doing, much less how to ask a
  proper question?
 
 
 
  On Jun 22, 8:41 am, naveen kumar kumarnaveen.si...@gmail.com wrote:
   Hello sir,
  
   Good evening,
  
   I am playing video from sdcard and also getting meta data for that
   video by this code
  
   ==video playing code==
  
video.setVideoPath(path);
  
video.setVisibility(1);
video.canSeekBackward();
video.canSeekForward();
video.setMediaController(new MediaController(this));
video.requestFocus();
  
video.start();
  
   when i am trying to play large video then getting exception
   outofmemory.
  
   Please help me how to resolve this issue in android, i am trying
 from
   two days, but not greeting any related solution on developer site.
  
   Please help me
   Thanks,
  
   Naveen Kumar shrivastva
  
   9555674501
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to
 android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
 
 
  Sir,
 
  This is  objective of my project to play large video file  movie (1 GB
 )
  mp4 from sdcard.
 
  I am able to play this file from server ftp url parse  but objective is
  play from sdcard.
 
  Please give me idea sir, this is very urgent need for me.
 
 
  Thanks in advance, Please help me.
  --
  Naveen Shrivastava
  BCA+MCA(LAST SEM)+O/A/B Level(DOEACC SOCITY IT GOVT INDIA)
 
 
 
  Any android developer please help me, thanks in advance,please help
 me...
 
 
 
  --
  Naveen Shrivastava
  BCA+MCA(LAST SEM)+O/A/B Level(DOEACC SOCITY IT GOVT INDIA)
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to
 android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

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


 Hello sir,

 Good evening,

 Please give me idea how to play(handle) large video file android code.

 i am trying but not getting success.when trying to divide data in chunk
 then video file this

 difficult to handle header.

 GOOGLE Android developer please help me please.

 --
 Naveen Shrivastava
 BCA+MCA(LAST SEM)+O/A/B Level(DOEACC SOCITY IT GOVT INDIA)


This is possible in Apple supported XCODE.so, i think it's also be possible
in Android SDK

-- 
Naveen Shrivastava
BCA+MCA(LAST SEM)+O/A/B Level(DOEACC SOCITY IT GOVT INDIA)

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

Re: [android-developers] Re: GAE and Android

2011-06-22 Thread kamilia amellal
Hi,
and this one :

Internal Server Error

com/google/gwt/user/client/rpc/IsSerializable

even if i'm using a GAE project,
Peace,
Gaara

2011/6/21 JP joachim.pfeif...@gmail.com


 If you see this constantly... you need to check GAE directly and
 analyze the logs there. Each call to the GAE web server has a trace.


 On Jun 20, 7:12 am, gaara amellal.kamili...@gmail.com wrote:
  Thanks for replay, i wanna ask a question how can i check that i have
  setup GAE correctly!!!
  Peace,
  Gaara
 
  On Jun 20, 1:59 pm, JP joachim.pfeif...@gmail.com wrote:
 
 
 
 
 
 
 
   As far as I can tell the significant log is:
 
   06-20 09:18:08.952: ERROR/AndroidRuntime(359): Internal Server Error
   (500) - Internal Server Error
 
   The Android http client reached out to the web server which read back
   a 500 error. Happens on occasion. Either you haven't set up your GAE
   app correctly, or this is one of the glitches that GAE sometimes has.
   In any case, you would be expected to wrap the call in an exception
   handler so your app doesn't just go under with an Force-Close.
 
   On Jun 20, 2:24 am, gaara amellal.kamili...@gmail.com wrote:
 
Hi group,
Can someone help to understand this for checking my error

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


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

Re: [android-developers] Handling radio button of the single choice List

2011-06-22 Thread TreKing
On Wed, Jun 22, 2011 at 9:05 AM, Manish Garg mannishga...@gmail.com wrote:

 So is there some way to get the handle of the radio button or view of
 the radio button so that I can implement onClickListener of the radio
 button.


Use the parent Radio Group to find the child you need. See the docs for the
relevant functions.

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

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

Re: [android-developers] How to handle large HTTPS server XML-RPC response

2011-06-22 Thread TreKing
On Wed, Jun 22, 2011 at 9:27 AM, NaveenShrivastva 
kumarnaveen.si...@gmail.com wrote:

 But taking more time approx 10minutes.


You're reading a huge chunk of data, writing it to a file, then turning
around and reading the data back a second time. Why would this be fast?


 i want reduce time here.

 please help me.


Kumar gave you the answer in the very first response: Parse the stream
using XMLPullParser if it's an XML.

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

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

[android-developers] Re: Unable to get Latitude, Longitude of Current location

2011-06-22 Thread Nadeem Hasan
You are running this in the emulator right? The emulator does not have GPS 
hardware (duh) so the only way for the Location api to return a location is 
to provide it to it via adb as you just found out.

On the other hand if you are running on an actual device, no idea. Make sure 
GPS is turned on and getting a fix?

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

Re: [android-developers] Re: Unable to get Latitude, Longitude of Current location

2011-06-22 Thread NaveenShrivastva
On Wed, Jun 22, 2011 at 8:58 PM, Nadeem Hasan nha...@nadmm.com wrote:

 You are running this in the emulator right? The emulator does not have GPS
 hardware (duh) so the only way for the Location api to return a location is
 to provide it to it via adb as you just found out.

 On the other hand if you are running on an actual device, no idea. Make
 sure GPS is turned on and getting a fix?

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



You click on the DDMS of eclipse.Then find there is emulator control, then
there is option Location control, then find the Manual tab and pass the lat
and long manually for current location.
-- 
Naveen Shrivastava
BCA+MCA(LAST SEM)+O/A/B Level(DOEACC SOCITY IT GOVT INDIA)

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

Re: [android-developers] Mp3 player Forward functionality

2011-06-22 Thread NaveenShrivastva
On Thu, Jun 9, 2011 at 9:11 AM, Abhishek Akhani
abhishek.akh...@gmail.comwrote:

 Hi,

 I am trying to make an MP3 player in android. Can anyone please
 suggest me how to forward a media file on forward button click??? i
 mean is there any way to set progress of that running media file :(

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



Create a object of mediaplayer and write mp.next() for play next video.
-- 
Naveen Shrivastava
BCA+MCA(LAST SEM)+O/A/B Level(DOEACC SOCITY IT GOVT INDIA)

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

[android-developers] Re: Setting Ringtones

2011-06-22 Thread Conny
[ro.build.fingerprint]: [samsung/GT-I9003/GT-I9003/GT-I9003:2.2.1/
FROYO/DDKB1:user/release-keys]

On Jun 11, 9:12 pm, dan raaka danra...@gmail.com wrote:
 which device... this will help to find it ..
 $ adb shell getprop | grep -i fingerprint

 -Dan







 On Thu, Jun 9, 2011 at 12:24 PM, MCON Dev mcon...@gmail.com wrote:
  ContentValues values = new ContentValues();
                 values.put(MediaStore.MediaColumns.DATA, resourcePath);
                 values.put(MediaStore.MediaColumns.TITLE, (String) ((Button)
  v).getText());
                 values.put(MediaStore.MediaColumns.MIME_TYPE, audio/mp3);
                 values.put(MediaStore.Audio.Media.IS_RINGTONE, true);
                 values.put(MediaStore.Audio.Media.IS_NOTIFICATION, false);
                 values.put(MediaStore.Audio.Media.IS_ALARM, false);
                 values.put(MediaStore.Audio.Media.IS_MUSIC, true);

                 // Insert it into the database
                 Uri uri =
  MediaStore.Audio.Media.getContentUriForPath(resourcePath);
                 RingtoneManager.setActualDefaultRingtoneUri(this,
  RingtoneManager.TYPE_RINGTONE, uri);

  I set a mp3 ringtone (that plays well on my ubuntu and windows) on
  samsung galaxy android phone, but it gives a weird sound instead of
  the mp3.

  Conny

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

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


[android-developers] Enforce Device Policy Manager rules remotely

2011-06-22 Thread garaus
Hi folks,
Regarding to android Docs, Device policy can be enforced for example
by exchange server administrator remotely. (Through the Email
application, Exchange administrators can enforce password policies —
including alphanumeric passwords or numeric PINs — across devices.)
Could anybody point me to an example how to use Android Email App to
apply policies?

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


[android-developers] ADK on WIndows 7 64 bit with 64 bit JDK - emulator hanging

2011-06-22 Thread Bryan
Nobody here has reported quite this problem.

I have a 64 bit Windows 7 machine with 64 bit Java:

java version 1.6.0_25
Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)


The ADK installation seemed to work well.

However, the emulator does not start properly for me - running

tools\emulator -versbose @AndroidVD1

causes the main emulator window to open, 3 other DOS windows flash
briefly, then disappear too soon for anything to be read, then the
emulator window hangs.

Does anyone have any clues to what might be going wrong?

Thanks
Bryan

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


[android-developers] Canvas.drawVertices with vertex colors AND BitmapShader

2011-06-22 Thread Ananth
Hello,
   I have not found a sample yet that uses the colors parameter of
Canvas.drawVertices (http://developer.android.com/reference/android/
graphics/Canvas.html#drawVertices%28android.graphics.Canvas.VertexMode,
%20int,%20float[],%20int,%20float[],%20int,%20int[],%20int,%20short[],
%20int,%20int,%20android.graphics.Paint%29), but when I pass in a set
of colors (as many colors as there are vertices in the object I'm
trying to draw), it doesn't draw anything at all. Logcat seems to give
me nothing, too.

Has anyone rendered even a simple quad with both a BitmapShader and
vertex colors simultaneously? It would be most helpful to see some
working code to figure out what I'm doing wrong.

Thanks in advance for your time,
-Ananth

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


[android-developers] SMS not being sent after phone boot in emulator

2011-06-22 Thread G Android
Im trying to send a sms and an email after the phone is get booted.
The email is being sent but sms is not being sent. The same message is
being sent from another activity when I run the application after the
phone get botted. I am using emulator for sending mail and messages.
I have setup  the proper permissions in menifest file. Here is the
code for SentSMS.class

code
import android.telephony.SmsManager;

public class SendSMS{

public void sendSMS(String phoneNumber, String msg){
SmsManager sm = SmsManager.getDefault();
sm.sendTextMessage(phoneNumber, null, msg, null, null);
}

}
/code

and here is how I am sending it after boot.


code
import android.app.Service;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.IBinder;
import android.telephony.TelephonyManager;
import android.util.Log;

public class NotifyOnBoot extends Service {
 @Override
 public IBinder onBind(Intent arg0) {
 return null;
 }

 @Override
 public void onCreate() {
   super.onCreate();
   Thread th = new Thread(null, task, NotifyingService);
   th.start();
 }

 private Runnable task = new Runnable() {
 public void run() {

SendSMS mysms = new SendSMS();
mysms.sendSMS(5556, hi);

NotifyOnBoot.this.stopSelf();
 }
 };

 @Override
 public void onDestroy() {
 super.onDestroy();
 }

 @Override
 public int  onStartCommand  (Intent  intent, int flags, int
startId){
return START_STICKY;
 }


}

/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


[android-developers] Re: capturing PCM data of the mp3 file being played on Android SDK

2011-06-22 Thread Asmishra
Hi Developers!!

Any clue how to get this job done ?

Is it possible to get the PCM data of the mp3 file being played?

-Ashutosh

On Jun 20, 9:41 am, Asmishra aashutosh.mis...@gmail.com wrote:
 I am trying to get thePCMdata of the mp3 files being played by
 Android system.

 In the SDK I do not find any API of the Mediaplayer which lets me set
 the data target (complement API of SetDataSource()) so that I can give
 the path of a simple file in which I want to write thePCMdata before
 it is being played on the DAC of my system.

 I thought of another way for the solution. Instead of setting the data
 target if I am able to use the MediaRecoder to record thePCMdata of
 the file being played on the DAC of the emulator I would be able to
 achieve the desired result in other way; But the Problem which I am
 finding in this approach is what to set the data source to the
 mediarecoder? If I set MIC I get an exception.

 Here is the code :-

 === CODE STARTS  =
 public class Hello extends Activity
 {
         //All buttons
         private static final String LOG_TAG = AudioRecordTest;
     private static String mFileName = null;
     private RecordButton mRecordButton = null;
     private MediaRecorder mRecorder = null;
     private PlayButton   mPlayButton = null;
     private MediaPlayer   mPlayer = null;

     private void onRecord(boolean start) {
         if (start) {
             startRecording();
         } else {
             stopRecording();
         }
     }

     private void onPlay(boolean start) {
         if (start) {
             startPlaying();
         } else {
             stopPlaying();
         }
     }

     private void startPlaying() {
         mPlayer = new MediaPlayer();
         try {
             mPlayer.setDataSource(mFileName);
             mPlayer.prepare();
             mPlayer.start();
         } catch (IOException e) {
             Log.e(LOG_TAG, prepare() failed);
         }
     }

     private void stopPlaying() {
         mPlayer.release();
         mPlayer = null;
     }

     private void startRecording() {
         mRecorder = new MediaRecorder();
         mRecorder.setAudioSource(MediaRecorder.AudioSource.MIC);

 mRecorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
         mRecorder.setOutputFile(mFileName);
         mRecorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);

         try {
             mRecorder.prepare();
         } catch (IOException e) {
             Log.e(LOG_TAG, prepare() failed);
         }

         mRecorder.start();
     }

     private void stopRecording() {
         mRecorder.stop();
         mRecorder.release();
         mRecorder = null;
     }

     class RecordButton extends Button {
         boolean mStartRecording = true;

         OnClickListener clicker = new OnClickListener() {
             public void onClick(View v) {
                 onRecord(mStartRecording);
                 if (mStartRecording) {
                     setText(Stop recording);
                 } else {
                     setText(Start recording);
                 }
                 mStartRecording = !mStartRecording;
             }
         };

         public RecordButton(Context ctx) {
             super(ctx);
             setText(Start recording);
             setOnClickListener(clicker);
         }
     }

     class PlayButton extends Button {
         boolean mStartPlaying = true;

         OnClickListener clicker = new OnClickListener() {
             public void onClick(View v) {
                 onPlay(mStartPlaying);
                 if (mStartPlaying) {
                     setText(Stop playing);
                 } else {
                     setText(Start playing);
                 }
                 mStartPlaying = !mStartPlaying;
             }
         };

         public PlayButton(Context ctx) {
             super(ctx);
             setText(Start playing);
             setOnClickListener(clicker);
         }
     }

     //public AudioRecordTest() {
     public Hello() {
         mFileName =
 Environment.getExternalStorageDirectory().getAbsolutePath();
         mFileName += /audiorecordtest.3gp;
     }

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

         LinearLayout ll = new LinearLayout(this);
         mRecordButton = new RecordButton(this);
         ll.addView(mRecordButton,
             new LinearLayout.LayoutParams(
                 ViewGroup.LayoutParams.WRAP_CONTENT,
                 ViewGroup.LayoutParams.WRAP_CONTENT,
                 0));
         mPlayButton = new PlayButton(this);
         ll.addView(mPlayButton,
             new LinearLayout.LayoutParams(
                 ViewGroup.LayoutParams.WRAP_CONTENT,
                 ViewGroup.LayoutParams.WRAP_CONTENT,
                 0));
         setContentView(ll);
     }

     @Override
     public void onPause() {
         super.onPause();
         if (mRecorder 

  1   2   3   4   >