[android-developers] AIDL read exception while returning parameter

2011-05-05 Thread srihari babu
I am implementing AIDL interface for remore service.
i am getting exception while reading exception from remore service
over AIDL interface.
Any suggestions are highly appreciated.
Thanks,
Srihari.R

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


[android-developers] Re: problem with in-app billing

2011-05-05 Thread D S
Thanks Nikolay,

That's what I was missing. I needed to put a signed app on the device
(I assume that's what you meant by release version). Interesting that
the test sku's work, but created sku's don't work without signed app..

Thanks,
DS

On May 2, 9:18 pm, Nikolay Elenkov nikolay.elen...@gmail.com wrote:
 On Mon, May 2, 2011 at 3:13 AM, D S dil...@gmail.com wrote:
  Hello,

  I integrated the code from Dungeons example into my app. When I use
  mSKU = android.test.purchased
  I am able to make the purchase successfully on my device, so I assume
  the integration is correct.

  But when I use
  mSKU = my.product.id
  I get an error RESULT_DEVELOPER_ERROR in the logs.

  You need to install a release version on your device and use one of
 the testing accounts as the primary Google account for this to work.

 http://developer.android.com/guide/market/billing/billing_testing.htm...

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

2011-05-05 Thread knocker
I am facing weird UI behavior issue.
When I set *listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);*
onListItemClick behave incorrectly... Let me know if I am missing
anything here.

When I comment following line
listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);

This UI works fine as expected but following part of code doesn't work
long[] idsList = getListView().getCheckedItemIds();
Log.i(TAG,number of rows selected+idsList.length);

Expected UI change is when i click on one list item it should toggle
its checked state, which does not happen it toggles other list item..
Strange



File:Listbox.java

package checkbox.list.com;
import android.app.ListActivity;
import android.database.Cursor;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.CheckedTextView;
import android.widget.ListView;
import android.provider.ContactsContract.CommonDataKinds.Phone;


public class listbox extends ListActivity {
private static final String TAG = listbox;
Cursor mCursor = null;
ListView listView = null;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
listView = getListView();
LoadList();
//listView.setChoiceMode(ListView.CHOICE_MODE_MULTIPLE);
}

@Override
protected void onListItemClick(ListView l, View v, int position, long
id) {
int pos = l.getPositionForView(v);
Log.i(TAG,pos of view+pos);
CheckedTextView txtview = (CheckedTextView)
v.findViewById(android.R.id.text1);
txtview.toggle();
long[] idsList = getListView().getCheckedItemIds();
Log.i(TAG,number of rows selected+idsList.length);
}

private void LoadList() {
mCursor = this.getContentResolver().query(Phone.CONTENT_URI, null,
null, null, null);
startManagingCursor(mCursor);

String [] from=new String []{Phone.DISPLAY_NAME,Phone.TYPE};
int [] to=new int [] {android.R.id.text1, android.R.id.text2};
MyCursorAdapter sca=new
MyCursorAdapter(this,R.layout.fetchrow,mCursor,from,to);
setListAdapter(sca);
}
}

File:MyCursorAdapter.java

package checkbox.list.com;
import android.content.Context;
import android.database.Cursor;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckedTextView;
import android.widget.SimpleCursorAdapter;
import android.widget.TextView;

public class MyCursorAdapter extends SimpleCursorAdapter {
protected static final String TAG = MyCursorAdapter;
private Cursor mCursor;
private String []strFromCols;
private int []toView;

public MyCursorAdapter(Context context, int layout, Cursor c,
String[] from, int[] to) {
super(context, layout, c, from, to);
mCursor = c;
strFromCols = from;
toView = to;
}
public View getView(int pos, View inView, ViewGroup parent) {
View v =  super.getView(pos,inView,parent);
mCursor.moveToPosition(pos);

final CheckedTextView chkTxt = (CheckedTextView)
v.findViewById(toView[0]);
String name=
mCursor.getString(mCursor.getColumnIndex(strFromCols[0]));
chkTxt.setText(name);
//  chkTxt.setOnClickListener(new OnClickListener() {
//
//  @Override
//  public void onClick(View v) {
//  chkTxt.toggle();
//  }
//  });
TextView txtPhone = (TextView) v.findViewById(toView[1]);
String phone =
mCursor.getString(mCursor.getColumnIndex(strFromCols[1]));
txtPhone.setText(phone);
return (v);
}
}

File: main.xml

?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=fill_parent
android:gravity=top
ListView
android:id=@id/android:list
android:layout_width=fill_parent
android:numColumns=1
android:stretchMode=columnWidth
android:gravity=top
android:layout_height=wrap_content
android:layout_gravity=bottom|top/

Button
android:text=delete
android:layout_width=wrap_content
android:layout_height=wrap_content
   /
/LinearLayout

File:fetchrow.xml

?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:layout_width=match_parent
android:layout_height=wrap_content
android:orientation=vertical

CheckedTextView xmlns:android=http://schemas.android.com/apk/res/
android
android:id=@android:id/text1
android:layout_width=match_parent
android:layout_height=?android:attr/listPreferredItemHeight
android:textAppearance=?android:attr/textAppearanceLarge
android:gravity=center_vertical
android:checkMark=?android:attr/listChoiceIndicatorMultiple
android:paddingLeft=6dip
android:paddingRight=6dip


/

TextView android:id=@android:id/text2
android:textSize=16sp
android:layout_width=match_parent

Re: [android-developers] AIDL read exception while returning parameter

2011-05-05 Thread Tahu
HI
I would like to get some help in establishing a connection between Android
PDA client and a desktop PC . I am not able to receive the message that i
send from client ,no error messages but simply the message are not reaching
the desktop PC . Could any one help .? I am able to successfully implement
this in J2ME .
many thanks in advance .

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

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

[android-developers] Re: 1380 Paid Applications in One Free Torrent then How to SELL it?

2011-05-05 Thread mot12
This is a significant problem on Android. I am making money ok but I
can only imagine how things would be if piracy wasn't so easy on this
platform.

