[android-developers] Re: Android "java.util.BitSet" in ICS vs "Ginger Bread"

2012-02-15 Thread Lew
I don't know why you needed to change the constructor, but I'm quite sure 
that 
you shouldn't use an instance method to set values in a static variable.

-- 
Lew

On Wednesday, February 15, 2012 10:27:05 PM UTC-8, Subba wrote:
>
> My application uses Java BitSet API, i never had problem with in 
> Android Ginger Bread and below version. All of sudden Android Ice 
> Cream Sandwich, it giving wrong results. 
>
>code: 
>
>   public class BitTracker 
>   { 
> private static BitSet m_FileIds = new BitSet(65535); 
>
> private void init() 
> { 
>for(int i=0; i<=63; i++) 
> { 
>   m_FileIds.set(i); 
> } 
> } 
>
> public int GetUnUsedId() 
> { 
> int iUnusedId = m_FileIds.nextClearBit(1); 
>
>return iUnusedId; 
>  } 
> } 
>
>BitTracker tracker = new BitTracker(); 
>tracker.init(); 
>int unusedID = tracker.GetUnUsedId(); 
>
> //In ICS unusedID returns "65536" 
>
> //In GingerBread unusedID returns "64" 
>
> I am able to fix the issue by changing this line 
>
>  private static BitSet m_FileIds = new BitSet(65535); //old one 
>
>  private static BitSet m_FileIds = new BitSet(); //new one 
>
> It seems to be working. I still can't understand what's deal with ICS 
> vs. GingerBread.. Is there any Java compatible version difference in 
> android ICS vs. GB or below versions..Curious to know..

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

2012-02-15 Thread Ratheesh Valamchuzhy
add
 android:windowSoftInputMode="stateHidden" to the activity tag in manifest
file

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

[android-developers] Re: OT: Comedy Gold

2012-02-15 Thread Dusk Jockeys Android Apps
I thought exactly the same! My mum used to make a wicked fish pie with
cod. Takes me back..

