[android-developers] Re: HttpClient GC_Concurrent freed

2013-07-30 Thread Johan Appelgren
Have you tried analyzing your app with tools like ddms? 

http://developer.android.com/tools/debugging/ddms.html
http://android-developers.blogspot.se/2011/03/memory-analysis-for-android.html

On Monday, July 29, 2013 8:22:12 AM UTC+2, Kristoffer wrote:
>
> Hello.
> Iam having trouble with memory leak it will finaly cause the app to force 
> close.
> I have stripped down my code just to find where the problem is and i 
> located it to my httpclient.
>
> When i run this code iam geting many GC_Concurrent freed.
> if i add a Thread.sleep(1000); then i will ofcourse get less warnings but 
> my guess is that there is still some problem with the code i run.
> Is there a way i could prevent the problem.
>
> Here is the code:
>
> Thread c = new Thread() {
> @Override
> public void run() {
> String xml;
>  UsernamePasswordCredentials creds = new 
> UsernamePasswordCredentials("username", "password"); 
>  HttpGet httpGet;
>  HttpClient httpClient;
>  HttpResponse httpResponse;
>  HttpEntity httpEntity;
>  while (RunThread) {
>
>  try {
>  httpClient = HttpClientFactory.getThreadSafeClient();
>  httpGet = new HttpGet("http://ipaddress/list?format=xml";);
>  httpGet.addHeader(new BasicScheme().authenticate(creds, 
> httpGet));
>  httpResponse = httpClient.execute(httpGet);
>  httpEntity = httpResponse.getEntity();
>  xml = EntityUtils.toString(httpEntity, "UTF-8");
>  
>  
>  } catch (Exception e) { 
>  e.printStackTrace();
>  
>  } 
> }
> };
> c.start();
> } 
>
> And here is the class HttpClientFactory
>
> public class HttpClientFactory {
>
> private static DefaultHttpClient client;
>
> public synchronized static DefaultHttpClient getThreadSafeClient() {
>   
> if (client != null)
> return client;
>  
> client = new DefaultHttpClient();
> 
> ClientConnectionManager mgr = client.getConnectionManager();
> 
> HttpParams params = client.getParams();
> params.setIntParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, 
> 1);
> params.setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 1);
> client = new DefaultHttpClient(
> new ThreadSafeClientConnManager(params,
> mgr.getSchemeRegistry()), params);
>   
> return client;
> } 
> }
>
>
> Have a made some huge mistage in the code that is causing this issue?
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: HttpClient GC_Concurrent freed

2013-07-30 Thread Kristoffer
Hello.
Thanks for reply.
I have tryed to look at threads and Heap but i could not find what the 
problem was.
I will try again if i could find anything.

Den måndagen den 29:e juli 2013 kl. 08:22:12 UTC+2 skrev Kristoffer:
>
> Hello.
> Iam having trouble with memory leak it will finaly cause the app to force 
> close.
> I have stripped down my code just to find where the problem is and i 
> located it to my httpclient.
>
> When i run this code iam geting many GC_Concurrent freed.
> if i add a Thread.sleep(1000); then i will ofcourse get less warnings but 
> my guess is that there is still some problem with the code i run.
> Is there a way i could prevent the problem.
>
> Here is the code:
>
> Thread c = new Thread() {
> @Override
> public void run() {
> String xml;
>  UsernamePasswordCredentials creds = new 
> UsernamePasswordCredentials("username", "password"); 
>  HttpGet httpGet;
>  HttpClient httpClient;
>  HttpResponse httpResponse;
>  HttpEntity httpEntity;
>  while (RunThread) {
>
>  try {
>  httpClient = HttpClientFactory.getThreadSafeClient();
>  httpGet = new HttpGet("http://ipaddress/list?format=xml";);
>  httpGet.addHeader(new BasicScheme().authenticate(creds, 
> httpGet));
>  httpResponse = httpClient.execute(httpGet);
>  httpEntity = httpResponse.getEntity();
>  xml = EntityUtils.toString(httpEntity, "UTF-8");
>  
>  
>  } catch (Exception e) { 
>  e.printStackTrace();
>  
>  } 
> }
> };
> c.start();
> } 
>
> And here is the class HttpClientFactory
>
> public class HttpClientFactory {
>
> private static DefaultHttpClient client;
>
> public synchronized static DefaultHttpClient getThreadSafeClient() {
>   
> if (client != null)
> return client;
>  
> client = new DefaultHttpClient();
> 
> ClientConnectionManager mgr = client.getConnectionManager();
> 
> HttpParams params = client.getParams();
> params.setIntParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, 
> 1);
> params.setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 1);
> client = new DefaultHttpClient(
> new ThreadSafeClientConnManager(params,
> mgr.getSchemeRegistry()), params);
>   
> return client;
> } 
> }
>
>
> Have a made some huge mistage in the code that is causing this issue?
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] android how to bring our application to foreground when it goes to background?

2013-07-30 Thread ashish
Hi,

i want to prevent the user to close my application with the 
homebutton+applicationswipe.

On Monday, July 29, 2013 8:50:10 PM UTC+5:30, TreKing wrote:
>
>
> On Mon, Jul 29, 2013 at 8:31 AM, ashish  >wrote:
>
>> i want to bring my application to foreground when it goes to background.
>
>
> Why? This sounds like obnoxious behavior.
>
>
> -
> 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: GLSurfaceView lag/delay on Galaxy S3.

2013-07-30 Thread Indicator Veritatis
The best solution to your problem is probably to "bite the bullet" and 
rewrite your code to use shaders in OpenGL ES 2.0. All major phones and 
quite a few minor ones support it now.

It may be your only solution, if the Galaxy S3 has to move too many more 
bits than the P350 did, or has a slower OpenGL client-server path. Or if 
Motorola took too many shortcuts in maintaining OpenGL ES 1.0 backwards 
compatibility.