- Constantly improve your app. If you have a cool app that people talk
about, they don't want a version that's half a year old.
- Sell things within your app.
- Use LVL.
- Limit the lifetime of your app so the app requires updates every few
months (this is a tricky one, you are likely to lose a lot of users if
you don't alert them well in in advance that an update is required).

Martin
mobitobi

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


[android-developers] Re: problem with Linkify.addLinks(

2011-05-05 Thread Kostya Vasilyev

Copying back to the list.

This looks like an emulator issue. Can you access the site with the 
emulator's web browser? I would guess not.


And looking at the last line in the log:

Address family not supported by protocol

I would guess that it's IPv6 related.

PS - Don't use hardcoded strings for intent actions, there are constants 
like Intent.ACTION_VIEW.


-- Kostya

05.05.2011 10:37, beginer пишет:

thanks Kostya

I put

lblTitulo.setOnClickListener(new OnClickListener() {


public void onClick(View v) {
// TODO Auto-generated method stub
   //TextView tv = (TextView)findViewById( 
R.id.link2_view );

   Intent browserIntent = new 
Intent(android.intent.action.VIEW,
Uri.parse(http://www.google.es;));
   startActivity(browserIntent);

   //tv.setText(la_dire);
  // Linkify.addLinks( tv, Linkify.WEB_URLS );


}
});

and it go good

BUt when I put my url, dosen't work, the code is this:

final String la_dire = miLista.get(position).getLink();
//System.out.println(la_dire);

lblTitulo.setOnClickListener(new OnClickListener() {


public void onClick(View v) {
// TODO Auto-generated method stub
   //TextView tv = (TextView)findViewById( 
R.id.link2_view );

   Intent browserIntent = new 
Intent(android.intent.action.VIEW,
Uri.parse(la_dire));
   startActivity(browserIntent);

   //tv.setText(la_dire);
  // Linkify.addLinks( tv, Linkify.WEB_URLS );


}
});

The emulator said this:

05-05 06:27:10.256: INFO/System.out(391):
[net.sgoliver.Evento@44ef34c8, net.sgoliver.Evento@44ef42e8,
net.sgoliver.Evento@44ef45f8, net.sgoliver.Evento@44ef48c0,
net.sgoliver.Evento@44ef5560, net.sgoliver.Evento@44ef65f8,
net.sgoliver.Evento@44ef6848, net.sgoliver.Evento@44ef6cb0,
net.sgoliver.Evento@44ef7010, net.sgoliver.Evento@44ef7428]
05-05 06:27:10.465: INFO/System.out(391): 
http://www.donostiakultura.com
05-05 06:27:10.545: INFO/System.out(391): http://www.google.es
05-05 06:27:10.577: INFO/System.out(391): http://www.adimedia.net
05-05 06:27:10.817: INFO/ActivityManager(59): Displayed activity
net.sgoliver/.AndroidXml: 2073 ms (total 2073 ms)
05-05 06:27:16.046: DEBUG/dalvikvm(119): GC_EXPLICIT freed 658
objects / 36880 bytes in 129ms
05-05 06:27:21.136: DEBUG/dalvikvm(214): GC_EXPLICIT freed 156
objects / 11168 bytes in 165ms
05-05 06:27:26.156: DEBUG/dalvikvm(261): GC_EXPLICIT freed 250
objects / 11856 bytes in 138ms
05-05 06:27:26.440: DEBUG/SntpClient(59): request time failed:
java.net.SocketException: Address family not supported by protocol
05-05 06:32:02.775: INFO/ActivityManager(59): Starting activity:
Intent { act=android.intent.action.VIEW dat=
05-05 06:32:02.775: INFO/ActivityManager(59):
http://www.donostiakultura.com }
05-05 06:32:02.775: DEBUG/AndroidRuntime(391): Shutting down VM
05-05 06:32:02.786: WARN/dalvikvm(391): threadid=1: thread exiting
with uncaught exception (group=0x4001d800)
05-05 06:32:02.796: ERROR/AndroidRuntime(391): FATAL EXCEPTION: main
05-05 06:32:02.796: ERROR/AndroidRuntime(391):
android.content.ActivityNotFoundException: No Activity found to handle
Intent { act=android.intent.action.VIEW dat=
05-05 06:32:02.796: ERROR/AndroidRuntime(391):
http://www.donostiakultura.com }
05-05 06:32:02.796: ERROR/AndroidRuntime(391): at
android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:
1408)
05-05 06:32:02.796: ERROR/AndroidRuntime(391): at
android.app.Instrumentation.execStartActivity(Instrumentation.java:
1378)
05-05 06:32:02.796: ERROR/AndroidRuntime(391): at
android.app.Activity.startActivityForResult(Activity.java:2817)
05-05 06:32:02.796: ERROR/AndroidRuntime(391): at
android.app.Activity.startActivity(Activity.java:2923)
05-05 06:32:02.796: ERROR/AndroidRuntime(391): at
net.sgoliver.AndroidXml$EventoAdapter$1.onClick(AndroidXml.java:162)
05-05 06:32:02.796: ERROR/AndroidRuntime(391): at
android.view.View.performClick(View.java:2408)
05-05 06:32:02.796: ERROR/AndroidRuntime(391): at android.view.View
$PerformClick.run(View.java:8816)
05-05 06:32:02.796: ERROR/AndroidRuntime(391): at
android.os.Handler.handleCallback(Handler.java:587)
05-05 06:32:02.796: ERROR/AndroidRuntime(391): at
android.os.Handler.dispatchMessage(Handler.java:92)
05-05 06:32:02.796: ERROR/AndroidRuntime(391): at
android.os.Looper.loop(Looper.java:123)
05-05 06:32:02.796: ERROR/AndroidRuntime(391): 

Re: [android-developers] Re: Appwidget and orientation

2011-05-05 Thread Kostya Vasilyev
This looks fragile - it depends on the service to keep running forever, 
which is 1) a bad idea 2) may not last long, especially on Android 2.0 
and later.


It also does not help if the Launcher is kicked out of memory, which is 
a rare event, but does happen sometimes.


My preferred solution is to always push complete, self-sufficient, 
RemoteViews to the widget, with all the data (like text views) and 
pending intents.


-- Kostya

05.05.2011 5:47, Niall ?:
Ok. I was wrong in my first post about the error not being displayed. 
The appwidget did indeed just default to the initial value.

I solved the issue (I think) by doing the following:

public static class orientationDetectionService extends Service {
  @Override public void onStart( Intent intent, int startID ) {
  }
  @Override void onConfigurationChanged( Configuration newConfig ) {
Intent intent = new Intent( this, widget.class );
intent.setAction( widget.FORCE_WIDGET_REDRAW );
sendBroadcast( intent );
  }
  @Override public IBinder onBind( Intent arg0 ) {
return null;
  }
}


I context.startService'd in the onCreate of the widget, and put the 
service into the manifest too.


Is this a heavy solution to the problem? It might be a naive question, 
but will this solution eat away battery?

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



--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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

Re: [android-developers] Re: Urdu Support in Android message

2011-05-05 Thread Naveed Ahmad
thanks for reply..  well if i made app for it.. i think it will work ..what
you say about this?


On Thu, May 5, 2011 at 6:54 AM, Zsolt Vasvari zvasv...@gmail.com wrote:

 - Get the source code to Android
 - Localize it
 - Submit localized data (text/images/etc.) to Google
 - Wait for it to appear in the next version of Android.

 On May 4, 6:30 pm, naveed ahmad navidu...@gmail.com wrote:
  Hi I am Naveed and i am new in Android world,, I need help regarding
  support of Urdu messages in Android .. plz guide me how can i do
  this,
 
  a lot of people in my country use to send message in Urdu  language
  but Android does not support Urud  yet in messaging.
 
  Thanks
  Naveed Ahmad

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




-- 


*Regards*

---
*Naveed Ahmad | E Factor | IT Executive | 0332-5271463 |
*http://www.linux-helpers.com
www.linux-helpers.com* |
*

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

[android-developers] Re: problem with Linkify.addLinks(

2011-05-05 Thread beginer
sorry but I don't understand what you said

On May 5, 9:52 am, Kostya Vasilyev kmans...@gmail.com wrote:
 Copying back to the list.

 This looks like an emulator issue. Can you access the site with the
 emulator's web browser? I would guess not.

 And looking at the last line in the log:

 Address family not supported by protocol

 I would guess that it's IPv6 related.

 PS - Don't use hardcoded strings for intent actions, there are constants
 like Intent.ACTION_VIEW.

 -- Kostya

 05.05.2011 10:37, beginer пишет:









  thanks Kostya

  I put

                     lblTitulo.setOnClickListener(new OnClickListener() {

                             public void onClick(View v) {
                                     // TODO Auto-generated method stub
                                //TextView tv = (TextView)findViewById( 
  R.id.link2_view );

                                Intent browserIntent = new 
  Intent(android.intent.action.VIEW,
  Uri.parse(http://www.google.es;));
                                startActivity(browserIntent);

                            //tv.setText(la_dire);
                           // Linkify.addLinks( tv, Linkify.WEB_URLS );

                             }
                     });

  and it go good

  BUt when I put my url, dosen't work, the code is this:

  final String la_dire = miLista.get(position).getLink();
                     //System.out.println(la_dire);

                     lblTitulo.setOnClickListener(new OnClickListener() {

                             public void onClick(View v) {
                                     // TODO Auto-generated method stub
                                //TextView tv = (TextView)findViewById( 
  R.id.link2_view );

                                Intent browserIntent = new 
  Intent(android.intent.action.VIEW,
  Uri.parse(la_dire));
                                startActivity(browserIntent);

                            //tv.setText(la_dire);
                           // Linkify.addLinks( tv, Linkify.WEB_URLS );

                             }
                     });

  The emulator said this:

  05-05 06:27:10.256: INFO/System.out(391):
  [net.sgoliver.Evento@44ef34c8, net.sgoliver.Evento@44ef42e8,
  net.sgoliver.Evento@44ef45f8, net.sgoliver.Evento@44ef48c0,
  net.sgoliver.Evento@44ef5560, net.sgoliver.Evento@44ef65f8,
  net.sgoliver.Evento@44ef6848, net.sgoliver.Evento@44ef6cb0,
  net.sgoliver.Evento@44ef7010, net.sgoliver.Evento@44ef7428]
  05-05 06:27:10.465: INFO/System.out(391):            
  http://www.donostiakultura.com
  05-05 06:27:10.545: INFO/System.out(391):            http://www.google.es
  05-05 06:27:10.577: INFO/System.out(391):            http://www.adimedia.net
  05-05 06:27:10.817: INFO/ActivityManager(59): Displayed activity
  net.sgoliver/.AndroidXml: 2073 ms (total 2073 ms)
  05-05 06:27:16.046: DEBUG/dalvikvm(119): GC_EXPLICIT freed 658
  objects / 36880 bytes in 129ms
  05-05 06:27:21.136: DEBUG/dalvikvm(214): GC_EXPLICIT freed 156
  objects / 11168 bytes in 165ms
  05-05 06:27:26.156: DEBUG/dalvikvm(261): GC_EXPLICIT freed 250
  objects / 11856 bytes in 138ms
  05-05 06:27:26.440: DEBUG/SntpClient(59): request time failed:
  java.net.SocketException: Address family not supported by protocol
  05-05 06:32:02.775: INFO/ActivityManager(59): Starting activity:
  Intent { act=android.intent.action.VIEW dat=
  05-05 06:32:02.775: INFO/ActivityManager(59):
 http://www.donostiakultura.com}
  05-05 06:32:02.775: DEBUG/AndroidRuntime(391): Shutting down VM
  05-05 06:32:02.786: WARN/dalvikvm(391): threadid=1: thread exiting
  with uncaught exception (group=0x4001d800)
  05-05 06:32:02.796: ERROR/AndroidRuntime(391): FATAL EXCEPTION: main
  05-05 06:32:02.796: ERROR/AndroidRuntime(391):
  android.content.ActivityNotFoundException: No Activity found to handle
  Intent { act=android.intent.action.VIEW dat=
  05-05 06:32:02.796: ERROR/AndroidRuntime(391):
 http://www.donostiakultura.com}
  05-05 06:32:02.796: ERROR/AndroidRuntime(391):     at
  android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:
  1408)
  05-05 06:32:02.796: ERROR/AndroidRuntime(391):     at
  android.app.Instrumentation.execStartActivity(Instrumentation.java:
  1378)
  05-05 06:32:02.796: ERROR/AndroidRuntime(391):     at
  android.app.Activity.startActivityForResult(Activity.java:2817)
  05-05 06:32:02.796: ERROR/AndroidRuntime(391):     at
  android.app.Activity.startActivity(Activity.java:2923)
  05-05 06:32:02.796: ERROR/AndroidRuntime(391):     at
  net.sgoliver.AndroidXml$EventoAdapter$1.onClick(AndroidXml.java:162)
  05-05 06:32:02.796: ERROR/AndroidRuntime(391):     at
  android.view.View.performClick(View.java:2408)
  05-05 06:32:02.796: ERROR/AndroidRuntime(391):     at android.view.View
  $PerformClick.run(View.java:8816)
  05-05 06:32:02.796: ERROR/AndroidRuntime(391):     at
  android.os.Handler.handleCallback(Handler.java:587)
  05-05 06:32:02.796: ERROR/AndroidRuntime(391):     at
  

[android-developers] Android Camera Streaming through RTP/RTSP?

2011-05-05 Thread saha devan
Hi all,

How do i stream Android Camera Using RTP/RTSP?

I googled it around and found that there are 2 ways:

1)  
http://www.mattakis.com/blog/kisg/20090708/broadcasting-video-with-android-without-writing-to-the-file-system;
- They havent mentioned about how to implement the server side?

2) Using the
 setPreviewCallback(new PreviewCallback() {

public void onPreviewFrame(byte[] data, Camera camera) {

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Fwd: Android Camera Streaming through RTP/RTSP?

2011-05-05 Thread saha devan
Hi all,

How do i stream Android Camera Using RTP/RTSP?

I googled it around and found that there are 2 ways:

1)  
http://www.mattakis.com/blog/kisg/20090708/broadcasting-video-with-android-without-writing-to-the-file-system;
- They havent mentioned about how to implement the server side?

2) Using the

setPreviewCallback(new PreviewCallback() {

public void onPreviewFrame(byte[] data, Camera camera)
{}

I tried both of the methods.

By using the 2nd method (using RTPPackets from sipdroid) i got Udp Packets
from Android to my PC ( captured via WireShark) but i am not able to play it
via VLC.

What need to be in the receiving side?

Is there any other way to achieve it?


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] Android 2.3.4. on Nexus S Calendar stuck

2011-05-05 Thread Andre Schaefer
hello,

my calendar cannot be replicated completely with Exchange.
Obviously there is one entry stopping the replication. See log below.
I have no problem with replication when using Nitrodesk.

W/RecurrenceProcessor(  453): DateException with
r=FREQ=MONTHLY;COUNT=93;INTERVAL=12;WKST=MO;BYMONTHDAY=31
rangeStart=134762628992 rangeEnd=9223372036854775807
W/CalendarProvider2(  453): Could not calculate last date.
W/CalendarProvider2(  453):
com.android.providers.calendar.DateException: Recurrence processing
stuck: FREQ=MONTHLY;COUNT=93;INTERVAL=12;WKST=MO;BYMONTHDAY=31

Is someone able to help me identifiying this crappy entry or how to
deal with this.
I have already tried to find entries on the 31th with ~93 open
recurrencies but no success. I have also tried to convert the
rangeStart entry. I tried to convert it with epoch converters assuming
that the figures contain millis. But here as well no success. The
first time is in 1974 and the second is unconvertible with epoch.

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

2011-05-05 Thread Kostya Vasilyev

Can you access the site with the  emulator's web browser?



05.05.2011 12:17, beginer пишет:

sorry but I don't understand what you said

On May 5, 9:52 am, Kostya Vasilyevkmans...@gmail.com  wrote:

  Copying back to the list.

  This looks like an emulator issue. Can you access the site with the
  emulator's web browser? I would guess not.

  And looking at the last line in the log:

  Address family not supported by protocol

  I would guess that it's IPv6 related.

  PS - Don't use hardcoded strings for intent actions, there are constants
  like Intent.ACTION_VIEW.

  -- Kostya

  05.05.2011 10:37, beginer пишет:






--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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


[android-developers] Re: problem with Linkify.addLinks(

2011-05-05 Thread beginer
Yes

On May 5, 10:35 am, Kostya Vasilyev kmans...@gmail.com wrote:
 Can you access the site with the  emulator's web browser?

 05.05.2011 12:17, beginer пишет:









  sorry but I don't understand what you said

  On May 5, 9:52 am, Kostya Vasilyevkmans...@gmail.com  wrote:
    Copying back to the list.

    This looks like an emulator issue. Can you access the site with the
    emulator's web browser? I would guess not.

    And looking at the last line in the log:

    Address family not supported by protocol

    I would guess that it's IPv6 related.

    PS - Don't use hardcoded strings for intent actions, there are constants
    like Intent.ACTION_VIEW.

    -- Kostya

    05.05.2011 10:37, beginer пишет:

 --
 Kostya Vasilyev --http://kmansoft.wordpress.com

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


[android-developers] Camera standby when screen is off?

2011-05-05 Thread Ricardo Silva
Hello,

If an application is using the camera and the screen goes off, the
camera (hardware/software) continues to work or is disabled? I want to
know to avoid draining the battery.

Thanks

Ricardo Silva

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

2011-05-05 Thread Niall
Does what you suggested mean that all the brunt work is performed by the 
service, and that this merely passes a RemoteViews to the appwidget for 
displaying etc?  

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

2011-05-05 Thread Kostya Vasilyev

Weird.

I wonder if there is some unprintable character somewhere, or perhaps a 
national (accented character) somewhere in your URL.


Change the Intent construction like this:

Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(la_dire));

And double check the URL to make sure it doesn't have any strange 
characters.


You're also supposed to create a chooser, in case the user has multiple 
web browsers installed:


String la_dire = http://www.donostiakultura.com;;
Intent browserIntent = new Intent(Intent.ACTION_VIEW, 
Uri.parse(la_dire));

startActivity(*Intent.createChooser(browserIntent, Browse with...)*);

-- Kostya

05.05.2011 12:47, beginer пишет:

Yes

On May 5, 10:35 am, Kostya Vasilyevkmans...@gmail.com  wrote:

Can you access the site with the  emulator's web browser?

05.05.2011 12:17, beginer пишет:










sorry but I don't understand what you said
On May 5, 9:52 am, Kostya Vasilyevkmans...@gmail.comwrote:

  Copying back to the list.
  This looks like an emulator issue. Can you access the site with the
  emulator's web browser? I would guess not.
  And looking at the last line in the log:
  Address family not supported by protocol
  I would guess that it's IPv6 related.
  PS - Don't use hardcoded strings for intent actions, there are constants
  like Intent.ACTION_VIEW.
  -- Kostya
  05.05.2011 10:37, beginer пишет:

--
Kostya Vasilyev --http://kmansoft.wordpress.com



--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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

Re: [android-developers] Re: Appwidget and orientation

2011-05-05 Thread Kostya Vasilyev
Not specifically. It's not about where you push the RemoteViews from, 
it's about what's in it.


What I do in my code is make sure that each and every RemoteViews object 
is complete, i.e. has calls to show data (setTextViewText, etc.) as well 
as set any pending intents.


Whenever something changes, and I need to update one text view in the 
widget (just to pick an example), my code again pushes a complete 
update, with values for all views, and pending intents.


Another way to look at this is - there is only one place in my code 
where I build RemoteViews and push it to the widget.


-- Kostya

05.05.2011 13:31, Niall пишет:
Does what you suggested mean that all the brunt work is performed by 
the service, and that this merely passes a RemoteViews to the 
appwidget for displaying etc? 



--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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


Aw: Re: [android-developers] Determine if device has only SoftMenu Keys ?

2011-05-05 Thread Andy
If you have a Game / App that uses a Full Screen you might want to make sure 
that Tablets that only have softkeys are not running in a Dead End, because 
afaik softkeys are not visible on certain views.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: 1380 Paid Applications in One Free Torrent then How to SELL it?

2011-05-05 Thread Marcin Orlowski
On 5 May 2011 09:34, mot12 martin.hu...@gmail.com wrote:

- Limit the lifetime of your app so the app requires updates every few
 months (this is a tricky one, you are likely to lose a lot of users if
 you don't alert them well in in advance that an update is required).


My experience with this approach is that it's better to use two deadlines.
One is soft expiration where you pops someting (dialog/notification etc)
that there's update and user have to update as the current version is no
longer supported and hard expiration (perfectly at lest 2 or 3 weeks
later than soft) which enforces upgrade by simply halting current version.
And make sure you do not push that too frequent. Each version shall
live no less than 1,5-2 months or your (l)users will rant.

Regards,
Marcin Orlowski

*Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
*Date In Tray* http://bit.ly/dateintraypro - current date at glance...
WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
*Twitterhttp://webnetmobile.com/twitter/
*

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

2011-05-05 Thread a a
Dear all devs,

try{
File newfile = new File(prefix);
FileInputStream fileInput = new FileInputStream(newfile);
BufferedInputStream buf = new BufferedInputStream(fileInput);
final DataInputStream dataInput = new DataInputStream(buf);
..
.
} catch(Exception e) {
// I don't know which should i close.

// Can anybody tell me which should i close??
//newfile.close()  ?
//fileInput.close() ?
//buf.close() ?
// dataInput.close() ?
}

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

2011-05-05 Thread Niall
I think I understand you... but I'm not sure that I do completely. 

Having not used services for updating (or for managing updates) let me first 
ask what you mean by pushing updates so I don't misunderstand. 
Does that mean that in a service I instantiate an appWidgetManager, and then 
call its updateAppWidget with one RemoteViews? The RemoteViews coming from 
some update function I write? I think I can do that. 
And does that as a result mean that to fix the orientation issues that this 
thread's about when I get an onConfigurationChanged notification I do the 
same thing with the appWidgetManager and its updateAppWidget method? 

I think that makes sense. And that would be preferable to broadcasting from 
the service back to the appwidget? 

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

2011-05-05 Thread lbendlin
keep in mind that you may be using phrases that are outside the OP's 
cultural context (as in mutual misunderstanding)

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

2011-05-05 Thread Kostya Vasilyev

05.05.2011 14:22, Niall ?:

I think I understand you... but I'm not sure that I do completely.

Having not used services for updating (or for managing updates) let me 
first ask what you mean by pushing updates so I don't misunderstand.


By pushing an update I mean:

1 - Instantiating RemoteViews;
2 - Setting some values in it;
3 - Calling AppWidgetManager.updateAppWidget.

I call it pushing because the RemoteViews object is sent over to the 
Launcher, which then displays the widget.


Does that mean that in a service I instantiate an appWidgetManager, 
and then call its updateAppWidget with one RemoteViews? The 
RemoteViews coming from some update function I write? I think I can do 
that.


Yes. In a service or not. Not all widgets need a service just to build 
the update.


And does that as a result mean that to fix the orientation issues that 
this thread's about when I get an onConfigurationChanged notification 
I do the same thing with the appWidgetManager and its updateAppWidget 
method?


You won't need the service with onConfigurationChanged if you do this.

The problem with orientation changes happens when you update your widget 
in several distinct updates: one to push the pending intents and some 
initial values, then another to update some text view, etc.


The launcher only keeps one RemoteViews for each widget - the most 
recent one. If it needs to recreate the widget, it does this by 
reloading the widget's layout, and applying this saved RemoteViews.


So, you want to make sure that your RemoteViews objects can completely 
specify the current state of your widget.




I think that makes sense. And that would be preferable to broadcasting 
from the service back to the appwidget?


The service can be killed, and thus not receive any config change 
notificaitons. The service also doesn't help if the Launcher (the home 
screen) is killed.


-- Kostya

--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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

Re: Aw: Re: [android-developers] Determine if device has only SoftMenu Keys ?

2011-05-05 Thread lbendlin
From an earlier post here I remember that it is not possible to distinguish 
between hardware and software keys with the same function (including IME)

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

2011-05-05 Thread Smiley
Make sure you close every object that you don't need (and has a close
method).

Do that in the finally block.

:-)

On May 5, 1:20 pm, a a harvey.a...@gmail.com wrote:
 Dear all devs,

 try{
             File newfile = new File(prefix);
             FileInputStream fileInput = new FileInputStream(newfile);
             BufferedInputStream buf = new BufferedInputStream(fileInput);
             final DataInputStream dataInput = new DataInputStream(buf);
 ..
 .} catch(Exception e) {

 // I don't know which should i close.

 // Can anybody tell me which should i close??
 //newfile.close()  ?
 //fileInput.close() ?
 //buf.close() ?
 // dataInput.close() ?







 }

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

2011-05-05 Thread Niall
Thanks for taking the time to explain. I think I understand it much better 
now. And I think it also makes sense, which is nice too :) 

