[android-developers] Polling at regular intervals in Android

2012-10-09 Thread Archana
Hi, I have 2 nanoHTTPD servers running in 2 instances of the emulator. The 
clients in both emulators should periodically poll to find if file got 
updated in server(every 5 minutes may be). Please let me know how  to 
implement this(as I am relatively new to Android)? Should i use Alarm 
Manager or create a Service?

Any help is appreciated.. Thank you!

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

[android-developers] New to Android App Development need Advice in Designing UI

2012-10-09 Thread Aadi Rockzz
Hi Everyone,

I'm going to develop an application for Android2.2 platform. I have some 
doubts while started creating UI Screen for my application.

-> In my one UI i have 10 Text Views and 10 edit-text and i wanted 
to accommodate One List View also in my UI but i felt difficulty while 
adding ListView in my UI.

Please Help me by giving suggestions.

Thanks in Advance.
Aadi 

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] New to Android App Development need Advice in Designing UI

2012-10-09 Thread Asheesh Arya
google is your friend buddy there are lots of material available to start
work on Android UI layout interface

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

[android-developers] Listview - Header , footer issue

2012-10-09 Thread Jovish P
In one of screen  we want to come up with a desing like this

Textview
Listview
Textview
Listview

First we thought of putting everything inside a linear layout with vertical
orientation and put that layout inside
a scroll view. Then we come to know that it is not a good idea. So right
now what we are trying to do is
add header and footer for listview. Header view will be a text view and
footer view will be a layout which conatins
a texview and listview. The problem what we are facing now is ,  we are not
able to scroll the second listview which is in
footerview layout. Is it a good solution ? If not wht is the best way to do
this ? Share your thoughts about 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] Polling at regular intervals in Android

2012-10-09 Thread lokesh gupta
You can use timer task.. Start it once n schedule it with 5*60*1000 i.e 5
minutes.

Sent from samsung mobile
On Oct 9, 2012 12:34 PM, "Archana"  wrote:

> Hi, I have 2 nanoHTTPD servers running in 2 instances of the emulator. The
> clients in both emulators should periodically poll to find if file got
> updated in server(every 5 minutes may be). Please let me know how  to
> implement this(as I am relatively new to Android)? Should i use Alarm
> Manager or create a Service?
>
> Any help is appreciated.. Thank you!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] New to Android App Development need Advice in Designing UI

2012-10-09 Thread lokesh gupta
Put every thing in scroll view

Sent from samsung mobile
On Oct 9, 2012 12:39 PM, "Aadi Rockzz"  wrote:

> Hi Everyone,
>
> I'm going to develop an application for Android2.2 platform. I have some
> doubts while started creating UI Screen for my application.
>
> -> In my one UI i have 10 Text Views and 10 edit-text and i wanted
> to accommodate One List View also in my UI but i felt difficulty while
> adding ListView in my UI.
>
> Please Help me by giving suggestions.
>
> Thanks in Advance.
> Aadi
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] New to Android App Development need Advice in Designing UI

2012-10-09 Thread Anees Thyrantakath
Yah i know that :-) .. ..in that i came to know tabActivity and Fragment
are there to manage this but its not supporting version 2.2 that's why i
posted my doubt here.

Please help me if you can suggest me any idea it will support Android 2.2
onwards

Thanks
Aadi

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

2012-10-09 Thread Carlos Calvo
My problem to see if you have any ideas to implement ...

I need to select a range within a circle .. This means that the user picks 
me for example ranges from -90 ° to 90 ° ...

And that is a bit of a visual ...

He had thought seekbar implement a circular ...

But I'm open to all kinds of ideas and suggestions ...

best rewards

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

2012-10-09 Thread ANKUR GOEL
Hi All,

i am trying to change the content of google plus + from the android sample
which is in extras folder .

https://developers.google.com/+/mobile/android/

But i havent got any thing

Can anybody suggest how to chnage the google plus contents .

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

Re: [android-developers] Polling at regular intervals in Android

2012-10-09 Thread Archana
Thank you! Can you please provide me a link of simple example to use the 
same?

On Tuesday, October 9, 2012 10:24:08 AM UTC+3, Lokesh wrote:
>
> You can use timer task.. Start it once n schedule it with 5*60*1000 i.e 5 
> minutes.
>
> Sent from samsung mobile
> On Oct 9, 2012 12:34 PM, "Archana" > 
> wrote:
>
>> Hi, I have 2 nanoHTTPD servers running in 2 instances of the emulator. 
>> The clients in both emulators should periodically poll to find if file got 
>> updated in server(every 5 minutes may be). Please let me know how  to 
>> implement this(as I am relatively new to Android)? Should i use Alarm 
>> Manager or create a Service?
>>
>> Any help is appreciated.. Thank you!
>>
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to 
>> android-d...@googlegroups.com
>> To unsubscribe from this group, 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: Wrong apk starts-up

2012-10-09 Thread katarina
Hi All,

thanks very much for your answers, we didn't know about domains, will
have to change that.

Actually the apk file has a different name, but within the Manifest we
have application and activity names the same as the original mms
application - do you think this can produce the cofusion too?

Can it be because of the applicaiton name inside the Manifes or
activity name inside the Manifest - do they have to be unique across
all Manifest files?

Thanks again very much for your answers, we are novices with Android
and ignorant of many things.

Regards,
Katarina

On Oct 8, 8:14 pm, Lew  wrote:
> latimerius wrote:
> > katarinawrote:
> > > Can it be because we have another application on the phone with the
> > > same name
>
> > Hm, I don't think this is even possible - how do you achieve this?
> > IIRC if you try to "adb install" an .apk with a package name that's
> > installed already it will return an error and do nothing (unless you
> > use -r that is, but that would make it a different operation).
>
> Also. you aren't supposed to name applications with someone else's domain.
>
> So unless you own android.com, you aren't supposed to name your app
> com.android.anything.
>
> --
> Lew

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

2012-10-09 Thread lokesh gupta
You can easily get code snippet from stack overflow.

Sent from samsung mobile
On Oct 9, 2012 1:00 PM, "Archana"  wrote:

> Thank you! Can you please provide me a link of simple example to use the
> same?
>
> On Tuesday, October 9, 2012 10:24:08 AM UTC+3, Lokesh wrote:
>>
>> You can use timer task.. Start it once n schedule it with 5*60*1000 i.e 5
>> minutes.
>>
>> Sent from samsung mobile
>> On Oct 9, 2012 12:34 PM, "Archana"  wrote:
>>
>>> Hi, I have 2 nanoHTTPD servers running in 2 instances of the emulator.
>>> The clients in both emulators should periodically poll to find if file got
>>> updated in server(every 5 minutes may be). Please let me know how  to
>>> implement this(as I am relatively new to Android)? Should i use Alarm
>>> Manager or create a Service?
>>>
>>> Any help is appreciated.. Thank you!
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-d...@**googlegroups.com
>>> To unsubscribe from this group, 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] Polling at regular intervals in Android

2012-10-09 Thread Archana
Ok. 1 more clarification. Will the task execute even if I exit the 
application(like a service)?

On Tuesday, October 9, 2012 10:36:14 AM UTC+3, Lokesh wrote:
>
> You can easily get code snippet from stack overflow.
>
> Sent from samsung mobile
> On Oct 9, 2012 1:00 PM, "Archana" > 
> wrote:
>
>> Thank you! Can you please provide me a link of simple example to use the 
>> same?
>>
>> On Tuesday, October 9, 2012 10:24:08 AM UTC+3, Lokesh wrote:
>>>
>>> You can use timer task.. Start it once n schedule it with 5*60*1000 i.e 
>>> 5 minutes.
>>>
>>> Sent from samsung mobile
>>> On Oct 9, 2012 12:34 PM, "Archana"  wrote:
>>>
 Hi, I have 2 nanoHTTPD servers running in 2 instances of the emulator. 
 The clients in both emulators should periodically poll to find if file got 
 updated in server(every 5 minutes may be). Please let me know how  to 
 implement this(as I am relatively new to Android)? Should i use Alarm 
 Manager or create a Service?

 Any help is appreciated.. Thank you!

 -- 
 You received this message because you are subscribed to the Google
 Groups "Android Developers" group.
 To post to this group, send email to android-d...@**googlegroups.com
 To unsubscribe from this group, 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-d...@googlegroups.com
>> To unsubscribe from this group, 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] New to Android App Development need Advice in Designing UI

2012-10-09 Thread Anees Thyrantakath
Thanks Lokesh i'll definitely try this out. But I doubt whether my List
View will work or not. Anyway Let me try this. I'll Let you know if this
idea works or not.
Thanks once again
Aadi

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

2012-10-09 Thread lokesh gupta
Only if it is stated via sevice.

Sent from samsung mobile
On Oct 9, 2012 1:09 PM, "Archana"  wrote:

> Ok. 1 more clarification. Will the task execute even if I exit the
> application(like a service)?
>
> On Tuesday, October 9, 2012 10:36:14 AM UTC+3, Lokesh wrote:
>>
>> You can easily get code snippet from stack overflow.
>>
>> Sent from samsung mobile
>> On Oct 9, 2012 1:00 PM, "Archana"  wrote:
>>
>>> Thank you! Can you please provide me a link of simple example to use the
>>> same?
>>>
>>> On Tuesday, October 9, 2012 10:24:08 AM UTC+3, Lokesh wrote:

 You can use timer task.. Start it once n schedule it with 5*60*1000 i.e
 5 minutes.

 Sent from samsung mobile
 On Oct 9, 2012 12:34 PM, "Archana"  wrote:

> Hi, I have 2 nanoHTTPD servers running in 2 instances of the emulator.
> The clients in both emulators should periodically poll to find if file got
> updated in server(every 5 minutes may be). Please let me know how  to
> implement this(as I am relatively new to Android)? Should i use Alarm
> Manager or create a Service?
>
> Any help is appreciated.. Thank you!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-d...@**googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+**unsubscribe**@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-d...@**googlegroups.com
>>> To unsubscribe from this group, 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] New to Android App Development need Advice in Designing UI

2012-10-09 Thread lokesh gupta
It should work. Pls share if u find a bettr way of doing this.

Sent from samsung mobile
On Oct 9, 2012 1:10 PM, "Anees Thyrantakath"  wrote:

