Re: [android-developers] 3D Charts

2012-04-01 Thread s.rawat
I have done quiet a research on this.If you are looking for drawing
pie,histograms, bar or line graphs for with 3D look.I beliver ther is not
such library available.You can use aichart for some 2D charts.Or final
solution is you can start using the google Chart APIS , they are very googd
but they all are in web view and you need to have internet available on the
phone/emulator.


..pain is temporary.quitting lasts forever..



On Sun, Apr 1, 2012 at 7:45 AM, James Black planiturth...@gmail.com wrote:

 This is a fairly broad area, it would be helpful if you could narrow it
 down.

 Basically, you need to connect to a server to get the data, or get it from
 sensors.

 Then, use OpenGL to draw the graph.

 On 31 Mar 2012, at 07:29, sourabh sahu wrote:

 How to draw 3D interactive charts in android.Please suggest something on
 it.

 Sourabh

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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] 3D Charts

2012-04-01 Thread s.rawat
There is a google group http://groups.google.com/group/achartengine?pli=1for
achartengine http://www.achartengine.org/, lots of good code is floating
around there you can join it.
But I am afraid you will not get the 3D charting anywhere else.
if you thought of using the Adobe Flex (using AIR 3.1 or higher) you may
get tremendous fullfillment of the requirement you are having in your head.
have a look at this , you will get teh idea of what I am talking about, but
sadly you have to code in Action Script and not in Andorid PL.

have a look at these http://www.youtube.com/watch?v=ba6oG6WmagM, this
http://www.youtube.com/watch?v=paTRLcmErNYand that one .



Rgds,
Saurabh
..pain is temporary.quitting lasts forever..



On Sun, Apr 1, 2012 at 12:29 PM, sourabh sahu souruit...@gmail.com wrote:

 Hey Saurabh,

 Thanks for the prompt.Can you plase share some code or samples for that.I
 looked on Google API but I dont want webview.

 Thanks  Regards,
 Sourabh


 On Sun, Apr 1, 2012 at 12:13 PM, s.rawat imsaurabhra...@gmail.com wrote:

 I have done quiet a research on this.If you are looking for drawing
 pie,histograms, bar or line graphs for with 3D look.I beliver ther is not
 such library available.You can use aichart for some 2D charts.Or final
 solution is you can start using the google Chart APIS , they are very googd
 but they all are in web view and you need to have internet available on the
 phone/emulator.


 ..pain is temporary.quitting lasts forever..




 On Sun, Apr 1, 2012 at 7:45 AM, James Black planiturth...@gmail.comwrote:

 This is a fairly broad area, it would be helpful if you could narrow it
 down.

 Basically, you need to connect to a server to get the data, or get it
 from sensors.

 Then, use OpenGL to draw the graph.

 On 31 Mar 2012, at 07:29, sourabh sahu wrote:

 How to draw 3D interactive charts in android.Please suggest something on
 it.

 Sourabh

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

Re: [android-developers] 3D Charts

2012-04-01 Thread sourabh sahu
Sounds good.Can I use some part of Adobe Flex (AIR) in my android project
for chart based reporting.

Sourabh

On Sun, Apr 1, 2012 at 12:42 PM, s.rawat imsaurabhra...@gmail.com wrote:

 There is a google grouphttp://groups.google.com/group/achartengine?pli=1for
 achartengine http://www.achartengine.org/, lots of good code is
 floating around there you can join it.
 But I am afraid you will not get the 3D charting anywhere else.
 if you thought of using the Adobe Flex (using AIR 3.1 or higher) you may
 get tremendous fullfillment of the requirement you are having in your head.
 have a look at this , you will get teh idea of what I am talking about,
 but sadly you have to code in Action Script and not in Andorid PL.

 have a look at these http://www.youtube.com/watch?v=ba6oG6WmagM, this
 http://www.youtube.com/watch?v=paTRLcmErNYand that one .



  Rgds,
 Saurabh

 ..pain is temporary.quitting lasts forever..



 On Sun, Apr 1, 2012 at 12:29 PM, sourabh sahu souruit...@gmail.comwrote:

 Hey Saurabh,

 Thanks for the prompt.Can you plase share some code or samples for that.I
 looked on Google API but I dont want webview.

 Thanks  Regards,
 Sourabh


 On Sun, Apr 1, 2012 at 12:13 PM, s.rawat imsaurabhra...@gmail.comwrote:

 I have done quiet a research on this.If you are looking for drawing
 pie,histograms, bar or line graphs for with 3D look.I beliver ther is not
 such library available.You can use aichart for some 2D charts.Or final
 solution is you can start using the google Chart APIS , they are very googd
 but they all are in web view and you need to have internet available on the
 phone/emulator.


 ..pain is temporary.quitting lasts forever..




 On Sun, Apr 1, 2012 at 7:45 AM, James Black planiturth...@gmail.comwrote:

 This is a fairly broad area, it would be helpful if you could narrow it
 down.

 Basically, you need to connect to a server to get the data, or get it
 from sensors.

 Then, use OpenGL to draw the graph.

 On 31 Mar 2012, at 07:29, sourabh sahu wrote:

 How to draw 3D interactive charts in android.Please suggest something
 on it.

 Sourabh

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to
 android-developers@googlegroups.com
 To unsubscribe from this group, 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: ContentProvider InstantiationException

2012-04-01 Thread Michael
Has there been any news on this error? I am having the same thing happen to 
me and I have been unable to find out what could be causing it. Thank you.