I may come back here if I have more questions, but I think not. 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Strangely !! The RAM usage of my APK over 20MB

2011-05-05 Thread lbendlin
which objects would consume that RAM? Large images? 

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

2011-05-05 Thread mack2978
Hi All,

I am trying to set the image as wallpaper from code and it is working
fine.
But when i looked the setted wallpaper, it seems to be streched, any
idea, why it has streched?

below is my code:
package com.example.HelloGridView;
import java.io.IOException;

import com.example.HelloGridView.R;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.Window;
import android.view.ViewGroup.LayoutParams;
import android.widget.Button;
import android.widget.Gallery;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.Toast;
import android.view.View.OnClickListener;
import android.app.WallpaperManager;

public class myimageview extends Activity implements OnClickListener {
/** Called when the activity is first created. */

//public MyView myView;
int   param1;
private ImageView mImageView;
private ImageButton setwallpaper;
private ImageButton mslideshow;
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
final WallpaperManager wallpaperManager =
WallpaperManager.getInstance(this);
requestWindowFeature(Window.FEATURE_NO_TITLE);
Bundle bundle = this.getIntent().getExtras();
param1 = bundle.getInt(param1);
setContentView(R.layout.myimageview);
mImageView = (ImageView) findViewById(R.id.imageview);
mImageView.setDrawingCacheEnabled(true);
mImageView.setImageResource(param1);
mslideshow =
(ImageButton)findViewById(R.id.slideshow);

mslideshow.setOnClickListener(new OnClickListener() {
public void onClick(View view) {

Intent MyIntent = new Intent(myimageview.this,
slideshowview.class);
startActivity(MyIntent);

}
});



setwallpaper = (ImageButton) findViewById(R.id.preview);
setwallpaper.setOnClickListener(new OnClickListener() {
public void onClick(View view) {
try {
 
wallpaperManager.setBitmap(mImageView.getDrawingCache());
finish();
} catch (IOException e) {
e.printStackTrace();
}
}
});
}
@Override
public void onClick(View v) {
//show message
//Toast.makeText(this, Button Pressed,
Toast.LENGTH_LONG).show();

}


}
thanks,
mac

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Strangely !! The RAM usage of my APK over 20MB

2011-05-05 Thread Adam Ratana
Use DDMS and profile your allocations in eclipse.  Are you creating
new instances in an ondraw method, etc. see the developer docs on
performance.

On May 4, 10:33 am, Leon Worker leon@gmail.com wrote:
 Dear Senior Developers :
    I'm a junior Android developer. And i caorn't understand where the
 problem is. As my Message Title said, i can't convince my Project
 Manager the RAM usage is so high sometimes.

 Here is my Steps and Situation for your reference.

 Situation : My APK have 4 Activities and 1 Service. And I will check
 my APK status through the function of Setting.

 Step 1 : From Setting -- Application -- Running Service.
 Step 2 : Find my APK Name, and you can see the RAM Usage and Service
 running-time. Normally, my APK will cause about 3 to 5 MB RAM. But i
 find the RAM Usage will become to 20MB sometimes.

 So i don't know how to tune my APK or how to avoid the Memory Leak
 issue. Please kindly to give me any suggestions. Many Thanks.

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


Re: [android-developers] Re: Strangely !! The RAM usage of my APK over 20MB

2011-05-05 Thread Gergely Juhász
You could try to use some memory analyzer tool. I use MAT for my project:
http://www.eclipse.org/mat/

Search for google how can you use it with android but here is a good start:
http://biowallet.blogspot.com/2009/04/analyze-android-15-memory-dump.html

On 5 May 2011 14:07, Adam Ratana adam.rat...@gmail.com wrote:

 Use DDMS and profile your allocations in eclipse.  Are you creating
 new instances in an ondraw method, etc. see the developer docs on
 performance.

 On May 4, 10:33 am, Leon Worker leon@gmail.com wrote:
  Dear Senior Developers :
 I'm a junior Android developer. And i caorn't understand where the
  problem is. As my Message Title said, i can't convince my Project
  Manager the RAM usage is so high sometimes.
 
  Here is my Steps and Situation for your reference.
 
  Situation : My APK have 4 Activities and 1 Service. And I will check
  my APK status through the function of Setting.
 
  Step 1 : From Setting -- Application -- Running Service.
  Step 2 : Find my APK Name, and you can see the RAM Usage and Service
  running-time. Normally, my APK will cause about 3 to 5 MB RAM. But i
  find the RAM Usage will become to 20MB sometimes.
 
  So i don't know how to tune my APK or how to avoid the Memory Leak
  issue. Please kindly to give me any suggestions. Many Thanks.

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


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

2011-05-05 Thread Niall
Just another quick question. I want to keep track of update-to-update 
changes. So I have a ListListint variable containting my data (which 
I've parsed from the net). At the end of updating I copy this value to 
another variable. I need to keep track of these variables. Does it make more 
sense to store them in the appwidget class or the service class that I'll be 
using? I think it makes more sense for the former, but I'm still sorta 
trying to get my head around the thing so I may be wrong.

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

2011-05-05 Thread lmp
I've uploaded my shot at a working implementation at:
https://github.com/Larpon/RangeSeekBar

If anyone is interested.

As always you are welcome to contribute to the project or ask
questions.

Cheers
--
lmp



On Apr 14, 1:26 pm, lmp leverpos...@gmail.com wrote:
 Hi group,

 I'm trying to make a custom seekbar that can have more than one thumb
 much like this one:http://jqueryui.com/demos/slider/#range-vertical(mine 
 should be able
 to be both vertical and horizontal though).

 I'm trying to get my head around how to start - I've already looked
 into the existing Andriod SeekBar view and derriving from ProgressBar
 view.
 As I see it none of those fit the purpose 100%. So I decided to roll
 my own.

 I've extended the View class, and played around.
 It would be nice to have features that let users set the
 background,colors etc. attributes for the seekbar and thumb(s) both in
 code and with xml.

 I'm quite uncertain how would be the best way to design this and where
 to start?
 Any pointers will be greatly appreciated.

 Thanks
 --
 lmp

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

2011-05-05 Thread iñaki
Hi, I have a weird error only in HTC Desire HD... When I start activity, It
open a DB with a query The first time that user open activity system
returns:
android.database.sqlite.SQLiteException: no such table: MyTable: , while
compiling: SELECT * FROM MyTable
With other kinds of phones doesn´t happen... And in the second time that
user start activity don´t retutn error...

Any idea?


Regards

Iñaki

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Logcat View fails with Could not create the view: For input string: our

2011-05-05 Thread Robert Rowntree
same issue on 3.7 M6 on windows vista  using a logcat filter containing :

resolved by following instructions in previous post

this bug makes the filter pretty useless for implementing string patterns

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

2011-05-05 Thread MEDO
thank you for your post



On 5 مايو, 06:35, Robert Massaioli robertmassai...@gmail.com wrote:
 For the record I think you would be better off with the Simple XML
 Library:http://massaioli.homelinux.com/wordpress/2011/04/21/simple-xml-in-and...

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

2011-05-05 Thread Kostya Vasilyev
AppWidgetProvider objects are transient, can be destroyed very quickly 
after they're needed (for onUpdate, etc.). Because of this, storing data 
there is pretty much useless.


Using the service is better, but services can be stopped (by the system 
or by the user).


I recommend making a static somewhere, which by definition lives as long 
as the process. You can wrap it in a nice class, such as:


class DataCache {

public static ListDataItem getMostRecentData() {

}

private static ListDataItem . ;
}

The process can be killed too, and next time it's launched, any statics 
will initially be empty. Make sure your code can handle this: doesn't 
crash and initiates getting the data from somewhere.


You might want to have a persistent data cache as well (using a SQL 
database or any other storage mechanism).


-- Kostya