Finally, from this snippet, we cannot tell if you are handling your buffers 
correctly. For example is 'buffer' a directly allocated ByteBuffer?

On Saturday, July 27, 2013 2:22:09 AM UTC-7, Edvinas Kilbauskas wrote:
>
> Hello,
> so I have this problem with galaxy S3 and OpenGL ES 1.0.
>
> Here's little backstory:
> I had LG P350 (600MHZ CPU, Adreno 200 GPU, 2.8 inch screen) for 2 years or 
> so. And I was developing this little game framework which used OpenGL. My 
> old LG handled it pretty well, good framerates, no lags, everything worked 
> as expected. But few days ago I decided that I should get new phone, so I 
> ordered Galaxy S3.
>
> So after I got the phone I installed my 2 games which used my framework 
> and noticed that there is a delay between touching / moving finger on the 
> screen and things appearing on screen. First I thought that this could be 
> problem of my input handling system, so I did something like this to check 
> if that was true:
>
> inputSystem.update();
>>
>> float x = inputSystem.getTouchX();
>> float y = inputSystem.geTouchY();
>>
>> Log.d("Touch: ", "X: " + x + " Y: " + y);
>>
>
>  
> Essentially I just touched my screen, and looked at the logcat to see if 
> there is any delay in receiving data. And there was absolutely no delay! As 
> soon as I touched the screen, coordinates on logcat changed.
>
> Then I thought to myself... OK, maybe my rendering system is messed up. To 
> test if that was true I did exactly this:
>
> public void onDrawFrame(GL10 gl){
>> FloatBuffer floatBuffer = buffer.asFloatBuffer();
>>
>> public void tempDraw(GL10 gl){
>> gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
>>
>> gl.glViewport(0,0,1280,720);
>> gl.glMatrixMode(GL10.GL_PROJECTION);
>> gl.glLoadIdentity();
>> gl.glOrthof(0, 20, 14, 0, -1, 1);
>>
>> gl.glMatrixMode(GL10.GL_MODELVIEW);
>> gl.glLoadIdentity();
>>
>> gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
>> gl.glVertexPointer(2,GL10.GL_FLOAT,0,floatBuffer);
>>
>> inputSystem.update();
>>
>> float x = inputSystem.getLastTouchEvent().position.x;
>> float y = inputSystem.getLastTouchEvent().position.y;
>>
>> Log.d("Touch: ", "X: " + x + " Y: " + y);
>>
>> gl.glTranslatef(x,y,0);
>> gl.glDrawArrays(GL10.GL_TRIANGLES, 0, 6);
>> }
>>
>
>
> This is as simple as it could be, I didn't use my render system for 
> rendering, I just used this little piece of code which couldn't get any 
> simpler. It just draws little rectangle on screen in the position of last 
> touch event.
>
> And guess what! This didn't do the trick either! It still has delay! *Also 
> in developer options I enabled "Show touches" function, so I could see in 
> real time how much delay there is.* After I scroll my finger through 
> screen, I immediately can see output on logcat, but square on the screen 
> still has huge delay. 
>
> Here's the video showing the delay: GLSurfaceView lag/delay on Galaxy 
> S3
>
> You can see that "Show touches" android function showing the white dot on 
> screen, this is where I WANT my square to be, but my square just follows it 
> with delay.
> Just for comparison I will launch painting application which paint on 
> EXACTLY the white dot. This is the performance I want in my game.
>
> It can't be the problem of my phone, because other games and apps that I 
> downloaded from google play doesn't have this lag/delay problem.
>
> So can someone help me out please? What am I missing? Have any of you 
> encountered this problem before?
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: GLSurfaceView lag/delay on Galaxy S3.

2013-07-30 Thread a1


> The best solution to your problem is probably to "bite the bullet" and 
> rewrite your code to use shaders in OpenGL ES 2.0. All major phones and 
> quite a few minor ones support it now. 


> It may be your only solution, if the Galaxy S3 has to move too many more 
> bits than the P350 did, or has a slower OpenGL client-server path. 
>

Really, c'mon there's not even a bit of indication that this lag is caused 
by rendering, I assure you that even lousy Adreno 225 from NA variants of 
S3 is more than capable drawing two small triangles at 60fps even in ES 
1.0. That being said ES 2.0 is of course way to go since ES 1.0 is 
basically dead and deprecated.

To OP:
First measure what cause delay (measure FPS, check and measure how you 
communicate between UI and GL thread etc) and then try to fix this. You 
cannot optimize without hard data.

--
Bart
 

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: GLSurfaceView lag/delay on Galaxy S3.

2013-07-30 Thread Edvinas Kilbauskas


> The best solution to your problem is probably to "bite the bullet" and 
> rewrite your code to use shaders in OpenGL ES 2.0. All major phones and 
> quite a few minor ones support it now.
>
> It may be your only solution, if the Galaxy S3 has to move too many more 
> bits than the P350 did, or has a slower OpenGL client-server path. Or if 
> Motorola took too many shortcuts in maintaining OpenGL ES 1.0 backwards 
> compatibility.
>
> Finally, from this snippet, we cannot tell if you are handling your 
> buffers correctly. For example is 'buffer' a directly allocated ByteBuffer?
>


This is full code, I optimized it even more, but only making 4 OpenGL calls 
every frame.


public class MainActivity extends Activity implements Renderer, 
>> OnTouchListener {
>
> private GLSurfaceView surfaceView;
>
> private FloatBuffer vertices;
>
> private float x;
>
> private float y;
>
> private int SCREEN_WIDTH = 1280;
>
> private int SCREEN_HEIGHT = 720;
>
>
>> @Override
>
> protected void onCreate(Bundle savedInstanceState) {
>
> super.onCreate(savedInstanceState);
>
>
>> surfaceView = new GLSurfaceView(this);
>
> surfaceView.setOnTouchListener(this);
>
> surfaceView.setEGLConfigChooser(8,8,8,8,8,8);
>
> surfaceView.setRenderer(this);
>
>
>> vertices = ByteBuffer.allocateDirect(12 * 
>> 4).order(ByteOrder.nativeOrder()).asFloatBuffer();
>
>
>> vertices.put(new float[]{
>
> -1,-1,
>
>  1,-1,
>
> -1, 1,
>
> -1, 1,
>
>  1, 1,
>
>  1,-1
>
> });
>
> vertices.flip();
>
>
>> setContentView(surfaceView);
>
> }
>
>
>> public boolean onTouch(View view, MotionEvent motionEvent){
>
> x = motionEvent.getRawX();
>
> y = motionEvent.getRawY();
>
>
>> return true;
>
> }
>
>
>> public void onDrawFrame(GL10 gl){
>
> gl.glClear(GL10.GL_COLOR_BUFFER_BIT);
>
> float frustumWidth = SCREEN_WIDTH/100.0f;
>
> float frustumHeight = SCREEN_HEIGHT/100.0f;
>
>
>> gl.glLoadIdentity();
>
> 
>> gl.glTranslatef((x/SCREEN_WIDTH)*frustumWidth,(y/SCREEN_HEIGHT)*frustumHeight,0);
>
> gl.glDrawArrays(GL10.GL_TRIANGLES, 0, 6);
>
>
>> }
>
>
>> public void onSurfaceChanged(GL10 gl, int width, int height){
>
> gl.glViewport(0,0,SCREEN_WIDTH,SCREEN_HEIGHT);
>
> gl.glMatrixMode(GL10.GL_PROJECTION);
>
> gl.glLoadIdentity();
>
>
>> gl.glOrthof(0,SCREEN_WIDTH/100.0f,SCREEN_HEIGHT/100.0f,0,-1,1);
>
>
>> gl.glMatrixMode(GL10.GL_MODELVIEW);
>
>
>> gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
>
> gl.glVertexPointer(2, GL10.GL_FLOAT, 0, vertices);
>
> }
>
>
>> public void onSurfaceCreated(GL10 gl, EGLConfig config){
>
>
>> }
>
>
>> }
>
>
You can't make it any simpler than that, and there is still delay.

Well, I guess I will have to move on to OpenGL ES 2.0, I was actually 
planning on rewriting that framework in ES 2.0 entirely, but only after I 
finish this game first. So I guess I have to stop working on my game, and 
start rewriting my framework now... I HOPE this will do the trick. If not, 
then i'm screwed, big 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
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Android 4.3 and Notification.iconLevel

2013-07-30 Thread Pierluigi
After the last update to Android 4.3 my OnGoing Notification does not show 
different icons as function of iconLevel. My code (*working with all 
previous Android versions*) is the following:

Notification oNotification = new Notification();
oNotification.icon = R.drawable.levels;
oNotification.iconLevel = currentLevel;
oNotification.when = System.currentTimeMillis();
oNotification.flags |= Notification.FLAG_ONGOING_EVENT;
oNotification.flags |= Notification.FLAG_ONLY_ALERT_ONCE;

and currentLevel is a particular value depending by the actual status of 
the app. I tested it on the emulator and on a real Nexus 4 with Android 
4.3, same behavior, the icon is always the default (iconLevel = 0). 

Maybe I miss something...

Any hint or suggestion is welcome!


-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] android how to bring our application to foreground when it goes to background?