On Friday, March 6, 2009 10:39:40 AM UTC-8, droozen wrote:

 Provider class public. Check: public class SavingsDbAdapter extends 
 ContentProvider 

 :) And I implement all the methods for a ContentProvider that Eclipse 
 asked me to. I do have some static code that runs first, as the 
 NotesList example does at the bottom of the class. That code seems to 
 run fine before I hit the exception. I also have added the 
 android:multiprocess parameter to true, but I wouldn't expect that to 
 have any effect either way on my problem. 

 On Mar 6, 12:33 pm, Marco Nelissen marc...@android.com wrote: 
  Did you forget to mark your provider class as public? 
  
  On Fri, Mar 6, 2009 at 10:25 AM, droozen droozenr...@gmail.com wrote: 
  
   Hence the InstantiationException. I get that. But WHY can't it be 
   instantiated or, the real kicker, how can I get it to work? From what 
   I can tell, and from what I keep reading in everything I can find on 
   ContentProviders, everything looks fine with my setup. I don't even 
   know where to look to try to fix my setup. Has anyone else ever 
   encountered this and figured out why your provider couldn't be 
   instantiated? 
  
   On Mar 6, 12:10 pm, Dianne Hackborn hack...@android.com wrote: 
   When a process is started, all content providers that run in it are 
   instantiated.  Apparently your new content provider can't be 
 instantiated. 
  
   On Fri, Mar 6, 2009 at 5:51 AM, droozen droozenr...@gmail.com 
 wrote: 
  
So, I was trying to create my own ContentProvider. I want a 
 recurring 
notification (say, once a day) so I discovered that I should be 
 able 
to do this by setting a repeating alarm that my BroadcastReceiver 
class can pick up. Because it's going to perform some calcs, it 
immediately starts a service. So far, so good. 
  
My service will need to access some data in the SQLite database in 
 my 
application. So I made a content provider to provide that 
functionality. However, after making the content provider and 
 adding 
the provider to my manifest between the application tags: 
  
provider android:name=--Fully qualified path name to 
 ContentProvider 
class-- android:authorities=--authority to be used--/provider 
  
Now my application, when it starts up, immediately fails with a 
InstantiationException for my ContentProvider. Any idea what I'm 
 doing 
wrong? Or what else I need to be doing right? 
  
   -- 
   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.  All such questions should be posted on 
 public 
   forums, where I and others can see and answer them.

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

Re: [android-developers] 3D Charts

2012-04-01 Thread Zsolt Vasvari


you may get tremendous fullfillment of the requirement you are having in 
 your head.


I don't want to know what that means 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Has ListView been modified in the latest SDK?

2012-04-01 Thread Zsolt Vasvari
I haven't noticed anything and I have some complex list items.

On Sunday, April 1, 2012 10:22:22 AM UTC+8, Spooky wrote:

 I'm looking at two of my apps, both with a ListView, and for both, the
 ListView is defined/described (whatever you want to call it) the same
 in both XML and in Java (variable names and resource IDs excepted, of
 course).

 Here's the catch:  in the first, and older app, touching anywhere on the
 bar for an item in the Listview would select that item.  In the newer
 app, with the current SDK, *ONLY* touching the area enclosing the text
 will select that item.

 Both use the same Adapter settings, a similar setOnItemClick method
 (nothing that sets anything in/for the ListView), and neither has any
 special options set.  Just the defaults.

 Does anyone know if the SDK includes changes in ListViews that might
 account for this?  (I didn't spot anything in the dev guide, but I
 could easily have missed it.)  I really don't like this new behavior,
 whatever is causing it

 Thanks,
--jim

 -- 
 THE SCORE:  ME:  2  CANCER:  0
 73 DE N5IAL (/4)MiSTie #49997   Running FreeBSD 7.0 
 spooky1...@gmail.com ICBM/Hurricane: 30.44406N 86.59909W

   'Wrong' is one of those concepts that depends on witnesses.
  --Catbert:  Evil Director of Human Resources (Dilbert, 05Nov09)

 Android Apps Listing at http://www.jstrack.org/barcodes.html



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

Re: [android-developers] Your Most Common Errors

2012-04-01 Thread Zsolt Vasvari


 I would bet that the #1 most common problem is my R is screwed up.
 Symptoms include findViewById() returning something unexpected (e.g.,
 a LinearLayout where you expected a Button). Solution is to clean the
 project (Project  Clean from Eclipse or ant clean from the command
 line).


I think this has been fixed now.  I haven't had this one for a long time 
and I used to get it all the time.




-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Unbranded Android tablet

2012-04-01 Thread Zsolt Vasvari
For God's sake, get a freaking sticker or use photoshop to remove the 
branding.  Much easier than to trying to dig up an unbranded tablet.  

On Sunday, April 1, 2012 1:56:41 AM UTC+8, bob wrote:



 Can someone recommend for me an unbranded Android tablet for Android dev?  
 I want something that doesn't say Vizio, Samsung, or Coby on it.  
 Essentially, I want a black box with nothing written on 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

Re: [android-developers] Re: [Android - developers] Exponential Smoothing on Latitude and Langitude

2012-04-01 Thread agung wiguna johan
Hi David, thanks for your respond
I already solved the problem here
The problem's my mistake in a code at the smoothing formula, i use the
wrong value
Anyway, anybody here know about high pass filter?
Thanks

On Mon, Mar 26, 2012 at 5:51 PM, David Griffiths davi...@cordic.com wrote:

 Sorry, my mistake.

 The line

 smoothingCoor[i] = smoothingCoor [i] +alpha * (coor[i] -
 smoothingCoor[i]);

 is correct as it stands. However my comment on your nearing smoothing not
 taking into account the 359 degrees problem is correct.

 Two other problems with the code you have posted: I presume that coor is
 declared as int[] coor = new int[2]; and smoothingCoor as int[]
 smoothingCoor = null;

 So your line smoothingCorr = coor; causes both variables to refer to the
 same array so coor[0] and smoothingCoor[0] always have the same value. The
 other problem is that smoothLat should be smoothingCoor / 1.0E6. Of
 course smoothLat needs to be a double. In fact I can't see why you convert
 the lat/long values into ints - the smoothing agorithm is going to work
 better on floating point numbers.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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: Has ListView been modified in the latest SDK?