05.05.2011 16:40, Niall пишет:
Just another quick question. I want to keep track of update-to-update 
changes. So I have a ListListint variable containting my data 
(which I've parsed from the net). At the end of updating I copy this 
value to another variable. I need to keep track of these variables. 
Does it make more sense to store them in the appwidget class or the 
service class that I'll be using? I think it makes more sense for the 
former, but I'm still sorta trying to get my head around the thing so 
I may be wrong. 



--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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


[android-developers] Re: SAX PARSER

2011-05-05 Thread Streets Of Boston
Yep, good choice. Also Piccolo XML pull/sax parser is a very lean and fast 
parser: 
http://sourceforge.net/projects/piccolo/ 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Re: [android-developers] Determine if device has only SoftMenu Keys ?

2011-05-05 Thread TreKing
On Thu, May 5, 2011 at 4:51 AM, Andy m...@tekx.de wrote:

 If you have a Game / App that uses a Full Screen you might want to make
 sure that Tablets that only have softkeys are not running in a Dead End,
 because afaik softkeys are not visible on certain views.


If I understand you correctly, the soft keys are part of the display itself
and can be hidden by a full screen app? That doesn't make sense. I'm pretty
sure it's required that devices running Android provide certain keys, in
particular the Home key, at all times to give the user some way out of the
app (i.e. they cannot come to a Dead End, as you put it).

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

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

Re: Re: [android-developers] Determine if device has only SoftMenu Keys ?

2011-05-05 Thread Marcin Orlowski
On 5 May 2011 15:55, TreKing treking...@gmail.com wrote:

 On Thu, May 5, 2011 at 4:51 AM, Andy m...@tekx.de wrote:

 If you have a Game / App that uses a Full Screen you might want to make
 sure that Tablets that only have softkeys are not running in a Dead End,
 because afaik softkeys are not visible on certain views.


 If I understand you correctly, the soft keys are part of the display itself
 and can be hidden by a full screen app? That doesn't make sense. I'm pretty
 sure it's required that devices running Android provide certain keys, in
 particular the Home key, at all times to give the user some way out of the
 app (i.e. they cannot come to a Dead End, as you put it).


http://static.googleusercontent.com/external_content/untrusted_dlcp/source.android.com/en//compatibility/2.3/android-2.3.3-cdd.pdf

7.2.3. The Home, Menu and Back functions are essential to the Android
navigation paradigm. Device implementations MUST make these functions
available
to the user at all times, regardless of application state

I did not bother to look for CDD for Honeycomb (not sure if it's yet
publicly available) but do not expect anyone to be allowed to left user in
described state (at least for devices that come with Market)

Regards,
Marcin Orlowski

*Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
*Date In Tray* http://bit.ly/dateintraypro - current date at glance...
WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
*Twitterhttp://webnetmobile.com/twitter/
*

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

2011-05-05 Thread Pandi
Hi,  I am getting ANR from camera if I press start/stop recording
continuously . How do I analyze this?
Which thread is creating problem?

ANR Trace:

- pid 3567 at 2011-05-05 13:02:57 -
Cmd line: com.android.camera

DALVIK THREADS:
(mutexes: tll=0 tsl=0 tscl=0 ghl=0 hwl=0 hwll=0)
main prio=5 tid=1 NATIVE
  | group=main sCount=1 dsCount=0 obj=0x4001f180 self=0xce58
  | sysTid=3567 nice=0 sched=0/0 cgrp=default handle=-1345006496
  | monitors held: none
  at android.media.MediaRecorder.native_stop(Native Method)
  at android.media.MediaRecorder.stop(MediaRecorder.java:606)
  at
com.android.camera.VideoCamera.stopVideoRecording(VideoCamera.java:
1826)
  at
com.android.camera.VideoCamera.stopVideoRecordingAndGetThumbnail(VideoCamera.java:
1735)
  at
com.android.camera.VideoCamera.onStopVideoRecording(VideoCamera.java:
847)
  at
com.android.camera.VideoCamera.onShutterButtonClick(VideoCamera.java:
857)
  at com.android.camera.ShutterButton.performClick(ShutterButton.java:
115)
  at android.view.View$PerformClick.run(View.java:9080)
  at android.os.Handler.handleCallback(Handler.java:587)
  at android.os.Handler.dispatchMessage(Handler.java:92)
  at android.os.Looper.loop(Looper.java:123)
  at android.app.ActivityThread.main(ActivityThread.java:3683)
  at java.lang.reflect.Method.invokeNative(Native Method)
  at java.lang.reflect.Method.invoke(Method.java:507)
  at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:864)
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
  at dalvik.system.NativeStart.main(Native Method)

GLThread 13 prio=5 tid=11 WAIT
  | group=main sCount=1 dsCount=0 obj=0x40550058 self=0x22cd10
  | sysTid=3585 nice=0 sched=0/0 cgrp=default handle=2077712
  | monitors held:
0x40539720[0] (Landroid/opengl/GLSurfaceView$GLThreadManager;)
  at java.lang.Object.wait(Native Method)
  - waiting on 0x40539720 (a android.opengl.GLSurfaceView
$GLThreadManager)
  at java.lang.Object.wait(Object.java:358)
  at android.opengl.GLSurfaceView
$GLThread.guardedRun(GLSurfaceView.java:1321)
  at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:
1118)

android.hardware.SensorManager$SensorThread prio=5 tid=9 NATIVE
  | group=main sCount=1 dsCount=0 obj=0x40514528 self=0x2078f8
  | sysTid=3582 nice=-8 sched=0/0 cgrp=default handle=2062968
  | monitors held: none
  at android.hardware.SensorManager.sensors_data_poll(Native Method)
  at android.hardware.SensorManager$SensorThread
$SensorThreadRunnable.run(SensorManager.java:446)
  at java.lang.Thread.run(Thread.java:1019)

CameraHolder prio=5 tid=10 NATIVE
  | group=main sCount=1 dsCount=0 obj=0x4058f668 self=0x1f
  | sysTid=3576 nice=0 sched=0/0 cgrp=default handle=2066880
  | monitors held: none
  at android.os.MessageQueue.nativePollOnce(Native Method)
  at android.os.MessageQueue.next(MessageQueue.java:119)
  at android.os.Looper.loop(Looper.java:110)
  at android.os.HandlerThread.run(HandlerThread.java:60)

Binder Thread #2 prio=5 tid=8 NATIVE
  | group=main sCount=1 dsCount=0 obj=0x40511030 self=0x193470
  | sysTid=3574 nice=0 sched=0/0 cgrp=default handle=607368
  | monitors held: none
  at dalvik.system.NativeStart.run(Native Method)

Binder Thread #1 prio=5 tid=7 NATIVE
  | group=main sCount=1 dsCount=0 obj=0x40510f68 self=0x941e8
  | sysTid=3573 nice=0 sched=0/0 cgrp=default handle=606536
  | monitors held: none
  at dalvik.system.NativeStart.run(Native Method)

Compiler daemon prio=5 tid=6 VMWAIT
  | group=system sCount=1 dsCount=0 obj=0x4050d0c0 self=0x1a5980
  | sysTid=3572 nice=0 sched=0/0 cgrp=default handle=1726784
  | monitors held: none
  at dalvik.system.NativeStart.run(Native Method)

JDWP daemon prio=5 tid=5 VMWAIT
  | group=system sCount=1 dsCount=0 obj=0x4050d010 self=0x1a5808
  | sysTid=3571 nice=0 sched=0/0 cgrp=default handle=1726408
  | monitors held: none
  at dalvik.system.NativeStart.run(Native Method)

Signal Catcher daemon prio=5 tid=4 RUNNABLE
  | group=system sCount=0 dsCount=0 obj=0x4050cf50 self=0x191e78
  | sysTid=3570 nice=0 sched=0/0 cgrp=default handle=1646136
  | monitors held: none
  at dalvik.system.NativeStart.run(Native Method)

GC daemon prio=5 tid=3 VMWAIT
  | group=system sCount=1 dsCount=0 obj=0x4050cea8 self=0x191c78
  | sysTid=3569 nice=0 sched=0/0 cgrp=default handle=1652720
  | monitors held: none
  at dalvik.system.NativeStart.run(Native Method)

HeapWorker daemon prio=5 tid=2 VMWAIT
  | group=system sCount=1 dsCount=0 obj=0x4050cdf0 self=0x15cc68
  | sysTid=3568 nice=0 sched=0/0 cgrp=default handle=1197128
  | monitors held: none
  at dalvik.system.NativeStart.run(Native Method)

- end 3567 -


Thanks  Regards,
Pandi

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

[android-developers] Re: 1380 Paid Applications in One Free Torrent then How to SELL it?

2011-05-05 Thread nemik
Please try to imagine the percentage of people you know around you
that would be capable of:
* enabling debug to install apps remotely
* getting the necessary BitTorrent programs
* using them to download this file
* extract that apps and install them to the phone

I can't imagine that is even close to 2% or 3%. Most of your customers
want nice and easy access to the app through the Market and will pay
for it. I think most of them also believe that this is the only way to
get apps and they don't know what an APK is.

Focus on your customers, there's nothing you can about crap like this.
Make sure their experience with you is much, much better than through
piracy; it's pretty hard to screw this up but the music and movie
industries manage to do it. Try not to make the same mistake. The
people downloading these torrents won't pay you anyway even if you
took it away from them. Concentrate on the people that will.

On May 5, 4:54 am, Marcin Orlowski webnet.andr...@gmail.com wrote:
 On 5 May 2011 09:34, mot12 martin.hu...@gmail.com wrote:

 - Limit the lifetime of your app so the app requires updates every few

  months (this is a tricky one, you are likely to lose a lot of users if
  you don't alert them well in in advance that an update is required).

 My experience with this approach is that it's better to use two deadlines.
 One is soft expiration where you pops someting (dialog/notification etc)
 that there's update and user have to update as the current version is no
 longer supported and hard expiration (perfectly at lest 2 or 3 weeks
 later than soft) which enforces upgrade by simply halting current version.
 And make sure you do not push that too frequent. Each version shall
 live no less than 1,5-2 months or your (l)users will rant.

 Regards,
 Marcin Orlowski

 *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
 *Date In Tray* http://bit.ly/dateintraypro - current date at glance...
 WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
 *Twitterhttp://webnetmobile.com/twitter/
 *

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

2011-05-05 Thread Jacob
sorry; It seems I cannot dislcose that according to my manager.
But I do understand if the question can't be answered without more
internal details.
Objective is to stay commnucated and know the other app is alive and
if one is down, inform the user of the status and do some minor data
work.

On May 4, 10:08 pm, TreKing treking...@gmail.com wrote:
 On Wed, May 4, 2011 at 10:45 AM, Jacob jacobroutolo...@gmail.com wrote:
  I have 2 apps; need to stay communicated with each other

 Why? What are you trying to achieve?

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

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


[android-developers] Re: 1380 Paid Applications in One Free Torrent then How to SELL it?

2011-05-05 Thread Streets Of Boston
I 100% agree with nemic. You can put tons and tons of effort in fighting 
piracy and maybe get a small return on it. It's better to spend this energy 
and effort in improving/augmenting your app for your paying customers.

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

2011-05-05 Thread Streets Of Boston
Maybe you can answer this:

You can only have one app (screen/activity) active at any given time. If one 
app is in the foreground (i.e. it is active), the other app is in the 
background at best (maybe even been killed). What does 'down' mean in your 
situation?

Is one app an activity (it has a UI) and the other is a service? Or are both 
apps just services (with no UI)?

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

[android-developers] How to Implement onChildClick Listener

2011-05-05 Thread Me
I am following the example code given on android developer site for develop
Expandable List View link as
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/ExpandableList1.html

http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/ExpandableList1.htmlnow
I am trying to implement onChildClick Listener ...
For this I am doing as
  super.onCreate(savedInstanceState);
mAdapter = new MyExpandableListAdapter();
setListAdapter(mAdapter);
   getExpandableListView().setOnChildClickListener(this);

in ExpandableList1

and overriding this method

@Override
 public boolean onChildClick(ExpandableListView parent, View v, int
groupPosition, int childPosition, long id){
System.out.print(This is the test);
 return false;
 }
in same ExpandableList1 as it extend ExpandableListActivity
But control not coming inside the onChildClick () method .
Anyone guide me where I am doing the wrong ...
Hope someone teach where is my mistake 


---
Regards :
   Aftab
---

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

[android-developers] Re: Eclipse/ADT not rebuilding correctly

2011-05-05 Thread Jake Basile
This problem has not gone away, and is getting worse. I need to fully 
restart eclipse so often now to get it to use my new code that I do it about 
15 times a day.

Incredibly frustrating, and a waste of my 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] obtaining true dimensions of a View larger than the screen

2011-05-05 Thread kellogs
Hello,

trying to implement a dynamic scrolview wrapping mechanism here. But
no matter what method I try from the View class they all return me the
view's part of height that is currently visible on screen. So if there
are 360 pixels available for a textview that has lots of text and is
currently using 400 pixels its getHeight() and many other related
methods always report 360.

Any way around this ? maybe getting to the View's Canvas ? How can I
go about that ?

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] Market: Significiant installations drop

2011-05-05 Thread Marcin Orlowski
Hi,

Since nobody complains about such posts here - it's just me or you see same
significiant drop of active installation today (like 1/5 of volume)? Mostly
on all apps. Is it sign of new Market fearture coming? ;/

Regards,
Marcin Orlowski

*Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
*Date In Tray* http://bit.ly/dateintraypro - current date at glance...
WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
*Twitterhttp://webnetmobile.com/twitter/
*

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

2011-05-05 Thread Niall
Suppose I have a status notification TextView on my appwidget. During my big 
update function (that returns the single RemoteViews object) would be be OK 
to call a method that'd update the value of the text? Like:

void updateStatus( String str ) {
  // update the status text R.id.statusUpdate 

}

RemoteViews updateAppWidgetLayout( Context context, int id ) {
  updateStatus( starting update ); 
  // do everything else
  // And here (end of function) manually set the R.id.statusUpdate view via 
the RemoteViews I'm returning.  
  return remoteViews; 

}


Where the big RemoteViews isn't touched? Or will that corrupt the process? 

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

2011-05-05 Thread TreKing
On Thu, May 5, 2011 at 10:17 AM, Jacob jacobroutolo...@gmail.com wrote:

 Both apps are just services and have a broadcast recevier each.


Is there some reason that you can explain as to why they're two separate
apps? I mean if they're this dependent, separate apps don't make sense (to
me).


 User can uninstall both the apps when they choose to.


And if they choose to uninstall one but not the other?

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

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

Re: [android-developers] Re: Appwidget and orientation

2011-05-05 Thread Kostya Vasilyev

It would be Ok, as long as:

- updateAppWidgetLayout constructs a single RemoteViews;
- this RemoteViews is passed into updateStatus;
- updateStatus calls remoteViews.setTextViewText.

You can call setTextViewText multiple times on a *single* RemoteViews, 
but that's kind of pointless, because only the most recent value will 
end up showing.


Remember that the widget won't be updated until you call 
AppWidgetManager.updateAppWidget, so if you're looking for some sort of 
progress indicator, that's not it.


-- Kostya