On Feb 16, 1:32 am, Mark Phillips  wrote:
> +10
> On Feb 15, 2012 10:06 AM, "Ted Scott"  wrote:
>
>
>
> > Please don't take this the wrong way, I'm not complaining, just observing.
> > I have to say that between the ESL and txt speak this list has some really
> > funny moments.
>
> > The mental image I got from "pies of cod" will have me smiling for the
> > rest of the week. I'm wondering if it's some new way of preparing lutefisk.
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to 
> > android-developers@**googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+**unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/**group/android-developers?hl=en-
> > Hide quoted text -
>
> - Show quoted text -

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


Re: [android-developers] Re: Getting access to a UI Context safely from anywhere

2012-02-15 Thread Kristopher Micinski
It seems like what you should really be doing is using a system
notification anyway, you don't want to randomly pop up a dialog box
(actually, you can probably pop up a toast in your case, which you can
do from the application context..), but a system bar notification
probably makes the most sense.

kris

On Thu, Feb 16, 2012 at 1:28 AM, Weston Weems  wrote:
> Treking
>
> Basically this is what I've done... say I have MyAppActivity which has
> stuff that automatically registers itself into application... events
> come in, application gets last accessed and I use that to start
> dialogs etc.
>
> Seemed like there were cases where it was throwing exceptions about
> null window token even though the activity reference itself wasnt
> null. Ie, just simply keeping a reference around doesnt guarentee its
> suitable to spawn dialogs (even if it IS an activity).
>
> I also tried to have in my base callback a context we pass through...
> could be activity or app context and thats fine... and say I want to
> spawn dialog if context is a subclass of Activity... seems like that
> works decent... but seems like that has potential to have problems if
> the activity goes away before the callback returns.
>
> I guess I am frustrated... I like in IOS dev I can just create a
> UIAlert, and show =)
>
> I know that there are things in place on purpose (for fluid user
> experience, but for a lot of the stuff I build, its much lower
> level... rom hacking and such and I do have a legitimate excuse to be
> wanting to do things the way I want)
>
> Weston
>
>
>
> On Feb 15, 4:12 pm, TreKing  wrote:
>> On Wed, Feb 15, 2012 at 5:49 PM, Weston Weems  wrote:
>> >  it doesnt even seem there is a decent way to
>> > test to see if context is
>> > 1) a valid ui context from which I can pop dialogs, show dialog fragments
>> > etc
>>
>> Don't use a base Context, use an Activity, which itself is a Context, but
>> one associated with UI (as opposed to, say, a Service).
>>
>> > 2) know if the reference to the instance of the activity or whatever
>> > actually has ties enough to spawn a dialog etc.
>>
>> That is not very clear.
>>
>> --- 
>> --
>> TreKing  - Chicago
>> transit tracking app for Android-powered devices
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: Getting access to a UI Context safely from anywhere

2012-02-15 Thread Weston Weems
Treking

Basically this is what I've done... say I have MyAppActivity which has
stuff that automatically registers itself into application... events
come in, application gets last accessed and I use that to start
dialogs etc.

Seemed like there were cases where it was throwing exceptions about
null window token even though the activity reference itself wasnt
null. Ie, just simply keeping a reference around doesnt guarentee its
suitable to spawn dialogs (even if it IS an activity).

I also tried to have in my base callback a context we pass through...
could be activity or app context and thats fine... and say I want to
spawn dialog if context is a subclass of Activity... seems like that
works decent... but seems like that has potential to have problems if
the activity goes away before the callback returns.

I guess I am frustrated... I like in IOS dev I can just create a
UIAlert, and show =)

I know that there are things in place on purpose (for fluid user
experience, but for a lot of the stuff I build, its much lower
level... rom hacking and such and I do have a legitimate excuse to be
wanting to do things the way I want)

Weston



On Feb 15, 4:12 pm, TreKing  wrote:
> On Wed, Feb 15, 2012 at 5:49 PM, Weston Weems  wrote:
> >  it doesnt even seem there is a decent way to
> > test to see if context is
> > 1) a valid ui context from which I can pop dialogs, show dialog fragments
> > etc
>
> Don't use a base Context, use an Activity, which itself is a Context, but
> one associated with UI (as opposed to, say, a Service).
>
> > 2) know if the reference to the instance of the activity or whatever
> > actually has ties enough to spawn a dialog etc.
>
> That is not very clear.
>
> --- 
> --
> TreKing  - Chicago
> transit tracking app for Android-powered devices

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


[android-developers] Android "java.util.BitSet" in ICS vs "Ginger Bread"

2012-02-15 Thread Subba
My application uses Java BitSet API, i never had problem with in
Android Ginger Bread and below version. All of sudden Android Ice
Cream Sandwich, it giving wrong results.

   code:

  public class BitTracker
  {
private static BitSet m_FileIds = new BitSet(65535);

private void init()
{
   for(int i=0; i<=63; i++)
{
  m_FileIds.set(i);
}
}

public int GetUnUsedId()
{
int iUnusedId = m_FileIds.nextClearBit(1);

   return iUnusedId;
 }
}

   BitTracker tracker = new BitTracker();
   tracker.init();
   int unusedID = tracker.GetUnUsedId();

//In ICS unusedID returns "65536"

//In GingerBread unusedID returns "64"

I am able to fix the issue by changing this line

 private static BitSet m_FileIds = new BitSet(65535); //old one

 private static BitSet m_FileIds = new BitSet(); //new one

It seems to be working. I still can't understand what's deal with ICS
vs. GingerBread.. Is there any Java compatible version difference in
android ICS vs. GB or below versions..Curious to know..

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

2012-02-15 Thread tushar sahni
Hi


Has anyone worked on push notifications in android


Regards
Tushar Sahni

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

[android-developers] Re: Why canvas.translate() do not work well in ICS???

2012-02-15 Thread Kandy Guan
i need your help really. Android Groups.

2012/2/14 Kandyguan 

> Hi :
> My app is used canvas.translate() to move a panel up and down, it
> work well in other version, but not in ICS?
> It can move up and down ,but when it move down, i touch the other
> area ,but the other area did not get any focus.
> I need you help, and waiting now. 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] keyboard dismissing issue

2012-02-15 Thread vani reddy
HI friends,

i have an edittext below which is the listview. after searching in the
edittext ,when i click on the listview item it switches to next activity
but the keyboard is not dismissed. how to acheive this.

In the getView() method i have given

 convertView.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View v) {


activity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);

Intent intent = new Intent(v.getContext(),
ChannelDetailShowListActivity.class);
Bundle myData = new Bundle();
myData.putSerializable("currentShow", channelShowItem);
myData.putString("class", "guide");
intent.putExtras(myData);

View view1 = EPGGroup.group
.getLocalActivityManager()
.startActivity(
"ChannelDetailShowListActivity",
intent

.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP))
.getDecorView();

// Again, replace the view
EPGGroup.group.replaceView(view1);

}
});

 and

@Override
protected void onPause() {
super.onPause();

this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
}

and


getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
is i have given in the onCreate of the next activity.

But still the keyboard is not dismisssed.
-- 
Regards,
Vani Reddy

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

2012-02-15 Thread vani reddy
This listview is in the activiyt group of tabactivity.

On Wed, Feb 15, 2012 at 6:41 PM, vani reddy wrote:

>
> public View getView(final int position, View convertView, ViewGroup
>> parent) {
>> try {
>> final Show channelShowItem = (Show)
>> myCurrentShowsList.getData()
>> .get(position);
>>
>> convertView = inflater.inflate(R.layout.channel_item, null);
>> ViewHolder holder = new ViewHolder();
>>
>> holder.logoLayout = (LinearLayout) convertView
>> .findViewById(R.id.logoLayout);
>> if (channelShowItem.getCountry().equals("IN_airtel")) {
>> holder.logoLayout.setBackgroundDrawable(null);
>> }
>> holder.channelLogo = (ImageView) convertView
>> .findViewById(R.id.channelLogo);
>> holder.discussionCount = (TextView) convertView
>> .findViewById(R.id.discussionCount);
>> holder.ActivityInfo = (TextView) convertView
>> .findViewById(R.id.ActivityInfo);
>> holder.showName = (TextView) convertView
>> .findViewById(R.id.showName);
>> holder.channelname = (TextView) convertView
>> .findViewById(R.id.channelname);
>>
>> holder.showName.setTypeface(fontObj);
>> holder.channelname.setTypeface(fontObj_myraid);
>> holder.showTiming = (TextView) convertView
>> .findViewById(R.id.showTiming);
>> holder.viewCount = (TextView) convertView
>> .findViewById(R.id.ChannelViewCount);
>>
>> holder.discussionCount.setText(String.valueOf(channelShowItem
>> .getComment_count()));
>>
>> if (channelShowItem.getFbids_watching() != null) {
>> System.out.println("INSIDE IF ***");
>> try {
>> String textToDisplay =
>> UserAPIHandler.getFriendsWatching(
>> channelShowItem.getFbids_watching(), fList);
>> holder.ActivityInfo.setText(textToDisplay);
>> System.out.println("LSITING
>> "+channelShowItem.getListing_name());
>> System.out.println("channelname
>> "+channelShowItem.getCh_name());
>> System.out.println("COUNT
>> "+channelShowItem.getFbids_watching().size());
>> holder.viewCount.setText(""
>> + channelShowItem.getFbids_watching().size());
>> } catch (Exception e) {
>> e.printStackTrace();
>> }
>> } else {
>> System.out.println("INSIDE ESLE*#**");
>> System.out.println("LSITING
>> "+channelShowItem.getListing_name());
>> System.out.println("channelname
>> "+channelShowItem.getCh_name());
>> System.out.println("COUNT 0");
>> holder.viewCount.setText("0");
>> holder.ActivityInfo.setText("");
>> }
>>
>> String temp = channelShowItem.getIcon();
>> Utility.setImageFromAssets(activity, temp,
>> holder.channelLogo);
>>
>> holder.showName.setText(channelShowItem.getListing_name());
>> holder.channelname.setText(channelShowItem.getCh_name());
>>
>> long startMilliSeconds =
>> Long.parseLong(channelShowItem.getStart()
>> .getSec()) * 1000;
>> long endMilliSeconds =
>> Long.parseLong(channelShowItem.getStop()
>> .getSec()) * 1000;
>> Date startDate = new Date(startMilliSeconds);
>> Date endDate = new Date(endMilliSeconds);
>>
>> if (channelShowItem.getCountry().equals("IN_airtel")) {
>>
>> startDate.setHours(startDate.getHours() - 5);
>> startDate.setMinutes(startDate.getMinutes() - 30);
>> endDate.setHours(endDate.getHours() - 5);
>> endDate.setMinutes(endDate.getMinutes() - 30);
>> }
>> SimpleDateFormat endFormatter = new SimpleDateFormat("HH:mm");
>>
>> String startDisplay = endFormatter.format(startDate);
>> String endDisplay = endFormatter.format(endDate);
>>
>> String showTimings = startDisplay + " - " + endDisplay;
>>
>> holder.showTiming.setText(showTimings);
>>
>> convertView.setTag(holder);
>>
>> convertView.setOnClickListener(new OnClickListener() {
>>
>> @Override
>> public void onClick(View v) {
>>
>>
>> activity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_HIDDEN);
>>
>> Intent intent = new Intent(v.getContext(),
>> ChannelDetailShowListActivity.class);
>> Bundle myData = new Bundle();
>

[android-developers] Re: How to interconnect two Android emulators

2012-02-15 Thread moktarul anam
1. adb connect 
2. adb devices list of devices

3. adb install- s   < *.apk  location>

Enjoy
Moktarul


On Feb 15, 10:31 pm, Robokop  wrote:
> I have a question for you because I am new in Android programming I am
> not quite sure how to interconnect two emulator instances.I found link
> where it's explained but it's not very comprehensible to me 
> (http://developer.android.com/guide/developing/devices/emulator.html#c...
> ). I don't understand how to Set up the server on B and how the set up
> client connection to 10.0.2.2. Could someone please help me and
> explain how to do that?

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

2012-02-15 Thread nvlakshmi vakiti
Thanks TreKing.

Regards
Lakshmi.V



On Thu, Feb 16, 2012 at 12:25 AM, TreKing  wrote:

> On Wed, Feb 15, 2012 at 3:39 AM, nvlakshmi vakiti <
> lakshmi.vad...@gmail.com> wrote:
>
>> Warning: Active APKs support fewer devices than previously active APKs.
>> Some users will not receive updates.
>>
>
> The APK you set as active has new features / permissions that prevent it
> from running on some devices that you previously supported. As such, those
> devices that are no longer supported due to your update will not receive
> the update, since they don't support it.
>
>
>> Error: APK version 2 supports all the same devices as other APKs with
>> higher versions. It would not be served. Please deactivate an APK.
>>
>
> You've activated more than one APK, including an older version that is no
> longer necessary since there is a newer version that supports all of the
> same devices. You can only have one version active at a given time.
>
> Also, the Android Market has its own support forum:
>
> https://groups.google.com/a/googleproductforums.com/forum/#!forum/android-market
>
>
> -
> TreKing  - Chicago
> transit tracking app for Android-powered devices
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-

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

[android-developers] Re: Question on Old Version of ADT

2012-02-15 Thread QD
Thank you very much.  Where can I find the ADT version for Android
2.2?

QD


On Feb 14, 10:50 pm, nvlakshmi vakiti 
wrote:
> Hi,
>
> http://wing-linux.sourceforge.net/sdk/adt_download.html
>
> Older versions of the ADT at the following URLs.
>
> http://dl.google.com/android/ADT-0.9.5.zip
>
> http://dl.google.com/android/ADT-0.9.6.zip
>
> http://dl.google.com/android/ADT-0.9.7.zip
>
> http://dl.google.com/android/ADT-0.9.8.zip
>
> http://dl.google.com/android/ADT-0.9.9.zip
>
> http://dl.google.com/android/ADT-8.0.0.zip
>
> http://dl.google.com/android/ADT-8.0.1.zip
>
> You can use these in Eclipse by first downloading the desired ADT zip to
> your local drive, then choosing "Install New Software", "Add Site",
> "Archive".
> Thanks & Regards
> Lakshmi.V
>
>
>
>
>
>
>
> On Wed, Feb 15, 2012 at 7:23 AM, Qin Ding  wrote:
> > My company still uses the old version of Eclipse (3.4 and 3.5).  When I
> > tried to install ADT within Eclipse, it shows the latest ADT, which,
> > unfortunately, does not work with the older Eclipse.  I seemed unable to
> > find the old version of ADT to install.  Question: where does Google store
> > its old version of ADT to install?
>
> > Thank you.
>
> > QD
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, 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: receive sms application. need help.

2012-02-15 Thread jitesh adnani
added the permission, still no luck.

this is my logcat:

02-16 09:11:11.367: D/AndroidRuntime(8446): Shutting down VM
02-16 09:11:11.367: W/dalvikvm(8446): threadid=1: thread exiting with
uncaught exception (group=0x40a251f8)
02-16 09:11:11.371: E/AndroidRuntime(8446): FATAL EXCEPTION: main
02-16 09:11:11.371: E/AndroidRuntime(8446):
java.lang.RuntimeException: Unable to instantiate activity
ComponentInfo{com.android.project.smsapp/
com.android.project.smsapp.Receiver}: java.lang.ClassCastException:
com.android.project.smsapp.Receiver cannot be cast to
android.app.Activity
02-16 09:11:11.371: E/AndroidRuntime(8446): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
1880)
02-16 09:11:11.371: E/AndroidRuntime(8446): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
1981)
02-16 09:11:11.371: E/AndroidRuntime(8446): at
android.app.ActivityThread.access$600(ActivityThread.java:123)
02-16 09:11:11.371: E/AndroidRuntime(8446): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
02-16 09:11:11.371: E/AndroidRuntime(8446): at
android.os.Handler.dispatchMessage(Handler.java:99)
02-16 09:11:11.371: E/AndroidRuntime(8446): at
android.os.Looper.loop(Looper.java:137)
02-16 09:11:11.371: E/AndroidRuntime(8446): at
android.app.ActivityThread.main(ActivityThread.java:4424)
02-16 09:11:11.371: E/AndroidRuntime(8446): at
java.lang.reflect.Method.invokeNative(Native Method)
02-16 09:11:11.371: E/AndroidRuntime(8446): at
java.lang.reflect.Method.invoke(Method.java:511)
02-16 09:11:11.371: E/AndroidRuntime(8446): at
com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:784)
02-16 09:11:11.371: E/AndroidRuntime(8446): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
02-16 09:11:11.371: E/AndroidRuntime(8446): at
dalvik.system.NativeStart.main(Native Method)
02-16 09:11:11.371: E/AndroidRuntime(8446): Caused by:
java.lang.ClassCastException: com.android.project.smsapp.Receiver
cannot be cast to android.app.Activity
02-16 09:11:11.371: E/AndroidRuntime(8446): at
android.app.Instrumentation.newActivity(Instrumentation.java:1023)
02-16 09:11:11.371: E/AndroidRuntime(8446): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
1871)
02-16 09:11:11.371: E/AndroidRuntime(8446): ... 11 more

* Caused by: java.lang.ClassCastException:
com.android.project.smsapp.Receiver cannot be cast to
android.app.Activity

what to do

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

2012-02-15 Thread john
Does android suuport PC/SC ?

l want to get some information from sim card, on windows can use
winscard.dll, but on android l can't find any usrful function.
do l need read  MF/DF files with file read functions? even so, l still
don't know the path simcar mounted to android system.

l am sure android lower layer has implemented the function, on high
layer we can use telephonyManager to get IMSI,MDN,IMEI.etc.

Can anyone specified how to do if l want to communicate with Sim card.


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: google maps and gps

2012-02-15 Thread lbendlin
http://code.google.com/android/add-ons/google-apis/maps-overview.html
http://stackoverflow.com/questions/2023669/j2me-android-blackberry-driving-directions-route-between-two-locations/2023685#2023685

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

2012-02-15 Thread TreKing
On Wed, Feb 15, 2012 at 6:49 PM, Mark McDonald wrote:

> Can I please get help with the proper code needed in Eclipse to create
> a button/widget that will be visible for an Android Phone Application?
>

What specific help do you need that you can't get from the documentation
and samples?

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] Is this the proper way to spawn a worker thread?

2012-02-15 Thread TreKing
On Wed, Feb 15, 2012 at 6:43 PM, Ab Caballero  wrote:

> I am attempting to spawn a worker thread in a service to do the service's
> work.
>

http://developer.android.com/reference/android/app/IntentService.html

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Re: Enabling both normal wifi and wifi hotspot to get RSSI values of wi-fi hotspots

2012-02-15 Thread lbendlin
AFAIK only one mode is possible at a time. I think Wireless Hotspot is just 
a glorified version of Ad Hoc.

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

2012-02-15 Thread lbendlin
http://developer.android.com/reference/android/widget/ListAdapter.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] How change ViewPager animation's duration when setCurrentItem is called?

2012-02-15 Thread Bruno Bruggemann
Hi, I've a handler that before some seconds changes my views in the
ViewPager. It works perfectly, the only thing that I want to do is
change the speed of the slide animation when the setCurrentItem is
called with the parameter smoothScroll true. It's too fast and in some
devices it looks a little jerky.

Any suggestion?

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] Eclipse Code

2012-02-15 Thread Mark McDonald
Can I please get help with the proper code needed in Eclipse to create
a button/widget that will be visible for an Android Phone Application?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] GoogleOAuthGetTemporaryToken - fails on HoneyComb, same code works with 2.1 api

2012-02-15 Thread NickL
The exact same code below results HTTP 400 (Bad request) on Honeycomb,
but works great on 2.2.  Any idea why?

GoogleOAuthGetTemporaryToken temporaryToken = new
GoogleOAuthGetTemporaryToken();
temporaryToken.signer = createOAuthSigner();
temporaryToken.consumerKey = "anonymous";
temporaryToken.scope = "https://docs.google.com/feeds/";;
temporaryToken.displayName = "My App Name";
temporaryToken.callback = "gdocs-upload:///";
isTemporary = true;
credentials = temporaryToken.execute();
GoogleOAuthAuthorizeTemporaryTokenUrl authorizeUrl =
new GoogleOAuthAuthorizeTemporaryTokenUrl();
authorizeUrl.temporaryToken = credentials.token;

  private static OAuthHmacSigner createOAuthSigner() {
OAuthHmacSigner result = new OAuthHmacSigner();
if (credentials != null) {
  result.tokenSharedSecret = credentials.tokenSecret;
}
result.clientSharedSecret = "anonymous";
return result;
  }

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Is this the proper way to spawn a worker thread?

2012-02-15 Thread Ab Caballero
I am attempting to spawn a worker thread in a service to do the
service's work. But when i run the debugger, the system does not
appear to create the worker thread. however, the application is
listening for updates


private void startMainService() {
startThread();
}

private volatile Thread runner;
public synchronized  void startThread(){
if(runner == null){
runner = new Thread();
runner.start();
lm = (LocationManager) 
getSystemService(Context.LOCATION_SERVICE);
locationListener = new MyLocationListener();
lm.requestLocationUpdates(LocationManager.GPS_PROVIDER,
minTimeMillis,
minDistanceMeters,
locationListener);
initDatabase();
Log.i(TAG, "Worker thread spawned");
}
}

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

2012-02-15 Thread TreKing
On Wed, Feb 15, 2012 at 5:49 PM, Weston Weems  wrote:

>  it doesnt even seem there is a decent way to
> test to see if context is
> 1) a valid ui context from which I can pop dialogs, show dialog fragments
> etc
>

Don't use a base Context, use an Activity, which itself is a Context, but
one associated with UI (as opposed to, say, a Service).


> 2) know if the reference to the instance of the activity or whatever
> actually has ties enough to spawn a dialog etc.
>

That is not very clear.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

[android-developers] The web page contains error message in Android 3.0

2012-02-15 Thread ramya
I am using android 3.0 and phonegap for my development,when ever I
pass the url with query string(parameters) ,I get error message
"Application error-The webPage contains error".I tried to bypass it
using local storage ;
But for search form,I need to retrieve the search inout from the
user .I am not able use GET method as query string is appended to
url.Any suggestions how to workaround 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] Getting access to a UI Context safely from anywhere

2012-02-15 Thread Weston Weems
Ok,

I've encountered several cases where I'd like to instantiate classes
that exist as a child of my application subclass, events fire say like
a communications error, and we'd like to be able to popup a sort of
general communication error anywhere in my app.

Another example is say where applicable have a progress dialog for
network transport items etc... I'd *LIKE* to be able to just get a
reference to the context, in before start, popup dialog, after finish
hide dialog.

The way I have things setup, we have a base callback for network
transport that has started, finished, error etc. Currently we create
an anonymous subclass and fire off the request. This works great, but
requires us to write implementation handling each and every sort of
error etc. (I'd like to have it handled in base class).

My callback does have a context constructor parameter, but every
context doesnt appear to be a UI Context (from which i can pop a
dialog etc), nor does it guarantee that when we try to go to pop it
up, we dont get a window token error.

For a while I was trying to have each activity onresume set a
"CurrentUIContext" in application, but this seems to be somewhat
problematic because it can potentially lead to leaking an activity,
and because if not maintained properly, context may be set, but trying
to pop a dialog with it ends up wit the window token error.


I dont want to try and pop anything from background if my app isnt
visible or anything, but it doesnt even seem there is a decent way to
test to see if context is
1) a valid ui context from which I can pop dialogs, show dialog
fragments etc
2) know if the reference to the instance of the activity or whatever
actually has ties enough to spawn a dialog etc.


I can see a very small excuse for this strange functionality, people
trying to do malicious stuff, or causing unexpected ui behaviour, but
other than some very specific cases, my network communications will
always be the result of a button click.

Any advice here would be greatly appreciated!

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


[android-developers] How to interconnect two Android emulators

2012-02-15 Thread Robokop
I have a question for you because I am new in Android programming I am
not quite sure how to interconnect two emulator instances.I found link
where it's explained but it's not very comprehensible to me (
http://developer.android.com/guide/developing/devices/emulator.html#connecting
). I don't understand how to Set up the server on B and how the set up
client connection to 10.0.2.2. Could someone please help me and
explain how to do that?

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

2012-02-15 Thread dan droid
Hi Eric,

you can use *JUnit4Android* (an *Android library* project) to build Android 
test runner applications for your *JUnit4 *tests and test suites.

https://github.com/dthommes/JUnit4Android/wiki

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

2012-02-15 Thread Edward Cerullo
Hello,

I am using the Eclipse editor, for Android SDK API level 15, and I
have loaded in the Sony Ericsson add-on from:

http://developer.sonyericsson.com/edk/android/repository.xml

According to the Eclipse log, the edk is found:

Fetching URL: http://developer.sonyericsson.com/edk/android/repository.xml
Validate XML: http://developer.sonyericsson.com/edk/android/repository.xml
Parse XML:http://developer.sonyericsson.com/edk/android/repository.xml
  Found EDK 1.2 by Sony Ericsson Mobile Communications AB, Android API
10, revision 1
Done loading packages.

However, when I try to create an AVD using the Android Virtual Device
Manager, the Sony Ericsson device is not found in the list of
available targets.

Please note that in this most recent Android SDK level 15, the SDK
Manager and AVD Manager are separate applications, thus making the
documentation and instructions showing them as one single application
here:

http://developer.sonyericsson.com/wportal/devworld/technology/android/edk/overview?cc=gb&lc=en

a bit obsolete.

I also posted this question in the support site, because that's what
the people at the User Support online chat told me to do.  They also
gave me this address:

dev-supp...@sonyericsson.com

Which does not work.  Although they told me that the problem with the
address "could just be temporary" and I should try again.  Hmmm.

I also tried johan.abr...@sonyericsson.com which I found in this
forum.  And that was an invalid address too.

Can someone please help me?

Thank you.

Edward

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Is Single Wire Protocol possible by default on Galaxy Nexus phone and OS4 now?

2012-02-15 Thread Paul
Hello I am finding the NFC SWP position a bit confusing with Android;

On an NFC Galaxy Nexus phone with OS4 - and inserting a UICC chip with
some data on it ...
will I be able to read this from another phone or device making use of
the Single Wire Protocol?

(This scenario works between 2 BlackBerrys and in theory should be the
same if I just put that UICC in the Galaxy Nexus?)

(PS I don't want to have a hacked version of Android to achieve this!)

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] Triumph or Exhibit II for testing?

2012-02-15 Thread Marcus
Hi guys,

I'm totally new to Android and need a device for testing purposes
(mostly games). I think I have narrowed it down to Motorola TRIUMPH or
Samsung Exhibit II 4G, but can't decide between them. Motorola should
be faster, but doesn't come with 2.3 (not sure if that's important or
not).

Could someone please help me to choose between those two (or maybe
something else - should be prepaid and up to $250 as I'm not going to
use the device for anything else but testing)?

Thank you all.

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

2012-02-15 Thread nilash
How to embed drawables such as icon, layout etc to an sdk.

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

2012-02-15 Thread Jags
ok, i replaced authentication code in authentication string in
simpleclientactivity. did i do it right ? but still i get registration
id as n/a !




regds
jags

On Feb 1, 9:34 am, TreKing  wrote:
> On Tue, Jan 31, 2012 at 4:48 AM, Jags  wrote:
> > is there any beginner tutorial for c2dm ?
>
> http://tinyurl.com/7egymyf
>
> --- 
> --
> TreKing  - Chicago
> transit tracking app for Android-powered devices

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


[android-developers] google maps and gps

2012-02-15 Thread enes
I am new android dev. I want to use googel maps api in my android
project. I want to use my api as  navigation and I give destination
cordinate , it draw route. do you offer some article about it. 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] Is NFC card emulation possible on Galaxy Nexus and OS 4?

2012-02-15 Thread Paul
I know last year Google where not allowing NFC emulation mode with OS
2.3.

But is NFC card emulation possible on Galaxy Nexus and OS 4?

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] create table of ranking

2012-02-15 Thread zarrouk.ani...@yahoo.fr
I am creating an android application of football in which you can find
information, the live matches and rankings championships .. but I'm
stuck in the ranking. my teacher told me you can do Standings using
jsoup, in fact I used jsoup and I posted values ​​from a website but I
have not figured out how to put these values ​​into a table .. please
help me if you like

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

2012-02-15 Thread zarrouk.ani...@yahoo.fr
je suis entrain de créer une application android du football dans la
quelle on peut trouver les infos ,le direct des matches et les
classement des championnats..mais je suis bloqué dans la partie du
classement .mon prof m'a dit tu peut  faire le classment en utilisant
jsoup, en fait j'ai utilisé jsoup et j'ai affiché des valeurs à partir
d'un site web mais j'ai pas compris comment mettre ces valeurs en un
tableau..aidez moi s'ils vous plait

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

2012-02-15 Thread $CVD$
Hi,
I'm fresher to android. In my project I have to parse data from the server
and to create database from the parsed data. and then i have to fetch the
data from the database and to populate the spinner. I'm in a critical
situation to complete this task. Kindly pls help me in step by step
procedure in creating the database from the feed and populating the spinner
from that database. pls pls pls...
-thanks in advance...-
$C V D$

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

2012-02-15 Thread Jags
02-15 23:34:04.119: W/C2DM(599): start registration process




02-15 23:34:04.129: W/ActivityManager(74): Unable to start service
Intent { act=com.google.android.c2dm.intent.REGISTER (has extras) }:
not found




02-15 23:34:18.431: D/SntpClient(74): request time failed:
java.net.SocketException: Address family not supported by protocol








i see this as log when run on simulator

i see no logs when run on device !

jags
On Feb 1, 9:34 am, TreKing  wrote:
> On Tue, Jan 31, 2012 at 4:48 AM, Jags  wrote:
> > is there any beginner tutorial for c2dm ?
>
> http://tinyurl.com/7egymyf
>
> --- 
> --
> TreKing  - Chicago
> transit tracking app for Android-powered devices

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


[android-developers] Re: Android RSS Library

2012-02-15 Thread Daryl Gent
Will you be adding Serialisation into the project?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] i m trying to get the value of a multi choice listview but when when i click on checkbobx it gves me value like android.database.sqllite SQLlietCursor@43e48998 instead of actual s

2012-02-15 Thread Shoaib Ahmed
/here is my code///


package my.com;

import my.com.R;
import my.com.SpinnerDBHelper;

import android.app.Activity;
import android.app.LauncherActivity.ListItem;
import android.app.ListActivity;
import android.content.Context;
import android.database.Cursor;
import android.os.Bundle;
import android.text.Layout;
import android.util.Log;
import android.util.SparseBooleanArray;
import android.view.View;
import android.widget.Adapter;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.Checkable;
import android.widget.CursorAdapter;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.SimpleCursorAdapter;
import android.widget.Toast;




public class MyListActivity  extends Activity  {
private String my_sel_items;
ListView lView;
String[] from;

/** Called when the activity is first created. */
private SpinnerDBHelper thisTestDBAdapter;
SimpleCursorAdapter adapter;