2013-07-30 Thread Kristopher Micinski
That sounds equally obnoxious.  Why would you want to do that?   Why
should your app be able to essentially take over the user's phone?

Kris

On Tue, Jul 30, 2013 at 5:05 AM, ashish  wrote:
> Hi,
>
> i want to prevent the user to close my application with the
> homebutton+applicationswipe.
>
> On Monday, July 29, 2013 8:50:10 PM UTC+5:30, TreKing wrote:
>>
>>
>> On Mon, Jul 29, 2013 at 8:31 AM, ashish  wrote:
>>>
>>> i want to bring my application to foreground when it goes to background.
>>
>>
>> Why? This sounds like obnoxious behavior.
>>
>>
>> -
>> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] android how to bring our application to foreground when it goes to background?

2013-07-30 Thread TreKing
On Tue, Jul 30, 2013 at 4:05 AM, ashish  wrote:

> i want to prevent the user to close my application with the
> homebutton+applicationswipe.


This is intentionally not possible.

-
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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] android how to bring our application to foreground when it goes to background?

2013-07-30 Thread Daniele Segato

On 07/30/2013 11:05 AM, ashish wrote:

Hi,

i want to prevent the user to close my application with the
homebutton+applicationswipe.


If you ever find a way: you found a bug
and I really hope they'll fix it in that case.

Whatever you are doing: don't. You are doing it utterly wrong.

As I user, if I click home or the app switcher that's because I want to 
go home or switch app and thus want your app to go in background.


If I'll ever found an app that doesn't let me do that I'll uninstall it 
immediately and give it 1 star with comment: "this app deserve zero 
star, keep away from it"


We don't need your app on the market.

I guess don't use an Android phone and never tried to read the design 
and develop sections here: http://developer.android.com/index.html


Stop writing code and take your time to do that. Do it now before you 
waste any more of your (and users) time.




Hope I've been transparent enough to make you change your mind.
Regards,
Daniele Segato

--
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Do SQLiteDatabase references "go stale"?

2013-07-30 Thread TreKing
On Mon, Jul 29, 2013 at 7:00 PM, Nathan  wrote:

> If I manage to get logs from the users, I might know what exception it is.


I wouldn't rely on waiting on users to send you anything. Have your app
automatically send you reports using something like ACRA, then flood your
app with log that are also sent in your report until you track the issue
down.

-
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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Required: Sr. Android Developer at MO

2013-07-30 Thread Mark J
Hi There,