05.05.2011 19:39, Niall ?:
Suppose I have a status notification TextView on my appwidget. During 
my big update function (that returns the single RemoteViews object) 
would be be OK to call a method that'd update the value of the text? 
Like:


void updateStatus( String str ) {
  // update the status text R.id.statusUpdate

}

RemoteViews updateAppWidgetLayout( Context context, int id ) {
  updateStatus( starting update );
  // do everything else
  // And here (end of function) manually set the R.id.statusUpdate
view via the RemoteViews I'm returning.
  return remoteViews;

}


Where the big RemoteViews isn't touched? Or will that corrupt the 
process?



--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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

Re: [android-developers] Market: Significiant installations drop

2011-05-05 Thread TreKing
On Thu, May 5, 2011 at 10:36 AM, Marcin Orlowski
webnet.andr...@gmail.comwrote:

 Since nobody complains about such posts here - it's just me or you see
 same significiant drop of active installation today (like 1/5 of volume)?
 Mostly on all apps. Is it sign of new Market fearture coming? ;/


http://www.google.com/support/androidmarket/bin/static.py?page=known_issues.cs

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

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

[android-developers] Re: Event based communication between two apps.

2011-05-05 Thread Jacob
ah.! good question. I should have mentioned that.
Both apps are just services and have a broadcast recevier each. They
have one minor ui for the user to start/register them; once started,
no more ui. only some notifications/informations to the user. User can
uninstall both the apps when they choose to.


On May 5, 9:41 am, Streets Of Boston flyingdutc...@gmail.com wrote:
 Maybe you can answer this:

 You can only have one app (screen/activity) active at any given time. If one
 app is in the foreground (i.e. it is active), the other app is in the
 background at best (maybe even been killed). What does 'down' mean in your
 situation?

 Is one app an activity (it has a UI) and the other is a service? Or are both
 apps just services (with no UI)?

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


[android-developers] How does the default News widget animate it's content

2011-05-05 Thread Joseph Earl
From my experience with Widgets the following apply:

 - You cannot apply Animations to RemoteViews
 - You cannot use custom classes in RemoteViews, and so there is no
way to provide a custom view with animation built in
 - You can use a Layout Animation, but this only plays when the widget
is added to the Home screen, not everytime you update the RemoteViews

However the default News(/Weather) widget (from 2.1 up I think)
animates smoothly in and out between headline changes.

How does it accomplish this? And are the methods it uses to do so
publicly 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] How does the default News widget animate it's content

2011-05-05 Thread Kostya Vasilyev

Could be a ViewFlipper.

I see it's annotated with @RemoteView in 2.2 sources.

And further, setFlipInterval is annotated with 
@android.view.RemotableViewMethod.


-- Kostya

05.05.2011 20:05, Joseph Earl пишет:

 From my experience with Widgets the following apply:

  - You cannot apply Animations to RemoteViews
  - You cannot use custom classes in RemoteViews, and so there is no
way to provide a custom view with animation built in
  - You can use a Layout Animation, but this only plays when the widget
is added to the Home screen, not everytime you update the RemoteViews

However the default News(/Weather) widget (from 2.1 up I think)
animates smoothly in and out between headline changes.

How does it accomplish this? And are the methods it uses to do so
publicly available?




--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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


Re: [android-developers] Market: Significiant installations drop

2011-05-05 Thread Marcin Orlowski
On 5 May 2011 17:56, TreKing treking...@gmail.com wrote:

 On Thu, May 5, 2011 at 10:36 AM, Marcin Orlowski webnet.andr...@gmail.com
  wrote:

 Since nobody complains about such posts here - it's just me or you see
 same significiant drop of active installation today (like 1/5 of volume)?
 Mostly on all apps. Is it sign of new Market fearture coming? ;/



 http://www.google.com/support/androidmarket/bin/static.py?page=known_issues.cs


Thanks. Damn it :)

Regards,
Marcin Orlowski

*Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
*Date In Tray* http://bit.ly/dateintraypro - current date at glance...
WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
*Twitterhttp://webnetmobile.com/twitter/
*

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

2011-05-05 Thread Joseph Earl
That it is probably it. Does anyone have suggestions for catching the
exception that will be generated if I try this on 2.1 or lower device
(with Reflection) so I could swap out the flipper for something that
works on these devices.

On May 5, 5:11 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 Could be a ViewFlipper.

 I see it's annotated with @RemoteView in 2.2 sources.

 And further, setFlipInterval is annotated with
 @android.view.RemotableViewMethod.

 -- Kostya

 05.05.2011 20:05, Joseph Earl пишет:

   From my experience with Widgets the following apply:

    - You cannot apply Animations to RemoteViews
    - You cannot use custom classes in RemoteViews, and so there is no
  way to provide a custom view with animation built in
    - You can use a Layout Animation, but this only plays when the widget
  is added to the Home screen, not everytime you update the RemoteViews

  However the default News(/Weather) widget (from 2.1 up I think)
  animates smoothly in and out between headline changes.

  How does it accomplish this? And are the methods it uses to do so
  publicly available?

 --
 Kostya Vasilyev --http://kmansoft.wordpress.com

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


Re: [android-developers] obtaining true dimensions of a View larger than the screen

2011-05-05 Thread Dianne Hackborn
The only thing View knows is these methods it calls on itself to have
subclasses tell it how to show the scroll bars:

http://developer.android.com/reference/android/view/View.html#computeHorizontalScrollExtent()

Beyond that, you will need to look at a specific class that is doing
scrolling.

On Thu, May 5, 2011 at 8:09 AM, kellogs mihai0...@gmail.com wrote:

 Hello,

 trying to implement a dynamic scrolview wrapping mechanism here. But
 no matter what method I try from the View class they all return me the
 view's part of height that is currently visible on screen. So if there
 are 360 pixels available for a textview that has lots of text and is
 currently using 400 pixels its getHeight() and many other related
 methods always report 360.

 Any way around this ? maybe getting to the View's Canvas ? How can I
 go about that ?

 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




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

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

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

Re: [android-developers] Event based communication between two apps.

2011-05-05 Thread Dianne Hackborn
The normal way you do this on Android is by providing an IBinder object
across the processes and using IBinder.linkToDeath.

That said, as others have commented, stay connected with each other and
know when an app stops working are *really* nebulous concepts on Android,
and if you are thinking in those terms there is a really good chance what
you are trying to do is fundamentally wrong.  It's hard to say more though
without knowing what you are trying to do.

On Wed, May 4, 2011 at 8:45 AM, Jacob jacobroutolo...@gmail.com wrote:

 Hi

 I have 2 apps; need to stay communicated with each other and make sure
 battery is not affected.
 I know I can open TCP socket between them and get notified if for some
 reason the other app stops working.
 I thought TCP sockets might be expensive to maintain and perhaps drain
 battery?

 Is there any other light weight way of achieving this obejctive?
   1) Pipes - How to open a pipe between 2 apps? are they lighter than
 tcp sockets?
   2) Files - using shared file between 2 apps (if signed with same
 certficate and using the same userid.)
  How to use this shared file to know if the other app is still
 running or not? locks?

 Basically, I don't want to explicitely query if the other app is
 running or not every now and then and then communicate with it.
 Instead wait on some event that gets triggered when the other app is
 down.

 Appreciate any suggestions on a light weight protocol.

 Thank you
 Jacob

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




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

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

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

Re: [android-developers] Re: android nfc tech API help

2011-05-05 Thread priti -
From android point of view it doesnt matter what the command data is, its
all byte[] to the transcieve.
I try to get a isodep first. if that fails i try to get a NfcB tag.

In my cardB case,
I tried to connect * transcieve using ISODep and get back 6700
If I try to get a NfcB tag, the connect fails with exception.

On Tue, May 3, 2011 at 11:10 PM, Michael Roland mi.rol...@gmail.com wrote:

 Hallo,

 which variant did you use, the low-level access or the IsoDep acccess?

 The low-level example will only work with MIFARE Ultralight cards (these
 are always NfcA). Sorry, I don't know any example for low-level access
 to NfcB cards. The IsoDep example will certainly only give a useful
 result if the card contains the ICAO electronic passport application...

 br
 Michael


 On 30.04.2011 00:58 priti - wrote:
  Hi Michael,
 
  Thanks! that worked with my nfcA cards!
  But when I use it with my nfcB cards, I am getting a 67 00 (protocol
  error?)
 
  Appreciate your help,
  Priti
 
  On Thu, Apr 28, 2011 at 8:50 AM, Michael Roland mi.rol...@gmail.com
   mailto:mi.rol...@gmail.com wrote:
 
  Hallo,
 
   What exactly is low level access?
 
  With low-level access (as compared to APDU based access) I mean some
  vendor specific (proprietary) protocol according to the ISO/IEC
 14443-3
  standard. Thus, instead of sending high-level APDU commands a more
  simple protocol is used (such a protocol is for example the MIFARE
  Ultralight and the MIFARE Classic command-set).
 
   How do I send/receive nfcA/nfcB commands then?
 
  For NfcA (e.g. MIFARE Ultralight) you would simply retrieve an NfcA
  object:
 
   NfcA myTag = NfcA.getTag(tag);
 
  And then transceive low-level commands with transceive() method. E.g.
 
   byte[] data = myTag.transceive(new byte[]{ (byte)0x30, (byte)0x00
 });
 
  would retrieve the first 16 bytes of data from an MIFARE Ultralight
 tag.
 
 
  But as you suggested you want to transfer APDUs, instead of getting
 an
  NfcA object you would want to get an IsoDep object for the tag. This
  object wraps an APDU-based (ISO/IEC 14443-4  ISO/IEC 7816-4)
  connection:
 
   IsoDep myCard = IsoDep.getTag(tag);
 
  The transceive() method then allows you to directly transmit command
  APDUs to the contactless smart card and returns the response APDU:
 
   byte[] response = myCard.transceive(command);
 
  Where command could be, for instance, a SELECT(file by DF name)
 command.
  The following command would select the ICAO electronic passport
  application (AID A002471001):
  byte[] command = new byte[]{
   (byte)0x00, /* CLA = 00 (first interindustry command set) */
   (byte)0xA4, /* INS = A4 (SELECT) */
   (byte)0x04, /* P1  = 04 (select file by DF name) */
   (byte)0x0C, /* P2  = 0C (first or only file; no FCI) */
   (byte)0x07, /* Lc  = 7  (data/AID has 7 bytes) */
   /* AID = A002471001: */
   (byte)0xA0, (byte)0x00, (byte)0x00, (byte)0x02,
   (byte)0x47, (byte)0x10, (byte)0x01
  };
 
  As a response you would get e.g. status code 9000 if the applet was
  found on the card.
 
  Best regards,
  Michael
 
 
 


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

2011-05-05 Thread mack2978
Anybody pls answer this?

On May 5, 4:29 pm, mack2978 smashmah...@gmail.com wrote:
 Hi All,

 I am trying to set the image as wallpaper from code and it is working
 fine.
 But when i looked the setted wallpaper, it seems to be streched, any
 idea, why it has streched?

 below is my code:
 package com.example.HelloGridView;
 import java.io.IOException;

 import com.example.HelloGridView.R;

 import android.app.Activity;
 import android.app.AlertDialog;
 import android.content.Intent;
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
 import android.graphics.drawable.Drawable;
 import android.os.Bundle;
 import android.util.Log;
 import android.view.View;
 import android.view.Window;
 import android.view.ViewGroup.LayoutParams;
 import android.widget.Button;
 import android.widget.Gallery;
 import android.widget.ImageButton;
 import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.Toast;
 import android.view.View.OnClickListener;
 import android.app.WallpaperManager;

 public class myimageview extends Activity implements OnClickListener {
     /** Called when the activity is first created. */

         //public MyView myView;
         int   param1;
     private ImageView mImageView;
     private ImageButton setwallpaper;
     private ImageButton mslideshow;
     @Override
     protected void onCreate(Bundle savedInstanceState)
     {
         super.onCreate(savedInstanceState);
         final WallpaperManager wallpaperManager =
 WallpaperManager.getInstance(this);
         requestWindowFeature(Window.FEATURE_NO_TITLE);
         Bundle bundle = this.getIntent().getExtras();
         param1 = bundle.getInt(param1);
         setContentView(R.layout.myimageview);
         mImageView = (ImageView) findViewById(R.id.imageview);
         mImageView.setDrawingCacheEnabled(true);
         mImageView.setImageResource(param1);
         mslideshow =
 (ImageButton)findViewById(R.id.slideshow);

         mslideshow.setOnClickListener(new OnClickListener() {
             public void onClick(View view) {

                     Intent MyIntent = new Intent(myimageview.this,
 slideshowview.class);
                     startActivity(MyIntent);

             }
         });

         setwallpaper = (ImageButton) findViewById(R.id.preview);
         setwallpaper.setOnClickListener(new OnClickListener() {
             public void onClick(View view) {
                 try {

 wallpaperManager.setBitmap(mImageView.getDrawingCache());
                     finish();
                 } catch (IOException e) {
                     e.printStackTrace();
                 }
             }
         });
     }
                 @Override
                 public void onClick(View v) {
                         //show message
                         //Toast.makeText(this, Button Pressed,
 Toast.LENGTH_LONG).show();

                         }

         }
 thanks,
 mac

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

2011-05-05 Thread mack2978
Thanks Dianne