public void onCreate(Bundle icicle) {
super.onCreate(icicle);
//  setContentView(R.layout.main);
setContentView(R.layout.main);
my_sel_items=new String();

 lView = (ListView) findViewById(R.id.listView1);




thisTestDBAdapter = new SpinnerDBHelper(this);






//  View mlayout= findViewById(R.id.laidout);
// set the color


Button submit = (Button) findViewById(R.id.button);
 submit.setOnClickListener(new View.OnClickListener() {
 public void onClick(View v) {
 final SparseBooleanArray checkedItems =
lView.getCheckedItemPositions();
if (checkedItems == null) {
int duration = Toast.LENGTH_SHORT;
Context context = getApplicationContext();
 Toast toast = Toast.makeText(context, "no items
selected", duration);
 toast.show();
return;
}

final int checkedItemsCount = checkedItems.size();
for (int i = 0; i < checkedItemsCount; ++i) {
// This tells us the item position we are looking at
final int position = checkedItems.keyAt(i);

// And this tells us the item status at the above
position
final boolean isChecked = checkedItems.valueAt(i);

// And we can get our data from the adapter like that
 Object currentItem =adapter.getItem(position);


 Context context = getApplicationContext();
 //CharSequence text = "Hello toast!";
 int duration = Toast.LENGTH_SHORT;

 Toast toast =
Toast.makeText(context,currentItem.toString() , duration);
 toast.show();
}

 }
 });


 lView.setOnItemClickListener(
new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView 
parent,
View view2, int pos, long id) {

//  String valor2 =
parent.getItemAtPosition(pos).toString();
//
Toast.makeText(getBaseContext(),valor2,Toast.LENGTH_SHORT).show();
//Log.v("valor2:", valor2);
   // recProdSpinner();

final SparseBooleanArray checkedItems =
lView.getCheckedItemPositions();

final int checkedItemsCount = 
checkedItems.size();
for (int i = 0; i < 
checkedItemsCount; ++i) {
// This tells us the item 
position we are looking at
final int position = 
checkedItems.keyAt(i);

// And this tells us the item 
status at the above
position
final boolean isChecked = 
checkedItems.valueAt(i);

// And we can get our data from 
the adapter like
that
 final Object currentItem
=adapter.getItem(position);
// final Object c=adapter.

 Context context = 
getApplicationContext();
 //CharSequence text = "Hello 
toast!";
 int duration = 
Toast.LENGTH_SHORT;

 Toast toast =
Toast.makeText(co

[android-developers] Building for 2.2, Styling for 4.0

2012-02-15 Thread Andrew
Hey folks,

I'm planning on writing an app and building against 2.2 Froyo (API
Level 8). However, I want app users of 4.0 ICS to experience the app
with the ICS user interface.

Currently my approach is to have the default activity of my app sense
the version of the Android device.

If it is less than 4.0, use XML views written for Gingerbread and
Froyo and, if it's 4.0 or higher to use ICS XML views. This however
seems a bit haphazard and I'm not sure I can manage the separation of
version views effectively.

What approaches, tools, and ideas can I use to help me make my app? Is
it even something I need to consider? Is my idea of the view
separation above correct?

Cheers!

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

2012-02-15 Thread satahippy
thnx! it's works. But i use addViewInLayout

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

2012-02-15 Thread Harri Smått
On Feb 16, 2012, at 12:03 AM, satahippy wrote:
> ok. not serialization, caching. i'm add about 80 views, which have a complex 
> structure (images and textview on other fonts)

I think I had somewhat similar situation and the delay in my case, as far as I 
know, was caused by unnecessary layouts while I was still changing the 
ViewGroup contents. What I did was hide this ViewGroup until I had made all the 
changes in a hope it would cause only one final layout you can't get away with. 
There might be better solutions to this kind of a problematics though I'm not 
aware of.

--
H

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


Re: [android-developers] List of alarms

2012-02-15 Thread Kristopher Micinski
Those two aren't mutually exclusive.  You use databases to store
information, you use content providers to access information through
an abstract interface.

kris

On Wed, Feb 15, 2012 at 4:58 PM, Pawel  wrote:
> Hi,
>
> I want to make an alarm clock application. I want to have the list of
> few alarms. Should I make it with sql database or rather
> contentprovider?
>
>
> Pawel
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Serialization View

2012-02-15 Thread satahippy
ok. not serialization, caching. i'm add about 80 views, which have a complex 
structure (images and textview on other fonts)

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

2012-02-15 Thread alh
On Feb 15, 8:24 pm, Kostya Vasilyev  wrote:
> I took a break for over 10 minutes, leaving logcat running, and...
> sorry, it just doesn't.

Very interesting :)
Thanks for trying it

Cheers,
Olof

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

2012-02-15 Thread Pawel
Hi,

I want to make an alarm clock application. I want to have the list of
few alarms. Should I make it with sql database or rather
contentprovider?


Pawel

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

2012-02-15 Thread Harri Smått
On Feb 15, 2012, at 11:38 PM, satahippy wrote:
> i just add many views into one, and it's take a lot of time

How many views (approximately) we are talking about if it takes up to 6 seconds 
to do a layout?

--
H

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


Re: [android-developers] Serialization View

2012-02-15 Thread Kristopher Micinski
What does that have to do at all with serialization?

kris

On Wed, Feb 15, 2012 at 4:38 PM, satahippy  wrote:
> i just add many views into one, and it's take a lot of time
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

2012-02-15 Thread satahippy
i just add many views into one, and it's take a lot of time

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

[android-developers] Re: What is wrong with Android Adapters?

2012-02-15 Thread gropapa
because using the addHeaderView() forces the use of another type of
adapter...stupid things in android



On 15 fév, 12:35, Olof Hedman  wrote:
> I did not. I have no need for headers in my lists.
> Why do you ask?
>
> Cheers,
> Olof
>
> On Feb 14, 12:38 pm, gropapa  wrote:
>
>
>
>
>
>
>
> > did you use addHeaderView() in your code?
>
> > On 14 fév, 10:22, jamesc  wrote:
>
> > > Also, are you calling notifyDatasetChanged() frequently?
>
> > > On Feb 14, 9:10 am, jamesc  wrote:
>
> > > > Hello
>
> > > > Are you using the ViewHolder pattern to recycle Views?
>
> > > > On Feb 13, 9:48 am, Olof Hedman  wrote:
>
> > > > > I have implemented a couple of different adapters in my application.
>
> > > > > No matter which base class I use, I get very weird behavior in how the
> > > > > list calls it to create and bind its views.
>
> > > > > I've tested this on 2.3.3, 2.3.6 and Kindle.
>
> > > > > This log is from an implementation of BaseAdapter, I put a debug-print
> > > > > in "getView".
> > > > > If convertView is null I inflate the view and print "created view".
> > > > > For every call to getView I print "binding View" when I set its
> > > > > values.
> > > > > The code on the end is an id string for the data I bind to the views.
>
> > > > > Everything display just as it should, but I get lots of unneccessary
> > > > > binds!
>
> > > > > This is what I get when I set the adapter to the listview:
>
> > > > > D/SLPA    ( 4097): created View - android.widget.LinearLayout@405bf190
> > > > > D/SLPA    ( 4097): binding View - android.widget.LinearLayout@405bf190
> > > > > position: 0 - to: A5D7W5U9.02
> > > > > D/SLPA    ( 4097): binding View - android.widget.LinearLayout@405bf190
> > > > > position: 1 - to: ASQK89Q8.58
> > > > > D/SLPA    ( 4097): binding View - android.widget.LinearLayout@405bf190
> > > > > position: 2 - to: ASQK89Q8.37
> > > > > D/SLPA    ( 4097): binding View - android.widget.LinearLayout@405bf190
> > > > > position: 3 - to: AEURWHRA.02
> > > > > D/SLPA    ( 4097): binding View - android.widget.LinearLayout@405bf190
> > > > > position: 4 - to: ASQK89Q8.44
> > > > > D/SLPA    ( 4097): binding View - android.widget.LinearLayout@405bf190
> > > > > position: 5 - to: ASQK89Q8.51
> > > > > D/SLPA    ( 4097): binding View - android.widget.LinearLayout@405bf190
> > > > > position: 6 - to: ASQK89Q8.10
> > > > > D/SLPA    ( 4097): binding View - android.widget.LinearLayout@405bf190
> > > > > position: 7 - to: AWQHVP6A.11
> > > > > D/SLPA    ( 4097): binding View - android.widget.LinearLayout@405bf190
> > > > > position: 0 - to: A5D7W5U9.02
> > > > > D/SLPA    ( 4097): binding View - android.widget.LinearLayout@405bf190
> > > > > position: 1 - to: ASQK89Q8.58
> > > > > D/SLPA    ( 4097): binding View - android.widget.LinearLayout@405bf190
> > > > > position: 2 - to: ASQK89Q8.37
> > > > > D/SLPA    ( 4097): binding View - android.widget.LinearLayout@405bf190
> > > > > position: 3 - to: AEURWHRA.02
> > > > > D/SLPA    ( 4097): binding View - android.widget.LinearLayout@405bf190
> > > > > position: 4 - to: ASQK89Q8.44
> > > > > D/SLPA    ( 4097): binding View - android.widget.LinearLayout@405bf190
> > > > > position: 5 - to: ASQK89Q8.51
> > > > > D/SLPA    ( 4097): binding View - android.widget.LinearLayout@405bf190
> > > > > position: 6 - to: ASQK89Q8.10
> > > > > D/SLPA    ( 4097): binding View - android.widget.LinearLayout@405bf190
> > > > > position: 7 - to: AWQHVP6A.11
> > > > > D/SLPA    ( 4097): binding View - android.widget.LinearLayout@405bf190
> > > > > position: 0 - to: A5D7W5U9.02
> > > > > D/SLPA    ( 4097): created View - android.widget.LinearLayout@405ab368
> > > > > D/SLPA    ( 4097): binding View - android.widget.LinearLayout@405ab368
> > > > > position: 1 - to: ASQK89Q8.58
> > > > > D/SLPA    ( 4097): created View - android.widget.LinearLayout@405a85f8
> > > > > D/SLPA    ( 4097): binding View - android.widget.LinearLayout@405a85f8
> > > > > position: 2 - to: ASQK89Q8.37
> > > > > D/SLPA    ( 4097): created View - android.widget.LinearLayout@40548088
> > > > > D/SLPA    ( 4097): binding View - android.widget.LinearLayout@40548088
> > > > > position: 3 - to: AEURWHRA.02
> > > > > D/SLPA    ( 4097): created View - android.widget.LinearLayout@405743e0
> > > > > D/SLPA    ( 4097): binding View - android.widget.LinearLayout@405743e0
> > > > > position: 4 - to: ASQK89Q8.44
> > > > > D/SLPA    ( 4097): created View - android.widget.LinearLayout@405877c0
> > > > > D/SLPA    ( 4097): binding View - android.widget.LinearLayout@405877c0
> > > > > position: 5 - to: ASQK89Q8.51
>
> > > > > Its not weird that users complain of sluggish UI if these things are
> > > > > going on!
>
> > > > > When the device goes into sleep, I get this:
>
> > > > > D/SLPA    ( 4097): created View - android.widget.LinearLayout@40555a00
> > > > > D/SLPA    ( 4097): binding View - android.widget.LinearLayout@40555a00
> > > > > position: 0 - to: A5D7W5U9.02
> > > > > D/SLPA    ( 4097): binding View - android.widget.LinearLayout@4

[android-developers] Re: Regarding copy right

2012-02-15 Thread John Coryat
Perhaps fork code?

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

Re: [android-developers] Serialization View

2012-02-15 Thread Kristopher Micinski
You seem to be quite misinformed about how views are constructed.
Your code is likely slow because you're doing something very strange,
and serialization has nothing to do with this..

kris

On Wed, Feb 15, 2012 at 3:27 PM, satahippy  wrote:
> a smaller number of elements in the xml - it's 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

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


Re: [android-developers] Handling a Checkbox Click Event

2012-02-15 Thread TreKing
On Wed, Feb 15, 2012 at 2:32 PM, davemeetsworld  wrote:

> This happens before the checkbox appears "ticked" i wondered if there
> was a way to delay the onclick event from firing until after the
> animation had...animated?
>

Use postDelayed() or something along those lines to do your onclick logic
however long you need after the actual event has occurred.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] Serialization View

2012-02-15 Thread TreKing
On Wed, Feb 15, 2012 at 2:27 PM, satahippy  wrote:

> a smaller number of elements in the xml - it's help?


What?

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Handling a Checkbox Click Event

2012-02-15 Thread davemeetsworld
I have a check box and a TextView Object in a list layout. I didn't
run into the issues that a lot of people seem to run into it when
doing this, I have managed to handle the onclick event. My problem is
that when the checkbox is clicked, it causes an action to occur that
moves the item into another List on another Tab of my application.
This happens before the checkbox appears "ticked" i wondered if there
was a way to delay the onclick event from firing until after the
animation had...animated?

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

2012-02-15 Thread satahippy
a smaller number of elements in the xml - it's 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

Re: [android-developers] TextView: How to make non-breaking string?

2012-02-15 Thread Kostya Vasilyev

Have you tried using non-breaking space?

On 02/16/2012 12:11 AM, Karim Varela wrote:

Is there a way to designate a substring within a string as non
breakable? i.e. to designate a part of a string that won't word wrap,
but the entire substring would be displayed on the next line?



--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] TextView: How to make non-breaking string?

2012-02-15 Thread Karim Varela
Is there a way to designate a substring within a string as non
breakable? i.e. to designate a part of a string that won't word wrap,
but the entire substring would be displayed on the next line?

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

2012-02-15 Thread JackN
I am not sure what the OP  is talking about at all. I don't think they
do either.

On Feb 15, 10:07 am, Lew  wrote:
> Are you sure the OP was asking about U.S. law?
>
> JackN wrote:
>
> > The procedure is document here
>
> >http://www.copyright.gov/
>
> > Dhaval Varia wrote:
> > > I m [sic] planning to publisb my app on amazon [sic] store.
> > > So i [sic] need to take  copy right [sic] for my app.
> > > What is its procedure ?
> > > Plz [sic] help me to know...
> > > Thanx [sic] in advance..
>
> Darned txtspeek. It's so illiterate and brain dead.
>
> --
> 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


[android-developers] Re: AlarmManager cancel does not work

2012-02-15 Thread Rudolf Polzer
This is really strange:

When shifting the alarm time for one minute, the old alarm is not
cancelled and I get two alarms one minute apart. When shifting the
alarm time for one day, the old alarm is cancelled.

How can this happen? The cancel command doesn't know the alarm times.
I use the intent without any text.

Plaese 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


Re: [android-developers] LocationManager requestLocationUpdates minTime parameter not working

2012-02-15 Thread Mark Murphy
On Wed, Feb 15, 2012 at 2:51 PM, Kristopher Micinski
 wrote:
>> Actually, I got it from the docs, where they added this somewhere
>> along the line to requestLocationUpdates():
>>
>> "This field is only used as a hint to conserve power, and actual time
>> between location updates may be greater or lesser than this value."
>
> Oops, didn't see that.. :-(

I have no idea when it was added, and I didn't catch it until last
year IIRC. In other words, "I feel your pain"... :-)

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