Please let me know if you have someone available for below mention
requirement.

Send your resume to m...@tekenergyusa.com



*Position: Sr. Android Developer *

*Location: MO*

*Duration: 6+months*

* *

*Required skills:*
• Deep and broad Android platform experience
• 10+ years of software development experience
• Good handle on OOP, patterns and best practices



Thanks,

Mark

TekEnergy LLC

m...@tekenergyusa.com

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




Re: [android-developers] Do SQLiteDatabase references "go stale"?

2013-07-30 Thread Nathan


On Tuesday, July 30, 2013 9:33:44 AM UTC-7, TreKing wrote:
>
>
> On Mon, Jul 29, 2013 at 7:00 PM, Nathan 
> > wrote:
>
>> If I manage to get logs from the users, I might know what exception it 
>> is. 
>
>
> I wouldn't rely on waiting on users to send you anything. Have your app 
> automatically send you reports using something like ACRA, then flood your 
> app with log that are also sent in your report until you track the issue 
> down.
>

I agree with that advice. I am finding any failure places and am treating 
them as a non fatal exception that should be reported in Crashlytics 
without user intervention. 

This probably means that it will take more than one update to fix, but 
that's the breaks. 

Nathan
 

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Get the incoming caller name before phone starts to ring

2013-07-30 Thread shiva pendem
HI everyone,


i am making an application to get the name of the contact no saved on the 
mobile.

i am using the following code