2012-04-01 Thread Jim Graham
On Sun, Apr 01, 2012 at 12:48:48AM -0700, Zsolt Vasvari wrote:
 I haven't noticed anything and I have some complex list items.

Ok, this just gets weirder and weirder  I was just playing around
with the XML file, trying ANYTHING, no matter how absurd, trying to find
the cause.  I found it...but don't understand why it matters.

There is a background image for the overall layout, and since the
ListView's background is apparently normally transparent by default, I
set its background to black with android:background=#FF00

Anyways, if I remove the background image, the ListView works as expected.

Now that I know that, is there a way I can fix it and keep the background
image?

Thanks,
   --jim

-- 
THE SCORE:  ME:  2  CANCER:  0
73 DE N5IAL (/4)MiSTie #49997   Running FreeBSD 7.0 
spooky1...@gmail.com ICBM/Hurricane: 30.44406N 86.59909W

Do not look into laser with remaining eye.

Android Apps Listing at http://www.jstrack.org/barcodes.html

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


Re: [android-developers] 3D Charts

2012-04-01 Thread Jim Graham
On Sun, Apr 01, 2012 at 12:42:20PM +0530, s.rawat wrote:
 There is a google group http://groups.google.com/group/achartengine?pli=1for
 achartengine http://www.achartengine.org/, lots of good code is floating
 around there you can join it.

I was going to suggest that one, but couldn't remember the name.  I saw
it a few months ago and thought it looked interesting.  So you beat me to
it, and that's a Good Thing(tm), as I probably wouldn't have ever
remembered the name, and thus, never would have been able to say more
than, Well, I remember seeing something out there, but, u   :-)

Later,
   --jim

-- 
THE SCORE:  ME:  2  CANCER:  0
73 DE N5IAL (/4)MiSTie #49997   Running FreeBSD 7.0 
spooky1...@gmail.com ICBM/Hurricane: 30.44406N 86.59909W

Do not look into laser with remaining eye.

Android Apps Listing at http://www.jstrack.org/barcodes.html

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


[android-developers] Hello Everyone, Is there anyway we can pass a listView from one activity to another

2012-04-01 Thread Soyer
I am trying to pass a list view from one activity to another and use
it as a Text_to_speech.