_Android Programming Tutorials_ Version 4.1 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] LocationManager requestLocationUpdates minTime parameter not working

2012-02-15 Thread Kristopher Micinski
On Wed, Feb 15, 2012 at 2:46 PM, Mark Murphy  wrote:
> On Wed, Feb 15, 2012 at 2:39 PM, Kristopher Micinski
>  wrote:
>> I suspected this, but I didn't look at LocationManager's implementation :-(
>
> Actually, I got it from the docs, where they added this somewhere
> along the line to requestLocationUpdates():
>
> "This field is only used as a hint to conserve power, and actual time
> between location updates may be greater or lesser than this value."

Oops, didn't see that.. :-(

kris

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


Re: [android-developers] LocationManager requestLocationUpdates minTime parameter not working

2012-02-15 Thread Mark Murphy
On Wed, Feb 15, 2012 at 2:39 PM, Kristopher Micinski
 wrote:
> I suspected this, but I didn't look at LocationManager's implementation :-(

Actually, I got it from the docs, where they added this somewhere
along the line to requestLocationUpdates():

"This field is only used as a hint to conserve power, and actual time
between location updates may be greater or lesser than this value."

> I think the reason people ask this is that they (incorrectly) think
> they will be saving battery life..

That's the theory. I don't know how well it works in practice.

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

_Android Programming Tutorials_ Version 4.1 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] LocationManager requestLocationUpdates minTime parameter not working

2012-02-15 Thread Kristopher Micinski
On Wed, Feb 15, 2012 at 2:37 PM, Mark Murphy  wrote:
> On Wed, Feb 15, 2012 at 2:32 PM, Kristopher Micinski
>  wrote:
>> The interval is not exact
>
> Moreover, the interval can be completely ignored. The minimum distance
> is a filter; the minimum time is a hint.
>

I suspected this, but I didn't look at LocationManager's implementation :-(

I think the reason people ask this is that they (incorrectly) think
they will be saving battery life..

kris

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


Re: [android-developers] Upload Video using Soap Webservice

2012-02-15 Thread TreKing
On Wed, Feb 15, 2012 at 7:04 AM, suresh  wrote:

> Can any one help me how to upload video using Saop Web services.
>

This has nothing to do with Android specifically.


>  Currently am converting to base64 string format but am getting exception
> as out of memory.
>

Try a group or forum related to SOAP, then post more information than that
if you want help.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] LocationManager requestLocationUpdates minTime parameter not working

2012-02-15 Thread Mark Murphy
On Wed, Feb 15, 2012 at 2:32 PM, Kristopher Micinski
 wrote:
> The interval is not exact

Moreover, the interval can be completely ignored. The minimum distance
is a filter; the minimum time is a hint.

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

_Android Programming Tutorials_ Version 4.1 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] LocationManager requestLocationUpdates minTime parameter not working