> Thanks Lokesh i'll definitely try this out. But I doubt whether my List
> View will work or not. Anyway Let me try this. I'll Let you know if this
> idea works or not.
> Thanks once again
> Aadi
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] New to Android App Development need Advice in Designing UI

2012-10-09 Thread lokesh gupta
Also will be pls let me know what exactly difficulty u were facing in
adding list view

Sent from samsung mobile
On Oct 9, 2012 1:14 PM, "lokesh gupta"  wrote:

> It should work. Pls share if u find a bettr way of doing this.
>
> Sent from samsung mobile
> On Oct 9, 2012 1:10 PM, "Anees Thyrantakath"  wrote:
>
>> Thanks Lokesh i'll definitely try this out. But I doubt whether my List
>> View will work or not. Anyway Let me try this. I'll Let you know if this
>> idea works or not.
>> Thanks once again
>> Aadi
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, 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: Polling at regular intervals in Android

2012-10-09 Thread skink


Archana wrote:
> Hi, I have 2 nanoHTTPD servers running in 2 instances of the emulator. The
> clients in both emulators should periodically poll to find if file got
> updated in server(every 5 minutes may be). Please let me know how  to
> implement this(as I am relatively new to Android)? Should i use Alarm
> Manager or create a Service?
>
> Any help is appreciated.. Thank you!


use AlarmManager

pskink

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] GCM Push Notification on ICW and Jelly Bean

2012-10-09 Thread vinay kumar
Hi Everyone,

I facing the issue with GCM push notification, for integrating push in my
application I followed each and every step mentioned at
http://developer.android.com/guide/google/gcm/index.html. It is working
fine on 2.3 and 3.0 devices but on 4.0 and 4.1 I haven't received the push
notification some times and some time after long waiting hours.

Does any body has any idea why on 4.0 and 4.1 taking so long to receive the
push. Please share your suggestion on this.


Thank You.

Regards
Vinay Kumar

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

Re: [android-developers] New to Android App Development need Advice in Designing UI

2012-10-09 Thread Anees Thyrantakath
I created 10 textview, 10 edittext, 3 buttons and a List View in and XML
file. and in Java class i extends from Activity. Then Listview is not
Working and when i extends ListActivity while running on Emulator it showed
Force To Close Error.
I'm Trying to Get a Better Option. If i can't do by adding all in a single
screen i think i have to create a next button so that remaining
informations we can edit from new Page.

Thanks
Aadi

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

2012-10-09 Thread Archana
Can you please let me know how to use Alarm Manager as service?

On Tuesday, October 9, 2012 11:09:52 AM UTC+3, skink wrote:
>
>
>
> Archana wrote: 
> > Hi, I have 2 nanoHTTPD servers running in 2 instances of the emulator. 
> The 
> > clients in both emulators should periodically poll to find if file got 
> > updated in server(every 5 minutes may be). Please let me know how  to 
> > implement this(as I am relatively new to Android)? Should i use Alarm 
> > Manager or create a Service? 
> > 
> > Any help is appreciated.. Thank you! 
>
>
> use AlarmManager 
>
> pskink 
>

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

2012-10-09 Thread skink


Archana wrote:
> Can you please let me know how to use Alarm Manager as service?
>
>


sure, google for:
android alarmmanager example

pskink

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

2012-10-09 Thread Archana
Should I have the alarm manager as a service?(as I want the application to 
be executed always)...  

Here is my service:

public class PollService extends Service
{
private PendingIntent pendingIntent;
private AlarmManager alarmManager;
private Calendar calendar; 
@Override
public IBinder onBind(Intent arg0) {
return null;
}
@Override
public boolean onUnbind(Intent intent) {
return super.onUnbind(intent);
}

@Override
public void onCreate() {
Toast.makeText(getApplicationContext(), "Service Started",
Toast.LENGTH_SHORT).show();
alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);
Intent myIntent = new Intent(this, PollService.class);
pendingIntent = PendingIntent.getService(this, 0, myIntent, 0);
calendar = Calendar.getInstance();
}
@Override
public void onStart(Intent intent, int startId) {
super.onStart(intent, startId);
calendar.setTimeInMillis(System.currentTimeMillis());
calendar.add(Calendar.MILLISECOND, 30);// Polling for every 5 minutes
alarmManager.set(AlarmManager.RTC_WAKEUP, 
calendar.getTimeInMillis(),pendingIntent);
}
 @Override
public void onDestroy() {
super.onDestroy();
alarmManager.cancel(pendingIntent);
} 
}

But where do I define connecting to the server and getting the contents?

Thank you.

On Tuesday, October 9, 2012 12:27:05 PM UTC+3, skink wrote:
>
>
>
> Archana wrote: 
> > Can you please let me know how to use Alarm Manager as service? 
> > 
> > 
>
>
> sure, google for: 
> android alarmmanager example 
>
> pskink 
>

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

[android-developers] Re: Listview - Header , footer issue

2012-10-09 Thread Piren
Android doesn't support putting two scrollable views one inside the other 
and i assume you dont want to divide the screen area between the listviews 
and make each take a constant size.

You're best (and probably only) choice is to just do everything manually. 
put a linear layout inside a scrollview and inflate everything in it 
manually. (the two textviews and the two listviews).
you can actually use the same code you wrote for your listviews to do that 
with some modifications.
It sounds like a lot of effort, but after doing it a few times i've noticed 
that it isnt. in some instances it even makes stuff easier.

On Tuesday, October 9, 2012 9:15:42 AM UTC+2, Jovish P wrote:
>
> In one of screen  we want to come up with a desing like this
>
> Textview
> Listview
> Textview
> Listview
>
> First we thought of putting everything inside a linear layout with 
> vertical orientation and put that layout inside
> a scroll view. Then we come to know that it is not a good idea. So right 
> now what we are trying to do is
> add header and footer for listview. Header view will be a text view and 
> footer view will be a layout which conatins
> a texview and listview. The problem what we are facing now is ,  we are 
> not able to scroll the second listview which is in
> footerview layout. Is it a good solution ? If not wht is the best way to 
> do this ? Share your thoughts about 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] Ksoap Android to .Net web service Timeout

2012-10-09 Thread Krishna Mahadik
Hi guys,

I am not able to handle exception generated by timeout. The application is
crashing. Any idea or logic for the same.

Thanks in advance..

Thanks & Regards,
Krishna V. Mahadik

-- 
-- 
. \\\///
.   /\
.   | \\   // |
. ( | (.) (.) |)
--o00o--(_)--o00o-

"Yesterday is not ours to recover, but
tomorrow is ours to win or to lose."

---ooo0---
.   (   )   0ooo
.\ (  (   )
. \_) ) /
.(_/

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

2012-10-09 Thread skink


Archana wrote:
> Should I have the alarm manager as a service?(as I want the application to
> be executed always)...
>
> Here is my service:
>
> public class PollService extends Service
> {
> private PendingIntent pendingIntent;
> private AlarmManager alarmManager;
> private Calendar calendar;
> @Override
> public IBinder onBind(Intent arg0) {
> return null;
> }
> @Override
> public boolean onUnbind(Intent intent) {
> return super.onUnbind(intent);
> }
>
> @Override
> public void onCreate() {
> Toast.makeText(getApplicationContext(), "Service Started",
> Toast.LENGTH_SHORT).show();
> alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE);
> Intent myIntent = new Intent(this, PollService.class);
> pendingIntent = PendingIntent.getService(this, 0, myIntent, 0);
> calendar = Calendar.getInstance();
> }
> @Override
> public void onStart(Intent intent, int startId) {
> super.onStart(intent, startId);
> calendar.setTimeInMillis(System.currentTimeMillis());
> calendar.add(Calendar.MILLISECOND, 30);// Polling for every 5 minutes
> alarmManager.set(AlarmManager.RTC_WAKEUP,
> calendar.getTimeInMillis(),pendingIntent);
> }
>  @Override
> public void onDestroy() {
> super.onDestroy();
> alarmManager.cancel(pendingIntent);
> }
> }
>
> But where do I define connecting to the server and getting the contents?
>
> Thank you.
>

use  IntentService as a sa base base class, read its docs and
everything will be obvious

pskink

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] GCM Push Notification on ICW and Jelly Bean

2012-10-09 Thread Mark Murphy
I suggest that you use the android-gcm Google Group for questions about GCM.

On Tue, Oct 9, 2012 at 4:19 AM, vinay kumar  wrote:
> Hi Everyone,
>
> I facing the issue with GCM push notification, for integrating push in my
> application I followed each and every step mentioned at
> http://developer.android.com/guide/google/gcm/index.html. It is working fine
> on 2.3 and 3.0 devices but on 4.0 and 4.1 I haven't received the push
> notification some times and some time after long waiting hours.
>
> Does any body has any idea why on 4.0 and 4.1 taking so long to receive the
> push. Please share your suggestion on this.
>
>
> Thank You.
>
> Regards
> Vinay Kumar
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en



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

_The Busy Coder's Guide to Android Development_ Version 4.2 Available!

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


Re: [android-developers] GCM Push Notification on ICW and Jelly Bean

2012-10-09 Thread vinay kumar
Thank you mark, I'll do the same

On Tue, Oct 9, 2012 at 3:35 PM, Mark Murphy  wrote:

> I suggest that you use the android-gcm Google Group for questions about
> GCM.
>
> On Tue, Oct 9, 2012 at 4:19 AM, vinay kumar  wrote:
> > Hi Everyone,
> >
> > I facing the issue with GCM push notification, for integrating push in my
> > application I followed each and every step mentioned at
> > http://developer.android.com/guide/google/gcm/index.html. It is working
> fine
> > on 2.3 and 3.0 devices but on 4.0 and 4.1 I haven't received the push
> > notification some times and some time after long waiting hours.
> >
> > Does any body has any idea why on 4.0 and 4.1 taking so long to receive
> the
> > push. Please share your suggestion on this.
> >
> >
> > Thank You.
> >
> > Regards
> > Vinay Kumar
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> > http://groups.google.com/group/android-developers?hl=en
>
>
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> _The Busy Coder's Guide to Android Development_ Version 4.2 Available!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

2012-10-09 Thread RichardC
Use AsyncTask or background thread or a thread in a Service.  To get a 
better answer you will need to ask a better question.