private class *CallStateListener *extends *PhoneStateListener *{
private String *displayContacts*(String incomingNumber) {
 ContentResolver cr = ctx.getContentResolver();
Cursor cur = cr.query(ContactsContract.Contacts.CONTENT_URI,
null, null, null, null);
if (cur.getCount() > 0) {
 while (cur.moveToNext()) {
 String id = 
cur.getString(cur.getColumnIndex(ContactsContract.Contacts._ID));
 String name = 
cur.getString(cur.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));
 if (Integer.parseInt(cur.getString(
   
 cur.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER))) > 0) {
 Cursor pCur = cr.query(
 ContactsContract.CommonDataKinds.Phone.CONTENT_URI, 
 null, 
 ContactsContract.CommonDataKinds.Phone.CONTACT_ID +" = 
?", 
 new String[]{id}, null);
 while (pCur.moveToNext()) {
 String phoneNo = 
pCur.getString(pCur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));
 if(phoneNo.length()>9&&incomingNumber.length()>9)
 {
 // 
Log.v("Test",phoneNo.substring(phoneNo.length()-10,phoneNo.length())+"   
"+incomingNumber.substring(incomingNumber.length()-10,incomingNumber.length()));
 
if(phoneNo.substring(phoneNo.length()-10,phoneNo.length()).equals(incomingNumber.substring(incomingNumber.length()-10,incomingNumber.length(
 {
 Toast.makeText(ctx, "Name: " + name + ", Phone No: " + 
phoneNo, Toast.LENGTH_SHORT).show();
 Log.v("Test","qualified   "+phoneNo+"   "+name);
 pCur.close();
 return ""+name;
 }
 }
 } 
  pCur.close();
  }
 }
}
return "";
}
i am calling the *displayContacts() *method with the incoming call no as 
argument
but its taking about 18 to 29 seconds to get the contact name, some times 
it is taking more than 35 seconds,

can any one suggest me the best way to get the contact names saved in the 
mobile,
i need to get the contact name in the following manner,
i have a contact with name as service call and no as 9848012345
and if i get a call i should get the name in not more than 5 seconds .

if there are any new mechanisms that are used to implement this mechanism 
plese send me the links,

Thanks
Shiva Shankar,

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Get the incoming caller name before phone starts to ring

2013-07-30 Thread Kristopher Micinski
Why don't you read them into memory when the app starts and cache them
somewhere?

Kris

On Tue, Jul 30, 2013 at 2:27 PM, shiva pendem  wrote:
> HI everyone,
>
>
> i am making an application to get the name of the contact no saved on the
> mobile.
>
> i am using the following code
>
> private class CallStateListener extends PhoneStateListener {
> private String displayContacts(String incomingNumber) {
> ContentResolver cr = ctx.getContentResolver();
>Cursor cur = cr.query(ContactsContract.Contacts.CONTENT_URI,
>null, null, null, null);
>if (cur.getCount() > 0) {
> while (cur.moveToNext()) {
> String id =
> cur.getString(cur.getColumnIndex(ContactsContract.Contacts._ID));
> String name =
> cur.getString(cur.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));
> if (Integer.parseInt(cur.getString(
>
> cur.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER))) > 0) {
> Cursor pCur = cr.query(
> ContactsContract.CommonDataKinds.Phone.CONTENT_URI,
> null,
> ContactsContract.CommonDataKinds.Phone.CONTACT_ID +" =
> ?",
> new String[]{id}, null);
> while (pCur.moveToNext()) {
> String phoneNo =
> pCur.getString(pCur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));
> if(phoneNo.length()>9&&incomingNumber.length()>9)
> {
> //
> Log.v("Test",phoneNo.substring(phoneNo.length()-10,phoneNo.length())+"
> "+incomingNumber.substring(incomingNumber.length()-10,incomingNumber.length()));
>
> if(phoneNo.substring(phoneNo.length()-10,phoneNo.length()).equals(incomingNumber.substring(incomingNumber.length()-10,incomingNumber.length(
> {
> Toast.makeText(ctx, "Name: " + name + ", Phone No: " +
> phoneNo, Toast.LENGTH_SHORT).show();
> Log.v("Test","qualified   "+phoneNo+"   "+name);
> pCur.close();
> return ""+name;
> }
> }
> }
>  pCur.close();
>  }
> }
>}
>return "";
>}
> i am calling the displayContacts() method with the incoming call no as
> argument
> but its taking about 18 to 29 seconds to get the contact name, some times it
> is taking more than 35 seconds,
>
> can any one suggest me the best way to get the contact names saved in the
> mobile,
> i need to get the contact name in the following manner,
> i have a contact with name as service call and no as 9848012345
> and if i get a call i should get the name in not more than 5 seconds .
>
> if there are any new mechanisms that are used to implement this mechanism
> plese send me the links,
>
> Thanks
> Shiva Shankar,
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Get the incoming caller name before phone starts to ring

2013-07-30 Thread shiva pendem
Hi,

Initiallly thanks for your answer,

can we make a app to automatically update the database of contacts so that
recently added contacts will also be added,

if yes,
lease reply me how,
Thanks


Thanks,
Pendem Shiva Shankar,
Gtalk:pendem.shiva89,
msn:shivapen...@live.com,
Mob:+91-9533024675.


On Wed, Jul 31, 2013 at 12:23 AM, Kristopher Micinski <
krismicin...@gmail.com> wrote:

> Why don't you read them into memory when the app starts and cache them
> somewhere?
>
> Kris
>
> On Tue, Jul 30, 2013 at 2:27 PM, shiva pendem 
> wrote:
> > HI everyone,
> >
> >
> > i am making an application to get the name of the contact no saved on the
> > mobile.
> >
> > i am using the following code
> >
> > private class CallStateListener extends PhoneStateListener {
> > private String displayContacts(String incomingNumber) {
> > ContentResolver cr = ctx.getContentResolver();
> >Cursor cur = cr.query(ContactsContract.Contacts.CONTENT_URI,
> >null, null, null, null);
> >if (cur.getCount() > 0) {
> > while (cur.moveToNext()) {
> > String id =
> > cur.getString(cur.getColumnIndex(ContactsContract.Contacts._ID));
> > String name =
> >
> cur.getString(cur.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));
> > if (Integer.parseInt(cur.getString(
> >
> > cur.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER))) > 0) {
> > Cursor pCur = cr.query(
> > ContactsContract.CommonDataKinds.Phone.CONTENT_URI,
> > null,
> > ContactsContract.CommonDataKinds.Phone.CONTACT_ID +"
> =
> > ?",
> > new String[]{id}, null);
> > while (pCur.moveToNext()) {
> > String phoneNo =
> >
> pCur.getString(pCur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));
> > if(phoneNo.length()>9&&incomingNumber.length()>9)
> > {
> > //
> > Log.v("Test",phoneNo.substring(phoneNo.length()-10,phoneNo.length())+"
> >
> "+incomingNumber.substring(incomingNumber.length()-10,incomingNumber.length()));
> >
> >
> if(phoneNo.substring(phoneNo.length()-10,phoneNo.length()).equals(incomingNumber.substring(incomingNumber.length()-10,incomingNumber.length(
> > {
> > Toast.makeText(ctx, "Name: " + name + ", Phone No: "
> +
> > phoneNo, Toast.LENGTH_SHORT).show();
> > Log.v("Test","qualified   "+phoneNo+"   "+name);
> > pCur.close();
> > return ""+name;
> > }
> > }
> > }
> >  pCur.close();
> >  }
> > }
> >}
> >return "";
> >}
> > i am calling the displayContacts() method with the incoming call no as
> > argument
> > but its taking about 18 to 29 seconds to get the contact name, some
> times it
> > is taking more than 35 seconds,
> >
> > can any one suggest me the best way to get the contact names saved in the
> > mobile,
> > i need to get the contact name in the following manner,
> > i have a contact with name as service call and no as 9848012345
> > and if i get a call i should get the name in not more than 5 seconds .
> >
> > if there are any new mechanisms that are used to implement this mechanism
> > plese send me the links,
> >
> > Thanks
> > Shiva Shankar,
> >
> > --
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an
> > email to android-developers+unsubscr...@googlegroups.com.
> > For more options, visit https://groups.google.com/groups/opt_out.
> >
> >
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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 a topic in the
> Google Groups "Android Developers" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/android-developers/XiQX9YLoMZc/unsubscribe
> .
> To unsubscribe from this group and all its topics, send an email to
> android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.co

[android-developers] TextToSpeech is not working

2013-07-30 Thread Raghavendra Rao
Am trying to implement text to speech its not working properly

below is the code snippet

private void speak()
{
String text = getText();
speech.speak(text, TextToSpeech.QUEUE_ADD, null); //getting null pointer
exception
}

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Android Developer Console?

2013-07-30 Thread Taylor Ringo
Hey,

I'm developing my first Android game, and I was wondering if I have to 
renew my Android Developer Console annualy? I am buying a license next 
month! 

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Get the incoming caller name before phone starts to ring

2013-07-30 Thread Kristopher Micinski
By "the database" I assume you mean your app.  You're afraid that your
app will cache the contacts and then some of the contacts will be
stale?  I mean, watch the database, and update it with an observer:
that's exactly what that's designed for.

Kris

On Tue, Jul 30, 2013 at 3:26 PM, shiva pendem  wrote:
> Hi,
>
> Initiallly thanks for your answer,
>
> can we make a app to automatically update the database of contacts so that
> recently added contacts will also be added,
>
> if yes,
> lease reply me how,
> Thanks
>
>
> Thanks,
> Pendem Shiva Shankar,
> Gtalk:pendem.shiva89,
> msn:shivapen...@live.com,
> Mob:+91-9533024675.
>
>
> On Wed, Jul 31, 2013 at 12:23 AM, Kristopher Micinski
>  wrote:
>>
>> Why don't you read them into memory when the app starts and cache them
>> somewhere?
>>
>> Kris
>>
>> On Tue, Jul 30, 2013 at 2:27 PM, shiva pendem 
>> wrote:
>> > HI everyone,
>> >
>> >
>> > i am making an application to get the name of the contact no saved on
>> > the
>> > mobile.
>> >
>> > i am using the following code
>> >
>> > private class CallStateListener extends PhoneStateListener {
>> > private String displayContacts(String incomingNumber) {
>> > ContentResolver cr = ctx.getContentResolver();
>> >Cursor cur = cr.query(ContactsContract.Contacts.CONTENT_URI,
>> >null, null, null, null);
>> >if (cur.getCount() > 0) {
>> > while (cur.moveToNext()) {
>> > String id =
>> > cur.getString(cur.getColumnIndex(ContactsContract.Contacts._ID));
>> > String name =
>> >
>> > cur.getString(cur.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));
>> > if (Integer.parseInt(cur.getString(
>> >
>> > cur.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER))) > 0) {
>> > Cursor pCur = cr.query(
>> > ContactsContract.CommonDataKinds.Phone.CONTENT_URI,
>> > null,
>> > ContactsContract.CommonDataKinds.Phone.CONTACT_ID +"
>> > =
>> > ?",
>> > new String[]{id}, null);
>> > while (pCur.moveToNext()) {
>> > String phoneNo =
>> >
>> > pCur.getString(pCur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));
>> > if(phoneNo.length()>9&&incomingNumber.length()>9)
>> > {
>> > //
>> > Log.v("Test",phoneNo.substring(phoneNo.length()-10,phoneNo.length())+"
>> >
>> > "+incomingNumber.substring(incomingNumber.length()-10,incomingNumber.length()));
>> >
>> >
>> > if(phoneNo.substring(phoneNo.length()-10,phoneNo.length()).equals(incomingNumber.substring(incomingNumber.length()-10,incomingNumber.length(
>> > {
>> > Toast.makeText(ctx, "Name: " + name + ", Phone No: "
>> > +
>> > phoneNo, Toast.LENGTH_SHORT).show();
>> > Log.v("Test","qualified   "+phoneNo+"   "+name);
>> > pCur.close();
>> > return ""+name;
>> > }
>> > }
>> > }
>> >  pCur.close();
>> >  }
>> > }
>> >}
>> >return "";
>> >}
>> > i am calling the displayContacts() method with the incoming call no as
>> > argument
>> > but its taking about 18 to 29 seconds to get the contact name, some
>> > times it
>> > is taking more than 35 seconds,
>> >
>> > can any one suggest me the best way to get the contact names saved in
>> > the
>> > mobile,
>> > i need to get the contact name in the following manner,
>> > i have a contact with name as service call and no as 9848012345
>> > and if i get a call i should get the name in not more than 5 seconds .
>> >
>> > if there are any new mechanisms that are used to implement this
>> > mechanism
>> > plese send me the links,
>> >
>> > Thanks
>> > Shiva Shankar,
>> >
>> > --
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" group.
>> > To post to this group, send email to android-developers@googlegroups.com
>> > To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send
>> > an
>> > email to android-developers+unsubscr...@googlegroups.com.
>> > For more options, visit https://groups.google.com/groups/opt_out.
>> >
>> >
>>
>> --
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http

[android-developers] Re: HttpClient GC_Concurrent freed

2013-07-30 Thread Kristoffer
Hello,
Thanks for the answer.
Iam going to rewrite my code and i hope there is some part in the old 
onethat is making this issue, i have never seen this before so i hope its a 
one time only.
Thanks for your time.

Den måndagen den 29:e juli 2013 kl. 08:22:12 UTC+2 skrev Kristoffer:
>
> Hello.
> Iam having trouble with memory leak it will finaly cause the app to force 
> close.
> I have stripped down my code just to find where the problem is and i 
> located it to my httpclient.
>
> When i run this code iam geting many GC_Concurrent freed.
> if i add a Thread.sleep(1000); then i will ofcourse get less warnings but 
> my guess is that there is still some problem with the code i run.
> Is there a way i could prevent the problem.
>
> Here is the code:
>
> Thread c = new Thread() {
> @Override
> public void run() {
> String xml;
>  UsernamePasswordCredentials creds = new 
> UsernamePasswordCredentials("username", "password"); 
>  HttpGet httpGet;
>  HttpClient httpClient;
>  HttpResponse httpResponse;
>  HttpEntity httpEntity;
>  while (RunThread) {
>
>  try {
>  httpClient = HttpClientFactory.getThreadSafeClient();
>  httpGet = new HttpGet("http://ipaddress/list?format=xml";);
>  httpGet.addHeader(new BasicScheme().authenticate(creds, 
> httpGet));
>  httpResponse = httpClient.execute(httpGet);
>  httpEntity = httpResponse.getEntity();
>  xml = EntityUtils.toString(httpEntity, "UTF-8");
>  
>  
>  } catch (Exception e) { 
>  e.printStackTrace();
>  
>  } 
> }
> };
> c.start();
> } 
>
> And here is the class HttpClientFactory
>
> public class HttpClientFactory {
>
> private static DefaultHttpClient client;
>
> public synchronized static DefaultHttpClient getThreadSafeClient() {
>   
> if (client != null)
> return client;
>  
> client = new DefaultHttpClient();
> 
> ClientConnectionManager mgr = client.getConnectionManager();
> 
> HttpParams params = client.getParams();
> params.setIntParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, 
> 1);
> params.setIntParameter(CoreConnectionPNames.SO_TIMEOUT, 1);
> client = new DefaultHttpClient(
> new ThreadSafeClientConnManager(params,
> mgr.getSchemeRegistry()), params);
>   
> return client;
> } 
> }
>
>
> Have a made some huge mistage in the code that is causing this issue?
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Android Developer Console?

2013-07-30 Thread TreKing
On Tue, Jul 30, 2013 at 3:39 PM, Taylor Ringo  wrote:

> I'm developing my first Android game, and I was wondering if I have to
> renew my Android Developer Console annualy? I am buying a license next
> month!


No, it is a one time fee 4 life.

-
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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: Dealing with 1000's of different devices, each one with its own bugs

2013-07-30 Thread Omer Gilad
Hey Mike I still didn't get answers to my questions about this service...
What are the remote devices that the code is running on? Do I need to 
instruct a user to install this on his own device?

On Monday, July 29, 2013 8:56:12 PM UTC+3, Mike wrote:
>
> Use my App, you can run code on remote device, not just read logs:
> https://cloudshellapp.appspot.com/
> https://play.google.com/store/apps/details?id=com.cloudshell
>
> The App will allow you to run code on remote Android phones, 
> so you can fix the bug on the phone you do not have physical access to.
>
> On Monday, July 29, 2013 2:57:18 AM UTC-4, Piren wrote:
>>
>> Well, after i started encountering such issues i just LOADED my app with 
>> debugging information, like, seriously redonkulous amounts of logging. 
>> There's nothing the app didn't log, sorted with tags and extra information 
>> to say exactly what is doing on and why. It was easier to fix bugs of even 
>> things i did not have in my hand... heck, most of the bugs i solved were of 
>> devices i never even held. (all the logs were surrounded by a constant 
>> variable that was set during compilation, so that code never made it to 
>> release versions, it makes it easier to manage app versions).
>>
>> I guess that will not be as easy to do with a game, but it should still 
>> be better than what you have now. You can make it a "feature" of the app, 
>> let the user community engage with you (the developer) and "actively 
>> participate in the creation of the game" and what not... you'll solve bugs, 
>> they'll feel as a contributer and get their apps running better.
>> If your game is a paid game, make sure the debug versions are limited in 
>> capability and will only be good for debugging.
>>
>>
>>
>>
>> On Monday, July 29, 2013 12:29:25 AM UTC+3, Omer Gilad wrote:
>>>
>>> What you wrote is the obvious part of what I do - test with beta users. 
>>> I agree that this is a must.
>>>
>>> The problem is, sometimes it's impossible to debug what you find.
>>> When the issue is not a simple crash stack trace - but rather some 
>>> behavior, or display issue, you can't just keep ping-ponging versions with 
>>> a user without wasting whole days on that... You need the device in your 
>>> hand.
>>> And as an indie developer, it's practically impossible to get a hold of 
>>> many different devices.
>>>
>>>
>>> On Sunday, July 28, 2013 12:47:30 PM UTC+3, Piren wrote:

 Wrote a lengthy response but my browser decided not to post it, so 
 here's the short version:

 - That's a known problem with android development, it was obvious about 
 a couple of months after it came out. when the premise of the system is to 
 be open and as varied as possible, this kind of issues are a given.
 - Under your limitations, the best approach is to release the app only 
 to a small subset of devices it was tested on and expand that subset as 
 time goes on. Use an open beta group for devices you do not have access 
 to. 
 Even Netflix was released on only 5 devices.
 - iOS development might not have this issue (it has fragmentation, but 
 it isn't the same as android's), but over all i believe android has a more 
 developer friendly ecosystem... instead of being frustrated with this, 
 you'll find more than enough other iOS specific issues that will frustrate 
 you.. especially since you're used to how Android is.



 On Friday, July 26, 2013 1:39:14 AM UTC+3, Omer Gilad wrote:
>
> .I am wondering how developers here are dealing with the fact that 
> there are 1000's of devices out there, some of them running your 
> applications in very broken ways
> .I keep running into these kind of issues again and again for the past 
> 3 years, and to be honest, I'm fed up with it
> .I've decided to move to iOS development, and the only way to convince 
> me otherwise is to give me a decent, reliable way of dealing with 
> fragmentation
>
> So what do you do when you develop a game, for example, and try to 
> create a high-quality user experience on Google Play?
> Do you do your QA on 50 different devices? 100? 1000?
> Or do you just shoot blindly and hope that it works, or wait for users 
> to send you bug reports?
>
> To make it clear, I'm not talking about "official" fragmentation.
> I don't talk about different screen sizes, densities, features, OS 
> versions and so on.
> I talk about the "unofficial" fragmentation. The fact that most 
> devices, even the popular ones from the big companies like Samsung, HTC, 
> Motorola, LG and so on, contain tons of implementation bugs that prevent 
> apps from working correctly.
> I'm talking about the fact that you can call a certain simple API, 
> test it on a stock Android ROM (like on Nexus 4), and then have your 
> application crash on some Samsung, that decided to break the 
> implementation 
>>

Re: [android-developers] TextToSpeech is not working

2013-07-30 Thread TreKing
On Tue, Jul 30, 2013 at 2:40 PM, Raghavendra Rao wrote:

> speech.speak(text, TextToSpeech.QUEUE_ADD, null); //getting null pointer
> exception


Have you debugged your app to determine what is null ... ?

-
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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: msgid in strings.xml

2013-07-30 Thread Turbo
Kinda sad the Android Engineers don't seem to browse here much.

This is super old but for posterity and future readers: I was looking 
through some source and wondered about this too and came across this SO 
post that *may* shed some light (could be totally off though as there are 
no docs anywhere about it): http://stackoverflow.com/a/4764749/708906

And from a related SO post someone links this blog post: 
http://blog.elsdoerfer.name/2010/04/08/android2po-managing-android-translations/

The guess seems to be some internal tool used to manage translations. 
*shrug*

On Tuesday, November 24, 2009 12:47:06 AM UTC-8, Ken wrote:
>
> Hello, 
>
> There are msgid in localized strings.xml. What are they? What's their 
> usage? How they are generated? Why the default strings.xml doesnt have 
> msgid? 
>
> Thanks! 
>

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




Re: [android-developers] TextToSpeech is not working

2013-07-30 Thread Raghavendra Rao
Yes i have.. its showing invocation Targetexception. But the same
code snippet is working fine when i execute that separately, after
integrating that with my code its causing this problem
On 31 Jul 2013 04:19, "TreKing"  wrote:

>
> On Tue, Jul 30, 2013 at 2:40 PM, Raghavendra Rao wrote:
>
>> speech.speak(text, TextToSpeech.QUEUE_ADD, null); //getting null pointer
>> exception
>
>
> Have you debugged your app to determine what is null ... ?
>
>
> -
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] TextToSpeech is not working

2013-07-30 Thread Raghavendra Rao
Yes i have.. its showing invocation Targetexception.. The jar file
e:\android\android-sdk-windows\platforms\android-17\android.jar has no
source attached. But the same code snippet is working fine when i execute
that separately, after integrating that with my code its causing this
problem


On 31 July 2013 07:27, Raghavendra Rao  wrote:

> Yes i have.. its showing invocation Targetexception. But the same
> code snippet is working fine when i execute that separately, after
> integrating that with my code its causing this problem
> On 31 Jul 2013 04:19, "TreKing"  wrote:
>
>>
>> On Tue, Jul 30, 2013 at 2:40 PM, Raghavendra Rao wrote:
>>
>>> speech.speak(text, TextToSpeech.QUEUE_ADD, null); //getting null pointer
>>> exception
>>
>>
>> Have you debugged your app to determine what is null ... ?
>>
>>
>> -
>> 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 unsubscribe from this group and stop receiving emails from it, send an
>> email to android-developers+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] TextToSpeech is not working

2013-07-30 Thread TreKing
On Tue, Jul 30, 2013 at 9:03 PM, Raghavendra Rao wrote:

> Yes i have.. its showing invocation Targetexception.. The jar file
> e:\android\android-sdk-windows\platforms\android-17\android.jar has no
> source attached.


You should download the android sources so you can step into it.


> But the same code snippet is working fine when i execute that separately,
> after integrating that with my code its causing this problem


You need to show a stack trace at least if you want help with an exception.

-
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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] TextToSpeech is not working

2013-07-30 Thread Raghavendra Rao
Hey its working now, actually i missed to initialize the speech variable.
Thanks


On 31 July 2013 07:55, TreKing  wrote:

>
> On Tue, Jul 30, 2013 at 9:03 PM, Raghavendra Rao wrote:
>
>> Yes i have.. its showing invocation Targetexception.. The jar file
>> e:\android\android-sdk-windows\platforms\android-17\android.jar has no
>> source attached.
>
>
> You should download the android sources so you can step into it.
>
>
>> But the same code snippet is working fine when i execute that separately,
>> after integrating that with my code its causing this problem
>
>
> You need to show a stack trace at least if you want help with an exception.
>
>
>
> -
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] TextToSpeech is not working

2013-07-30 Thread TreKing
On Tue, Jul 30, 2013 at 9:31 PM, Raghavendra Rao wrote:

> Hey its working now, actually i missed to initialize the speech variable.
> Thanks


Uh huh... when I asked "have you debugged your app" ... this is why. =P

-
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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: Get the incoming caller name before phone starts to ring

2013-07-30 Thread Piren
what the hell? why are you scanning the entire DB and in such a bad 
fashion? 
You do know that the reason there's a ContentResolver is for you to run 
queries right?

http://developer.android.com/reference/android/provider/ContactsContract.PhoneLookup.html

You'll get the result instantly. 

On Tuesday, July 30, 2013 9:27:49 PM UTC+3, shiva pendem wrote:
>
> HI everyone,
>
>
> i am making an application to get the name of the contact no saved on the 
> mobile.
>
> i am using the following code
>
> private class *CallStateListener *extends *PhoneStateListener *{
> private String *displayContacts*(String incomingNumber) {
>  ContentResolver cr = ctx.getContentResolver();
> Cursor cur = cr.query(ContactsContract.Contacts.CONTENT_URI,
> null, null, null, null);
> if (cur.getCount() > 0) {
>  while (cur.moveToNext()) {
>  String id = 
> cur.getString(cur.getColumnIndex(ContactsContract.Contacts._ID));
>  String name = 
> cur.getString(cur.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));
>  if (Integer.parseInt(cur.getString(
>
>  cur.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER))) > 0) {
>  Cursor pCur = cr.query(
>  ContactsContract.CommonDataKinds.Phone.CONTENT_URI, 
>  null, 
>  ContactsContract.CommonDataKinds.Phone.CONTACT_ID +" 
> = ?", 
>  new String[]{id}, null);
>  while (pCur.moveToNext()) {
>  String phoneNo = 
> pCur.getString(pCur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));
>  if(phoneNo.length()>9&&incomingNumber.length()>9)
>  {
>  // 
> Log.v("Test",phoneNo.substring(phoneNo.length()-10,phoneNo.length())+"   
> "+incomingNumber.substring(incomingNumber.length()-10,incomingNumber.length()));
>  
> if(phoneNo.substring(phoneNo.length()-10,phoneNo.length()).equals(incomingNumber.substring(incomingNumber.length()-10,incomingNumber.length(
>  {
>  Toast.makeText(ctx, "Name: " + name + ", Phone No: " 
> + phoneNo, Toast.LENGTH_SHORT).show();
>  Log.v("Test","qualified   "+phoneNo+"   "+name);
>  pCur.close();
>  return ""+name;
>  }
>  }
>  } 
>   pCur.close();
>   }
>  }
> }
> return "";
> }
> i am calling the *displayContacts() *method with the incoming call no as 
> argument
> but its taking about 18 to 29 seconds to get the contact name, some times 
> it is taking more than 35 seconds,
>
> can any one suggest me the best way to get the contact names saved in the 
> mobile,
> i need to get the contact name in the following manner,
> i have a contact with name as service call and no as 9848012345
> and if i get a call i should get the name in not more than 5 seconds .
>
> if there are any new mechanisms that are used to implement this mechanism 
> plese send me the links,
>
> Thanks
> Shiva Shankar,
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.