I converted the list view to a string (Using toString()) in the first
activity and did work, but it's not so convenient since i can't
manipulate the elements in the list(I can't use them)...i thought of
convert the String back to a listview but i thing no such method can
do that.




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


[android-developers] Re: Hello Everyone, Is there anyway we can pass a listView from one activity to another

2012-04-01 Thread lbendlin
Normally a listview is fed by an adapter. There is nothing stopping you 
from using the same adapter in different activities.

On Sunday, April 1, 2012 8:53:45 AM UTC-4, Soyer wrote:

 I am trying to pass a list view from one activity to another and use 
 it as a Text_to_speech. 

 I converted the list view to a string (Using toString()) in the first 
 activity and did work, but it's not so convenient since i can't 
 manipulate the elements in the list(I can't use them)...i thought of 
 convert the String back to a listview but i thing no such method can 
 do that. 




 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

[android-developers] Re: Hello Everyone, Is there anyway we can pass a listView from one activity to another

2012-04-01 Thread Soyer
Hello there,

the part of my code which dispatch the string form the first activity
to the second is :
  if (BluetoothDevice.ACTION_FOUND.equals(action)) {
// Get the BluetoothDevice object from the Intent
BluetoothDevice device =
intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
// If it's already paired, skip it, because it's been
listed already
if (device.getBondState() !=
BluetoothDevice.BOND_BONDED) {
mNewDevicesArrayAdapter.add(device.getName());
x=device.getName();
fromLat.add(x);
}
// When discovery is finished, change the Activity title
} else if
(BluetoothAdapter.ACTION_DISCOVERY_FINISHED.equals(action)) {
setProgressBarIndeterminateVisibility(false);
setTitle(R.string.Scanning_is_Over);
Bundle bundle = new Bundle(1);
String b=fromLat.toString();
bundle.putString(fromLat,b);
Intent intent1=new
Intent(AllthepiecesActivity.this,ttsActivity.class);
intent1.putExtras(bundle);
startActivity(intent1);
   startActivityForResult(intent1, 2);
and the TTS code is:
Bundle extras = this.getIntent().getExtras();
 final String fLat=extras.getString(fromLat);
 inputText.setText(fLat);
and
  if (text!=null  text.length()0) {
   Toast.makeText(ttsActivity.this, Saying:  +
text,
Toast.LENGTH_LONG).show();
   tts.speak(text, TextToSpeech.QUEUE_ADD, null);
  }
//to go to the first activity.
Intent i=new
Intent(ttsActivity.this,AllthepiecesActivity.class);
startActivity(i);

On Apr 1, 5:02 pm, lbendlin l...@bendlin.us wrote:
 Normally a listview is fed by an adapter. There is nothing stopping you
 from using the same adapter in different activities.







 On Sunday, April 1, 2012 8:53:45 AM UTC-4, Soyer wrote:

  I am trying to pass a list view from one activity to another and use
  it as a Text_to_speech.

  I converted the list view to a string (Using toString()) in the first
  activity and did work, but it's not so convenient since i can't
  manipulate the elements in the list(I can't use them)...i thought of
  convert the String back to a listview but i thing no such method can
  do that.

  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


[android-developers] Re: Textview gravity resets

2012-04-01 Thread adev
The adview and admob is all in the XML.
I do not have any code related to it.
So that is not dynamic.
However, it seems that the height of the adview is not determined
until the ad is loaded.
When I start the app, the adview height seems to be zero, then after
one or two seconds, it appears and the rest of the layout resizes to
fit.
This is when the gravity is reset.
I couldn't figure out how to have a preset height.

On Apr 1, 1:52 am, Narendra Singh Rathore nsr.curi...@gmail.com
wrote:
 On Sun, Apr 1, 2012 at 8:01 AM, adev enric...@gmail.com wrote:
  Sure I can reset the gravity on all of them in code, but that defeats
  the purpose of using the XML.

 No, not at all. Just reset the gravity of only the TextView in code. You
 need not to reset the gravity of all of them, as you are facing the problem
 only because of TextView's gravity.



  I'd like to know the cause of the issue I'm seeing now and solve it.

 The cause of issue might be that, your adview is being loaded dynamically,
 hence you have to resolve the matter dynamically through 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


Re: [android-developers] Remove '@override' annotion

2012-04-01 Thread Anirudh Loya
Remove the widget library related to it !

On Sun, Apr 1, 2012 at 6:49 AM, Kirupa answerofandr...@gmail.com wrote:

 After sdk updatting I got more no of errors. that Remove '@override'
 annotion

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




-- 

Thank you

Anirudh Loya | Android Developer**

Desk: +9140-30681824 | Mobile: +91*9246561265*

*Love your Job but don't Love your company, Because you may not know when
your company stops loving you.--  Voice Of Love*

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Cache application

2012-04-01 Thread oneking
How to make an application to detect and delete the cache of
applications?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 sense the amplitude of mic while recording with audiorecord in android ?

2012-04-01 Thread vishnu raj





 i am recording the sound with audiorecord in 
android and at the same time i want to get notified about the amplitude of 
the input voice  I want to send peak values at interval of times as input 
to my service . Is it possible .

Also wanted to know how to get notified when audio 
file is finished while playing the media file with audiotrack. 
I










Here is my code 



import android.media.AudioFormat;
import android.media.AudioRecord;
import android.media.MediaRecorder;
import android.util.Log;
import java.io.BufferedOutputStream;
import java.io.DataOutputStream;
import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

/**
 * 
 * @author Dany
 */
public class RecordSystem {

private boolean isRecording;
private String fileLocation;

public RecordSystem(String fileLocation) {
this.fileLocation = fileLocation;
}

public void stopRecord() {
isRecording = false;
}

public void startRecord() {
isRecording = true;
int frequency = 11025;
int channelConfiguration = AudioFormat.CHANNEL_CONFIGURATION_STEREO;
int audioEncoding = AudioFormat.ENCODING_PCM_16BIT;

File file = new File(fileLocation);

// delete any previous recording
if (file.exists()) {
file.delete();
}

// create the new file on SD
try {
file.createNewFile();
} catch (IOException e) {
throw new IllegalStateException(Failed to create 
+ file.toString());
}

try {
// create a DataOuputStream to write the audio data into the 
saved
// file
OutputStream os = new FileOutputStream(file);
BufferedOutputStream bos = new BufferedOutputStream(os);
DataOutputStream dos = new DataOutputStream(bos);

int bufferSize = AudioRecord.getMinBufferSize(frequency,
channelConfiguration, audioEncoding);

// create a new AudioRecord object to record the audio
// uses the permission 'android.permission.RECORD_AUDIO' in the
// manifest
AudioRecord audioRecord = new AudioRecord(
MediaRecorder.AudioSource.MIC, frequency,
channelConfiguration, audioEncoding, bufferSize);

short[] buffer = new short[bufferSize];
audioRecord.startRecording();

while (isRecording) {
// grab the buffered input (mic) and write it to a file on 
the
// SD
int bufferReadResult = audioRecord.read(buffer, 0, 
bufferSize);
for (int i = 0; i  bufferReadResult; i++) {
dos.writeShort(buffer[i]);
Log.i(result,+bufferReadResult);
}
}

audioRecord.stop();
audioRecord.release();
dos.flush();
dos.close();

} catch (Throwable t) {
Log.e(AudioRecord, Recording Failed);
}
}
}



/

package com.news.sample;

import java.io.BufferedInputStream;
import java.io.DataInputStream;
import java.io.EOFException;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;

import android.media.AudioFormat;
import android.media.AudioManager;
import android.media.AudioRecord;
import android.media.AudioTrack;
import android.util.Log;

public class PlaySystem {

private boolean isPlaying;
private String fileLocation;

public PlaySystem(String fileLocation) {
this.fileLocation = fileLocation;
}

public void stopPlay() {
isPlaying = false;
}

public void startPlay(int playFrequency) {
isPlaying = true;
int frequency = 11025;
int channelConfiguration = AudioFormat.CHANNEL_CONFIGURATION_MONO;
int audioEncoding = AudioFormat.ENCODING_PCM_16BIT;

File file = new File(fileLocation);

try {
InputStream is = new FileInputStream(file);
BufferedInputStream bis = new BufferedInputStream(is);
DataInputStream dis = new DataInputStream(bis);

int bufferSize = AudioRecord.getMinBufferSize(frequency,
channelConfiguration, audioEncoding);

// initialize an audiotrack with a different frequency then
// originally used for the recording
// this wil automatically manipulate the 'pitch' of the sound
AudioTrack audioTrack = new 
AudioTrack(AudioManager.STREAM_MUSIC,
playFrequency, channelConfiguration, audioEncoding,
bufferSize, AudioTrack.MODE_STREAM);

// start playback
 

Re: [android-developers] Remove '@override' annotion

2012-04-01 Thread Harri Smått
On Apr 1, 2012, at 4:19 AM, Kirupa wrote:
 After sdk updatting I got more no of errors. that Remove '@override'
 annotion

Could you provide a bit more specific information what SDK you updated 
(previous version, new version). Also it would be nice have an example method 
for which @Override does not work as expected.

--
H

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Remove '@override' annotion

2012-04-01 Thread Cristiano
I met the same questions from 2.3 update to 4.0

2012/4/2 Harri Smått har...@gmail.com

 On Apr 1, 2012, at 4:19 AM, Kirupa wrote:
  After sdk updatting I got more no of errors. that Remove '@override'
  annotion

 Could you provide a bit more specific information what SDK you updated
 (previous version, new version). Also it would be nice have an example
 method for which @Override does not work as expected.

 --
 H

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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] Cache application

2012-04-01 Thread Kristopher Micinski
why do you want to do this?  What do you want to do?  Most likely it
will be impossible, and should be.

kris

On Sun, Apr 1, 2012 at 12:13 PM, oneking onekingg...@gmail.com wrote:
 How to make an application to detect and delete the cache of
 applications?

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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] AndroidHttpClient HttpGet with Basic Authorization

2012-04-01 Thread Ralph Bergmann | the4thFloor.eu
Hallo,


why I can't add a Authorization header field to my get request?

AndroidHttpClient client = AndroidHttpClient.newInstance(useragent);

HttpParams httpParams = new BasicHttpParams();
HttpConnectionParams.setConnectionTimeout(httpParams, 15 * 1000);
HttpConnectionParams.setSoTimeout(httpParams, 15 * 1000);

HttpGet get = new HttpGet(url);
get.addHeader(Authorization, Base64 encoded String);
get.addHeader(Accept, application/json);
get.setParams(httpParams);

...


When I execute this request I get a HTTP/1.1 400 Bad Request response.

When I remove the line get.addHeader(Authorization, Base64 encoded
String); everything works fine (without the authorization).


What's going wrong? Is that the right way to do a basic authorization?
How to add the header field?



Ralph

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] AndroidHttpClient HttpGet with Basic Authorization

2012-04-01 Thread Ralph Bergmann | the4thFloor.eu
found an example

http://www.android-dev-faq.com/2011/11/how-to-make-httpdigest-client.html


Am 01.04.12 20:25, schrieb Ralph Bergmann | the4thFloor.eu:
 Hallo,
 
 
 why I can't add a Authorization header field to my get request?
 
 AndroidHttpClient client = AndroidHttpClient.newInstance(useragent);
 
 HttpParams httpParams = new BasicHttpParams();
 HttpConnectionParams.setConnectionTimeout(httpParams, 15 * 1000);
 HttpConnectionParams.setSoTimeout(httpParams, 15 * 1000);
 
 HttpGet get = new HttpGet(url);
 get.addHeader(Authorization, Base64 encoded String);
 get.addHeader(Accept, application/json);
 get.setParams(httpParams);
 
 ...
 
 
 When I execute this request I get a HTTP/1.1 400 Bad Request response.
 
 When I remove the line get.addHeader(Authorization, Base64 encoded
 String); everything works fine (without the authorization).
 
 
 What's going wrong? Is that the right way to do a basic authorization?
 How to add the header field?
 
 
 
 Ralph
 

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


Re: [android-developers] ListView and Database

2012-04-01 Thread Ricardo Santos
Hi Ted,

   Maybe I have understood the theory, now, but my code still do not work.
So, my code looks like this:


//This is my list view

ListView charList = (ListView)findViewById(R.id.list);


//This is the cursor that stores all the DB rows, I tested it and it works
just fine

 Cursor loadCursor = mDbHelper.fetchAllRecords();


//Setting up the from String[]

String[] from = new String[]{name};


//Setting up the to int[]

int[] to = new int[]{R.id.lstCharacters};


//Now, I set the SimpleCursorAdapter

 SimpleCursorAdapter simplCursor = new SimpleCursorAdapter(this, R.id.list,
loadCharacterCursor, from, to);


//Setting the adapter do the list - here it crashes.

charList.setAdapter(simplCursor);

I cant see what I'm doing wrong. Can anyone shed (some) more light to the
subject?

Ricardo


On Sun, Apr 1, 2012 at 12:33 AM, Ted Scott t...@hootinholler.com wrote:

 Hi Ricardo,

 First, I'm sure others will chime in if this is bad advice, but my
 understanding is that it is better to use the compatibility package and
 cursor loaders and a load manager. See http://developer.android.com/**
 reference/android/widget/**SimpleCursorAdapter.htmlhttp://developer.android.com/reference/android/widget/SimpleCursorAdapter.htmland
  the base CursorAdapter.

 That said, from is simply a list of columns in the PROJECTION exposed by
 the cursor that are of interest to the ListView ids in the to array. This
 is in order of the two arrays such that the data from from[x] is passed to
 the view with the id in to[x].

 Given the list view row definition:

 ?xml version=1.0 encoding=utf-8?
 LinearLayout 
 xmlns:android=http://schemas.**android.com/apk/res/androidhttp://schemas.android.com/apk/res/android
 
  android:layout_width=fill_**parent
  android:layout_height=34dp
  android:gravity=bottom
  android:orientation=**horizontal

 TextView 
 xmlns:android=http://schemas.**android.com/apk/res/androidhttp://schemas.android.com/apk/res/android
 
android:id=@+id/foo
android:layout_width=100dp
android:layout_height=30dp
android:textSize=16dp
android:gravity=center_**vertical
android:paddingLeft=5dip
android:singleLine=true
/
 TextView 
 xmlns:android=http://schemas.**android.com/apk/res/androidhttp://schemas.android.com/apk/res/android
 
android:id=@+id/bar
android:layout_width=50dp
android:layout_height=30dp
android:textSize=20dp
android:gravity=right|center_**vertical
android:paddingLeft=5dip
android:singleLine=true
/
 /LinearLayout

 And assuming that you have column1 and column2 in your cursor's
 projection, and want to map the contents of column1 to the textview foo and
 column2 to textview bar, from and to would be defined something like:

 String[] from =  new String[] { column1 , coulmn2};
 int[] to   = new int[] { R.id.foo , R.id.bar };

 Clear as mud?

 -Ted


 On 3/31/2012 9:36 PM, Ricardo Santos wrote:

 Hello everyone!

  I have in my application, I hace a list view that needs to be populated
 with data from a database, I have tested my database and my app is handling
 the data correctly, but I cant populate the list view, I have read about
 the SimpleCursorAdapter but I cant understand how to use the class,
 specially the from and to fields, does anyone know how to use it?

  My class is not extending ListActivity, my list view is inside a dialog.

 Ricardo
 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@**
 googlegroups.com android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+**unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/**group/android-developers?hl=enhttp://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.comandroid-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+**unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/**group/android-developers?hl=enhttp://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] Hello everyone, what i have done so far regarding passing a ListView from one activity to another

2012-04-01 Thread Soyer
Hello everyone,


i posted a question about passing a listview from one activity to
another and this is what i did so far..

the first activity is this:

  Bundle bundle = new Bundle(1);

bundle.putStringArrayList(fromLat, fromLat);



Intent intent1=new
Intent(piecesActivity.this,ttsActivity.class);

intent1.putStringArrayListExtra(fromLat, fromLat);

startActivity(intent1);
   startActivityForResult(intent1, 2);

in The Second Activity is:


 ArrayList StringfLat = new ArrayListString ();

Intent intent=new Intent();
 fLat=intent.getStringArrayListExtra(fromLat);

System.out.println(=38+fLat);



and in the second activity i am trying to make the list as a
text_to_speach:

@Override
public void onClick(View v) {


  if (fLat!=null  ((CharSequence) fLat).length()0) {
   Toast.makeText(ttsActivity.this, Saying:  + fLat,
Toast.LENGTH_LONG).show();
   tts.speak(fLat, TextToSpeech.QUEUE_ADD, null);
  }




i don't know why the second activity is giving me NullPointerException
(the fLat is returning Null) and the .speak method is not accepting a
list view... :S


I really need an advice...any Idea will be very appreciated.



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


[android-developers] How to open an existing project in Eclipse

2012-04-01 Thread g...@deanblakely.com
I'm new to Android and Eclipse.  I have been creating new projects in
Eclipse with little problem but now I have downloaded an existing
project entitled BingMapsAndroidSDK_v1.5.  its supposed to be a
working app demonstraiting how use use Bing Maps on Android.  The
directory structure looks like the projects I created having
subdirectories named .metadata, assets, bin, gen, MainActivity, res,
src.

I can't seem to figure out how to open this project in Eclipse.  I
have went through most of the help topics that relate to this and they
pretty much show how to do everything except how to open an existing
project.

Anyone willing to help me out here?
Thanks,
Gary

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 open an existing project in Eclipse

2012-04-01 Thread Mark Murphy
Try File  Import from the main menu.

If that fails to find a project, then the ZIP file does not contain
Eclipse project files. In that case:

Step #1: File  New  Project from the main menu

Step #2: Choose Android Project from the roster of project types

Step #3: Choose Create project from existing source in the radio buttons

Step #4: Use the Browse button to find the root directory of the project

and continue from there as if it were a regular new project.

On Sun, Apr 1, 2012 at 6:27 PM, g...@deanblakely.com
g...@deanblakely.com wrote:
 I'm new to Android and Eclipse.  I have been creating new projects in
 Eclipse with little problem but now I have downloaded an existing
 project entitled BingMapsAndroidSDK_v1.5.  its supposed to be a
 working app demonstraiting how use use Bing Maps on Android.  The
 directory structure looks like the projects I created having
 subdirectories named .metadata, assets, bin, gen, MainActivity, res,
 src.

 I can't seem to figure out how to open this project in Eclipse.  I
 have went through most of the help topics that relate to this and they
 pretty much show how to do everything except how to open an existing
 project.

 Anyone willing to help me out here?
 Thanks,
 Gary

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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 NYC: http://marakana.com/training/android/

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


[android-developers] Return formatted time

2012-04-01 Thread aikidoguy
Im trying to get the time a button is pressed and display it on the
screen


case R.id.btoMovies:
statuschange.setText(To Movies);
mystatus=2;
Time now = new Time();
now.setToNow();
timeofchange.setText( + now);

and it returns 20120401T232303GMT(0,91,0,0,122583)

Im trying to get the time formatted  MMDDTHHMMSS format  ... is
this the best way to do this ?

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


[android-developers] Return formatted time

2012-04-01 Thread aikidoguy
Im trying to get the time a button is pressed and display it on the
screen


case R.id.btoMovies:
statuschange.setText(To Movies);
mystatus=2;
Time now = new Time();
now.setToNow();
timeofchange.setText( + now);

and it returns 20120401T232303GMT(0,91,0,0,122583)

Im trying to get the time formatted  MMDDTHHMMSS format  ... is
this the best way to do this ?

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


Re: [android-developers] Return formatted time

2012-04-01 Thread Mark Murphy
Use SimpleDateFormat.

On Sun, Apr 1, 2012 at 7:34 PM, aikidoguy clayrichmo...@gmail.com wrote:
 Im trying to get the time a button is pressed and display it on the
 screen


 case R.id.btoMovies:
                        statuschange.setText(To Movies);
                        mystatus=2;
                        Time now = new Time();
                        now.setToNow();
                        timeofchange.setText( + now);

 and it returns 20120401T232303GMT(0,91,0,0,122583)

 Im trying to get the time formatted  MMDDTHHMMSS format  ... is
 this the best way to do this ?

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



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

Android Training in NYC: http://marakana.com/training/android/

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


Re: [android-developers] AndroidHttpClient HttpGet with Basic Authorization

2012-04-01 Thread Nikolay Elenkov
On Mon, Apr 2, 2012 at 4:15 AM, Ralph Bergmann | the4thFloor.eu
ra...@the4thfloor.eu wrote:
 found an example

 http://www.android-dev-faq.com/2011/11/how-to-make-httpdigest-client.html


The implementation in Android is however broken: it uses a fixed nonce of 1.
If you server is actually checking for replay requests, you might get errors.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Your Most Common Errors

2012-04-01 Thread Nikolay Elenkov
On Sun, Apr 1, 2012 at 4:09 AM, Raghav Sood
raghavs...@androidactivist.org wrote:
 Hi all,

 I'm working on compiling a list of the commonly faced Android errors, and
 how to solve them.
 ..
  Errors related to Eclipse problem are also welcome.

killall -s 9 eclipse

Works like a charm.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] saving camera preview frames to a file with minimum slow-down

2012-04-01 Thread Qianqian Fang
hi list

I'd like to get some advice on optimizing file IO of a camera-frame
processing code I am working on.

I used the setPreviewCallbackWithBuffer() method to capture each
preview frame and do some processing in the real-time. The processed
frame (an int array) is then save to the sdcard. I found that by
commenting out the file io block, my frame rate can go up to 30fps for
a 512x512 preview size. However, with the data saving, the frame rate
is only around 10 fps or less.

Any suggestions to speed up this?

Qianqian

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] saving camera preview frames to a file with minimum slow-down

2012-04-01 Thread Nikolay Elenkov
On Mon, Apr 2, 2012 at 10:42 AM, Qianqian Fang fan...@gmail.com wrote:
 hi list

 I'd like to get some advice on optimizing file IO of a camera-frame
 processing code I am working on.

 I used the setPreviewCallbackWithBuffer() method to capture each
 preview frame and do some processing in the real-time. The processed
 frame (an int array) is then save to the sdcard. I found that by
 commenting out the file io block, my frame rate can go up to 30fps for
 a 512x512 preview size. However, with the data saving, the frame rate
 is only around 10 fps or less.

 Any suggestions to speed up this?

Offload saving to a worker thread?

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


Re: [android-developers] Your Most Common Errors

2012-04-01 Thread Kristopher Micinski
On Sat, Mar 31, 2012 at 3:09 PM, Raghav Sood
raghavs...@androidactivist.org wrote:
 Hi all,

 I'm working on compiling a list of the commonly faced Android errors, and
 how to solve them. I sincerely doubt I've encountered all of them
 personally, hence this post. Which are the errors that you have faced most
 commonly, and how did you solve them? Please reply to this thread, it'll
 only take a few minutes. Hopefully, in the future people can refer here for
 solutions of some of the errors at least. Errors related to Eclipse problem
 are also welcome. This is not for an assignment or something like that.
 Android isn't even remotely part of my school syllabus.

 Thanks


In my mind, the most common error -- by a vast majority -- is people
trying to write apps without understanding anything about the Android
platform.  There are tons of people that ask can my app do X?
Usually x is:
  -- Extending other apps,
  -- Adding some system level functionality,
  -- Altering the typical Android semantics in a strange way (back /
home weirdness)
  -- Something that makes sense on a desktop machine, but Android
isn't a desktop
-- Typically phrased as: how do I translate this app from C to
Java, how do I wrap this C app in Java?

The common complaint when people say Android doesn't work like that
is a long manifesto that reduces to this:
  You're wrong, and your credibility should all be stripped, because
here, I found this *one app* in the market that does what I want, and
I want to know how to replicate its functionality exactly.  Let me
further insist that this app works without root even though the
instructions say it requires it, and that all apps that can be written
work according to the documented parts of the API and across all
devices.

Kris

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Textview gravity resets

2012-04-01 Thread adev
Also, even if I did do it dynamically, how do I know when to do it?
I would need to trigger the gravity code to run after the ad has been
loaded or when the gravity gets changed.
Is there a way to trigger off one of these events?

On Apr 1, 9:54 am, adev enric...@gmail.com wrote:
 The adview and admob is all in the XML.
 I do not have any code related to it.
 So that is not dynamic.
 However, it seems that the height of the adview is not determined
 until the ad is loaded.
 When I start the app, the adview height seems to be zero, then after
 one or two seconds, it appears and the rest of the layout resizes to
 fit.
 This is when the gravity is reset.
 I couldn't figure out how to have a preset height.

 On Apr 1, 1:52 am, Narendra Singh Rathore nsr.curi...@gmail.com
 wrote:







  On Sun, Apr 1, 2012 at 8:01 AM, adev enric...@gmail.com wrote:
   Sure I can reset the gravity on all of them in code, but that defeats
   the purpose of using the XML.

  No, not at all. Just reset the gravity of only the TextView in code. You
  need not to reset the gravity of all of them, as you are facing the problem
  only because of TextView's gravity.

   I'd like to know the cause of the issue I'm seeing now and solve it.

  The cause of issue might be that, your adview is being loaded dynamically,
  hence you have to resolve the matter dynamically through 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] Looking for a favour from someone with an Android 1.6 device

2012-04-01 Thread William Ferguson
Could someone with an Android-1.6 device please do me a favor?

Download https://play.google.com/store/apps/details?id=au.com.xandar.jumblee 
(it's 
free)
Start the app, after the license and how to play you'll get to the 
OverviewScreen.
Choose start new game. It might take a couple of seconds (during which a 
dialog will be displayed).

Does the GameScreen get displayed or is it blank?

I'm asking because I have 2 builds both built using identical source, 
libraries, SDK tools, platform-tools and JDK. 
One of which works on the 1.6 emulator, one of which doesn't.
I'd like to find out if this is a quirk of the emulator or if it is real.

And if anyone has any ideas as to what the discrepancy is between the 2 
builds then I'm all ears.

William

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Textview gravity resets

2012-04-01 Thread adev
I've tried dynamically changing each text view, but nothing happens
when I change it.
Is there anything thing else that would cause a text view to APPEAR to
be left justified eventhough gravity is still set to RIGHT?

On Apr 1, 9:54 am, adev enric...@gmail.com wrote:
 The adview and admob is all in the XML.
 I do not have any code related to it.
 So that is not dynamic.
 However, it seems that the height of the adview is not determined
 until the ad is loaded.
 When I start the app, the adview height seems to be zero, then after
 one or two seconds, it appears and the rest of the layout resizes to
 fit.
 This is when the gravity is reset.
 I couldn't figure out how to have a preset height.

 On Apr 1, 1:52 am, Narendra Singh Rathore nsr.curi...@gmail.com
 wrote:







  On Sun, Apr 1, 2012 at 8:01 AM, adev enric...@gmail.com wrote:
   Sure I can reset the gravity on all of them in code, but that defeats
   the purpose of using the XML.

  No, not at all. Just reset the gravity of only the TextView in code. You
  need not to reset the gravity of all of them, as you are facing the problem
  only because of TextView's gravity.

   I'd like to know the cause of the issue I'm seeing now and solve it.

  The cause of issue might be that, your adview is being loaded dynamically,
  hence you have to resolve the matter dynamically through 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


Re: [android-developers] AndroidHttpClient HttpGet with Basic Authorization

2012-04-01 Thread Michael Banzon
You need to add Basic in front of the Authorization parameter (if
you are using basic auth.). The base64 encoded string also needs both
username and password.

This is from a working example:

method.addHeader(Authorization, Basic  + Base64.encodeBytes(new
String(this.username + : + this.password).getBytes()));

The Base64.encodeBytes helper method is found here: http://iharder.net/base64


On Mon, Apr 2, 2012 at 3:10 AM, Nikolay Elenkov
nikolay.elen...@gmail.com wrote:
 On Mon, Apr 2, 2012 at 4:15 AM, Ralph Bergmann | the4thFloor.eu
 ra...@the4thfloor.eu wrote:
 found an example

 http://www.android-dev-faq.com/2011/11/how-to-make-httpdigest-client.html


 The implementation in Android is however broken: it uses a fixed nonce of 1.
 If you server is actually checking for replay requests, you might get errors.

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



-- 
Michael Banzon
http://michaelbanzon.com/

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


Re: [android-developers] AndroidHttpClient HttpGet with Basic Authorization

2012-04-01 Thread Nikolay Elenkov
On Mon, Apr 2, 2012 at 10:10 AM, Nikolay Elenkov
nikolay.elen...@gmail.com wrote:
 On Mon, Apr 2, 2012 at 4:15 AM, Ralph Bergmann | the4thFloor.eu
 ra...@the4thfloor.eu wrote:
 found an example

 http://www.android-dev-faq.com/2011/11/how-to-make-httpdigest-client.html


 The implementation in Android is however broken: it uses a fixed nonce of 1.
 If you server is actually checking for replay requests, you might get errors.

This is, of course, for digest authentication. Basic authentication works, but
you should only use it over HTTPS.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] AndroidHttpClient HttpGet with Basic Authorization

2012-04-01 Thread Nikolay Elenkov
On Mon, Apr 2, 2012 at 1:13 PM, Michael Banzon mich...@banzon.dk wrote:
 You need to add Basic in front of the Authorization parameter (if
 you are using basic auth.). The base64 encoded string also needs both
 username and password.

 This is from a working example:

 method.addHeader(Authorization, Basic  + Base64.encodeBytes(new
 String(this.username + : + this.password).getBytes()));


There is really no need to re-implement functionality already found in
HttpClient.
(unless is broken, like the digest auth implementation)

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Wake-lock instance.

2012-04-01 Thread Put_tiMe
The PowerManager.newWakeLock() will return a new instance of a wake 
lock every time.
 
If I have an intent service or an alarm manager service, then I won't have 
an instance to store this wake lock.
 
Whereas I want to work on one instance of the wake-lock object.
 
How do I handle this situation in an intent-service or an alarm manager 
service?
 
 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] AndroidHttpClient HttpGet with Basic Authorization

2012-04-01 Thread Michael Banzon
I am sure that Ralph will be absolutely ecstatic about that - can you
imagine that - a working example that require less code/library
inclusion compared to my app - absolutely magnificent!

Personally the first part (working) would be my clear focus.

Have a nice day ;-)


On Mon, Apr 2, 2012 at 6:23 AM, Nikolay Elenkov
nikolay.elen...@gmail.com wrote:
 On Mon, Apr 2, 2012 at 1:13 PM, Michael Banzon mich...@banzon.dk wrote:
 You need to add Basic in front of the Authorization parameter (if
 you are using basic auth.). The base64 encoded string also needs both
 username and password.

 This is from a working example:

 method.addHeader(Authorization, Basic  + Base64.encodeBytes(new
 String(this.username + : + this.password).getBytes()));


 There is really no need to re-implement functionality already found in
 HttpClient.
 (unless is broken, like the digest auth implementation)

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



-- 
Michael Banzon
http://michaelbanzon.com/

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


Re: [android-developers] AndroidHttpClient HttpGet with Basic Authorization

2012-04-01 Thread Nikolay Elenkov
On Mon, Apr 2, 2012 at 1:54 PM, Michael Banzon mich...@banzon.dk wrote:
 I am sure that Ralph will be absolutely ecstatic about that - can you
 imagine that - a working example that require less code/library
 inclusion compared to my app - absolutely magnificent!

I didn't post the example, but I have to agree. It is indeed a lot
better, than having to include (or write your own) Base64
implementation just to re-invent a feature that is already
available and probably well tested. Magnificent indeed :)


 Personally the first part (working) would be my clear focus.


working != good
working != maintainable

etc.

 Have a nice day ;-)


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] Selection and Highlight text in Webview

2012-04-01 Thread Satya
Hi All,

I need to select and highlight text in webview.
I already used clipboard manager and javascript solutions but i need
to select any paragraph and highlight it permanently can any one help
me for this..

Thanks
Satya

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