On Tuesday, October 9, 2012 11:01:54 AM UTC+1, Spike wrote:
>
> Hi guys,
>
> I am not able to handle exception generated by timeout. The application is 
> crashing. Any idea or logic for the same.
>
> Thanks in advance..
>
> Thanks & Regards,
> Krishna V. Mahadik
>
> -- 
> -- 
> . \\\///
> .   /\
> .   | \\   // |
> . ( | (.) (.) |)
> --o00o--(_)--o00o-
>
> "Yesterday is not ours to recover, but
> tomorrow is ours to win or to lose."
>
> ---ooo0---
> .   (   )   0ooo
> .\ (  (   )
> . \_) ) /
> .(_/
>  

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Layout is corrupted with graphics from another layout? Only at runtime, only on a certain device.

2012-10-09 Thread NickL
I have never seen this before, and have been developing apps for 2 years+.  
I wrote a layout, ran it on an old handset (HTC Android 2.2), and one of 
the dialogs (android.Theme.Dialog) has graphics in it from a different 
layout.  The other layout is not a dialog.  Not that that probably matters. 
 
In eclipse, this does not happen. On a tablet (4.0.3) and a Motorola (2.3) 
this never occurs (yet).  I thought this might have happened because I 
uploaded a debug version over a bad cable, and maybe got a bad copy.  But 
then I de-installed it and loaded it from the Google Play market, and it 
occurs only some of the time.  I have even tried modifying that layout and 
re-installing.  Still occurs infrequently.  Could it be a memory problem?  
 
Has anyone seen this occur?  How to prevent it?

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

[android-developers] Converting LAt Long to UTM

2012-10-09 Thread Karl Kristian Markman
Hi

I am currently in the process with making an app that shall show the 
loaction retrived from the GPS sensor and displying the position in UTM 
format (WGS83 datum).

Is there a way to get the location info from the GPS as UTM? 

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

2012-10-09 Thread Tom

Hi ,

U check the  webservice response is null or not.
   if response is null u print any meassages. and  best way to use try 
catch block 
   That is used to read the exception.

Thanks,
Tom

On Tuesday, 9 October 2012 15:31:54 UTC+5:30, Spike wrote:
>
> Hi guys,
>
> I am not able to handle exception generated by timeout. The application is 
> crashing. Any idea or logic for the same.
>
> Thanks in advance..
>
> Thanks & Regards,
> Krishna V. Mahadik
>
> -- 
> -- 
> . \\\///
> .   /\
> .   | \\   // |
> . ( | (.) (.) |)
> --o00o--(_)--o00o-
>
> "Yesterday is not ours to recover, but
> tomorrow is ours to win or to lose."
>
> ---ooo0---
> .   (   )   0ooo
> .\ (  (   )
> . \_) ) /
> .(_/
>  

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

2012-10-09 Thread Sadhna Upadhyay
  Hi everybody,
   i want to know that how to implement Java
script,HTML and CSS in android.if any one know pls share with me.



Thanks:
Sadhana

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

2012-10-09 Thread Balesabu Godugu
Hi you can you web technologies(like javascript,html,css) for Android.you
can go through Phonegap framework(it is cross platform supports 6 Mobile
platforms) and make a plugin for andriod.


On Tue, Oct 9, 2012 at 4:54 PM, Sadhna Upadhyay
wrote:

>
>
>   Hi everybody,
>i want to know that how to implement Java
> script,HTML and CSS in android.if any one know pls share with me.
>
>
>
> Thanks:
> Sadhana
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Html implementation in android

2012-10-09 Thread Tamil Arasi
Hi,

u will use webview on implement the Java script,HTML and CSS in android.
For ur reference u will see this link:
"http://www.youtube.com/watch?v=uVqp1zcMfbE";
Thanks,


On Tue, Oct 9, 2012 at 4:54 PM, Sadhna Upadhyay
wrote:

>
>
>   Hi everybody,
>i want to know that how to implement Java
> script,HTML and CSS in android.if any one know pls share with me.
>
>
>
> Thanks:
> Sadhana
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] how to create a wlakie talkie application using android?

2012-10-09 Thread Tom
Hi,

I am try to create walkie talkie app using android. but i couldn't store 
the recorded files in sdcard.
 
 And also i need a networking information like how to send and receive the 
voice message between one mobile to another.

Please tell me the details. Because this is very urgent .

Thanks,
Tom

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Simple example for drag and drop a sprite

2012-10-09 Thread kalandar
take a look,

http://kalandars-cocos2d-android.blogspot.in/2012/10/drag-and-drop-sprite.html

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

[android-developers] Re: Converting LAt Long to UTM

2012-10-09 Thread Rudolf Hornig
No. Location is provides as lat/lon in WGS84. You have to convert that to 
UTM.

On Tuesday, October 9, 2012 12:40:16 PM UTC+2, Karl Kristian Markman wrote:
>
> Hi
>
> I am currently in the process with making an app that shall show the 
> loaction retrived from the GPS sensor and displying the position in UTM 
> format (WGS83 datum).
>
> Is there a way to get the location info from the GPS as UTM? 
>

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

2012-10-09 Thread Tom
Hi,

How to create a  voice recorder using android .if anybody knows .Please 
share with me this very urgent.

Thanks,
Tom

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

2012-10-09 Thread Live Happy
 this will help u
http://developer.android.com/guide/topics/media/audio-capture.html

On Tue, Oct 9, 2012 at 3:29 PM, Tom  wrote:

> Hi,
>
> How to create a  voice recorder using android .if anybody knows .Please
> share with me this very urgent.
>
> Thanks,
> Tom
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] How to deliver a free app, but purchase expansions?

2012-10-09 Thread Andrew Cesario
I am designing my first game for android and I would like to give away the 
base game which would be downloaded for free. This is a single player rpg, 
designed for use without internet access.  If people like it they can then 
buy other maps...like dungeons... or different weapons, scrolls etc.. 
 Different users could purchase the add-on items that they want, based on 
their choices in the game.  These would cost real money to buy.

How can I do this? 

My thoughts are as follows:
1) UNLOCK approach.
Initial download includes the entire software package. Users buy 'licences' 
directly (like an in app purchase).  When they enter their lic. code, it 
unlocks the items.  This seems to have a greater potential for hacking.

2) MULTIPLE APP approach.
Multiple apps for sale via google play. Use the free app to launch the 
purchased app if it exists on the device.

Any other ides or advice would be appreciated.  Any examples out there??

-ac




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

[android-developers] Re: how to create a voice recorder using android

2012-10-09 Thread Saurav
Hi Tom,

Have you looked into this: 
http://developer.android.com/guide/topics/media/audio-capture.html ?
Hope this helps.

Thanks,
Saurav.


On Tuesday, October 9, 2012 5:59:52 PM UTC+5:30, Tom wrote:
>
> Hi,
>
> How to create a  voice recorder using android .if anybody knows .Please 
> share with me this very urgent.
>
> Thanks,
> Tom
>

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

2012-10-09 Thread Mark Murphy
On Tue, Oct 9, 2012 at 8:29 AM, Tom  wrote:
> How to create a  voice recorder using android

Use MediaRecorder.

https://github.com/commonsguy/cw-omnibus/tree/master/Media/AudioRecording

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

_The Busy Coder's Guide to Android Development_ Version 4.2 Available!

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


Re: [android-developers] New to Android App Development need Advice in Designing UI

2012-10-09 Thread Rafael Maas
you set the id of your listview as:
android:id="@android:id/list" ?


2012/10/9 Anees Thyrantakath 

> I created 10 textview, 10 edittext, 3 buttons and a List View in and XML
> file. and in Java class i extends from Activity. Then Listview is not
> Working and when i extends ListActivity while running on Emulator it showed
> Force To Close Error.
> I'm Trying to Get a Better Option. If i can't do by adding all in a single
> screen i think i have to create a next button so that remaining
> informations we can edit from new Page.
>
> Thanks
>  Aadi
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] Re: How to deliver a free app, but purchase expansions?

2012-10-09 Thread RichardC
Look at (play) the "free" apps in this category:
https://play.google.com/store/apps/collection/topgrossing

Look at how they manage in-app purchases.

On Tuesday, October 9, 2012 1:43:19 PM UTC+1, Andrew Cesario wrote:
>
> I am designing my first game for android and I would like to give away the 
> base game which would be downloaded for free. This is a single player rpg, 
> designed for use without internet access.  If people like it they can then 
> buy other maps...like dungeons... or different weapons, scrolls etc.. 
>  Different users could purchase the add-on items that they want, based on 
> their choices in the game.  These would cost real money to buy.
>
> How can I do this? 
>
> My thoughts are as follows:
> 1) UNLOCK approach.
> Initial download includes the entire software package. Users buy 
> 'licences' directly (like an in app purchase).  When they enter their lic. 
> code, it unlocks the items.  This seems to have a greater potential for 
> hacking.
>
> 2) MULTIPLE APP approach.
> Multiple apps for sale via google play. Use the free app to launch the 
> purchased app if it exists on the device.
>
> Any other ides or advice would be appreciated.  Any examples out there??
>
> -ac
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: It is possible to stop a thread that is connecting to URL with httpConnection.connect()?