2012-02-15 Thread Kristopher Micinski
The interval is not exact: if they come too quickly then you can throw
the unwanted ones away.  Are they coming too late?

kris

On Wed, Feb 15, 2012 at 2:25 AM, santhosh b  wrote:
> Hi,
>
> I am using below code to send location updates for every 2 min
> interval  or  100 meters displacement.  This is working fine in Droid2
> Motorola device but when it comes to Google Nexus S
> not working as expected
>
> Here is the code snippet:
>
> LocationManager   locationManager = (LocationManager)
> getSystemService(Context.LOCATION_SERVICE);
>
>  locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,
> 12,  100,
>            locationListener);
>
> Am i missing something please help..
> Thanks in Advance,
> Santhosh
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] How to generate multiple apk's for single project

2012-02-15 Thread TreKing
On Tue, Feb 14, 2012 at 10:17 PM, kumar varma wrote:

> Can any one suggest me in android how to generate multiple apk's
> for single project.
>

What is the purpose of "multiple apk's for single project"?

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] LocationManager requestLocationUpdates minTime parameter not working

2012-02-15 Thread TreKing
On Wed, Feb 15, 2012 at 1:25 AM, santhosh b wrote:

> This is working fine in Droid2
> Motorola device but when it comes to Google Nexus S
> not working as expected
>

What is it doing that is not "as expected"?

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] Re: What is wrong with Android Adapters?

2012-02-15 Thread Kostya Vasilyev

On 02/15/2012 11:09 PM, Olof Hedman wrote:

Wait a while after the power turns off and check your logs, I'm pretty
sure you will se a couple of "getView":s in your logs too.
It doesn't come right away, but within a minute or so after the screen
goes black.
I took a break for over 10 minutes, leaving logcat running, and... 
sorry, it just doesn't.


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

2012-02-15 Thread Jon Sutherland
Hi,

When I create a TextureView for a android.hardware.Camera preview and
set the scaleX and scaleY properties in my Activity onCreate method,
everything looks great and as expected.

However when I try calling setScaleX/setScaleY in the onClick listener
of a button and invalidate/postInvalidate the view, I see no changes
in the view.  I tried similar things with ObjectAnimator with the same
result.  The scaling only seems to work when the TextureView is first
created.

Can I change the scaling of my TextureView in a click listener while
the camera preview is running?  Is there any way to get this to work
while my activity is running and the preview is on the screen.

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] Enabling both normal wifi and wifi hotspot to get RSSI values of wi-fi hotspots

2012-02-15 Thread SyncMaster
I want an android phone to have both 'normal wi-fi' and 'portable
hotspot' turned on at the same time, so that I will be able to get the
RSSI values of wireless networks as well as involve in an hotspot
connection.

Scenario:
4 rooted android phones in CyanogenMod (2-Nexus One, 2-Galaxy S2;
consider A,B,C,D).
Kernel version 2.3.3 in all the phones
Portable wi-fi hot spot enabled in all the phones.

I wrote an application to find the RSSI values of available wireless
signals. But as the phones (A,B,C,D) are using wi-fi hot spot, the
normal wifi does not turn on. Either wi-fi hot spot can be on, or
normal wi-fi can be on.
i.e. If each phone(A,B, C and D) have a wifi hotspot created(AH, BH,
CH, DH), then I am not able to use my application, as normal wifi
connection needs to be turned on to find the wireless networks.

So I want the phones to scan available wireless networks with
portable wi-fi hot spot enabled. Is there a way to do this.?

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


[android-developers] Re: What is wrong with Android Adapters?

2012-02-15 Thread Olof Hedman
Turns out my super-simple adapter never had the on init-problem.
But it still has the on power down-problem.
Its a 100% static list with the views created on startup and put into
an array.
Wait a while after the power turns off and check your logs, I'm pretty
sure you will se a couple of "getView":s in your logs too.
It doesn't come right away, but within a minute or so after the screen
goes black.

I'll revisit my slightly more complex adapters tomorrow.

Cheers,
Olof