On May 4, 8:19 pm, Dianne Hackborn hack...@android.com wrote:
 There is not a shared directory for all apps on internal storage.  The
 shared directory for all apps is the directory you get for external storage
 from Environment.  (Which these days may not be external any more, but is
 still the shared directory.)





 On Wed, May 4, 2011 at 10:38 AM, mack2978 smashmah...@gmail.com wrote:
  I am newbie and this is very basic question..

  I want to store image from my application to some internal
  device location(not external SD card).
  Can anyone please let me know which location(any shared directory for
  all apps) on internal storage is this?

  thanks you
  mack

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

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

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

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


[android-developers] Android app crashes when invoking getSystemService(LOCATION_SERVICE)

2011-05-05 Thread Prayag Pathak
Hi guys,

I am trying to get the latitude and longitude of the current location.
Let me clarify, I dont want to implement a listener that will create
an event when the location will be changed. I am trying to create an
app that will record the current location on a button click event.
Following is my code :

hdLocMgr = (LocationManager)
getSystemService(Context.LOCATION_SERVICE);
Log.w(LocationTracker, The Location Manager is :
+hdLocMgr.toString());
hdLocProvider = hdLocMgr.getBestProvider(hdCrit, true);
location = hdLocMgr.getLastKnownLocation(hdLocProvider);
dlat = location.getLatitude();
dlon = location.getLongitude();
Log.w(LocationTracker, The value of Latitude is :
+dlat.toString());

The code gives a RunTimeException (caused by NullPointerException as
stated in it).

Kindly help me out in that.

Regards,

Prayag

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

2011-05-05 Thread Mark Murphy
On Thu, May 5, 2011 at 2:20 PM, Prayag Pathak prayag.d.pat...@gmail.com wrote:
 I am trying to get the latitude and longitude of the current location.
 Let me clarify, I dont want to implement a listener that will create
 an event when the location will be changed.

You act as though you have a choice in the matter.

 I am trying to create an
 app that will record the current location on a button click event.
 Following is my code :

 hdLocMgr = (LocationManager)
 getSystemService(Context.LOCATION_SERVICE);
 Log.w(LocationTracker, The Location Manager is :
 +hdLocMgr.toString());
 hdLocProvider = hdLocMgr.getBestProvider(hdCrit, true);
 location = hdLocMgr.getLastKnownLocation(hdLocProvider);
 dlat = location.getLatitude();
 dlon = location.getLongitude();
 Log.w(LocationTracker, The value of Latitude is :
 +dlat.toString());

 The code gives a RunTimeException (caused by NullPointerException as
 stated in it).

Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine
LogCat and look at the stack trace to find the line that has the
NullPointerException. If I had to guess, your location variable is
null, because getLastKnownLocation() is null, because there is no
location for the provider, because you have not requested location
updates on that provider.

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

_Android Programming Tutorials_ Version 3.4 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: HorizontalScrollView automatically scrolling

2011-05-05 Thread MB
After digging a little further:

The scrolling is caused by HorizontalScrollView.onSizeChanged. The HSV
gets the currently focused item and makes sure that it is visible in
the scroll in the new size, with the following code (from the HSV
source):

  View currentFocused = findFocus();
  if (null == currentFocused || this == currentFocused) return;

  final int maxJump = mRight - mLeft;

  if (isWithinDeltaOfScreen(currentFocused, maxJump)) {
 // [Scroll the view]
  }

I don't know what View had focus according the framework, but it was
trying to scroll it into view. I'm also unclear why this was only
happening when a ListView was shown - it's possible that the ListView
declares itself focusable and the LinearLayout doesn't.

I fixed the issue by subclassing HorizontalScrollView to return null
from findFocus(). I'm still able to click on elements within the HSV -
I suspect that navigating the UI with a d-pad might not work.

If someone has a non-hack solution let me know...

Mike



On May 4, 10:35 am, MB michael.bushei...@thoora.com wrote:
 Hello,

 I am developing for Honeycomb, and I have aHorizontalScrollViewwith
 a number of panels that make up the UI. The rightmost panel changes
 its content, sometimes displaying a ListView. I also have a sliding
 drawer that, when opening or closing, causes theHorizontalScrollView
 to resize.

 When theHorizontalScrollViewresizes, it also jumps to show the
 rightmost panel, which I don't want. But this only happens when the
 panel contains a ListView - when the panel contains a LinearLayout 
 theHorizontalScrollViewdoesn't change it's position when resizing.

 The only similar issue I found while searching is 
 this:http://stackoverflow.com/questions/1878623/listview-in-a-horizontalsc...,
 but it's triggered by an adapter changing data rather than a resize.

 How can I stop this automatic scrolling?

 Thanks,
 Mike

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

2011-05-05 Thread Julian
Anyone?

2009/11/25 Mathias mathias.menningh...@googlemail.com

 Hi,

 which Spatial Reference System is used by the Google Maps API and in
 which Reference System are the GPS coordinates to be received by a
 LocationProvider?
 I only can assume that the Location Services use WGS84, or EPSG:4326.
 But what if I use GeoPoint? Will it require WGS84 or the Google Maps
 Projection (some kind of traverse mercator projection EPSG:90913). And
 what reference do the Projection.fromPixels(..) and Projection.toPixels
 (..) methods require?

 I ask because I want to display some GeoData to an Overlay and I have
 to decide in which reference system I have to request it from my
 Services.

 Kind regards

 Mathias

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

2011-05-05 Thread Prayag Pathak
Great!
You are correct, Mark. I used LogCat
The NullPointerException is getting generated on line 34 which has
getLastKnowLocation() method.

Now I updated the code and even then the same error comes :

LocationManager lm = (LocationManager)
getSystemService(Context.LOCATION_SERVICE);
LocationListener ll = new mylocationlistener();
lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0,
ll);
Location l =
lm.getLastKnownLocation(lm.getProvider(LOCATION_SERVICE).getName());
Log.w(LocationTracker, The value of Location returned by
getLastKnownLocation() is :  + l.toString());
Log.d(Current Location, l.getLatitude() + );
Log.d(Current Location,l.getLongitude() + );
Toast.makeText(this, l.getLatitude() +  +
l.getLongitude(),Toast.LENGTH_LONG).show();


Thanks again. It would be great if you could guide me further.

Regards,

prayag

On May 5, 2:24 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Thu, May 5, 2011 at 2:20 PM, Prayag Pathak prayag.d.pat...@gmail.com 
 wrote:
  I am trying to get the latitude and longitude of the current location.
  Let me clarify, I dont want to implement a listener that will create
  an event when the location will be changed.

 You act as though you have a choice in the matter.





  I am trying to create an
  app that will record the current location on a button click event.
  Following is my code :

  hdLocMgr = (LocationManager)
  getSystemService(Context.LOCATION_SERVICE);
  Log.w(LocationTracker, The Location Manager is :
  +hdLocMgr.toString());
  hdLocProvider = hdLocMgr.getBestProvider(hdCrit, true);
  location = hdLocMgr.getLastKnownLocation(hdLocProvider);
  dlat = location.getLatitude();
  dlon = location.getLongitude();
  Log.w(LocationTracker, The value of Latitude is :
  +dlat.toString());

  The code gives a RunTimeException (caused by NullPointerException as
  stated in it).

 Use adb logcat, DDMS, or the DDMS perspective in Eclipse to examine
 LogCat and look at the stack trace to find the line that has the
 NullPointerException. If I had to guess, your location variable is
 null, because getLastKnownLocation() is null, because there is no
 location for the provider, because you have not requested location
 updates on that provider.

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

 _Android Programming Tutorials_ Version 3.4 Available!- 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


[android-developers] Re: Android app crashes when invoking getSystemService(LOCATION_SERVICE)

2011-05-05 Thread Prayag Pathak
Hi Mark,

Thanks for the answer. But still its not working. I included the code
segment that updates the code. But still not working.
Following is the code :

LocationManager lm = (LocationManager)
getSystemService(Context.LOCATION_SERVICE);
LocationListener ll = new mylocationlistener();
lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0,
ll);
Location l =
lm.getLastKnownLocation(lm.getProvider(LOCATION_SERVICE).getName());
Log.w(LocationTracker, The value of Location returned by
getLastKnownLocation() is :  + l.toString());
Log.d(Current Location, l.getLatitude() + );
Log.d(Current Location,l.getLongitude() + );
Toast.makeText(this, l.getLatitude() +  +
l.getLongitude(),Toast.LENGTH_LONG).show();

Regards,

Prayag

On May 5, 2:20 pm, Prayag Pathak prayag.d.pat...@gmail.com wrote:
 Hi guys,

 I am trying to get the latitude and longitude of the current location.
 Let me clarify, I dont want to implement a listener that will create
 an event when the location will be changed. I am trying to create an
 app that will record the current location on a button click event.
 Following is my code :

 hdLocMgr = (LocationManager)
 getSystemService(Context.LOCATION_SERVICE);
 Log.w(LocationTracker, The Location Manager is :
 +hdLocMgr.toString());
 hdLocProvider = hdLocMgr.getBestProvider(hdCrit, true);
 location = hdLocMgr.getLastKnownLocation(hdLocProvider);
 dlat = location.getLatitude();
 dlon = location.getLongitude();
 Log.w(LocationTracker, The value of Latitude is :
 +dlat.toString());

 The code gives a RunTimeException (caused by NullPointerException as
 stated in it).

 Kindly help me out in that.

 Regards,

 Prayag

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

2011-05-05 Thread patjackson52
I'm working on using google docs list api and spreadsheet api in
android.  I'm having trouble getting Oauth to work and there does not
appear to be any libraries or sample code on the web.  The only
example I have found is a picasa api example on the google data api
site and I wad unable to get that to work.  Anybody k ow of examples
or have experience with this?

My goal is to read data from spreadsheets from google docs using a
single sign on approach.

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


Re: [android-developers] Re: Android app crashes when invoking getSystemService(LOCATION_SERVICE)

2011-05-05 Thread Mark Murphy
requestLocationUpdates() is asynchronous. It may take seconds or more
for the location to be determined, depending on the location provider
being used and the user's circumstances (e.g., is the user getting a
GPS signal?). You cannot simply call getLastKnownLocation()
immediately after calling requestLocationUpdates() and expect to get
any value.

Your whole premise (press a button, get a location) will only work if either:

1. You have location updates started early (e.g., onResume()), so by
the time the user presses the button, you probably have a fix, or

2. Pressing the button triggers the request for the location, and it
simply does not have an immediate effect, until the fix arrives

On Thu, May 5, 2011 at 3:23 PM, Prayag Pathak prayag.d.pat...@gmail.com wrote:
 Hi Mark,

 Thanks for the answer. But still its not working. I included the code
 segment that updates the code. But still not working.
 Following is the code :

        LocationManager lm = (LocationManager)
 getSystemService(Context.LOCATION_SERVICE);
        LocationListener ll = new mylocationlistener();
        lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0,
 ll);
        Location l =
 lm.getLastKnownLocation(lm.getProvider(LOCATION_SERVICE).getName());
        Log.w(LocationTracker, The value of Location returned by
 getLastKnownLocation() is :  + l.toString());
        Log.d(Current Location, l.getLatitude() + );
        Log.d(Current Location,l.getLongitude() + );
        Toast.makeText(this, l.getLatitude() +  +
 l.getLongitude(),Toast.LENGTH_LONG).show();

 Regards,

 Prayag

 On May 5, 2:20 pm, Prayag Pathak prayag.d.pat...@gmail.com wrote:
 Hi guys,

 I am trying to get the latitude and longitude of the current location.
 Let me clarify, I dont want to implement a listener that will create
 an event when the location will be changed. I am trying to create an
 app that will record the current location on a button click event.
 Following is my code :

 hdLocMgr = (LocationManager)
 getSystemService(Context.LOCATION_SERVICE);
 Log.w(LocationTracker, The Location Manager is :
 +hdLocMgr.toString());
 hdLocProvider = hdLocMgr.getBestProvider(hdCrit, true);
 location = hdLocMgr.getLastKnownLocation(hdLocProvider);
 dlat = location.getLatitude();
 dlon = location.getLongitude();
 Log.w(LocationTracker, The value of Latitude is :
 +dlat.toString());

 The code gives a RunTimeException (caused by NullPointerException as
 stated in it).

 Kindly help me out in that.

 Regards,

 Prayag

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




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

_Android Programming Tutorials_ Version 3.4 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] Re: 1380 Paid Applications in One Free Torrent then How to SELL it?

2011-05-05 Thread Chris Stewart
 I 100% agree with nemic. You can put tons and tons of effort in fighting
piracy and maybe get a small return on it. It's better to spend this energy
and effort in  improving/augmenting your app for your paying customers.

+1.  My recent apps have been all over the piracy sites but instead of
focusing any attention on that, I simply work to make my app better.  Not
sure there's a better way to look at the situation.

--
Chris Stewart
http://chriswstewart.com



On Thu, May 5, 2011 at 10:28 AM, Streets Of Boston
flyingdutc...@gmail.comwrote:

 I 100% agree with nemic. You can put tons and tons of effort in fighting
 piracy and maybe get a small return on it. It's better to spend this energy
 and effort in improving/augmenting your app for your paying customers.

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

2011-05-05 Thread jtoolsdev
The manifest display in Eclipse defaults to auto.  On a recent release
I set it to preferExternal and there seemed to be some reports of
difficulty.  Problem is the docs say the same thing for both settings
and that the user can move the installation.  I don't have a device
that is 2.2 or better so I've never seen any ability to move the
installation and it doesn't show on the emulators either (2.2 or
better).