2012-10-09 Thread Streets Of Boston
Run the code you posted above in a back-ground thread (either as a plain 
thread or an AsyncTask's 'doInBackground(...)' implementation).

After 5 seconds or on user input, call either the back-ground thread's 
'interrupt()' method (if you are using a plain Thread) or 'cancel(true)' on 
your AsyncTask (if you're using AsyncTask).

Network I/O is usually (immediately) interrupted by Thread interruptions. 

--- Anton.

On Friday, October 5, 2012 7:39:55 PM UTC-4, saex wrote:
>
> i have a thread that is connecting to a url to obtaining some data.
>
> Sometimes the method httpConnection.connect(); taked too munch time to 
> get the response, and i want to limit the loading dialog of this connection 
> thread to 5 seg.
>
> I tryed adding timeouts into the code, *but it doesn't work*!!
>
> URL formattedUrl = new URL(url); 
> URLConnection connection = formattedUrl.openConnection(); 
> connection.setConnectTimeout(5000);
> connection.setReadTimeout(5000);
> HttpURLConnection httpConnection = (HttpURLConnection) connection;
> httpConnection.setAllowUserInteraction(false);
> httpConnection.setInstanceFollowRedirects(true);
> httpConnection.setRequestMethod("GET");
> httpConnection.setConnectTimeout(5000);
> httpConnection.setReadTimeout(5000);
> httpConnection.connect();
>
> So, i must stop the connect method and the thread when 5000 seconds have 
> passed or when the used has pressed the back key on the phone.
>
> How can this be achieved? i can't find info about doing this work in 
> android with a url connection thread.
>
> 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

Re: [android-developers] Buttons in ViewPager pages: Problem swiping/dragging pages when finger starts on top of Button. How can I fix this?

2012-10-09 Thread Streets Of Boston
Hi Kostya,

Thanks for your answer.

This bug (?) only happens on Jelly Bean (I don't have ICS devices to test 
it on).
It works fine on Honeycomb and lower OS versions. 

It seems there is indeed a regression of the ViewPager in JB (and possibly 
ICS).

Thanks.

On Tuesday, October 2, 2012 12:47:41 PM UTC-4, Kostya Vasilyev wrote:
>
> Sounds like a bug in how ViewPager dispatches events (sorry for stating 
> the obvious). I'd consider looking at the source and comparing it to 
> ScrollView (which handles nested touchable areas just fine).
>
> -- K
>
> 2012/10/2 Streets Of Boston >
>
>> Hi everyone,
>>
>> I have a ViewPager that contains pages, each page with a bunch of Buttons 
>> (or clickable TextViews). When I set the buttons to 'setClickable(false)', 
>> swiping the ViewPager to another page works fine all the time.
>>
>> However, when the buttons are clickable (OnClick listener is set), the 
>> ViewPager won't do anything if the user put his or her finger down on the 
>> button when he or she starts a swipe or scroll. If the user swipes, the 
>> button 'eats' all the touch-events (MotionEvents).
>>
>> Is there a convenient way to make these buttons/textviews clickable and 
>> make the ViewPager swipe even if the user puts his finger on a button 
>> initially?
>> (I'd like to avoid hacks and using GestureDetectors if possible)
>>
>> Thanks!
>>
>> -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to 
>> To unsubscribe from this group, send email to
>>
>> 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: Wrong apk starts-up

2012-10-09 Thread Latimerius
On Tue, Oct 9, 2012 at 9:30 AM, katarina  wrote:
> Actually the apk file has a different name, but within the Manifest we
> have application and activity names the same as the original mms
> application - do you think this can produce the cofusion too?
>
> Can it be because of the applicaiton name inside the Manifes or
> activity name inside the Manifest - do they have to be unique across
> all Manifest files?

I believe the APK file name doesn't really matter much.  It's what you
put into your manifest - specifically, the  element has a
"package" attribute whose value is your package name.  This package
name has to be unique - I don't think Android package manager would
let you install two different APKs on the same device whose manifests
both declared the same package name.

I guess it would be useful if you post more details about what exactly
you do - at least the manifests and how you install your APKs on your
device.

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


Re: [android-developers] Re: How to deliver a free app, but purchase expansions?

2012-10-09 Thread Andrew Cesario
In-app billing seems to be an appropriate approach!

I'll download a few of these to try it out.

Thanks
-ac


On Tue, Oct 9, 2012 at 9:55 AM, RichardC wrote:

> Look at (play) the "free" apps in this category:
> https://play.google.com/store/apps/collection/topgrossing
>
> Look at how they manage in-app purchases.
>
>
> On Tuesday, October 9, 2012 1:43:19 PM UTC+1, Andrew Cesario wrote:
>>
>> I am designing my first game for android and I would like to give away
>> the base game which would be downloaded for free. This is a single player
>> rpg, designed for use without internet access.  If people like it they can
>> then buy other maps...like dungeons... or different weapons, scrolls etc..
>>  Different users could purchase the add-on items that they want, based on
>> their choices in the game.  These would cost real money to buy.
>>
>> How can I do this?
>>
>> My thoughts are as follows:
>> 1) UNLOCK approach.
>> Initial download includes the entire software package. Users buy
>> 'licences' directly (like an in app purchase).  When they enter their lic.
>> code, it unlocks the items.  This seems to have a greater potential for
>> hacking.
>>
>> 2) MULTIPLE APP approach.
>> Multiple apps for sale via google play. Use the free app to launch the
>> purchased app if it exists on the device.
>>
>> Any other ides or advice would be appreciated.  Any examples out there??
>>
>> -ac
>>
>>
>>
>>
>>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: VerifyError on Custom View

2012-10-09 Thread Christophe Versieux
Same error in my project...
Did you find a solution in 3 years? :-p

On Monday, June 1, 2009 4:49:16 PM UTC-4, Zach Hobbs wrote:
>
> I have setup remote crash reports for unhandled java exceptions.  I am 
> getting lots of users who are crashing right on startup, and I'm 
> seeing VerifyErrors that look like they are thrown right on startup. 
>
> I have tested this app extensively on 1.1 and 1.5 on many different 
> devices, but some phone just have this problem everytime, 
> unfortunately I haven't been able to get my hands on one that it 
> crashes on to see what else is happening in LogCat. 
>
> Anyways, the exception looks like this: 
>
> java.lang.VerifyError: com.tunewiki.lyricplayer.android.views.TopBar 
>at java.lang.Class.getDeclaredConstructors(Native Method) 
>at java.lang.Class.getConstructor(Class.java:401) 
>at android.view.LayoutInflater.createView(LayoutInflater.java: 
> 470) 
>at android.view.LayoutInflater.createViewFromTag 
> (LayoutInflater.java:560) 
>at android.view.LayoutInflater.rInflate(LayoutInflater.java: 
> 613) 
>at android.view.LayoutInflater.inflate(LayoutInflater.java:403) 
>at android.view.LayoutInflater.inflate(LayoutInflater.java:316) 
>at android.view.LayoutInflater.inflate(LayoutInflater.java:272) 
>at com.android.internal.policy.impl.PhoneWindow.setContentView 
> (PhoneWindow.java:227) 
>at android.app.Activity.setContentView(Activity.java:1569) 
>at 
> com.tunewiki.lyricplayer.android.library.MainLibraryActivity.onCreate 
> (MainLibraryActivity.java:21) 
>at android.app.Instrumentation.callActivityOnCreate 
> (Instrumentation.java:1122) 
>at android.app.ActivityThread.performLaunchActivity 
> (ActivityThread.java:2103) 
>at android.app.ActivityThread.startActivityNow 
> (ActivityThread.java:1988) 
>at android.app.LocalActivityManager.moveToState 
> (LocalActivityManager.java:122) 
>at android.app.LocalActivityManager.startActivity 
> (LocalActivityManager.java:335) 
>at 
> com.tunewiki.lyricplayer.android.tabs.TabHostActivity.setCurrentTab 
> (TabHostActivity.java:359) 
>at com.tunewiki.lyricplayer.android.MainActivity.setCurrentTab 
> (MainActivity.java:687) 
>at 
> com.tunewiki.lyricplayer.android.tabs.TabHostActivity.setCurrentTab 
> (TabHostActivity.java:259) 
>at 
> com.tunewiki.lyricplayer.android.tabs.TabHostActivity.setDefaultTab 
> (TabHostActivity.java:67) 
>at com.tunewiki.lyricplayer.android.MainActivity.onCreate 
> (MainActivity.java:268) 
>at android.app.Instrumentation.callActivityOnCreate 
> (Instrumentation.java:1122) 
>at android.app.ActivityThread.performLaunchActivity 
> (ActivityThread.java:2103) 
>at android.app.ActivityThread.handleLaunchActivity 
> (ActivityThread.java:2156) 
>at android.app.ActivityThread.access$1800(ActivityThread.java: 
> 112) 
>at android.app.ActivityThread$H.handleMessage 
> (ActivityThread.java:1580) 
>at android.os.Handler.dispatchMessage(Handler.java:88) 
>at android.os.Looper.loop(Looper.java:123) 
>at android.app.ActivityThread.main(ActivityThread.java:3742) 
>at java.lang.reflect.Method.invokeNative(Native Method) 
>at java.lang.reflect.Method.invoke(Method.java:515) 
>at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run 
> (ZygoteInit.java:739) 
>at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497) 
>at dalvik.system.NativeStart.main(Native Method) 
>
> TopBar extends RelativeLayout. 
>
> Thanks, 
> Zach 
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Buttons in ViewPager pages: Problem swiping/dragging pages when finger starts on top of Button. How can I fix this?

2012-10-09 Thread Piren
ViewPager is part of the support package and inherits from a ViewGroup , it 
shouldn't matter much which OS version it runs on.
I have a similar setup and i dont experience this issue (using support 
package v4, i assume you're using the same since you said you tested on 
earlier os versions).
I can even press a button and see it switch to its pressed state and then 
start a swipe without generating an onClick event.

What is your targetSdkVersion? 