On Feb 15, 7:58 pm, Kostya Vasilyev  wrote:
> On 02/15/2012 10:45 PM, Olof Hedman wrote:
>
> > Thanks for the log!
> > Which version of android did you run it on?
>
> 2.3.4 and 4.0.2
>
> > It made my try one more thing...
> > I simplified my layout as much as I could, and this actually got rid
> > of the extreme weirdness, and made my log look like yours.
>
> > I don't get though why it would matter.
> > The problem seem to be the relative-layout I have in the background.
> > (I use it for a background image + a logo shown behind the list)
>
> > Here is my layout with just the relative-layout commented out:
> >http://pastebin.com/zFBxL97m
>
> > The view never resizes or anything, so there seems to be some funky-
> > ness going on when it inflates the views for the Activity.
> > Do you have any idea of why it would behave like this because of the
> > relativelayout?
>
> If you wanted to investigate, I suppose you could make your own subclass
> of ListView, override requestLayout and put a log statement there.
>
>
>
> > Also still weird it thinks its necessary to re-getting the views when
> > the screen power down, but at least the user will only notice that
> > because of slightly worse battery life:)
>
> By itself, the backlight turning off does not have anything to do with it.
>
> However, take a look at your activty's onResume to see if it tells the
> view to invalidate.
>
> If your list view is backed by a managed cursor, the latter will be
> requiried around the time of onResume, in turn causing the list view to
> fully update.
>
> -- Kostya
>
>
>
>
>
>
>
>
>
> > Cheers,
> > Olof

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

2012-02-15 Thread Kostya Vasilyev

On 02/15/2012 10:45 PM, Olof Hedman wrote:

Thanks for the log!
Which version of android did you run it on?


2.3.4 and 4.0.2


It made my try one more thing...
I simplified my layout as much as I could, and this actually got rid
of the extreme weirdness, and made my log look like yours.

I don't get though why it would matter.
The problem seem to be the relative-layout I have in the background.
(I use it for a background image + a logo shown behind the list)

Here is my layout with just the relative-layout commented out:
http://pastebin.com/zFBxL97m

The view never resizes or anything, so there seems to be some funky-
ness going on when it inflates the views for the Activity.
Do you have any idea of why it would behave like this because of the
relativelayout?


If you wanted to investigate, I suppose you could make your own subclass 
of ListView, override requestLayout and put a log statement there.




Also still weird it thinks its necessary to re-getting the views when
the screen power down, but at least the user will only notice that
because of slightly worse battery life:)


By itself, the backlight turning off does not have anything to do with it.

However, take a look at your activty's onResume to see if it tells the 
view to invalidate.


If your list view is backed by a managed cursor, the latter will be 
requiried around the time of onResume, in turn causing the list view to 
fully update.


-- Kostya



Cheers,
Olof


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

2012-02-15 Thread TreKing
On Wed, Feb 15, 2012 at 3:39 AM, nvlakshmi vakiti
wrote:

> Warning: Active APKs support fewer devices than previously active APKs.
> Some users will not receive updates.
>

The APK you set as active has new features / permissions that prevent it
from running on some devices that you previously supported. As such, those
devices that are no longer supported due to your update will not receive
the update, since they don't support it.


> Error: APK version 2 supports all the same devices as other APKs with
> higher versions. It would not be served. Please deactivate an APK.
>

You've activated more than one APK, including an older version that is no
longer necessary since there is a newer version that supports all of the
same devices. You can only have one version active at a given time.

Also, the Android Market has its own support forum:
https://groups.google.com/a/googleproductforums.com/forum/#!forum/android-market

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] Re: Extended Application life time.

2012-02-15 Thread Mark Murphy
On Wed, Feb 15, 2012 at 1:25 PM, A. Elk  wrote:
> A continuously-running Service is not always bad. Sometimes this type of
> Service is necessary.

For about one app in several hundred, perhaps. We have *way* too many
cases of apps "leaking" services and *way* too many pissed off users
as a result. I would rather developers be "fearful" of everlasting
services than to use them indiscriminately.

> For example, sync adapters use a service that's always running

Do you have a reference for this? Since this whole sync area is pretty
much undocumented (outside of drips and drabs of JavaDocs), I have no
idea what to expect from implementations.

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

_Android Programming Tutorials_ Version 4.1 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: What is wrong with Android Adapters?

2012-02-15 Thread Olof Hedman
Hmm, hold that...
Might have made a mistake in my tests...
I'll revisit this tomorrow when my brain works better :)

Cheers,
Olof

On Feb 15, 7:45 pm, Olof Hedman  wrote:
> Thanks for the log!
> Which version of android did you run it on?
>
> It made my try one more thing...
> I simplified my layout as much as I could, and this actually got rid
> of the extreme weirdness, and made my log look like yours.
>
> I don't get though why it would matter.
> The problem seem to be the relative-layout I have in the background.
> (I use it for a background image + a logo shown behind the list)
>
> Here is my layout with just the relative-layout commented 
> out:http://pastebin.com/zFBxL97m
>
> The view never resizes or anything, so there seems to be some funky-
> ness going on when it inflates the views for the Activity.
> Do you have any idea of why it would behave like this because of the
> relativelayout?
>
> Also still weird it thinks its necessary to re-getting the views when
> the screen power down, but at least the user will only notice that
> because of slightly worse battery life :)
>
> Cheers,
> Olof
>
> On Feb 15, 5:28 pm, Kostya Vasilyev  wrote:
>
>
>
>
>
>
>
> > On 02/15/2012 08:02 PM, Olof Hedman wrote:
>
> > >> Perhaps it's populating a cache of some kind?
>
> > > That theory doesn't hold.
> > > It would only need to cache the views once, and if you look at what is
> > > actually happening, you will se it binds the_same_view_  over and over
> > > with different list item data.
> > > Nothing is then cached, for a list with 8 items, the information will
> > > be overwritten 16 times before it settles and start to create more
> > > views for the list.
>
> > I just happened to have an app with ListView handy, so, here is my log,
> > the number is the position passed into getView, the reference is the
> > convertView:
>
> > When the activity is shown for the first time:
>
> > 02-15 20:17:45.058 I/ScanViewModeList(11347): getView for 0, null
> > 02-15 20:17:45.097 I/ScanViewModeList(11347): getView for 1, null
> > 02-15 20:17:45.160 I/ScanViewModeList(11347): getView for 2, null
> > 02-15 20:17:45.238 I/ScanViewModeList(11347): getView for 0,
> > android.widget.LinearLayout@41877ac8
> > 02-15 20:17:45.238 I/ScanViewModeList(11347): getView for 1,
> > android.widget.LinearLayout@418c4fe8
> > 02-15 20:17:45.238 I/ScanViewModeList(11347): getView for 2,
> > android.widget.LinearLayout@41879f70
>
> > After the list is invalidated:
>
> > 02-15 20:17:47.832 I/ScanViewModeList(11347): getView for 0,
> > android.widget.LinearLayout@41877ac8
> > 02-15 20:17:47.840 I/ScanViewModeList(11347): getView for 1,
> > android.widget.LinearLayout@418c4fe8
> > 02-15 20:17:47.847 I/ScanViewModeList(11347): getView for 2,
> > android.widget.LinearLayout@41879f70
>
> > The initial calls to getView with null are, perhaps, unnecessary, but
> > could be legit. In any case, they only happen once, when the listview is
> > initally shown.
>
> > As for your log - does your code do anything that could cause listview
> > to change its size, and force a new layout pass? does it unnecessarily
> > call adapter.notifyDataSet{Changed|Invalidated}?
>
> > -- Kostya

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

2012-02-15 Thread Olof Hedman
Thanks for the log!
Which version of android did you run it on?

It made my try one more thing...
I simplified my layout as much as I could, and this actually got rid
of the extreme weirdness, and made my log look like yours.

I don't get though why it would matter.
The problem seem to be the relative-layout I have in the background.
(I use it for a background image + a logo shown behind the list)

Here is my layout with just the relative-layout commented out:
http://pastebin.com/zFBxL97m

The view never resizes or anything, so there seems to be some funky-
ness going on when it inflates the views for the Activity.
Do you have any idea of why it would behave like this because of the
relativelayout?

Also still weird it thinks its necessary to re-getting the views when
the screen power down, but at least the user will only notice that
because of slightly worse battery life :)

Cheers,
Olof


On Feb 15, 5:28 pm, Kostya Vasilyev  wrote:
> On 02/15/2012 08:02 PM, Olof Hedman wrote:
>
> >> Perhaps it's populating a cache of some kind?
>
> > That theory doesn't hold.
> > It would only need to cache the views once, and if you look at what is
> > actually happening, you will se it binds the_same_view_  over and over
> > with different list item data.
> > Nothing is then cached, for a list with 8 items, the information will
> > be overwritten 16 times before it settles and start to create more
> > views for the list.
>
> I just happened to have an app with ListView handy, so, here is my log,
> the number is the position passed into getView, the reference is the
> convertView:
>
> When the activity is shown for the first time:
>
> 02-15 20:17:45.058 I/ScanViewModeList(11347): getView for 0, null
> 02-15 20:17:45.097 I/ScanViewModeList(11347): getView for 1, null
> 02-15 20:17:45.160 I/ScanViewModeList(11347): getView for 2, null
> 02-15 20:17:45.238 I/ScanViewModeList(11347): getView for 0,
> android.widget.LinearLayout@41877ac8
> 02-15 20:17:45.238 I/ScanViewModeList(11347): getView for 1,
> android.widget.LinearLayout@418c4fe8
> 02-15 20:17:45.238 I/ScanViewModeList(11347): getView for 2,
> android.widget.LinearLayout@41879f70
>
> After the list is invalidated:
>
> 02-15 20:17:47.832 I/ScanViewModeList(11347): getView for 0,
> android.widget.LinearLayout@41877ac8
> 02-15 20:17:47.840 I/ScanViewModeList(11347): getView for 1,
> android.widget.LinearLayout@418c4fe8
> 02-15 20:17:47.847 I/ScanViewModeList(11347): getView for 2,
> android.widget.LinearLayout@41879f70
>
> The initial calls to getView with null are, perhaps, unnecessary, but
> could be legit. In any case, they only happen once, when the listview is
> initally shown.
>
> As for your log - does your code do anything that could cause listview
> to change its size, and force a new layout pass? does it unnecessarily
> call adapter.notifyDataSet{Changed|Invalidated}?
>
> -- Kostya

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

2012-02-15 Thread TreKing
Try explaining what specifically you mean by "Talk Back" feature and what
specifically you hope to achieve.

Also explain what you have tried on your own so far. Asking for a link to
an Ebook, which you can search for yourself, makes it sound as if you've
not done your own homework on the matter.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

Re: [android-developers] group introductory text box

2012-02-15 Thread Harri Smått
On Feb 15, 2012, at 1:23 PM, BobF wrote:
> See the attached png.
> It has to do with using this group via a web browser ...

I rarely use web interface but on Chrome and Safari (OSX);
http://groups.google.com/group/android-developers/topics

URL gives you a much more "simplified" view at least.

--
H

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


Re: [android-developers] Widget

2012-02-15 Thread TreKing
On Wed, Feb 15, 2012 at 1:13 AM, Omollo Ateng wrote:

> How to use a widget to start and stop an application. pliz help me, any
> idea


Read the documentation section on Widgets.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Re: Extended Application life time.

2012-02-15 Thread A. Elk
A continuously-running Service is not always bad. Sometimes this type of 
Service is necessary.

For example, sync adapters use a service that's always running, and they 
may also use an Application object to instantiate and return a singleton. 
This allows the SyncManager to start synchronizations without user 
intervention. This pattern is visible in the SampleSyncAdapter sample app.