On May 4, 10:59 am, Seni Sangrujee s...@wombatmobile.com wrote:
 I lean towards auto as well.  I tried preferExternal at first and
 several users reported errors, so I switched to auto, and the
 complaints went away.

 On May 4, 5:15 am, Droid rod...@gmail.com wrote:

  Yes, maybe 'auto' better, I read somewhere that a few models will fail
  to install at all if install location is set to preferExternal.



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


RE: [android-developers] Re: Android app crashes when invoking getSystemService(LOCATION_SERVICE)

2011-05-05 Thread Tommy
You are getting the null pointer b/c getLastKnownLocation has nothing to
give... In this case you would need to call up the GPS listener... When it
gets the current fix it will pop off its subroutine.. Inside there you can
get the lat/lon do what you need to do with your button click then kill the
GPS listener..

-Original Message-
From: android-developers@googlegroups.com
[mailto:android-developers@googlegroups.com] On Behalf Of Mark Murphy
Sent: Thursday, May 05, 2011 3:29 PM
To: android-developers@googlegroups.com
Subject: Re: [android-developers] Re: Android app crashes when invoking
getSystemService(LOCATION_SERVICE)

requestLocationUpdates() is asynchronous. It may take seconds or more for
the location to be determined, depending on the location provider being used
and the user's circumstances (e.g., is the user getting a GPS signal?). You
cannot simply call getLastKnownLocation() immediately after calling
requestLocationUpdates() and expect to get any value.

Your whole premise (press a button, get a location) will only work if
either:

1. You have location updates started early (e.g., onResume()), so by the
time the user presses the button, you probably have a fix, or

2. Pressing the button triggers the request for the location, and it simply
does not have an immediate effect, until the fix arrives

On Thu, May 5, 2011 at 3:23 PM, Prayag Pathak prayag.d.pat...@gmail.com
wrote:
 Hi Mark,

 Thanks for the answer. But still its not working. I included the code 
 segment that updates the code. But still not working.
 Following is the code :

        LocationManager lm = (LocationManager) 
 getSystemService(Context.LOCATION_SERVICE);
        LocationListener ll = new mylocationlistener();
        lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, 
 ll);
        Location l =
 lm.getLastKnownLocation(lm.getProvider(LOCATION_SERVICE).getName());
        Log.w(LocationTracker, The value of Location returned by
 getLastKnownLocation() is :  + l.toString());
        Log.d(Current Location, l.getLatitude() + );
        Log.d(Current Location,l.getLongitude() + );
        Toast.makeText(this, l.getLatitude() +  + 
 l.getLongitude(),Toast.LENGTH_LONG).show();

 Regards,

 Prayag

 On May 5, 2:20 pm, Prayag Pathak prayag.d.pat...@gmail.com wrote:
 Hi guys,

 I am trying to get the latitude and longitude of the current location.
 Let me clarify, I dont want to implement a listener that will create 
 an event when the location will be changed. I am trying to create an 
 app that will record the current location on a button click event.
 Following is my code :

 hdLocMgr = (LocationManager)
 getSystemService(Context.LOCATION_SERVICE);
 Log.w(LocationTracker, The Location Manager is :
 +hdLocMgr.toString());
 hdLocProvider = hdLocMgr.getBestProvider(hdCrit, true); location = 
 hdLocMgr.getLastKnownLocation(hdLocProvider);
 dlat = location.getLatitude();
 dlon = location.getLongitude();
 Log.w(LocationTracker, The value of Latitude is :
 +dlat.toString());

 The code gives a RunTimeException (caused by NullPointerException as 
 stated in it).

 Kindly help me out in that.

 Regards,

 Prayag

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




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

_Android Programming Tutorials_ Version 3.4 Available!

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

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


[android-developers] Is there a way to include permissions only during Testing?

2011-05-05 Thread Greg Giacovelli
Hi,
I have a test project that mocks out a bunch of locations and sends
them through my application project. I don't want my application to
include the ACCESS_MOCK_LOCATION permission so I wanted to include it
in the Test project. This seems to not give me the expected result as
I always get a permission error for ACCESS_MOCK_LOCATION when I set a
TestLocationProvider using the instrumentation Context. Has anyone
experienced the same or know how to allow such injection? Or do I
really just have to keep manually editing the App manifest before it
is launched?

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

2011-05-05 Thread Eric
1. I took the advice of others on this list and changed my drawing
code so that if the number of items in the ListView has not changed,
instead of calling ArrayAdapter.notifyDataSetChanged(), I instead
iterate over the ListView visible children and attempt to update them
manually.


int firstVisibleDataSetPosition =
listView.getFirstVisiblePosition();
for(int dataSetPosition = firstVisibleDataSetPosition;
dataSetPosition =  listView.getLastVisiblePosition(); dataSetPosition+
+) {
View view =  listView.getChildAt(dataSetPosition -
firstVisibleDataSetPosition);
updateView(view, dataSetPosition);
}


2. In certain cases, my data set holds one object.  Sometimes when
this happens, listView.getFirstVisiblePosition is returning 1, when
instead it should return 0, because the data set has only one object.
If I then attempt to retrieve the data item at index 1 using
ArrayAdapter.getItem(), I get an IndexOutOfBoundsException.

It seems to me getFirstVisiblePosition() cannot be used reliably if it
stands the chance of returning an invalid value.  Is this variable not
updated in certain cases, where it can get out of sync with the data
set?

- Eric

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

2011-05-05 Thread Eric
It seems to me I need to assume getFirstVisiblePosition() can get out
of sync with the data set, and in order to update my data manually
(without calling ArrayAdapter.notifyDataSetChanged) is that I need to
iterate over the data set items, not the indexes defined by
getFirstVisiblePosition() and getLastVisiblePosition(), and then check
if there is a View available for that data index, and if so, update
it?

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


[android-developers] Re: obtaining true dimensions of a View larger than the screen

2011-05-05 Thread kellogs
Good hint. I was able to do

int h1 = computeVerticalScrollExtent();
int h3 = computeVerticalScrollRange();

if (h1 == h3)
{
//switch to linearlayout wrapper
}

inside a ScrollView wrapper. The above methods return the same thing
on a LinearLayout though (and probably also on regular Views), so at
first the trick needs assuming that the wrapped View needs a scrollbar
and then see if it really needs one.

Thanks!


On May 5, 6:41 pm, Dianne Hackborn hack...@android.com wrote:
 The only thing View knows is these methods it calls on itself to have
 subclasses tell it how to show the scroll bars:

 http://developer.android.com/reference/android/view/View.html#compute...()

 Beyond that, you will need to look at a specific class that is doing
 scrolling.









 On Thu, May 5, 2011 at 8:09 AM, kellogs mihai0...@gmail.com wrote:
  Hello,

  trying to implement a dynamic scrolview wrapping mechanism here. But
  no matter what method I try from the View class they all return me the
  view's part of height that is currently visible on screen. So if there
  are 360 pixels available for a textview that has lots of text and is
  currently using 400 pixels its getHeight() and many other related
  methods always report 360.

  Any way around this ? maybe getting to the View's Canvas ? How can I
  go about that ?

  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

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

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

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


[android-developers] Re: obtaining true dimensions of a View larger than the screen

2011-05-05 Thread kellogs
Good hint. I was able to do

int h1 = computeVerticalScrollExtent();
int h3 = computeVerticalScrollRange();

if (h1 == h3)
{
//switch to linearlayout wrapper
}

inside a ScrollView wrapper. The above methods return the same thing
on a LinearLayout though (and probably also on regular Views), so at
first the trick needs assuming that the wrapped View needs a scrollbar
and then see if it really needs one.

Thanks!


On May 5, 6:41 pm, Dianne Hackborn hack...@android.com wrote:
 The only thing View knows is these methods it calls on itself to have
 subclasses tell it how to show the scroll bars:

 http://developer.android.com/reference/android/view/View.html#compute...()

 Beyond that, you will need to look at a specific class that is doing
 scrolling.









 On Thu, May 5, 2011 at 8:09 AM, kellogs mihai0...@gmail.com wrote:
  Hello,

  trying to implement a dynamic scrolview wrapping mechanism here. But
  no matter what method I try from the View class they all return me the
  view's part of height that is currently visible on screen. So if there
  are 360 pixels available for a textview that has lots of text and is
  currently using 400 pixels its getHeight() and many other related
  methods always report 360.

  Any way around this ? maybe getting to the View's Canvas ? How can I
  go about that ?

  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

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

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

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


[android-developers] xliff:g and Multiple substitutions specified in non-positional format error.

2011-05-05 Thread Ryszard Wiśniewski
I've found if you tag substitutions in string resource with xliff:g, aapt 
won't throw above error. First, I thought aapt automatically position 
substitutions using xliff:g ids, e.g.:

res/values/strings.xml: string name=fooxliff:g id=bar%d/xliff:g 
xliff:g id=baz%d/xliff:g/string
res/values-en/strings.xml: string name=fooxliff:g id=baz%d/xliff:g 
xliff:g id=bar%d/xliff:g/string

become:

res/values/strings.xml: string name=foo%1$d %2$d/string
res/values-en/strings.xml: string name=foo%2$d %1$d/string

, but this isn't true.

So why aapt ignores multiple non-positional substitutions in such case? Is 
it a bug?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Question about Android 2.2/2.3 and Hardware accelerated graphics

2011-05-05 Thread Videoguy
Hi
Does Android 2.2/2.3 use hardware accelerated graphics primitives for
different view operations (draw, animations etc)?
Lets say the platform it runs on has GPU with OpenGL driver for it.
Do graphics operations use it automatically?
Or
Does the developer have to use GLSurfaceView and other opengl calls if
they want any kind of h/w acceleration?

Please throw some light on 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] Re: getFirstVisiblePosition() not returning the correct value

2011-05-05 Thread Eric
I figured it out.  The long/short of it is that notifyDataSetChanged()
does NOT cause ListView.getFirstVisiblePosition() to get updated
immediately -- it gets updated on NEXT redraw of the ListView.  I had
some code that was causing my display method to be called twice in the
same event loop.  In the first call, because myNewDataSetSize !=
myOldDataSetSize(), that was forcing a
ArrayAdapter.notifyDataSetChanged() as expected.  However, later in
the same thread I caused the data to refresh again, this time
myNewDataSetSize == myOldDataSetSize, and I tried to iterate over the
loop above and grab the data set item using ArrayAdapter.getItem()
using a stale position keyed-off of
ListView.getFirstVisiblePosition().  Basically the way I fixed it is
to just call notifyDataSetChanged() instead of doing a manual update
to my ListView cells if I detect ListView.getFirstVisiblePosition() is
stale (i.e.   myCurrentDataSetSize 
ListView.getFirstVisiblePosition(), or
ListView.getLastVisiblePosition()   myCurrentDataSetSize).

So I guess my question changes to -- what happens if I call
ListView.notifyDataSetChanged() twice (or more) in the same 'event
loop' -- will the calls be coalesced together such that the ListView
will only redraw one time in the next redraw cycle?

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

2011-05-05 Thread veetowner
We have finished implementation with LVL, and about ready to publish.
Previously, we developed the app with separated publish account so
that the whole team can get access to test environment. Now, we have
done that, we created a build with package name and key with our
official publish account info.

I side-loaded the app to device, when app starts, it received the
ERROR_NOT_MARKET_MANAGED response. I am bit confused why I receive
this. My package name is the same, my version number is updated, why I
get this response from server?

How could I run a check before publishing on Android Market? What do I
need to in order to get test response? We have already had a paid app
in the market, I am pretty careful doing anything that might mess up
with our published app.

Google documentation isn't that clear. :-(

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

2011-05-05 Thread Streets Of Boston
Good find!

About the multiple calls to notifyDataSetChanged() in the same 'event loop' 
cycle:
I don't think it will cause multiple redraws, much like multiple calls to a 
view's 'invalidate()' method in the same event-loop cycle that won't cause 
multiple redraws either.

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

2011-05-05 Thread fordeveloper
Hi,

Am facing the exact same issue, and the logcat shows that the native
function seems to be losing the connection to the card on the
transcieve().
I increased the timeout and that didn't solve the issue either.

Please let me know if you find a solution :-)

Thanks,
Priti

On May 3, 11:50 pm, Wilson Chew lhchew1...@gmail.com wrote:
 Hi All,

 I noticed that the connection created (using IsoDep) is not stable.
 For example, when I perform a signing(digital signature) and
 verification of signature via APDU, the NFC service will die or
 connection totagwill belosteven if I set the timeout to 20sec. It
 happen quite often.

 Is it a known issue or I have missed out something in my code?

 Thanks.

 Regards,
 Wilson

 On Apr 26, 5:09 pm, perumal316 perumal...@gmail.com wrote:



  For IsoDep using setTimeOut function to set a time resolves the issue.

  On Apr 26, 12:13 pm, perumal316 perumal...@gmail.com wrote:

   Hi Michael,

   I changed MiFareClassic object to IsoDep. But I am getting the
   following error:

   android.nfc.TagLostException:Tagwaslost

   Must I add in additional code to sustain the connection? (Am I
   correct?)

   Thanks In Advance,
   Perumal

   On Apr 25, 5:00 pm, Michael Roland mi.rol...@gmail.com wrote:

Hallo Wilson,

 I am facing an issue with a Mifare Classic card (this is a dual
 interface smart card; contact and contactless).

Alright, then it is most likely not a MIFARE Classic card but a
contactless (dual interface) smart card (with ISO 14443-4 interface)
that additionally provides a MIFARE Classic emulation.

 When I use transceive() to send apdu corresponding to select AID, 
 it always
 return null.