On Tuesday, October 9, 2012 4:27:31 PM UTC+2, Streets Of Boston wrote:
>
> Hi Kostya,
>
> Thanks for your answer.
>
> This bug (?) only happens on Jelly Bean (I don't have ICS devices to test 
> it on).
> It works fine on Honeycomb and lower OS versions. 
>
> It seems there is indeed a regression of the ViewPager in JB (and possibly 
> ICS).
>
> Thanks.
>
> On Tuesday, October 2, 2012 12:47:41 PM UTC-4, Kostya Vasilyev wrote:
>>
>> Sounds like a bug in how ViewPager dispatches events (sorry for stating 
>> the obvious). I'd consider looking at the source and comparing it to 
>> ScrollView (which handles nested touchable areas just fine).
>>
>> -- K
>>
>> 2012/10/2 Streets Of Boston 
>>
>>> Hi everyone,
>>>
>>> I have a ViewPager that contains pages, each page with a bunch of 
>>> Buttons (or clickable TextViews). When I set the buttons to 
>>> 'setClickable(false)', swiping the ViewPager to another page works fine all 
>>> the time.
>>>
>>> However, when the buttons are clickable (OnClick listener is set), the 
>>> ViewPager won't do anything if the user put his or her finger down on the 
>>> button when he or she starts a swipe or scroll. If the user swipes, the 
>>> button 'eats' all the touch-events (MotionEvents).
>>>
>>> Is there a convenient way to make these buttons/textviews clickable and 
>>> make the ViewPager swipe even if the user puts his finger on a button 
>>> initially?
>>> (I'd like to avoid hacks and using GestureDetectors if possible)
>>>
>>> Thanks!
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to 
>>> To unsubscribe from this group, send email to
>>>
>>> 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: Layout is corrupted with graphics from another layout? Only at runtime, only on a certain device.

2012-10-09 Thread Piren

I've had it happen to me a lot of times, but as a packaging error 
(resources got packages incorrectly into the apk). but the issues were very 
broad and obvious and manifested on all of my devices.

Try a clean build of the app and see if it re-appears.



On Tuesday, October 9, 2012 12:34:51 PM UTC+2, NickL wrote:
>
> I have never seen this before, and have been developing apps for 2 
> years+.  I wrote a layout, ran it on an old handset (HTC Android 2.2), and 
> one of the dialogs (android.Theme.Dialog) has graphics in it from a 
> different layout.  The other layout is not a dialog.  Not that that 
> probably matters. 
>  
> In eclipse, this does not happen. On a tablet (4.0.3) and a Motorola (2.3) 
> this never occurs (yet).  I thought this might have happened because I 
> uploaded a debug version over a bad cable, and maybe got a bad copy.  But 
> then I de-installed it and loaded it from the Google Play market, and it 
> occurs only some of the time.  I have even tried modifying that layout and 
> re-installing.  Still occurs infrequently.  Could it be a memory problem?  
>  
> Has anyone seen this occur?  How to prevent 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: VerifyError on Custom View

2012-10-09 Thread Justin Anderson
Does this help?
http://stackoverflow.com/questions/668788/android-java-lang-verifyerror

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Tue, Oct 9, 2012 at 9:07 AM, Christophe Versieux <
christophe.versi...@gmail.com> wrote:

> Same error in my project...
> Did you find a solution in 3 years? :-p
>
> On Monday, June 1, 2009 4:49:16 PM UTC-4, Zach Hobbs wrote:
>>
>> I have setup remote crash reports for unhandled java exceptions.  I am
>> getting lots of users who are crashing right on startup, and I'm
>> seeing VerifyErrors that look like they are thrown right on startup.
>>
>> I have tested this app extensively on 1.1 and 1.5 on many different
>> devices, but some phone just have this problem everytime,
>> unfortunately I haven't been able to get my hands on one that it
>> crashes on to see what else is happening in LogCat.
>>
>> Anyways, the exception looks like this:
>>
>> java.lang.VerifyError: com.tunewiki.lyricplayer.**android.views.TopBar
>>at java.lang.Class.**getDeclaredConstructors(Native Method)
>>at java.lang.Class.**getConstructor(Class.java:401)
>>at android.view.LayoutInflater.**createView(LayoutInflater.**java:
>>
>> 470)
>>at android.view.LayoutInflater.**createViewFromTag
>> (LayoutInflater.java:560)
>>at android.view.LayoutInflater.**rInflate(LayoutInflater.java:
>> 613)
>>at android.view.LayoutInflater.**inflate(LayoutInflater.java:**403)
>>
>>at android.view.LayoutInflater.**inflate(LayoutInflater.java:**316)
>>
>>at android.view.LayoutInflater.**inflate(LayoutInflater.java:**272)
>>
>>at com.android.internal.policy.**impl.PhoneWindow.**setContentView
>>
>> (PhoneWindow.java:227)
>>at android.app.Activity.**setContentView(Activity.java:**1569)
>>at
>> com.tunewiki.lyricplayer.**android.library.**MainLibraryActivity.onCreate
>>
>> (MainLibraryActivity.java:21)
>>at android.app.Instrumentation.**callActivityOnCreate
>> (Instrumentation.java:1122)
>>at android.app.ActivityThread.**performLaunchActivity
>> (ActivityThread.java:2103)
>>at android.app.ActivityThread.**startActivityNow
>> (ActivityThread.java:1988)
>>at android.app.**LocalActivityManager.**moveToState
>> (LocalActivityManager.java:**122)
>>at android.app.**LocalActivityManager.**startActivity
>> (LocalActivityManager.java:**335)
>>at
>> com.tunewiki.lyricplayer.**android.tabs.TabHostActivity.**setCurrentTab
>> (TabHostActivity.java:359)
>>at com.tunewiki.lyricplayer.**android.MainActivity.**setCurrentTab
>>
>> (MainActivity.java:687)
>>at
>> com.tunewiki.lyricplayer.**android.tabs.TabHostActivity.**setCurrentTab
>> (TabHostActivity.java:259)
>>at
>> com.tunewiki.lyricplayer.**android.tabs.TabHostActivity.**setDefaultTab
>> (TabHostActivity.java:67)
>>at com.tunewiki.lyricplayer.**android.MainActivity.onCreate
>> (MainActivity.java:268)
>>at android.app.Instrumentation.**callActivityOnCreate
>> (Instrumentation.java:1122)
>>at android.app.ActivityThread.**performLaunchActivity
>> (ActivityThread.java:2103)
>>at android.app.ActivityThread.**handleLaunchActivity
>> (ActivityThread.java:2156)
>>at android.app.ActivityThread.**access$1800(ActivityThread.**java:
>>
>> 112)
>>at android.app.ActivityThread$H.**handleMessage
>> (ActivityThread.java:1580)
>>at android.os.Handler.**dispatchMessage(Handler.java:**88)
>>at android.os.Looper.loop(Looper.**java:123)
>>at android.app.ActivityThread.**main(ActivityThread.java:3742)
>>at java.lang.reflect.Method.**invokeNative(Native Method)
>>at java.lang.reflect.Method.**invoke(Method.java:515)
>>at com.android.internal.os.**ZygoteInit$**MethodAndArgsCaller.run
>> (ZygoteInit.java:739)
>>at com.android.internal.os.**ZygoteInit.main(ZygoteInit.**java:497)
>>
>>at dalvik.system.NativeStart.**main(Native Method)
>>
>> TopBar extends RelativeLayout.
>>
>> Thanks,
>> Zach
>>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] ClassCastException of LayoutParams to MarginLayoutParams after setting a view's width

2012-10-09 Thread Timothy Caraballo
I've posted this question to 
StackOverflow,
 
but no answer there yet, so I thought I'd ask here as well.

I've written a small proxy class so that I can use ObjectAnimator to 
animate a view's margin. After checking that this worked and everything 
animated properly, I wanted to adjust the view's size before the animation, 
but after I set the width, my animation fails with a ClassCastException. I 
haven't a clue why.

private class handleClickListener implements View.OnClickListener { private 
static final int LEFT_MARGIN_VISIBLE = 0; private static final int 
LEFT_MARGIN_HIDDEN = -196; public void onClick(View view) { LinearLayout 
row = (LinearLayout) view.getParent().getParent(); RelativeLayout options = 
(RelativeLayout) row.findViewById(R.id.options); LayoutProxy layoutProxy = 
new LayoutProxy(options); // First make sure the options are the right 
width to fill the screen with the handle int rowWidth = row.getWidth(); int 
handleWidth = view.getWidth(); layoutProxy.setWidth(rowWidth - 
handleWidth);ObjectAnimator animation
; if (layoutProxy.getLeftMargin() == Util.dipsToPixels(options, 
LEFT_MARGIN_VISIBLE)) { animation = ObjectAnimator.ofInt(layoutProxy, 
"leftMargin", Util.dipsToPixels(view, LEFT_MARGIN_VISIBLE), Util
.dipsToPixels(view, LEFT_MARGIN_HIDDEN)); } else { animation = 
ObjectAnimator.ofInt(layoutProxy, "leftMargin", Util.dipsToPixels(view, 
LEFT_MARGIN_HIDDEN), Util.dipsToPixels(view, LEFT_MARGIN_VISIBLE)); } 
animation.setDuration(200); animation.start(); } /** * Allows an 
ObjectAnimator to set/get margins and dimensions of a view */ private class 
LayoutProxy { private ViewGroup mView; public LayoutProxy(View view) { 
mView = (ViewGroup) view; } public int getWidth() { ViewGroup.LayoutParamslp = 
mView
.getLayoutParams(); return lp.width; } public void setWidth(int width) { 
ViewGroup.LayoutParams lp = mView.getLayoutParams(); mView.setLayoutParams(new 
ViewGroup.LayoutParams(width, lp.height)); } public int getHeight() { 
ViewGroup.LayoutParams lp = mView.getLayoutParams(); return lp.height; } 
public void setHeight(int height) { ViewGroup.LayoutParams lp = mView
.getLayoutParams(); mView.setLayoutParams(new ViewGroup.LayoutParams(lp
.width, height)); } public int getLeftMargin() { ViewGroup
.MarginLayoutParams lp = (ViewGroup.MarginLayoutParams) mView
.getLayoutParams(); return lp.leftMargin; } public void setLeftMargin(int 
margin) { MarginLayoutParams lp = (MarginLayoutParams) mView.getLayoutParams
(); lp.setMargins(margin, lp.topMargin, lp.rightMargin, lp.bottomMargin);mView
.requestLayout(); } public int getTopMargin() { MarginLayoutParams lp = 
(MarginLayoutParams) mView.getLayoutParams(); return lp.topMargin; } public 
void setTopMargin(int margin) { MarginLayoutParams lp = 
(MarginLayoutParams) mView.getLayoutParams(); lp.setMargins(lp.leftMargin, 
margin, lp.rightMargin, lp.bottomMargin); mView.requestLayout(); } public 
int getRightMargin() { MarginLayoutParams lp = (MarginLayoutParams) mView
.getLayoutParams(); return lp.rightMargin; } public void setRightMargin(int 
margin) { MarginLayoutParams lp = (MarginLayoutParams) mView.getLayoutParams
(); lp.setMargins(lp.leftMargin, lp.topMargin, margin, lp.bottomMargin);mView
.requestLayout(); } public int getBottomMargin() { MarginLayoutParams lp = 
(MarginLayoutParams) mView.getLayoutParams(); return lp.bottomMargin; } 
public void setBottomMargin(int margin) { MarginLayoutParams lp = 
(MarginLayoutParams) mView.getLayoutParams(); lp.setMargins(lp.leftMargin, 
lp.topMargin, lp.rightMargin, margin); mView.requestLayout(); } } }

And the error:

FATAL EXCEPTION: main java.lang.ClassCastException: 
android.view.ViewGroup$LayoutParams 
cannot be cast to android.view.ViewGroup$MarginLayoutParams at com.test.data
.ContactListCursorAdapter$handleClickListener$LayoutProxy.getLeftMargin
(ContactListCursorAdapter.java:135) at com.test.data
.ContactListCursorAdapter$handleClickListener.onClick
(ContactListCursorAdapter.java:94) at android.view.View.performClick(View
.java:4084) at android.view.View$PerformClick.run(View.java:16966)