If you use an Application object or a continuously-running Service, give it 
a descriptive name, such as SyncAdapterService or SyncAdapterModule.

It's true that users "attack" apps with task killers and force stop, even 
though Google tries to get the message out that they shouldn't do it. 
However, this shouldn't make developers fearful of background services. If 
you need an "always-on" Service, use one, but also look at alternatives 
that don't require one.

Apparently, you want to "sync" location to a server on a regular basis. If 
you're sending the location to the server every so many minutes/seconds, 
you can probably use AlarmManager and IntentService. Even so, you have to 
handle error conditions, such as the server not being available.

If you're truly synchronizing data between a server and the device, and 
you'd rather let the system handling all the ugly details, use a sync 
adapter. The system will schedule sychronization automatically, check 
network availability, restart interrupted syncs, and handle authentication 
if necessary.

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

2012-02-15 Thread TreKing
On Wed, Feb 15, 2012 at 12:16 AM, Passion Android  wrote:

> I want to create an facebook android application where i want to
> create a option ..by press it will show all the phone numbers of the
> friends who are in my friend list.so how to do this please give the
> idea.
>

Google "facebook android api".
Then read the documentation section on accessing contacts.
That should be a start.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Re: whole file dose not load always

2012-02-15 Thread limelect
Ok daniel one small suggestion

After playing with wireshark i added to the software
Log.e("WindGraph","response  "+response.getAllHeaders()[5]);
and i see Content-Length: >>> LES then needed
Am i to deduce that is the SERVER fault???
Thank