Right, as you write here: 2) Create MifareClassic object using

you create a MifareClassic but what you really want to do is open an
APDU connection to the card. If your card is a real dual-interface
smart card(*) it should also expose an IsoDep interface (ISO 14443-4 /
ISO 7816-4). This is the interface you would want to use for APDU
communication.

br,
Michael

(*) There could also exist some hybrid cards that have a MIFARE
Classic _contactless_ card and an APDU-based _contact_ smart card
joined into the same plastic card. In that case the contact and
contactless parts would be independent chips and no communication
between them would be possible.- Hide quoted text -

   - Show quoted text -- Hide quoted text -

  - Show quoted text -- 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


[android-developers] Button in a ListView cell

2011-05-05 Thread Eric
I have seen dozens of posts about people trying to put a clickable
Button in a ListView cell, along with other text, and apparently
nobody has been able to get it to work.

Here is what I need to do:

1. Have a couple of TextViews in a ListView cell, with a clickable
Button on the right-side of the cell.

2. When the user clicks in the cell outside of the button, I should
receive the click in OnItemClicked (which will navigate me to another
Activity).

3.  When the user clicks on the Button in the cell, the Button's
onClick() should be executed and some other operation will be
performed.

4. This has to work for both Touch input, and trackball/D-pad input.

5. This cannot interfere with the ListViews selector highlighting such
that when I use the trackball-DPad to navigate the ListView, the
selected cell should be highlighted.

I just can't get this to work.  I've tried many permutations of many
approaches, but one of the above items stops working in each of the
cases.  Can anyone please tell me the best/correct way to achieve
this?

- Eric

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

2011-05-05 Thread Eric
and also:

6. The trackball D-pad will ideally allow me to navigate not only to
every cell in the ListView, but also navigate over the clickable
Button and give it trackball focus such that I can run the Button
action from the Trackball.

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

2011-05-05 Thread denov
when i add the style attribute for the my relativeLayout below it
breaks the onClick events in my activity.

---

style name=list_item_bl parent=text_large_bl
item name=android:paddingRight4sp/item
item name=android:paddingLeft4sp/item
item name=android:background@drawable/list_item_bl/item
item name=android:focusablefalse/item
item name=android:focusableInTouchModefalse/item
item name=android:clickabletrue/item
/style

?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=fill_parent

TextView android:id=@+id/TextView01
  android:layout_height=wrap_content
  android:text=blah blah blah... blah blah
  android:textStyle=normal|bold
  android:gravity=center_vertical|center_horizontal
  android:layout_width=fill_parent /

ListView android:id=@android:id/list
  android:layout_height=wrap_content
  android:layout_width=fill_parent /
TextView
android:id=@+id/android:empty
android:layout_width=wrap_content
android:layout_height=wrap_content
android:text=@string/nothing /

 /LinearLayout

?xml version=1.0 encoding=utf-8?
RelativeLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:layout_width=fill_parent
android:layout_height=wrap_content
android:orientation=horizontal
android:id=@+id/list_item
style=?listItem 

TextView
android:id=@+id/item_entry
android:layout_width=wrap_content
android:layout_height=wrap_content
android:gravity=left android:focusable=false
android:focusableInTouchMode=false/
TextView
android:id=@+id/category_entry
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_toRightOf=@id/item_entry
android:gravity=right
android:paddingLeft=8sp android:focusable=false
android:focusableInTouchMode=false/
TextView
android:id=@+id/date_completed
android:layout_width=wrap_content
android:layout_height=wrap_content
android:layout_alignParentRight=true
android:gravity=right
android:paddingLeft=4sp android:focusable=false
android:focusableInTouchMode=false/

/RelativeLayout



public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

 

fillData();
getListView().setOnCreateContextMenuListener(this);

}

private void fillData() {
ArrayListString names = new ArrayListString();
for (int i = 0; i  _options.length; i++) {
String item = (String) _options[i];
if (_selections[i]) names.add(item);
}
_taskCursor = _dbHelper.fetchTasksByName(names);
startManagingCursor(_taskCursor);

String[] from = new String[] { TaskDbAdapter.KEY_ITEM,
TaskDbAdapter.KEY_CATEGORY, TaskDbAdapter.KEY_DATE };
int[] to = new int[] { R.id.category_entry, R.id.item_entry,
R.id.date_completed };

ListAdapter notesAdapter = new ListAdapter(this, 
R.layout.list_item,
_taskCursor, from, to);
//SimpleCursorAdapter notesAdapter = new 
SimpleCursorAdapter(this,
R.layout.list_item, taskCursor, from, to)
notesAdapter.setViewBinder(new ViewBinder() {
public boolean setViewValue(View aView, Cursor 
aCursor, int
aColumnIndex) {
if (aColumnIndex == 3) {
Date createDate = new 
Date(aCursor.getLong(aColumnIndex));
TextView textView = (TextView) 
aView;

textView.setText(listFormat.format(createDate));
return true;
}
return false;
}
});

setListAdapter(notesAdapter);
}




---

i wrote a custom ListAdapter to see that would solve my problem.  i
can catch the listOnClick this way (with a lot of extra work) but
onCreateContextMenu never seems to get invoked.

this seems really weird that applying a style would break event
handling...

-- 
You received this message because you are 

Re: [android-developers] Button in a ListView cell

2011-05-05 Thread B Lyon
So you were able to get everything to work without the trackball case?

On Thu, May 5, 2011 at 6:37 PM, Eric e...@alum.mit.edu wrote:
 I have seen dozens of posts about people trying to put a clickable
 Button in a ListView cell, along with other text, and apparently
 nobody has been able to get it to work.

 Here is what I need to do:

 1. Have a couple of TextViews in a ListView cell, with a clickable
 Button on the right-side of the cell.

 2. When the user clicks in the cell outside of the button, I should
 receive the click in OnItemClicked (which will navigate me to another
 Activity).

 3.  When the user clicks on the Button in the cell, the Button's
 onClick() should be executed and some other operation will be
 performed.

 4. This has to work for both Touch input, and trackball/D-pad input.

 5. This cannot interfere with the ListViews selector highlighting such
 that when I use the trackball-DPad to navigate the ListView, the
 selected cell should be highlighted.

 I just can't get this to work.  I've tried many permutations of many
 approaches, but one of the above items stops working in each of the
 cases.  Can anyone please tell me the best/correct way to achieve
 this?

 - Eric

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

2011-05-05 Thread TheBear
Anyone know how to create a mouse pointer  for the finger ??

I have a framelayout  which displays an ImageView  This must be the
background image
Then on top  I am trying to draw lines
I'm trying to have a mouse pointer  (looks more like a target sites)
so that you can fix the start of the line
then  using the same fix the end of the line and finally draw a line
between the two points

I'm using the onTouch  and triggering with ACTON_DOWN etc..

When I move the pointer it either leaves a ghost trail behind,  or  if
using XferMode   leaves a black square ?

any help would be greatly appreciated

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: Button in a ListView cell

2011-05-05 Thread Eric


On May 5, 7:11 pm, B Lyon bradfl...@gmail.com wrote:
 So you were able to get everything to work without the trackball case?

It depends on what you mean by 'work'.  I was able to hack things to
work.  The ListView steals focus from the inner-widgets if you set an
OnItemClickListener.  So I had to set an OnClickListener() on the
ListView item View, and a separate OnClickListener() for the child
button.  That works in so much as touch-clicks work, but the trackball/
D-pad is broken for clicks.  Furthermore, I still haven't been able to
figure out how to get the trackball to be able to focus into the
Button instead of the entire list view cell.

So, no, I would not say I have things working to anywhere near my
satisfaction.  I am hoping there is one solution that will allow
everything to work as I would expect it to above, which is in my
opinion that way the UI should function.

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

2011-05-05 Thread ferran fabregas
Hi! When I try to upload the app high resolution icon image o app screen
capture to android market, browser give me next error:

Unable to parse response. If you have a browser extension or add-on
installedwhich changes the JSON response, please disable and refresh this
page.

I've tried with Firefox, chrome and IE8, and dosn't work...

Any Ideas?

Thanks in advance,
*Ferran*

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

2011-05-05 Thread ferran
Thanks! I've done it with a reciver attending ACTION_SHUTDOWN signal,
and using shared preferences to save the state.

Sorry, i'm newbie and I'm learning...

On May 4, 11:47 pm, Justin Anderson magouyaw...@gmail.com wrote:
 * Hi! I want to know if there are any method to know if is the first
 exuction of an app after reboot, or the app is alredy executed by the user
 (the app have one activity and to recivers).*
 *
 *
 Is this for an application you developed or any arbitrary app?  And, WHY?

 * I'm thinking in methods like write and rewrite a token file every minute,
 and each time the app starts, check the lastmodified property to know the
 state, but i think that must be smart ways to do it.*

 Please tell me you're not serious... You're joking right?  Writing a file
 every minute in the background would surely drain the battery like crazy.

 A better solution, if you really want to know the first time your app is
 launched after a reboot is to listen for the Boot Completed broadcast
 message:http://developer.android.com/reference/android/content/Intent.html#AC...

 Have your receiver write out a value to SharedPreferences... something like
 a boolean key/value pair with a key of LaunchedSinceBoot and a value of
 false

 Then when you launch your main app read that value and act accordingly.
  Then set the value to true so the next time you launch you skip the
 first-launch-since-boot steps...

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







 On Wed, May 4, 2011 at 5:34 AM, ferran fabregas ferri...@gmail.com wrote:
  Hi! I want to know if there are any method to know if is the first exuction
  of an app after reboot, or the app is alredy executed by the user (the app
  have one activity and to recivers).

  I'm thinking in methods like write and rewrite a token file every minute,
  and each time the app starts, check the lastmodified property to know the
  state, but i think that must be smart ways to do it.

  Any idea?

  Thanks in advance,

  *Ferran*

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

2011-05-05 Thread Shruthi Varma
Use alll, what's the problem in that.
An object.close() doesn't give you exception if you have initialized that
object.
But still I think these 3 might be important as it deals with the
inputstream.

fileInput.close()
buf.close()
dataInput.close()

InputStreams must be closed after its contents are obtained by another
object.

Regards,
Shruthi.






On Thu, May 5, 2011 at 3:50 PM, a a harvey.a...@gmail.com wrote:

 Dear all devs,

 try{
File newfile = new File(prefix);
FileInputStream fileInput = new FileInputStream(newfile);
BufferedInputStream buf = new BufferedInputStream(fileInput);
final DataInputStream dataInput = new DataInputStream(buf);
 ..
 .
 } catch(Exception e) {
 // I don't know which should i close.

 // Can anybody tell me which should i close??
 //newfile.close()  ?
 //fileInput.close() ?
 //buf.close() ?
 // dataInput.close() ?
 }

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

2011-05-05 Thread आशुतोष हिन्दुस्तानी
hi all,
please tell me how can i get call history in android app


-- 
Thanks
Ashutosh Mohle
Software Engineer
CS-KNIT-2010



Praying for the peace and love for 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] How to show the soft keyboard on native activity

2011-05-05 Thread Miles
When I try to use ANativeActivity_showSoftInput(), it doesn't bring up
the soft keyboard.

I have tried using ANativeActivity_showSoftInput(engine-app-
activity, ANATIVEACTIVITY_SHOW_SOFT_INPUT_FORCED) and
ANativeActivity_showSoftInput(engine-app-activity,
ANATIVEACTIVITY_SHOW_SOFT_INPUT_IMPLICIT) to show softinput, but also
failed.

I read the source code, and I found after start nativeActivity,
NativeContentView(extend View) will be created, and when call
ANativeActivity_showSoftInput, it will call showSoftInput() in java
side. I think maybe the softkeyboard is not turned on.

Can you help me?

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

2011-05-05 Thread Joana Neves
hi! I need to display a listView with rows containning a TextView and
a EditText.. The number of rows is variable. Below such listView is a
button. All i want is to click on that button and get all text from
edittexts above. At this point, i am having trouble fixing the text
from not visible rows. Can anyone give me some idea, any example.

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

2011-05-05 Thread mLjH
Hi,

I'm new to developing Android applications and I'm trying to use
arcGIS maps for my application. I've been able to load the map in
normal layouts such as Linearlayout and Relativelayout. But when I
tried loading the map from a Tabview, the map just doesn't load at
all.

Looking at the log cat, there is no error just a debug message
stating, Failed to initiate MapView.

My MapView is in the maps.xml. I call the MapView to be shown in the
tab in MapTab.java whereby it is loaded as a tab in App.java (aka
the main class)

May I know how do I solve this problem?

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] how to test activity in portrait orientation - honeycomb

2011-05-05 Thread jjoe64
Hello.

I would like to unit test my app in portrait orientation. (For
honeycomb the default orientation is landscape.)

First I set the orientation to portrait by calling the method
getActivity().setRequestedOrientation(...)
So far so good.

Now I simulate a click on a button and then a new activity will open
(by a intent). This activity is only used in portrait orientation.
The problem is: The new activity starts in the (default) landscape
orientation.

So what must be done, that the new activity starts in the portrait
orientation?

Thanks,
Jonas

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


[android-developers] Update to 2.3.4 with Nexus S GRI54

2011-05-05 Thread NaStYle
Hi all, I am using Nexus S
with Build Number GRI54, Baseband version I9023XXKB3. And I received
the update
notification ... I hold the power button and volume up button at the
same time,
and screen show that update had an error status 7. Is GRI54 cannot be
updated to 2.3.4?
Regards

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


  1   2   >