What am I doing wrong and why would setting the margins just not work after 
setting a width?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: ClassCastException of LayoutParams to MarginLayoutParams after setting a view's width

2012-10-09 Thread RichardC
The error is in here:

public int getLeftMargin() { ViewGroup.MarginLayoutParams lp = (ViewGroup
.MarginLayoutParams) mView.getLayoutParams(); return lp.leftMargin; }

mView.getLayoutParams()
http://developer.android.com/reference/android/view/View.html#getLayoutParams()
returns a ViewGroup.LayoutParams 
http://developer.android.com/reference/android/view/ViewGroup.LayoutParams.html
not a ViewGroup.MarginLayoutParams

On Tuesday, October 9, 2012 6:31:23 PM UTC+1, Timothy Caraballo wrote:
>
> I've posted this question to 
> StackOverflow,
>  
> but no answer there yet, so I thought I'd ask here as well.
>
> I've written a small proxy class so that I can use ObjectAnimator to 
> animate a view's margin. After checking that this worked and everything 
> animated properly, I wanted to adjust the view's size before the animation, 
> but after I set the width, my animation fails with a ClassCastException. 
> I haven't a clue why.
>
> private class handleClickListener implements View.OnClickListener { 
> private static final int LEFT_MARGIN_VISIBLE = 0; private static final 
> int LEFT_MARGIN_HIDDEN = -196; public void onClick(View view) { 
> LinearLayout row = (LinearLayout) view.getParent().getParent();RelativeLayout 
> options = (RelativeLayout) row
> .findViewById(R.id.options); LayoutProxy layoutProxy = new 
> LayoutProxy(options); // First make sure the options are the right width 
> to fill the screen with the handle int rowWidth = row.getWidth(); int 
> handleWidth = view.getWidth(); layoutProxy.setWidth(rowWidth - 
> handleWidth); ObjectAnimator animation; if (layoutProxy.getLeftMargin() 
> == Util.dipsToPixels(options, LEFT_MARGIN_VISIBLE)) { animation = 
> ObjectAnimator.ofInt(layoutProxy, "leftMargin", Util.dipsToPixels(view, 
> LEFT_MARGIN_VISIBLE), Util.dipsToPixels(view, LEFT_MARGIN_HIDDEN)); } 
> else { animation = ObjectAnimator.ofInt(layoutProxy, "leftMargin", Util
> .dipsToPixels(view, LEFT_MARGIN_HIDDEN), Util.dipsToPixels(view, 
> LEFT_MARGIN_VISIBLE)); } animation.setDuration(200); animation.start(); } /** 
> * Allows an ObjectAnimator to set/get margins and dimensions of a view 
> */private class LayoutProxy { private ViewGroup mView
> ; public LayoutProxy(View view) { mView = (ViewGroup) view; } public int 
> getWidth() { ViewGroup.LayoutParams lp = mView.getLayoutParams(); return 
> lp.width; } public void setWidth(int width) { ViewGroup.LayoutParams lp = 
> mView.getLayoutParams(); mView.setLayoutParams(new 
> ViewGroup.LayoutParams(width, 
> lp.height)); } public int getHeight() { ViewGroup.LayoutParams lp = mView
> .getLayoutParams(); return lp.height; } public void setHeight(int height) 
> { ViewGroup.LayoutParams lp = mView.getLayoutParams(); mView
> .setLayoutParams(new ViewGroup.LayoutParams(lp.width, height)); } public 
> int getLeftMargin() { ViewGroup.MarginLayoutParams lp = (ViewGroup
> .MarginLayoutParams) mView.getLayoutParams(); return lp.leftMargin; } 
> public void setLeftMargin(int margin) { MarginLayoutParams lp = 
> (MarginLayoutParams) mView.getLayoutParams(); lp.setMargins(margin, lp
> .topMargin, lp.rightMargin, lp.bottomMargin); mView.requestLayout(); } 
> public int getTopMargin() { MarginLayoutParams lp = (MarginLayoutParams) 
> mView.getLayoutParams(); return lp.topMargin; } public void 
> setTopMargin(int margin) { MarginLayoutParams lp = (MarginLayoutParams) 
> mView.getLayoutParams(); lp.setMargins(lp.leftMargin, margin, lp
> .rightMargin, lp.bottomMargin); mView.requestLayout(); } public int 
> getRightMargin() { MarginLayoutParams lp = (MarginLayoutParams) mView
> .getLayoutParams(); return lp.rightMargin; } public void 
> setRightMargin(int margin) { MarginLayoutParams lp = (MarginLayoutParams) 
> mView.getLayoutParams(); lp.setMargins(lp.leftMargin, lp.topMargin, 
> margin, lp.bottomMargin); mView.requestLayout(); } public int 
> getBottomMargin() { MarginLayoutParams lp = (MarginLayoutParams) mView
> .getLayoutParams(); return lp.bottomMargin; } public void 
> setBottomMargin(int margin) { MarginLayoutParams lp = (MarginLayoutParams) 
> mView.getLayoutParams(); lp.setMargins(lp.leftMargin, lp.topMargin, lp
> .rightMargin, margin); mView.requestLayout(); } } }
>
> And the error:
>
> FATAL EXCEPTION: main java.lang.ClassCastException: 
> android.view.ViewGroup$LayoutParams 
> cannot be cast to android.view.ViewGroup$MarginLayoutParams at com.test
> .data.ContactListCursorAdapter$handleClickListener$LayoutProxy
> .getLeftMargin(ContactListCursorAdapter.java:135) at com.test.data
> .ContactListCursorAdapter$handleClickListener.onClick
> (ContactListCursorAdapter.java:94) at android.view.View.performClick(View
> .java:4084) at android.view.View$PerformClick.run(View.java:16966)
>
> What am I doing wrong and why would setting the margins just not work 
> after setting a width?
>

-- 
You received this message because you are subscribed to 

Re: [android-developers] Re: Wrong apk starts-up

2012-10-09 Thread Nicholas Campion
I have seen this, historically, on older phones using HTC's sense ui. The 
application launcher would cache the invokable target using properties of 
the AndroidManifest. It seemed to eventually go away, specifically if the 
device was restarted. I noticed this specifically when we changed the name 
of the Application class on these devices.

Is it possible you are hitting that issue?

On Tuesday, October 9, 2012 9:40:40 AM UTC-5, latimerius wrote:
>
> On Tue, Oct 9, 2012 at 9:30 AM, katarina > 
> wrote: 
> > Actually the apk file has a different name, but within the Manifest we 
> > have application and activity names the same as the original mms 
> > application - do you think this can produce the cofusion too? 
> > 
> > Can it be because of the applicaiton name inside the Manifes or 
> > activity name inside the Manifest - do they have to be unique across 
> > all Manifest files? 
>
> I believe the APK file name doesn't really matter much.  It's what you 
> put into your manifest - specifically, the  element has a 
> "package" attribute whose value is your package name.  This package 
> name has to be unique - I don't think Android package manager would 
> let you install two different APKs on the same device whose manifests 
> both declared the same package name. 
>
> I guess it would be useful if you post more details about what exactly 
> you do - at least the manifests and how you install your APKs on your 
> device. 
>

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

2012-10-09 Thread vnv
Hi,

could anyone help with architecture of application that would gather info 
from sensors and send it or save it to database.

My idea was to make service that would gather data from 
GPS,accelerometer,orientation and send it to my web service while also 
saving it to database on phone.

Service would run in background and fronted (Activity) would be used to 
communicate with service (ie. shut it down or start it) , show data from 
service.

Is this good approach?

What are means of communication with activity from service? (that are fast 
enough for this type of task)

Thanks for help.

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

[android-developers] optimized way to get large data from webservice(json or xml)

2012-10-09 Thread satya attili
Hi  Friends..

This is satya, new to android development, can anybody...

fetching the data from json or xml format, ok..

how can we achieve the the best optimized way to do this...


thanks in advance...

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

[android-developers] Re: optimized way to get large data from webservice(json or xml)

2012-10-09 Thread Matt Kanninen
Try:

http://stackoverflow.com/questions/10254872/download-sqlite-database-from-internet-and-load-into-android-application

-MK

On Tuesday, October 9, 2012 11:30:24 AM UTC-7, satyaandroid wrote:
>
> Hi  Friends..
>
> This is satya, new to android development, can anybody...
>
> fetching the data from json or xml format, ok..
>
> how can we achieve the the best optimized way to do this...
>
>
> thanks in advance...
>

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

[android-developers] Drawable Query

2012-10-09 Thread Darryl Griffiths
I am working on a simple animation using the animation-list attribute.  I
have all my sequenced images in the drawable-xhdpi folder and the first
line of my XML looks like this:



To keep things tidy, I decided to create a new folder called "seq" inside
of the drawable-xhdpi and moved my images inside.  Of course I got errors
in my animation.xml file, so I changed the first line to:



Still showing an error so could someone help.  Thanks.

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

Re: [android-developers] Re: optimized way to get large data from webservice(json or xml)

2012-10-09 Thread satya attili
Thank you.
but..
let us understand my problem..

i have an json or xml data in the server with large amount of data...
at the time of fetching and i want to show in listview..
so its takes so long time to ready my listview...

alternate to this, any better solution... like fetch the data with time
interval ?

i hope u got it..

i have an idea like this, first fetch the total data to my SQLite DB after
that i will add to my list view...
is it good??






On Wed, Oct 10, 2012 at 12:04 AM, Matt Kanninen wrote:

> Try:
>
>
> http://stackoverflow.com/questions/10254872/download-sqlite-database-from-internet-and-load-into-android-application
>
> -MK
>
>
> On Tuesday, October 9, 2012 11:30:24 AM UTC-7, satyaandroid wrote:
>>
>> Hi  Friends..
>>
>> This is satya, new to android development, can anybody...
>>
>> fetching the data from json or xml format, ok..
>>
>> how can we achieve the the best optimized way to do this...
>>
>>
>> thanks in advance...
>>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] Re: optimized way to get large data from webservice(json or xml)

2012-10-09 Thread Kristopher Micinski
If your network operations are going slow, there's no magic operation
you can do to speed them up..

kris