On Feb 15, 6:53 pm, limelect  wrote:
> getContentLength() returne less then needed size much less
> I know as a pro this one is of those ones
> Thanks in any case it will take all my effort
> P.S if i parse wrongly the page i reload it again
> so i do it 6 times
> So i see every time it get more from the page
> 130k 150k 200k (not round numbers) randomly then after a wile it gets
> ok and then after
> a few minutes ( i download every 10 seconds) it breaks down again and
> so on
> i wander if it is not time out of http ? Or memory ?
>
> On Feb 15, 6:42 pm, Daniel Drozdzewski 
> wrote:
>
>
>
>
>
>
>
> > What does getContentLength() return for the failing requests?
>
> > Other idea is to look into HTTP response and all of its headers and the 
> > body.
>
> > Run your code from within the emulator and use Wireshark to peep into
> > the HTTP requests and responses.
>
> > On 15 February 2012 16:28, limelect  wrote:
>
> > > Well i added as daniel advice this pies of cod
>
> > >           Log.d("WindGraph","Chunk ?  "+
> > > entity.isChunked());<<<
> > >            BufferedHttpEntity bufHttpEntity = new
> > > BufferedHttpEntity(entity);
> > >             if (entity != null) {
> > >                InputStream inputStream = null;
> > >                try {
> > >                //      entity.getContentLength()
> > > //                    inputStream = entity.getContent();
> > >                        inputStream = bufHttpEntity.getContent();
> > >                        Log.d("WindGraph","Chunk 2 ?  "+
> > > bufHttpEntity.isChunked());<<<
>
> > > both show FALSE (no chunk) when the down load fails
> > > Any idea what to look for?
>
> > > On Feb 15, 6:02 pm, limelect  wrote:
> > >> I changed to BufferedReader after i head problem as i read in the
> > >> internet it
> > >> will solve the problem but it did not
>
> > >> On Feb 15, 5:56 pm, Kostya Vasilyev  wrote:
>
> > >> > To add my $0.02 to everything Daniel wrote --
>
> > >> > -- why use BufferedHttpEntity?
>
> > >> >http://developer.android.com/reference/org/apache/http/entity/Buffere...
>
> > >> > > A wrapping entity that buffers it content if necessary. The buffered
> > >> > > entity is always repeatable. If the wrapped entity is repeatable
> > >> > > itself, calls are passed through. If the wrapped entity is not
> > >> > > repeatable, the content is read into a buffer once and provided from
> > >> > > there as often as required.
>
> > >> > I don't see anything in the posted snippet that would require a
> > >> > repeatable entity (i.e. rewinding the stream and reading the same data
> > >> > again).
>
> > >> > The underlying entity is most likely not repeatable, so all this does 
> > >> > is
> > >> > forces unnecessary in-memory buffering. Perhaps there is a limit to 
> > >> > this
> > >> > buffer?
>
> > >> > -- Kostya
>
> > >> > On 02/15/2012 07:37 PM, Daniel Drozdzewski wrote:
>
> > >> > > It is worth examining few things about your entity:
>
> > >> > > - is it streaming?
> > >> > > - is it chunked?
> > >> > > - get it length..
>
> > >> > > All of those are method calls on HttpEntity.
>
> > >> > > Also it is worth checking the headers of your request. If the
> > >> > > requested file is big, it is most likely that it will get chunked by
> > >> > > the web server. In such case, your client will need some extra logic
> > >> > > to receive the whole chunked file.
> > >> > > I *presume* that chunked response mean that getContentLength() 
> > >> > > returns
> > >> > > the length of each chunk that is ready to be received.
>
> > >> > > For more info, read some HTTP 1.1 spec:
> > >> > >http://sharovatov.wordpress.com/2009/04/30/http-chunked-encoding/
>
> > >> > > Daniel
>
> > >> > > On 15 February 2012 14:38, limelect  wrote:
> > >> > >> I have this part in a service (or Thread same problem ) to load a 
> > >> > >> file
> > >> > >> greater then 40 char;
> > >> > >> almost 1/2 a mega char.
> > >> > >> Some times it load much less not consistent.
> > >> > >> How to debug it or make adjustment.
> > >> > >> Same program download jpg (with modifications) of 30k without a
> > >> > >> problem.
>
> > >> > >>     StringBuilder downloadFile(String url) {
> > >> > >>         final int IO_BUFFER_SIZE = 4 * 1024;
>
> > >> > >>         // AndroidHttpClient is not allowed to be used from the main
> > >> > >> thread
> > >> > >> //        final HttpClient client = (mode == Mode.NO_ASYNC_TASK) ? 
> > >> > >> new
> > >> > >> DefaultHttpClient() :
> > >> > >>             final HttpClient client = (mode == Mode.CORRECT) ? new
> > >> > >> DefaultHttpClient() :
> > >> > >>                 AndroidHttpClient.newInstance("Android");
> > >> > >>          final HttpGet getRequest = new HttpGet(url);
> > >> > >>         try {
> > >> 

Re: [android-developers] group introductory text box

2012-02-15 Thread TreKing
On Wed, Feb 15, 2012 at 11:51 AM, BobF  wrote:

> If only you were trying to help ...


Now I'm curious why you think I wasted my time on this, if not to try to
help.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

[android-developers] Re: Regarding copy right

2012-02-15 Thread Lew
Are you sure the OP was asking about U.S. law?

JackN wrote:
>
> The procedure is document here 
>
> http://www.copyright.gov/ 
>
 

> Dhaval Varia wrote: 
> > I m [sic] planning to publisb my app on amazon [sic] store. 
> > So i [sic] need to take  copy right [sic] for my app. 
> > What is its procedure ? 
> > Plz [sic] help me to know... 
> > Thanx [sic] in advance..


Darned txtspeek. It's so illiterate and brain dead.

-- 
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] Plz help

2012-02-15 Thread Lew
TreKing wrote:
>
> Also, it's spelled "Please". I really don't understand why that particular 
> word is apparently left out of English language instruction in certain 
> foreign countries.
>

Such as the U.S.
 
-- 
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] group introductory text box

2012-02-15 Thread BobF
If only you were trying to help ... If that's what ya' got for help, I 
respectfully decline.  Thanks anyway

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

2012-02-15 Thread Peeyush Varshney
Is it Apps specific? if it is common then you can keep into prebuilt folder
and do the changes in .mk file..

On Wed, Feb 15, 2012 at 9:52 PM, Mark Winchester wrote:

> I've got some so files that I'm building from pre-existing code.  I'm
> trying to use it, as is, but I've run into a problem.  The source
> relies on two extraneous files that are expected to exist in the same
> directory as the so.  If I push the files to the correct location,
> with the adb, everything works as expected.  I thought that putting
> the files in the "assets" folder of the project would work, but that
> was not the case.  Is there a way to add these files to the project,
> so that they are installed with the libraries?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
Thank & Regards
Peeyush Varshney

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

2012-02-15 Thread Mark Phillips
+10
On Feb 15, 2012 10:06 AM, "Ted Scott"  wrote:

> Please don't take this the wrong way, I'm not complaining, just observing.
> I have to say that between the ESL and txt speak this list has some really
> funny moments.
>
> The mental image I got from "pies of cod" will have me smiling for the
> rest of the week. I'm wondering if it's some new way of preparing lutefisk.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to 
> android-developers@**googlegroups.com
> To unsubscribe from this group, 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: Adding extraneous files to APK?

2012-02-15 Thread JackN
I put files into assetts folder. Are you referring to them correctly

On Feb 15, 9:02 am, Mark Murphy  wrote:
> On Wed, Feb 15, 2012 at 11:22 AM, Mark Winchester  
> wrote:
> > I've got some so files that I'm building from pre-existing code.  I'm
> > trying to use it, as is, but I've run into a problem.  The source
> > relies on two extraneous files that are expected to exist in the same
> > directory as the so.  If I push the files to the correct location,
> > with the adb, everything works as expected.  I thought that putting
> > the files in the "assets" folder of the project would work, but that
> > was not the case.  Is there a way to add these files to the project,
> > so that they are installed with the libraries?
>
> No. You can rewrite the pre-existing code in question to have a
> configurable location for the files.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 4.1 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] group introductory text box

2012-02-15 Thread TreKing
On Wed, Feb 15, 2012 at 10:50 AM, BobF  wrote:

> GFY - Apparently we have a difference of opinion on this topic.
>

Wow. OK. That seems unnecessary. I was just trying to help. I'm sorry if I
caught you on your period.


>   The intro is specific to this group.
>

This has nothing to do with developing Android Apps which is what this
group is for. If you have a technical issue with a particular Google
Group's page, you would direct your question to the group moderator, or
perhaps try the Help or Feedback options I mentioned.


> I had already looked for options to turn it off myself.
>

You never stated that. Sorry for not reading your mind.


>  We also have an apparent difference of opinion WRT your personal
> importance.
>

I don't know what that means.


> If you don't have an answer, don't post
>

I did have an answer. In fact, I had three. We have an apparent different
of opinion WRT what constitutes an "answer".


> ignore what I posted like everybody else.
>

You were probably ignored because, I said, this has nothing to do with this
list. Also, telling someone that's trying to help you to "GFY" is likely
not going to endear you to the group when you come back to ask more
off-topic questions.

-
TreKing  - Chicago
transit tracking app for Android-powered devices

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

[android-developers] OT: Comedy Gold

2012-02-15 Thread Ted Scott
Please don't take this the wrong way, I'm not complaining, just 
observing. I have to say that between the ESL and txt speak this list 
has some really funny moments.


The mental image I got from "pies of cod" will have me smiling for the 
rest of the week. I'm wondering if it's some new way of preparing lutefisk.


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

2012-02-15 Thread Mark Murphy
On Wed, Feb 15, 2012 at 11:22 AM, Mark Winchester  wrote:
> I've got some so files that I'm building from pre-existing code.  I'm
> trying to use it, as is, but I've run into a problem.  The source
> relies on two extraneous files that are expected to exist in the same
> directory as the so.  If I push the files to the correct location,
> with the adb, everything works as expected.  I thought that putting
> the files in the "assets" folder of the project would work, but that
> was not the case.  Is there a way to add these files to the project,
> so that they are installed with the libraries?

No. You can rewrite the pre-existing code in question to have a
configurable location for the files.

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

_Android Programming Tutorials_ Version 4.1 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: whole file dose not load always

2012-02-15 Thread limelect
getContentLength() returne less then needed size much less
I know as a pro this one is of those ones
Thanks in any case it will take all my effort
P.S if i parse wrongly the page i reload it again
so i do it 6 times
So i see every time it get more from the page
130k 150k 200k (not round numbers) randomly then after a wile it gets
ok and then after
a few minutes ( i download every 10 seconds) it breaks down again and
so on
i wander if it is not time out of http ? Or memory ?


On Feb 15, 6:42 pm, Daniel Drozdzewski 
wrote:
> What does getContentLength() return for the failing requests?
>
> Other idea is to look into HTTP response and all of its headers and the body.
>
> Run your code from within the emulator and use Wireshark to peep into
> the HTTP requests and responses.
>
> On 15 February 2012 16:28, limelect  wrote:
>
>
>
>
>
>
>
>
>
> > Well i added as daniel advice this pies of cod
>
> >           Log.d("WindGraph","Chunk ?  "+
> > entity.isChunked());<<<
> >            BufferedHttpEntity bufHttpEntity = new
> > BufferedHttpEntity(entity);
> >             if (entity != null) {
> >                InputStream inputStream = null;
> >                try {
> >                //      entity.getContentLength()
> > //                    inputStream = entity.getContent();
> >                        inputStream = bufHttpEntity.getContent();
> >                        Log.d("WindGraph","Chunk 2 ?  "+
> > bufHttpEntity.isChunked());<<<
>
> > both show FALSE (no chunk) when the down load fails
> > Any idea what to look for?
>
> > On Feb 15, 6:02 pm, limelect  wrote:
> >> I changed to BufferedReader after i head problem as i read in the
> >> internet it
> >> will solve the problem but it did not
>
> >> On Feb 15, 5:56 pm, Kostya Vasilyev  wrote:
>
> >> > To add my $0.02 to everything Daniel wrote --
>
> >> > -- why use BufferedHttpEntity?
>
> >> >http://developer.android.com/reference/org/apache/http/entity/Buffere...
>
> >> > > A wrapping entity that buffers it content if necessary. The buffered
> >> > > entity is always repeatable. If the wrapped entity is repeatable
> >> > > itself, calls are passed through. If the wrapped entity is not
> >> > > repeatable, the content is read into a buffer once and provided from
> >> > > there as often as required.
>
> >> > I don't see anything in the posted snippet that would require a
> >> > repeatable entity (i.e. rewinding the stream and reading the same data
> >> > again).
>
> >> > The underlying entity is most likely not repeatable, so all this does is
> >> > forces unnecessary in-memory buffering. Perhaps there is a limit to this
> >> > buffer?
>
> >> > -- Kostya
>
> >> > On 02/15/2012 07:37 PM, Daniel Drozdzewski wrote:
>
> >> > > It is worth examining few things about your entity:
>
> >> > > - is it streaming?
> >> > > - is it chunked?
> >> > > - get it length..
>
> >> > > All of those are method calls on HttpEntity.
>
> >> > > Also it is worth checking the headers of your request. If the
> >> > > requested file is big, it is most likely that it will get chunked by
> >> > > the web server. In such case, your client will need some extra logic
> >> > > to receive the whole chunked file.
> >> > > I *presume* that chunked response mean that getContentLength() returns
> >> > > the length of each chunk that is ready to be received.
>
> >> > > For more info, read some HTTP 1.1 spec:
> >> > >http://sharovatov.wordpress.com/2009/04/30/http-chunked-encoding/
>
> >> > > Daniel
>
> >> > > On 15 February 2012 14:38, limelect  wrote:
> >> > >> I have this part in a service (or Thread same problem ) to load a file
> >> > >> greater then 40 char;
> >> > >> almost 1/2 a mega char.
> >> > >> Some times it load much less not consistent.
> >> > >> How to debug it or make adjustment.
> >> > >> Same program download jpg (with modifications) of 30k without a
> >> > >> problem.
>
> >> > >>     StringBuilder downloadFile(String url) {
> >> > >>         final int IO_BUFFER_SIZE = 4 * 1024;
>
> >> > >>         // AndroidHttpClient is not allowed to be used from the main
> >> > >> thread
> >> > >> //        final HttpClient client = (mode == Mode.NO_ASYNC_TASK) ? new
> >> > >> DefaultHttpClient() :
> >> > >>             final HttpClient client = (mode == Mode.CORRECT) ? new
> >> > >> DefaultHttpClient() :
> >> > >>                 AndroidHttpClient.newInstance("Android");
> >> > >>          final HttpGet getRequest = new HttpGet(url);
> >> > >>         try {
> >> > >>             HttpResponse response = client.execute(getRequest);
> >> > >>             final int statusCode =
> >> > >> response.getStatusLine().getStatusCode();
> >> > >>             if (statusCode != HttpStatus.SC_OK) {
> >> > >>                 Log.e("WindGraph", "Error " + statusCode +
> >> > >>                         " while retrieving file from " + url);
> >> > >>                 return null;
> >> > >>             }
> >> > >>             final HttpEntity entity = response.getEntity();
> >> > >>         

Re: [android-developers] group introductory text box

2012-02-15 Thread BobF
GFY - Apparently we have a difference of opinion on this topic.  The intro 
is specific to this group.  I had already looked for options to turn it off 
myself.
 
We also have an apparent difference of opinion WRT your personal importance.
 
If you don't have an answer, don't post - ignore what I posted like 
everybody else.

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

2012-02-15 Thread Daniel Drozdzewski
What does getContentLength() return for the failing requests?

Other idea is to look into HTTP response and all of its headers and the body.

Run your code from within the emulator and use Wireshark to peep into
the HTTP requests and responses.



On 15 February 2012 16:28, limelect  wrote:
> Well i added as daniel advice this pies of cod
>
>           Log.d("WindGraph","Chunk ?  "+
> entity.isChunked());<<<
>            BufferedHttpEntity bufHttpEntity = new
> BufferedHttpEntity(entity);
>             if (entity != null) {
>                InputStream inputStream = null;
>                try {
>                //      entity.getContentLength()
> //                    inputStream = entity.getContent();
>                        inputStream = bufHttpEntity.getContent();
>                        Log.d("WindGraph","Chunk 2 ?  "+
> bufHttpEntity.isChunked());<<<
>
> both show FALSE (no chunk) when the down load fails
> Any idea what to look for?
>
> On Feb 15, 6:02 pm, limelect  wrote:
>> I changed to BufferedReader after i head problem as i read in the
>> internet it
>> will solve the problem but it did not
>>
>> On Feb 15, 5:56 pm, Kostya Vasilyev  wrote:
>>
>>
>>
>>
>>
>>
>>
>> > To add my $0.02 to everything Daniel wrote --
>>
>> > -- why use BufferedHttpEntity?
>>
>> >http://developer.android.com/reference/org/apache/http/entity/Buffere...
>>
>> > > A wrapping entity that buffers it content if necessary. The buffered
>> > > entity is always repeatable. If the wrapped entity is repeatable
>> > > itself, calls are passed through. If the wrapped entity is not
>> > > repeatable, the content is read into a buffer once and provided from
>> > > there as often as required.
>>
>> > I don't see anything in the posted snippet that would require a
>> > repeatable entity (i.e. rewinding the stream and reading the same data
>> > again).
>>
>> > The underlying entity is most likely not repeatable, so all this does is
>> > forces unnecessary in-memory buffering. Perhaps there is a limit to this
>> > buffer?
>>
>> > -- Kostya
>>
>> > On 02/15/2012 07:37 PM, Daniel Drozdzewski wrote:
>>
>> > > It is worth examining few things about your entity:
>>
>> > > - is it streaming?
>> > > - is it chunked?
>> > > - get it length..
>>
>> > > All of those are method calls on HttpEntity.
>>
>> > > Also it is worth checking the headers of your request. If the
>> > > requested file is big, it is most likely that it will get chunked by
>> > > the web server. In such case, your client will need some extra logic
>> > > to receive the whole chunked file.
>> > > I *presume* that chunked response mean that getContentLength() returns
>> > > the length of each chunk that is ready to be received.
>>
>> > > For more info, read some HTTP 1.1 spec:
>> > >http://sharovatov.wordpress.com/2009/04/30/http-chunked-encoding/
>>
>> > > Daniel
>>
>> > > On 15 February 2012 14:38, limelect  wrote:
>> > >> I have this part in a service (or Thread same problem ) to load a file
>> > >> greater then 40 char;
>> > >> almost 1/2 a mega char.
>> > >> Some times it load much less not consistent.
>> > >> How to debug it or make adjustment.
>> > >> Same program download jpg (with modifications) of 30k without a
>> > >> problem.
>>
>> > >>     StringBuilder downloadFile(String url) {
>> > >>         final int IO_BUFFER_SIZE = 4 * 1024;
>>
>> > >>         // AndroidHttpClient is not allowed to be used from the main
>> > >> thread
>> > >> //        final HttpClient client = (mode == Mode.NO_ASYNC_TASK) ? new
>> > >> DefaultHttpClient() :
>> > >>             final HttpClient client = (mode == Mode.CORRECT) ? new
>> > >> DefaultHttpClient() :
>> > >>                 AndroidHttpClient.newInstance("Android");
>> > >>          final HttpGet getRequest = new HttpGet(url);
>> > >>         try {
>> > >>             HttpResponse response = client.execute(getRequest);
>> > >>             final int statusCode =
>> > >> response.getStatusLine().getStatusCode();
>> > >>             if (statusCode != HttpStatus.SC_OK) {
>> > >>                 Log.e("WindGraph", "Error " + statusCode +
>> > >>                         " while retrieving file from " + url);
>> > >>                 return null;
>> > >>             }
>> > >>             final HttpEntity entity = response.getEntity();
>> > >>             BufferedHttpEntity bufHttpEntity = new
>> > >> BufferedHttpEntity(entity);
>> > >>              if (entity != null) {
>> > >>                 InputStream inputStream = null;
>> > >>                 try {
>>
>> > >>                         inputStream = bufHttpEntity.getContent();
>> > > This is where content fails some time 
>> > > 1
>> > >>                     Log.d("WindGraph","Content size  "
>> > >> +Integer.toString( (int) bufHttpEntity.getContentLength()));
>>
>> > >> --
>> > >> You received this message because you are subscribed to the Google
>> > >> Groups "Android Developers" group.
>> > >> To post to this gro

  1   2   3   >