On Tue, Oct 9, 2012 at 2:48 PM, satya attili  wrote:
> Thank you.
> but..
> let us understand my problem..
>
> i have an json or xml data in the server with large amount of data...
> at the time of fetching and i want to show in listview..
> so its takes so long time to ready my listview...
>
> alternate to this, any better solution... like fetch the data with time
> interval ?
>
> i hope u got it..
>
> i have an idea like this, first fetch the total data to my SQLite DB after
> that i will add to my list view...
> is it good??
>
>
>
>
>
>
> On Wed, Oct 10, 2012 at 12:04 AM, Matt Kanninen 
> wrote:
>>
>> Try:
>>
>>
>> http://stackoverflow.com/questions/10254872/download-sqlite-database-from-internet-and-load-into-android-application
>>
>> -MK
>>
>>
>> On Tuesday, October 9, 2012 11:30:24 AM UTC-7, satyaandroid wrote:
>>>
>>> Hi  Friends..
>>>
>>> This is satya, new to android development, can anybody...
>>>
>>> fetching the data from json or xml format, ok..
>>>
>>> how can we achieve the the best optimized way to do this...
>>>
>>>
>>> thanks in advance...
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

2012-10-09 Thread RichardC
Also make sure you read and understand:
http://android-developers.blogspot.co.uk/2011/06/things-that-cannot-change.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] Re: Display all images from SD card and phone memory

2012-10-09 Thread laxman k
*how to display all images from SD card and Phone memory using  Grid View
API  2.2*
*
*
*
*
On Tue, Oct 9, 2012 at 2:16 AM, bob  wrote:

> android.widget.Gallery
>
> *This class is deprecated.*
> This widget is no longer supported. Other horizontally scrolling widgets
> include 
> HorizontalScrollView
>  and 
> ViewPager
>  from
> the support library.
>
> On Monday, October 8, 2012 2:28:13 PM UTC-5, laxman k wrote:
>>
>> *how to display all images from SD card and Phone memory using gallary
>> widget*
>>
>>
>> *Thank You*
>>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: The package name of your apk is the same as the package name of another developer's application. Choose a new package name.

2012-10-09 Thread John Merlino
the play store supposedly transfered the app between the accounts but when 
I log into my account it still says "No applications uploaded" and when I 
tried toi upload the app again it gives same error "he package name of your 
apk is the same as the package name of another developer's application. 
Choose a new package name."

On Monday, October 8, 2012 6:19:36 PM UTC-4, Mark Murphy (a Commons Guy) 
wrote:
>
> On Mon, Oct 8, 2012 at 6:07 PM, John Merlino > 
> wrote: 
> > Here's the thing. It's the same application. Someone else had uploaded 
> > it using their google play account, but now I have an updated version 
> > that I want to upload using my google play account. So I just want to 
> > be able to upload it. 
>
> Have the "someone else" sign and upload it, as it is their app, from 
> the standpoint of the Play Store. 
>
> Reputedly, there is some process by which you can get the Play Store 
> folk to transfer an app between accounts, though I am not seeing a 
> mention of how to do that in the Play Store docs. 
>
> Regardless, once an app is on the Play Store, the Play Store account 
> and signing key must both match the original ones used with that 
> package. So, if you do not have the signing key from "someone else" or 
> cannot get "someone else" to arrange to transfer the app to your Play 
> Store account, you cannot publish an updated version of the app. 
>
> -- 
> 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] Re: The package name of your apk is the same as the package name of another developer's application. Choose a new package name.

2012-10-09 Thread Mark Murphy
On Tue, Oct 9, 2012 at 3:03 PM, John Merlino  wrote:
> the play store supposedly transfered the app between the accounts but when I
> log into my account it still says "No applications uploaded" and when I
> tried toi upload the app again it gives same error "he package name of your
> apk is the same as the package name of another developer's application.
> Choose a new package name."

That's a question for the Play Store team -- they do not monitor this
list as far as we are aware.

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

_The Busy Coder's Guide to Android Development_ Version 4.2 Available!

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


[android-developers] Re: Converting LAt Long to UTM

2012-10-09 Thread Karl Kristian Markman
I figured as much.

I hav found the forumla but Im not sure how to use the formula in code. I 
mean do I just put the numbers and calculations in or do I need a special 
syntax for things like sinus and cosinus?

Here is link to formula : Lat long to 
UTM

On Tuesday, October 9, 2012 2:17:12 PM UTC+2, Rudolf Hornig wrote:
>
> No. Location is provides as lat/lon in WGS84. You have to convert that to 
> UTM.
>
> On Tuesday, October 9, 2012 12:40:16 PM UTC+2, Karl Kristian Markman wrote:
>>
>> Hi
>>
>> I am currently in the process with making an app that shall show the 
>> loaction retrived from the GPS sensor and displying the position in UTM 
>> format (WGS83 datum).
>>
>> Is there a way to get the location info from the GPS as UTM? 
>>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Display all images from SD card and phone memory

2012-10-09 Thread bob
Please see 
MIHAI FONOAGE'S 
BLOG

http://mihaifonoage.blogspot.com/2009/11/displaying-images-from-sd-card-in.html





On Tuesday, October 9, 2012 2:06:01 PM UTC-5, laxman k wrote:
>
>
> *how to display all images from SD card and Phone memory using  Grid View 
> API  2.2*
> *
> *
> *
> *
> On Tue, Oct 9, 2012 at 2:16 AM, bob 
> > wrote:
>
>>  android.widget.Gallery
>>
>> *This class is deprecated.*
>> This widget is no longer supported. Other horizontally scrolling widgets 
>> include 
>> HorizontalScrollView
>>  and 
>> ViewPager
>>  from 
>> the support library.
>>
>> On Monday, October 8, 2012 2:28:13 PM UTC-5, laxman k wrote:
>>>
>>> *how to display all images from SD card and Phone memory using gallary 
>>> widget*
>>>
>>> 
>>> *Thank You*
>>>
>>  -- 
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to 
>> android-d...@googlegroups.com
>> To unsubscribe from this group, 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] Interfacing android device with external device using bluetooth.

2012-10-09 Thread Sunil Mishra
I want to interface an external touch screen device (e.g. monitor) with 
android device. What are the requirements to accomplish this? How should I 
proceed on the work? Any reference materials?


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

2012-10-09 Thread RichardC
I think I am correct in saying that this cannot be done using the Android 
SDK (or NDK).  However, if you are building your own device then the AOSP 
groups may be of some help:
http://source.android.com/community/index.html

On Tuesday, October 9, 2012 8:34:06 PM UTC+1, Sunil Mishra wrote:
>
> I want to interface an external touch screen device (e.g. monitor) with 
> android device. What are the requirements to accomplish this? How should I 
> proceed on the work? Any reference materials?
>
>
>

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

2012-10-09 Thread William Ferguson
I just received the following crash report

java.lang.NoClassDefFoundError: junit.framework.Assert
at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:658)
at java.lang.Thread.run(Thread.java:1019)

This is for Gingerbread (2.3.6). Frankly I couldn't believe that a test 
class was burnt into and being used by a production class. I wonder whether 
they really meant to use the Java "assert" statement instead and hope it 
has been fixed since. The Junit Assert class shouldn't be used outside of a 
test harness. 

Has anyone else seen anything similar?

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

Re: [android-developers] Re: The package name of your apk is the same as the package name of another developer's application. Choose a new package name.

2012-10-09 Thread Jonas Petersson

On 2012-10-09 21:08, Mark Murphy wrote:

Reputedly, there is some process by which you can get the Play Store
folk to transfer an app between accounts, though I am not seeing a
mention of how to do that in the Play Store docs.
[...]

> On Tue, Oct 9, 2012 at 3:03 PM, John Merlino 
>> wrote:

the play store supposedly transfered the app between the accounts but when I
log into my account it still says "No applications uploaded"


Incidentally, I'm familiar with this procedure and the request to 
transfer the app MUST come from BOTH the involved developers' accounts 
for the Play admins to take action. (Presumably two very similar emails 
with just different sender, submitted around the same time.)


I'd suspect a working day or two for it to actually be moved is normal. 
So far I've only prepared for this, not actually done it.


Best / Jonas

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Buttons in ViewPager pages: Problem swiping/dragging pages when finger starts on top of Button. How can I fix this?

2012-10-09 Thread Streets Of Boston
The targetSdk is 11.
This is our hierarchy:

-ViewPager 
  | 
  +-NoSaveStateFrameLayout
   | 
   +-ProfileGridView
  |
  +-ProfileGridViewRow
  |
  +-FrameLayout
|
+-TextView

Note that ProfileGridView contains one or more ProfileGridViewRows which 
contains one or more clickable TextView  (i.e. our buttons).
The ProfileGridView and ProfileGridViewRow are custom LinearyLayouts: The 
have their own measure and layout-logic. These two subclasses don't have 
any method or logic to capture or handle touch-events.

Thanks!

On Tuesday, October 9, 2012 11:31:03 AM UTC-4, Piren wrote:
>
> ViewPager is part of the support package and inherits from a ViewGroup , 
> it shouldn't matter much which OS version it runs on.
> I have a similar setup and i dont experience this issue (using support 
> package v4, i assume you're using the same since you said you tested on 
> earlier os versions).
> I can even press a button and see it switch to its pressed state and then 
> start a swipe without generating an onClick event.
>
> What is your targetSdkVersion? 
>
> On Tuesday, October 9, 2012 4:27:31 PM UTC+2, Streets Of Boston wrote:
>>
>> Hi Kostya,
>>
>> Thanks for your answer.
>>
>> This bug (?) only happens on Jelly Bean (I don't have ICS devices to test 
>> it on).
>> It works fine on Honeycomb and lower OS versions. 
>>
>> It seems there is indeed a regression of the ViewPager in JB (and 
>> possibly ICS).
>>
>> Thanks.
>>
>> On Tuesday, October 2, 2012 12:47:41 PM UTC-4, Kostya Vasilyev wrote:
>>>
>>> Sounds like a bug in how ViewPager dispatches events (sorry for stating 
>>> the obvious). I'd consider looking at the source and comparing it to 
>>> ScrollView (which handles nested touchable areas just fine).
>>>
>>> -- K
>>>
>>> 2012/10/2 Streets Of Boston 
>>>
 Hi everyone,

 I have a ViewPager that contains pages, each page with a bunch of 
 Buttons (or clickable TextViews). When I set the buttons to 
 'setClickable(false)', swiping the ViewPager to another page works fine 
 all 
 the time.

 However, when the buttons are clickable (OnClick listener is set), the 
 ViewPager won't do anything if the user put his or her finger down on the 
 button when he or she starts a swipe or scroll. If the user swipes, the 
 button 'eats' all the touch-events (MotionEvents).

 Is there a convenient way to make these buttons/textviews clickable and 
 make the ViewPager swipe even if the user puts his finger on a button 
 initially?
 (I'd like to avoid hacks and using GestureDetectors if possible)

 Thanks!

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

 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: Interfacing android device with external device using bluetooth.

2012-10-09 Thread bob
 

You will most likely want to use Bluetooth or Wifi.



On Tuesday, October 9, 2012 2:34:06 PM UTC-5, Sunil Mishra wrote:
>
> I want to interface an external touch screen device (e.g. monitor) with 
> android device. What are the requirements to accomplish this? How should I 
> proceed on the work? Any reference materials?
>
>
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Layout is corrupted with graphics from another layout? Only at runtime, only on a certain device.

2012-10-09 Thread NickL
Good suggestion, but the build works perfectly on all devices but the 2.2 
HTC.  If it occurs and the layout is corrupted, I can make the problem go 
away by rebooting the phone.  Sounds like some sort of memory corruption 
that Android is sensitive to.  
 

On Tuesday, October 9, 2012 11:36:04 AM UTC-4, Piren wrote:

>
> I've had it happen to me a lot of times, but as a packaging error 
> (resources got packages incorrectly into the apk). but the issues were very 
> broad and obvious and manifested on all of my devices. 
>
> Try a clean build of the app and see if it re-appears.
>
>
>
> On Tuesday, October 9, 2012 12:34:51 PM UTC+2, NickL wrote: 
>>
>> I have never seen this before, and have been developing apps for 2 
>> years+.  I wrote a layout, ran it on an old handset (HTC Android 2.2), and 
>> one of the dialogs (android.Theme.Dialog) has graphics in it from a 
>> different layout.  The other layout is not a dialog.  Not that that 
>> probably matters. 
>>  
>> In eclipse, this does not happen. On a tablet (4.0.3) and a Motorola 
>> (2.3) this never occurs (yet).  I thought this might have happened because 
>> I uploaded a debug version over a bad cable, and maybe got a bad copy.  But 
>> then I de-installed it and loaded it from the Google Play market, and it 
>> occurs only some of the time.  I have even tried modifying that layout and 
>> re-installing.  Still occurs infrequently.  Could it be a memory problem?  
>>  
>> Has anyone seen this occur?  How to prevent it?
>>
>

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

[android-developers] Lucky patcher - how to protect

2012-10-09 Thread Gabriel Simões
Hello,

It has been sometime now since this app was first saw in town but I still 
can´t find much about how it bypasses some key java resource protections.
LVL patching has been there for quite sometime and isn´t the problem here 
at all: receiving wrong validation information from dalvik seems to be the 
issue, which no code based on those can help.

While I really don´t expect to find a magic formula to fight this (and keep 
the dogfight between developers and crackers), I´d like to know if anyone 
has found/figured out information on how it works so we can start thinking 
about fighting back strategies.
Any news to be shared?

Thanks,
Gabriel Simões

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 does the new tools: namespace work?How many elements in this namespace,how to use them?

2012-10-09 Thread futurexiong
I noticed that in newer version of ADT(higher than 17) we have a new 
namespace prefix call "tools:" in Layout Editor,but I can't find any 
documentations about this namespace.I want to know  how the new tools: 
namespace works?How many elements in this namespace,how to use them?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] [Android-developers]:need help in creating bluetooth file transfer app. urgent

2012-10-09 Thread akash roy
i am currently on a project and i need to share files from one device to
another with the help of bluetooth. so i thought of changing the codes from
the bluetooth chat demo that is available in android developer's site .
actually i need to simply send a text file . but i am getting some issues
in that code due to which i could not rectify my problem. so if any of you
can send me a sample for sharing files using bluetooth then i think then it
could be a great help to me.

Thankyou

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

[android-developers] Re: [Android-developers]:need help in creating bluetooth file transfer app. urgent

2012-10-09 Thread akash roy
and i m very new on this android developing.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] New to Android App Development need Advice in Designing UI

2012-10-09 Thread Anees Thyrantakath



Like this i designed my list view

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

2012-10-09 Thread Jovish P
Sorry , we are not able to understand you fully. Wht is the difference
between the first approach we explained in the mail and the approach u
suggested .  Up to our knowledge both are same . Wht difference it is going
to make if u inflate every view programmatically instead of using xml ?

On Tue, Oct 9, 2012 at 3:25 PM, Piren  wrote:

> Android doesn't support putting two scrollable views one inside the other
> and i assume you dont want to divide the screen area between the listviews
> and make each take a constant size.
>
> You're best (and probably only) choice is to just do everything manually.
> put a linear layout inside a scrollview and inflate everything in it
> manually. (the two textviews and the two listviews).
> you can actually use the same code you wrote for your listviews to do that
> with some modifications.
> It sounds like a lot of effort, but after doing it a few times i've
> noticed that it isnt. in some instances it even makes stuff easier.
>
>
> On Tuesday, October 9, 2012 9:15:42 AM UTC+2, Jovish P wrote:
>>
>> In one of screen  we want to come up with a desing like this
>>
>> Textview
>> Listview
>> Textview
>> Listview
>>
>> First we thought of putting everything inside a linear layout with
>> vertical orientation and put that layout inside
>> a scroll view. Then we come to know that it is not a good idea. So right
>> now what we are trying to do is
>> add header and footer for listview. Header view will be a text view and
>> footer view will be a layout which conatins
>> a texview and listview. The problem what we are facing now is ,  we are
>> not able to scroll the second listview which is in
>> footerview layout. Is it a good solution ? If not wht is the best way to
>> do this ? Share your thoughts about 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

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Rotation Vector Sensor - anyone using it? (issues w/ Galaxy Tab 10.1)

2012-10-09 Thread Adam Ratana
Hello, I am working on improving an augmented reality app I have, and part 
of that improvement involves making use of the sparsely-documented rotation 
vector sensor, which seems to integrate the magnetometer, accelerometer and 
gyroscope rather well on several of my devices.  This will serve to replace 
the classic magnetometer + accelerometer fusion + filtering that we've had 
to do ourselves previously.  Making use of this seems to be a huge 
improvement, and I'd love to deploy it as soon as I can get the feeling it 
will be safe for most devices.

The problem I am running into is, on my Galaxy Tab 10.1, which just got ICS 
4.0.4, the Rotation Vector Sensor does not seem to be working consistently 
when dealing with screen rotation compensation. North seems to change 
places depending on how the screen is oriented, even after calling 
SensorManager.remapCoordinateSystem(), whereas all is good on the Nexus 7 
and Galaxy Nexus, and several other gingerbread + devices, that is, North 
is consistent, after calling SensorManager.remapCoordinateSystem().

I haven't really seen much when doing google searches for anyone really 
making use of this or running into this sort of thing, so if anyone here 
has any experience, please get in touch.  Or, if you have some of the less 
popular devices which have gingerbread+ and are interested in helping 
evaluate a proof of concept/test APK, let me know.

Adam

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] New to Android App Development need Advice in Designing UI

2012-10-09 Thread Parthi K
put all scroll view .it will come list view

On Wed, Oct 10, 2012 at 10:45 AM, Anees Thyrantakath wrote:

>  android:id="@+id/rLV"
> android:layout_width="match_parent"
> android:layout_height="250dp"
> android:choiceMode="multipleChoice" >
> 
>
> Like this i designed my list view
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: Polling at regular intervals in Android

2012-10-09 Thread Archana
Hi,

Please let me know if the following is okay:
1. Fire alarm for every 5 minutes using Alarm Manager
2. Response- Start a service that polls server
3. After polling, new alarm is set and service shuts down.
Should I also use WakeLock in my code? 
https://github.com/commonsguy/cwac-wakeful

Thank you!


On Tuesday, October 9, 2012 1:04:40 PM UTC+3, skink wrote:
>
>
>
> Archana wrote: 
> > Should I have the alarm manager as a service?(as I want the application 
> to 
> > be executed always)... 
> > 
> > Here is my service: 
> > 
> > public class PollService extends Service 
> > { 
> > private PendingIntent pendingIntent; 
> > private AlarmManager alarmManager; 
> > private Calendar calendar; 
> > @Override 
> > public IBinder onBind(Intent arg0) { 
> > return null; 
> > } 
> > @Override 
> > public boolean onUnbind(Intent intent) { 
> > return super.onUnbind(intent); 
> > } 
> > 
> > @Override 
> > public void onCreate() { 
> > Toast.makeText(getApplicationContext(), "Service Started", 
> > Toast.LENGTH_SHORT).show(); 
> > alarmManager = (AlarmManager) getSystemService(ALARM_SERVICE); 
> > Intent myIntent = new Intent(this, PollService.class); 
> > pendingIntent = PendingIntent.getService(this, 0, myIntent, 0); 
> > calendar = Calendar.getInstance(); 
> > } 
> > @Override 
> > public void onStart(Intent intent, int startId) { 
> > super.onStart(intent, startId); 
> > calendar.setTimeInMillis(System.currentTimeMillis()); 
> > calendar.add(Calendar.MILLISECOND, 30);// Polling for every 5 
> minutes 
> > alarmManager.set(AlarmManager.RTC_WAKEUP, 
> > calendar.getTimeInMillis(),pendingIntent); 
> > } 
> >  @Override 
> > public void onDestroy() { 
> > super.onDestroy(); 
> > alarmManager.cancel(pendingIntent); 
> > } 
> > } 
> > 
> > But where do I define connecting to the server and getting the contents? 
> > 
> > Thank you. 
> > 
>
> use  IntentService as a sa base base class, read its docs and 
> everything will be obvious 
>
> pskink 
>

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

2012-10-09 Thread skink


Archana wrote:
> Hi,
>
> Please let me know if the following is okay:
> 1. Fire alarm for every 5 minutes using Alarm Manager
> 2. Response- Start a service that polls server
> 3. After polling, new alarm is set and service shuts down.
> Should I also use WakeLock in my code?
> https://github.com/commonsguy/cwac-wakeful
>
> Thank you!
>
>
>

yes, use wake locks and replace steps #2 <-> #3

pskink

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