[android-developers] Play-Store: Paid app sais "no compatible devices", free app is working

2016-12-30 Thread 'Frank Völker' via Android Developers
hi, i uploaded 2 versions of my app

a free one and a paid one

the free app sais on top of play store entry, that all my devices, phones, 
tables are compatible

the paid one sais "none of your devices are compatible"

any ideas?

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/c7000648-bb77-4e0f-ab9c-bebfcf97dc14%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Android Studio on Windows 8.1 changes my keyboard language

2015-02-09 Thread Frank Röhm
Hello

I have a german Windows 8.1 (64 Bit Enterpreis) with only german keyboard 
input language and installed Android Studio, the newest version.

When I use it, maybe after some editing, I don't know exactly when it 
happens, Android Studio adds english keyboard language and activates it.
I have then EN and DE in the system tray, before there was no keyboard 
language setting there, as I only had german.
But this adding is really strange, because in the Language Panel it is not 
visible. I still have there only german, so I cannot delete english there.

To get rid of it, I first need to install english keyboard to be able to 
remove it then after, which is annoying after a while.
After this the english keyboard is away, but with next start of Android 
Studio it might come back.

How can I tell Android Studio (I am pretty sure it is this) to *not* add 
english keyboard language?
Or maybe I could tell Windows not allow any app to add without my request 
or confirmation another language?

Thank you.

frank

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


[android-developers] How to disable the broadcasting of the SSID of the mobile hotspot (tethering)

2013-04-08 Thread Frank
Hi all,
 
Is it possible to disable the broadcasting of the SSID of the mobile 
hotspot (tethering)? 
I didn't see any device support this features. And i want to add this 
feature to hide the hotspot ssid. So other don't know a hotspot is being 
used.
 
Thanks advanced.
 
 

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




[android-developers] android drag and drop gridview ordering using OnDragListener

2012-12-19 Thread Frank
I created a drag and drop gridview (using an 'OnDragListener'). Grid items 
can be dropped upon one another. However, I also want to be able to 
re-order them. I implemented this, but there is a major issue left standing:

When I drag around my shadow object I want the items to make space for my 
dragged object while I am dragging it around. I already implemented the 
moving of the other items, but I cannot seem to figure out a way to find 
out IF/WHEN I am in between two items. I get drag events when I hoover 
ABOVE an item, but not in between then. The gridview does not get any 
'onTouchEvent' calls when I am dragging, not even 'onInterceptTouchEvent' 
calls.

Does anyone know a way in which I can implement this? 

I already tried:

1. Implementing 'onTouchEvent' and 'onInterceptTouchEvent' in the gridview. 
Problem: 
The gridview does not get any 'onTouchEvent' calls when I am dragging an 
item, not even 'onInterceptTouchEvent' calls.

2. Setting another 'draglistener' on the whole gridview. Problem: 
'ACTION_DRAG_LOCATION' gets only called a few times, not on every move 
(location change), as is documented (!!).

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

2012-12-19 Thread Frank
I implemented an 'OnDragListener' and notice that 
'DragEvent.ACTION_DRAG_LOCATION' is called only a few times (2-4) when I 
drag my shadow around on top of a view (a view with this listener). After 
that, it keeps silent until I release my dragged item. 

The other 'DragEvents' (enter, drop, exited) I do receive as often as I 
expect them. But entered and exited are very slow. I get these events 
500-1000 ms after entering/exiting a view).

So:

 1. The drag listener is slow (the events arrive late)

 2. 'DragEvent.ACTION_DRAG_LOCATION' is called only a few times per
gesture.

Is this normal behaviour?

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

2012-12-19 Thread Frank
around 15 right now. But it might be anything between 2 and 200.

Op woensdag 19 december 2012 10:40:47 UTC+1 schreef Grzegorz Patynek het 
volgende:

 it may depend on amount of o objects in memory. 
 How many views with listener do You have?

 W dniu środa, 19 grudnia 2012 10:26:21 UTC+1 użytkownik Frank napisał:

 I implemented an 'OnDragListener' and notice that 
 'DragEvent.ACTION_DRAG_LOCATION' is called only a few times (2-4) when I 
 drag my shadow around on top of a view (a view with this listener). After 
 that, it keeps silent until I release my dragged item. 

 The other 'DragEvents' (enter, drop, exited) I do receive as often as I 
 expect them. But entered and exited are very slow. I get these events 
 500-1000 ms after entering/exiting a view).

 So:

  1. The drag listener is slow (the events arrive late)
 
  2. 'DragEvent.ACTION_DRAG_LOCATION' is called only a few times per
 gesture.

 Is this normal behaviour?



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

2012-12-19 Thread Frank
15 right now.

but I also want to be able to handle up to 200 items in the end.

Op woensdag 19 december 2012 10:40:47 UTC+1 schreef Grzegorz Patynek het 
volgende:

 it may depend on amount of o objects in memory. 
 How many views with listener do You have?

 W dniu środa, 19 grudnia 2012 10:26:21 UTC+1 użytkownik Frank napisał:

 I implemented an 'OnDragListener' and notice that 
 'DragEvent.ACTION_DRAG_LOCATION' is called only a few times (2-4) when I 
 drag my shadow around on top of a view (a view with this listener). After 
 that, it keeps silent until I release my dragged item. 

 The other 'DragEvents' (enter, drop, exited) I do receive as often as I 
 expect them. But entered and exited are very slow. I get these events 
 500-1000 ms after entering/exiting a view).

 So:

  1. The drag listener is slow (the events arrive late)
 
  2. 'DragEvent.ACTION_DRAG_LOCATION' is called only a few times per
 gesture.

 Is this normal behaviour?



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

[android-developers] Google Play outside of US and UK

2012-10-25 Thread Frank Reiff
Hi, 

I'm a Mac developer living in Luxembourg (Europe). As far as I can see the 
only way of selling on Google Play is via a Google Wallet merchant account, 
but Google Wallet doesn't support Luxembourgian accounts. What's the way 
around that limitation? Surely there's commercial Android developers in 
non-Google Wallet (most of the world) countries?

Best regards,

Frank

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

2012-10-12 Thread Frank Arroyo
what is the perfect URL to download the official plugin for Eclipse (Juno) 
for mobile developers?
-- 
 

El servicio de correo misena es soportado tecnológicamente por © Google y 
ofrecido por el Servicio Nacional de Aprendizaje – SENA de manera gratuita 
a todos los colombianos y en especial a los aprendices e instructores de 
Programas de Formación Titulada y Complementaria. Los contenidos, textos, 
imágenes, archivos y puntos de vista enviados en este mensaje son 
responsabilidad exclusiva del remitente y no reflejan ni comprometen 
oficialmente a la institución. No se autoriza el uso de esta herramienta 
para el intercambio de correos masivos, cadenas o spam, ni de mensajes 
ofensivos, de carácter político, sexual o religioso, con fines de lucro, 
con propósitos delictivos o cualquier otro mensaje que se considere 
indebido o que vaya en contra de la Ley.

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

2012-08-20 Thread frank he
Does any buddy meet the eclipse4.2 bug : another file changed when i paste
some characters in one file . that`s

 Which clearly did the trick...

 forEach_root - calls the script for each float in the array. So I
 shouldn't try to loop around the input array copying data - that's handled
 by RenderScript calling root multiple times itself (per CPU/core) - duh!
 From memory - changed to:

 void root(const float *v_in, float *v_out) {
const float *data = v_in;
float *outData = v_out;
*outData = *data;
 }

 and set the outputFloatPointer to be of Allocation.USAGE_SCRIPT so I could
 read the data afterwards (though not sure why I had to do this at the
 moment - my own memory is suffering from sig-11 ;) ).

 On Saturday, 18 August 2012 13:29:01 UTC+1, barclakj wrote:

 I'm clearly missing something here but have been going round in circles
 all day so can someone please can you point out where my blind spot is...

 I have a very simple RenderScript (.rs) file which tries to copy data
 from one float pointer to another (please note that this is a contrived
 case for test purposes):

 void root(const float *v_in, float *v_out) {
 const float *data = v_in;
 float *outData = v_out;

 for(int i=0;isize;i++) {
 *outData = *data; // [X] DOES NOT WORK!
 data ++;
 outData ++;
 }
 }


 In the Java code I create the script and allocations then call the script
 as:

 RenderScript rs = RenderScript.create(ctx);
 ScriptC_protomask protomaskScript = new ScriptC_protomask(rs,
 getResources(), R.raw.protomask);

 Allocation inFloatPointer = Allocation.createSized(rs, Element.F32(rs),
 data.length, Allocation.USAGE_IO_INPUT);
 Allocation outFloatPointer = Allocation.createSized(rs, Element.F32(rs),
 data.length, Allocation.USAGE_IO_OUTPUT);

 inFloatPointer.copyFrom(data); // copies from an array of floats (random
 numbers in this test case).
 protomaskScript.set_size(data.length);

 protomaskScript.forEach_root(inFloatPointer, outFloatPointer);


 Now my expectation is that this will just copy the data from one
 allocation to another (pointless, but again, this is just a test case).
 When I comment out the line in the .rs file ([x] above) the script runs but
 clearly does nothing. When I leave it in, the code crashes with sig 11
 suggesting I'm attempting to write to some memory I'm not allowed to. But
 why not? I've created and sized both allocations - why can I not just write
 to the output float pointer? :(

 Off to get some fresh air and kick a football round the garden.. 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

[android-developers] Re: Can't get cursor position from InputConnection

2012-02-07 Thread Frank Chun Yat Li
I am wondering the same thing. How would anyone use the setComposingRegion 
or setSelection without knowing the current cursor position?


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

2012-01-20 Thread Philip Frank
Hi everyone,

I'm accessing a SQLite database from AsyncTasks, several of them, but
as I understand that should be fine. We received reports from users
that our app is lagging and sometimes even freezing up the whole phone
to a point where they can only pull the battery. The reports come from
very few types of phones: Motorola Defy, LG Optimus lgp970 and Samsung
Galaxy S. I could never reproduce the problem on any of the phones I
have access to.

Is there anything known about these phones being particularly bad with
handling sqlite? Are there any best practices in that regard?

Here's an old thread where someone seemingly had the same problem:
http://groups.google.com/group/android-developers/browse_thread/thread/5e6e47458827a5e8

Cheers!

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


[android-developers] Unable to establish loopback connection

2012-01-02 Thread Frank Ahearn
On starting Eclipse I get Failed to initialize Monitor Thread: Unable
to establish loopback connection Any subsequent attempts to run give
Connection with adb was interrupted

See several have had this problem and have tried the various
suggestions:

1) Turning off firewall
2) Doing an adb kill-server and then adb start-server.
3) Starting the SDK manually.
4) Starting the SDK before starting Eclipse.
5) Running Eclipse with -clean option.

None of these work. Any other ideas? Thanks for any replies.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 it possible to add a GLSurfaceView to ViewGroup without making screen go black

2011-11-04 Thread Frank L
Dear All,

I have a ViewGroup (V) that is the Activity's content view and I draw
on the V's Canvas directly. At runtime, I create a GLSurfaceView (G)
whose initial content is set to be the same as the V. Then I call
V.addView(G) to add G to the top of V. I expect this to be a smooth
transition and users should not notice any artifacts. However, during
the transition, the screen goes black for about half a second and then
G shows up. I am not sure why it is so and is there any way to get rid
of this effect?

Best Regards,
Frank

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 force ViewGroup to draw (in onDraw callback) in regions occupied by its child views

2011-11-04 Thread Frank L
Hello,

I have a ViewGroup and I manually draw certain things in its onDraw()
callback. After I add a GLSurfaceView to it at runtime, ViewGroup's
onDraw() is called. It seems that Android clips out the region
occupied by the GLSurfaceView so that the onDraw() function cannot
draw into that region. However, since GLSurfaceView draws in a
separate thread, its content is not ready yet when ViewGroup's
onDraw() is called. So the consequence of this is that after onDraw(),
the region occupied by GLSurfaceView is left black for a bit. This
causes flickering.

So I am wondering if there is way to let ViewGroup draw into the
region occupied by the GLSurfaceView so that I can avoid the
flickering.

Thanks,
Frank

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

2011-11-03 Thread frank he
try  xxx.this.getParent.startActivity
在 2011-11-3 上午6:46,Ashley Waters water...@googlemail.com写道:

 Hey im developing my first proper app for android and have run into 2
 small hickups and was hoping for some help basicaly the main problem
 is that i cant seem to change to a new view from within tabhost. I
 have 4 tabs 2 just show a simple xml file the 3rd shows a series of
 pictures which i want to make clickable so that they expand out into
 player bio's. atm im attempting to do this in the following way but it
 just causes my application to crash

 package com.BPRUFC;

 import android.app.TabActivity;
 import android.content.Intent;
 import android.os.Bundle;
 import android.view.View;
 import android.widget.TabHost;

 public class BPRUFCAppActivity extends TabActivity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

TabHost mTabHost = getTabHost();



 mTabHost.addTab(mTabHost.newTabSpec(tab_test1).setIndicator(Fixtures).setContent(R.id.fixtures));


 mTabHost.addTab(mTabHost.newTabSpec(tab_test2).setIndicator(Results).setContent(R.id.results));


 mTabHost.addTab(mTabHost.newTabSpec(tab_test3).setIndicator(Players).setContent(R.id.bio));


 mTabHost.addTab(mTabHost.newTabSpec(tab_test4).setIndicator(Tour).setContent(R.id.tour));

mTabHost.setCurrentTab(0);

int days = 184;
String tour2 = getString(R.string.tour, days);
}

public void clicked(View view)
{
Intent myIntent = new Intent(BPRUFCAppActivity.this,
 PlayerBio.class);
BPRUFCAppActivity.this.startActivity(myIntent);
}
 }

 main Xml stopped after first pic as its quite long

 ?xml version=1.0 encoding=utf-8?
 TabHost xmlns:android=http://schemas.android.com/apk/res/android;
android:id=@android:id/tabhost
android:layout_width=fill_parent
android:layout_height=fill_parent
LinearLayout
android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=fill_parent
TabWidget
android:id=@android:id/tabs
android:layout_width=fill_parent
android:layout_height=wrap_content /
FrameLayout
android:id=@android:id/tabcontent
android:layout_width=fill_parent
android:layout_height=fill_parent
ScrollView
android:id=@+id/ScrollView01
android:layout_width=fill_parent
android:layout_height=fill_parent 
TextView
android:id=@+id/fixtures
android:layout_width=fill_parent
android:layout_height=fill_parent
android:text=@string/fixtures /
/ScrollView
TextView
android:id=@+id/results
android:layout_width=fill_parent
android:layout_height=fill_parent
android:text=Results go here /
ScrollView
android:id=@+id/ScrollView02
android:layout_width=fill_parent
android:layout_height=fill_parent
RelativeLayout
android:id=@+id/bio
android:layout_width=fill_parent
android:layout_height=fill_parent
ImageView android:layout_width=90dip
android:layout_height=90dip
android:id=@+id/imageView1
android:src=@drawable/forrest
android:onClick=clicked
android:layout_alignParentTop=true
android:layout_alignParentLeft=true
android:layout_marginLeft=10dp
android:layout_marginTop=10dp
/ImageView

 Thanks in advance and im sure its a noob mistake

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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] EditText box doesn't work the same way in PopupWindow as in AlertDialog

2011-08-26 Thread Frank
Dear All,

I am having some difficulty getting an EditText widget work properly
in a PopupWindow class.

When it is used in a PopupWindow and double clicked/long pressed,
nothing happens. However, when it is put in an AlertDialog, double
click selects the text in it and brings up a built-in text tool bar at
the top. Does anyone know the cause of this? Thank you very much.


Regards,
Frank

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: EditText box doesn't work the same way in PopupWindow as in AlertDialog

2011-08-26 Thread Frank
Hi Dan,

Actually, the PopupWindow was made focusable. I can tap on EditText
and use the keyboard to input text. But just the long press/double tap
won't select any text.

Frank

On Aug 26, 12:19 pm, IcedNet d...@icednet.info wrote:
 http://developer.android.com/reference/android/widget/PopupWindow.html

 Depending on how it is instantiated, it may be non-focusable by
 default...

 Peace,
 Dan

 On Aug 26, 1:09 pm, Frank frank.android@gmail.com wrote:







  Dear All,

  I am having some difficulty getting an EditText widget work properly
  in a PopupWindow class.

  When it is used in a PopupWindow and double clicked/long pressed,
  nothing happens. However, when it is put in an AlertDialog, double
  click selects the text in it and brings up a built-in text tool bar at
  the top. Does anyone know the cause of this? Thank you very much.

  Regards,
  Frank

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

2011-07-29 Thread Frank
Hi All,

Just FYI, I found that you need to turn off the long press detection
in GestureDetector using setIsLongpressEnabled. This way, subsequent
events after long press will be triggered. However, there will be no
long press generated automatically and you need to make it yourself.

Cheers,
Frank

On Jul 25, 5:53 pm, Frank frank.android@gmail.com wrote:
 Hi All,

 I am using GestureDetector to fire some events. Everything works fine
 except for the following:
 If I do a long press and then move my finger (without lifting it and
 scrolling again), long press is fired but not scroll event. Doesn't
 anyone know what is going on here? Is this supposed to be the case? If
 so, what if I do need scroll event after a long press? Thanks a lot.

 Regards,
 Frank

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

2011-07-27 Thread Frank
Hi all,

I have a very weird problem from NumberPicker. The values input
through the keyboard is not recognized but the values input by the
+/- buttons are. The following is the source code.

public class NumberPickerDlg extends AlertDialog {
private NumberPicker mInteger;
private NumberPicker mDecimal;
public NumberPickerDlg(Context context, float val) {
...
}

public float getNumber() {
float v = mInteger.getValue() + ((float)mDecimal.getValue())/10;
return v;
}
}

//the following is how it is used.

final NumberPickerDlg d = new NumberPickerDlg(...);
d.setButton(OK, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
float val = d.getNumber();
 }
});

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

2011-07-25 Thread Frank
Hi All,

I am using GestureDetector to fire some events. Everything works fine
except for the following:
If I do a long press and then move my finger (without lifting it and
scrolling again), long press is fired but not scroll event. Doesn't
anyone know what is going on here? Is this supposed to be the case? If
so, what if I do need scroll event after a long press? Thanks a lot.

Regards,
Frank

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

2011-07-18 Thread Frank Ahearn
I am aware there are almost identical posts on here and Google but see
no answers, therefore asking again in case any have come up since.

I made a very small change to my app icon and on upload got  The apk
must be signed with the same certificates as the previous version

It is the same. The version number was incremented, the keystore is
unchanged, the date of the keystore is unchanged, the alias and
passwords are all as carefully noted (they are meaningful and familar
to me anyway) and I am using exactly the same ones.  I have uploaded
mods before with no problems.

It is not just me that has said this and I think there is some issue
here that has not been addressed. It may be relevant that another with
the problem had also only made a change to the app icon?

Any new thoughts on what seems to be an old problem would be most
welcome.

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


[android-developers] monkeyrunner script for scroll and touch

2011-07-14 Thread frank
Hi ,
I am writing monkeyrunner script to scroll screen, touch on
specific menu item, long touch on an item.

The script should haveonly touch operations as I am working with only
touch enabled device(NO keypad, Full touch device).

I came across one utility called androidlib.py which provides methods
to perform many actions on device. In that there is a scroll()
method,
which is not performing successfully.

path:   https://github.com/eing/moet/blob/master/common/androidlib.py

After first scroll(horizontally in home screen) , the focus went to
contacts shortcut at the bottom of screen and it can't proceed with
the second scroll.
(Note: is it possible to embed touchevent constants like
ACTION_SCROLL
in that method?)

I also tried with MonkeyDevice.drag() api, which requires hardcoded
values of x, y screen coordinates which may not perform operation
when
the script runs on emulator or other device.

Can you please help me with solution or any alternative for the same.

Thanks in advance.
frank

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 perfrom long press on screen, and how to get text on screen in monkeyrunner

2011-07-12 Thread frank
Hi ,
Thanks for the reply.

Actually the scenario of my script is to scroll screen, touch on
specific menu item, long touch on an item.

The script should haveonly touch operations as I am working with only
touch enabled device(NO keypad, Full touch device).

I came across one utility called androidlib.py which provides methods
to perform many actions on device. In that there is a scroll() method,
which is not performing successfully.

path:   https://github.com/eing/moet/blob/master/common/androidlib.py

After first scroll(horizontally in home screen) , the focus went to
contacts shortcut at the bottom of screen and it can't proceed with
the second scroll.
(Note: is it possible to embed touchevent constants like ACTION_SCROLL
in that method?)

I also tried with MonkeyDevice.drag() api, which requires hardcoded
values of x, y screen coordinates which may not perform operation when
the script runs on emulator or other device.

Can you please help me with solution or any alternative for the same.

Thanks in advance.
frank

On Jul 12, 3:31 am, Bill Napier nap...@android.com wrote:
 Oh, and there currently is no way to get text from the screen.  It's
 something we are working on, but it's not yet ready.



 On Mon, Jul 11, 2011 at 3:31 PM, Bill Napier nap...@android.com wrote:
  device.press('KEY_MENU', MonkeyDevice.DOWN_AND_UP) is what I think you
  want.  I think the docs are currently incorrect.

  DOWN_AND_UP means to send both the down event and the up event, which
  should simulate a press of the button.

  On Mon, Jul 11, 2011 at 12:58 AM, frank franklin.f2...@gmail.com wrote:

  Hi All

   I am writing scripts on monkeyrunner to test screen verification.
  I want to get screen text and verifiy the same to perform touch and
  press action
  on the screen items.

  The below command takes only key presses,
  device.press('KEY_MENU', 'DOWN')

  Can you anyone help me with some option to perform touch and press on
  screen.
  Also to get and verify screen contents like text.

  regards,
  Frank

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

 - Show quoted text -

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


[android-developers] how to perfrom long press on screen, and how to get text on screen in monkeyrunner

2011-07-11 Thread frank
Hi All

 I am writing scripts on monkeyrunner to test screen verification.
I want to get screen text and verifiy the same to perform touch and
press action
on the screen items.

The below command takes only key presses,
device.press('KEY_MENU', 'DOWN')

Can you anyone help me with some option to perform touch and press on
screen.
Also to get and verify screen contents like text.

regards,
Frank



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 press on a particular menu item using touch in monkeyrunner script?

2011-07-11 Thread frank
how to press on a particular menu item using touch in monkeyrunner
script?

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

2011-06-14 Thread Frank
Hi All,

I am experiencing a strange problem of using fopen in native code. I
have a few files in /mnt/sdcard/Download and all of them have -rw
privileges. However, when I call my native function which in turns
uses fopen to open them, I got null returns for some files, but valid
returns for others. Why is that? Any insights? Thanks.

Cheers,
Frank

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

2011-06-14 Thread Frank
Thanks, Chris. I will definitely do that.

On Jun 14, 9:49 am, Chris crehb...@gmail.com wrote:
 Frank,

 There's a android-ndk group that you may want to try.

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

2011-06-14 Thread Frank
Thanks, Chris. I've done that.

On Jun 14, 9:49 am, Chris crehb...@gmail.com wrote:
 Frank,

 There's a android-ndk group that you may want to try.

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

2011-06-14 Thread Frank
Hi Nikolay,

I don't see any crucial differences between the two kinds of files. In
fact, for those bad ones, I can even sometimes open them correctly.
Strange Things are just un-deterministic. I checked errno, and the
message is No such file or directory (but the files are definitely
there).

Frank

On Jun 14, 9:52 am, Nikolay Elenkov nikolay.elen...@gmail.com wrote:
 On Wed, Jun 15, 2011 at 1:42 AM, Frank frank.android@gmail.com wrote:
  Hi All,

  I am experiencing a strange problem of using fopen in native code. I
  have a few files in /mnt/sdcard/Download and all of them have -rw
  privileges. However, when I call my native function which in turns
  uses fopen to open them, I got null returns for some files, but valid
  returns for others. Why is that? Any insights? Thanks.

 The SD card uses FAT, so permissions shouldn't really matter.
 Check errno in your native code to see the actual error.
 What is the difference between the files that are OK and the
 ones that are 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: problems with fopen in native code

2011-06-14 Thread Frank
BTW, if I don't use fopen in my native function but instead use

File file = new File(my file path);
InputStream fis = new FileInputStream(file);

and read from fis, it is always fine.

On Jun 14, 2:38 pm, Frank frank.android@gmail.com wrote:
 Hi Nikolay,

 I don't see any crucial differences between the two kinds of files. In
 fact, for those bad ones, I can even sometimes open them correctly.
 Strange Things are just un-deterministic. I checked errno, and the
 message is No such file or directory (but the files are definitely
 there).

 Frank

 On Jun 14, 9:52 am, Nikolay Elenkov nikolay.elen...@gmail.com wrote:







  On Wed, Jun 15, 2011 at 1:42 AM, Frank frank.android@gmail.com wrote:
   Hi All,

   I am experiencing a strange problem of using fopen in native code. I
   have a few files in /mnt/sdcard/Download and all of them have -rw
   privileges. However, when I call my native function which in turns
   uses fopen to open them, I got null returns for some files, but valid
   returns for others. Why is that? Any insights? Thanks.

  The SD card uses FAT, so permissions shouldn't really matter.
  Check errno in your native code to see the actual error.
  What is the difference between the files that are OK and the
  ones that are 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: problems with fopen in native code

2011-06-14 Thread Frank
I have figured out my problem. When I converted the file path from
java String to c++ char*, I used GetStringChars(), which doesn't
automatically null-terminate the converted char*; so my fopen doesn't
get the right file name. More information can be found from:

https://groups.google.com/group/android-ndk/browse_thread/thread/e0ab7aefb3982c45
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4616318



On Jun 14, 2:43 pm, Frank frank.android@gmail.com wrote:
 BTW, if I don't use fopen in my native function but instead use

 File file = new File(my file path);
 InputStream fis = new FileInputStream(file);

 and read from fis, it is always fine.

 On Jun 14, 2:38 pm, Frank frank.android@gmail.com wrote:







  Hi Nikolay,

  I don't see any crucial differences between the two kinds of files. In
  fact, for those bad ones, I can even sometimes open them correctly.
  Strange Things are just un-deterministic. I checked errno, and the
  message is No such file or directory (but the files are definitely
  there).

  Frank

  On Jun 14, 9:52 am, Nikolay Elenkov nikolay.elen...@gmail.com wrote:

   On Wed, Jun 15, 2011 at 1:42 AM, Frank frank.android@gmail.com 
   wrote:
Hi All,

I am experiencing a strange problem of using fopen in native code. I
have a few files in /mnt/sdcard/Download and all of them have -rw
privileges. However, when I call my native function which in turns
uses fopen to open them, I got null returns for some files, but valid
returns for others. Why is that? Any insights? Thanks.

   The SD card uses FAT, so permissions shouldn't really matter.
   Check errno in your native code to see the actual error.
   What is the difference between the files that are OK and the
   ones that are 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] View's scrollbars disappear

2011-06-06 Thread Frank
Dear All,

I am having trouble make both the vertical and horizontal scrollbars
of a View (top window) show up properly.

I have definitely called setHorizontalScrollBarEnabled(true) and
setVerticalScrollBarEnabled(true) and the View's vertical scrollbar
does show up initially (behaves normally as well), at which time the
View's height is greater than the screen height and the width is equal
to the screen width (so it is okay there is no horizontal scrollbar).
Note that I have also overloaded computeHorizontalScrollExtent(),
computeHorizontalScrollOffset(), computeHorizontalScrollRange()
respectively and the same for the vertical scrollbar as well.

However, if I later change the View's width to be greater than
screen's width (by calling requestLayout() to trigger onMeasure()
within which I call setMeasuredDimension()). The weird thing is that
then the vertical scrollbar disappears and the horizontal scrollbar
still doesn't show up.

I have been looking around for answers for a while, but didn't find
any solutions. Does anybody see any possible problems? BTW, I am using
Android 3.0 (API 11).

Regards,
Frank

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

2011-05-30 Thread Frank
I managed to speed up my processing noticeably. I previously stored a
tile buffer in an int array. During onDraw, I used
Canvas.drawBitmap(int[] ...). I found this is not as efficient as
Canvas.drawBitmap(Bitmap...). So, I changed to store a tile buffer in
Bitmap. Just to post my solution here so that others could benefit.

Frank

On May 27, 11:40 pm, Frank frank.android@gmail.com wrote:
 Thank you very much,  Dianne.

 So if I do useViewand I have to redraw it in onDraw while scrolling,
 how can I make the drawing process as fast as possible?  Basically,  I
 have a whole bunch of tile buffers available and I just need to piece
 them together ontoView'sCanvas based on the scroll position. I am
 currently using dramBitmap, but the scrolling is not very smooth.

 Frank

 On May 27, 3:50 pm, Dianne Hackborn hack...@android.com wrote:







  You shouldn't put aSurfaceViewinside of a ScrollView or other such
  container.  Since a surfaceviewis actually creating a separate window that
  is positioned along with your window and provides the surface, those kinds
  of interactions just won't work.

  The way a scrollviewworks is that it expects to have one childview, whose
  height is potentially larger than the scrollview.  If it is larger, then
  the scrollviewwill change offsets to scroll around in it.  Theviewbeing
  larger in height doesn't use any more memory or such -- this is just a
  virtual coordinate space, with appropriate offsets and clipping applied by
  the scrollviewwhen it is drawn.

  Calling setMeasuredDimension() in onMeasure() should definitely make it be
  the size you specify.  Make sure you are not calling the super class
  implementation or doing your code after calling the super class, since there
  is a default implementation inViewto set the measurements.  Also make sure
  you are using wrap_content for theview, not match_parent.

  You could try looking in hierarchyviewer to see what is going on with the
 viewhierarchy.

  On Fri, May 27, 2011 at 2:54 PM, Frank frank.android@gmail.com wrote:
   Hi All,

   I am writing an application that needs to put aViewinside a
   ScrollView. SinceViewis used to display some content that is very
   long, I doView.setMeasuredDimension(width, large_height) inView's
   onMeasure() callback  function. I noticed that no matter how high the
  Viewis, its Canvas size I queried inView.onDraw() is the same with
   that of the viewport. This is good since the memory consumption is
   only dependent on the size of the viewport. But the downside is that I
   have to redraw the entire Canvas manually every time onDraw() is
   called.

   Instead ofView, I can useSurfaceView. However, the problem is that I
   cannot doSurfaceView.setMeasuredDimension(width, large_height). I
   found that the Canvas size ofSurfaceViewis the same with its virtual
   size (not the same with the viewport asView). So the underlying
   Bitmap takes lots of memory and my application won't even run (because
   of out of memory).

   Does any of you know any solution to this problem? Thank you very
   much.

   Thanks,
   Frank

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

2011-05-28 Thread Frank
Thank you very much,  Dianne.

So if I do use View and I have to redraw it in onDraw while scrolling,
how can I make the drawing process as fast as possible?  Basically,  I
have a whole bunch of tile buffers available and I just need to piece
them together onto View's Canvas based on the scroll position. I am
currently using dramBitmap, but the scrolling is not very smooth.

Frank

On May 27, 3:50 pm, Dianne Hackborn hack...@android.com wrote:
 You shouldn't put a SurfaceView inside of a ScrollView or other such
 container.  Since a surface view is actually creating a separate window that
 is positioned along with your window and provides the surface, those kinds
 of interactions just won't work.

 The way a scroll view works is that it expects to have one child view, whose
 height is potentially larger than the scroll view.  If it is larger, then
 the scroll view will change offsets to scroll around in it.  The view being
 larger in height doesn't use any more memory or such -- this is just a
 virtual coordinate space, with appropriate offsets and clipping applied by
 the scroll view when it is drawn.

 Calling setMeasuredDimension() in onMeasure() should definitely make it be
 the size you specify.  Make sure you are not calling the super class
 implementation or doing your code after calling the super class, since there
 is a default implementation in View to set the measurements.  Also make sure
 you are using wrap_content for the view, not match_parent.

 You could try looking in hierarchyviewer to see what is going on with the
 view hierarchy.





 On Fri, May 27, 2011 at 2:54 PM, Frank frank.android@gmail.com wrote:
  Hi All,

  I am writing an application that needs to put a View inside a
  ScrollView. Since View is used to display some content that is very
  long, I do View.setMeasuredDimension(width, large_height) in View's
  onMeasure() callback  function. I noticed that no matter how high the
  View is, its Canvas size I queried in View.onDraw() is the same with
  that of the viewport. This is good since the memory consumption is
  only dependent on the size of the viewport. But the downside is that I
  have to redraw the entire Canvas manually every time onDraw() is
  called.

  Instead of View, I can use SurfaceView. However, the problem is that I
  cannot do SurfaceView.setMeasuredDimension(width, large_height). I
  found that the Canvas size of SurfaceView is the same with its virtual
  size (not the same with the viewport as View). So the underlying
  Bitmap takes lots of memory and my application won't even run (because
  of out of memory).

  Does any of you know any solution to this problem? Thank you very
  much.

  Thanks,
  Frank

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

2011-05-27 Thread Frank
Hi All,

I am writing an application that needs to put a View inside a
ScrollView. Since View is used to display some content that is very
long, I do View.setMeasuredDimension(width, large_height) in View's
onMeasure() callback  function. I noticed that no matter how high the
View is, its Canvas size I queried in View.onDraw() is the same with
that of the viewport. This is good since the memory consumption is
only dependent on the size of the viewport. But the downside is that I
have to redraw the entire Canvas manually every time onDraw() is
called.

Instead of View, I can use SurfaceView. However, the problem is that I
cannot do SurfaceView.setMeasuredDimension(width, large_height). I
found that the Canvas size of SurfaceView is the same with its virtual
size (not the same with the viewport as View). So the underlying
Bitmap takes lots of memory and my application won't even run (because
of out of memory).

Does any of you know any solution to this problem? Thank you very
much.

Thanks,
Frank

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


[android-developers] LIstView,item data mismatch

2011-05-23 Thread he-frank
hi all,
I load consuming item data in a thread. I send a load data request when
listview state is idle. When the data load success, i'll show via a UI
handler.
The question is :
for example, in the listview position 1 and position 9 use the same
convertView, i get the position 1 data first ,then scroll to the
position 9 ,now i will send a request to get position 9 data, and then i
scroll to position 1. when the position 9 data load success, it will
show the data in position 1.
I don't know how to solve the problem.
help me ,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] Help,I don't konw why the Contact apk(2.3, packages/apps/Contacts) can set a contact's photo in ui thread with the reused the view

2011-05-23 Thread he-frank
in android 2.3 source code, Contact (packages/apps/Contacts) app can
load the contacts' photo in a background thead, and set the photo to the
contacts listview .

my question is :
the listview's item is a reused view, and why it can set the photo into
the right item view. that's so odd. Any one can help!

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

[android-developers] Re: Why ImageView doesn't show up inside ScrollView

2011-05-20 Thread Frank
Thank you, Mark,  for the reply.

For of all, I am pretty new to Android and my code is by no means
doing things in the most meaningful way. :)
Before answering your question, can I ask does using
LinearLayout.LayoutParams prevent it from working? I tried to comment
it out, but it still doesn't work.

In fact, this is just a trial code. What I really want to do is to
tile a ViewGroup with a whole bunch of ImageViews. I want to specify
the absolute location and dimensions of each ImageView inside the
parent ViewGroup. However, it looks to me that I cannot do this. I
found there is AbsoluteLayout, but it is deprecated. So do you know of
any option to achieve this?

Thank you very much.

Frank

On May 20, 3:03 am, Mark Murphy mmur...@commonsware.com wrote:
 Why are you using LinearLayout.LayoutParams for a child of 
 aScrollViewsubclass?









 On Thu, May 19, 2011 at 9:21 PM, Frank frank.android@gmail.com wrote:
  Hi All,

  I have the following code. I only got a black screen without seeing
  the white image.

  public class Demo extends Activity {
     private MyCtrl mCtrl;
     protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);

         mCtrl = new MyCtrl(this);
         setContentView(mCtrl);
     }
  }

  public class MyCtrl extendsScrollView{

     public MyCtrl (Context context) {
         super(context);
         setFocusable(true);

         int width = 100;
         int height = 100;
         int size = width * height;
         int buf[] = new int[size];
         for ( int i = 0; i  size; ++i) {
                 buf[i] = 0x; //white image
         }

         Bitmap bmp = Bitmap.createBitmap(buf, width, height,
  Bitmap.Config.ARGB_);
         ImageViewiv = newImageView(getContext());
         iv.setLayoutParams( new LinearLayout.LayoutParams(width, height) );
         iv.setImageBitmap(bmp);
         iv.setScaleType(ImageView.ScaleType.CENTER);
         addView(iv);
     }
  }

  However, if I derive MyCtrl fromImageViewdirectly, the white image
  shows up.

  Your help is highly appreciated.

  Cheers,
  Frank

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

 Android App Developer Books:http://commonsware.com/books

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


[android-developers] Re: Why ImageView doesn't show up inside ScrollView

2011-05-20 Thread Frank

  In fact, this is just a trial code. What I really want to do is to
  tile a ViewGroup with a whole bunch of ImageViews. I want to specify
  the absolute location and dimensions of eachImageViewinside the
  parent ViewGroup. However, it looks to me that I cannot do this. I
  found there is AbsoluteLayout, but it is deprecated. So do you know of
  any option to achieve this?

 Write your own ViewGroup.

 Or, don't use widgets at all, and draw on the Canvas, the way 2D games do.

Hi Mark,

If I can tile a ViewGroup as I planned originally, I can tile beyond
the visible region. Then when it is scrolled, Android can just quickly
scroll in the new tiles (with whatever hardware acceleration it can
use). If I use Canvas, I need to redraw the entire Canvas using the
tiles (basically, copying tile buffer onto Canvas using drawBitmap),
would this be slower than the first option, because it cannot benefit
from the possible hardware acceleration? This is just my concern. Your
expertise is highly appreciated!

Thanks,
Frank



 Bear in mind that there is a massive range of screen resolutions
 (based on size/density), which is why AbsoluteLayout is deprecated, as
 it does not lend itself to creating UIs that work well on everything
 from a 3 phone to a 10 tablet to a 42 TV.

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

 Android App Developer Books:http://commonsware.com/books

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


[android-developers] Re: Why ImageView doesn't show up inside ScrollView

2011-05-20 Thread Frank
Anyways, thank you, Mark.

On May 20, 11:14 am, Mark Murphy mmur...@commonsware.com wrote:
 On Fri, May 20, 2011 at 2:12 PM, Frank frank.android@gmail.com wrote:
  If I can tile a ViewGroup as I planned originally, I can tile beyond
  the visible region. Then when it is scrolled, Android can just quickly
  scroll in the new tiles (with whatever hardware acceleration it can
  use). If I use Canvas, I need to redraw the entire Canvas using the
  tiles (basically, copying tile buffer onto Canvas using drawBitmap),
  would this be slower than the first option, because it cannot benefit
  from the possible hardware acceleration? This is just my concern. Your
  expertise is highly appreciated!

 You are outside my areas of expertise, sorry.

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

 Android App Developer Books:http://commonsware.com/books

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Why ImageView doesn't show up inside ScrollView

2011-05-19 Thread Frank
Hi All,

I have the following code. I only got a black screen without seeing
the white image.

public class Demo extends Activity {
private MyCtrl mCtrl;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

mCtrl = new MyCtrl(this);
setContentView(mCtrl);
}
}

public class MyCtrl extends ScrollView {

public MyCtrl (Context context) {
super(context);
setFocusable(true);

int width = 100;
int height = 100;
int size = width * height;
int buf[] = new int[size];
for ( int i = 0; i  size; ++i) {
buf[i] = 0x; //white image
}

Bitmap bmp = Bitmap.createBitmap(buf, width, height,
Bitmap.Config.ARGB_);
ImageView iv = new ImageView(getContext());
iv.setLayoutParams( new LinearLayout.LayoutParams(width, height) );
iv.setImageBitmap(bmp);
iv.setScaleType(ImageView.ScaleType.CENTER);
addView(iv);
}
}


However, if I derive MyCtrl from ImageView directly, the white image
shows up.

Your help is highly appreciated.

Cheers,
Frank

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Does Android1.6 support Serial Port? any Examples?

2011-04-20 Thread Chen Frank
I am porting the android source on NEC EMMA MOBILE 1.
I want to do some program by Serial Port on Android 1.6.

Is there any Examples?

PS: maybe I will have some other questions. I hope I can get helps
from you guys.

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] Re: Is anybody using amazon S3 for uploading files from android?

2011-03-19 Thread Frank LoVecchio
I've gotten a multipart upload to work, I will give it a shot on
Android and get back to you Monday if you haven't gotten this to work
yet :)

On Feb 24, 12:48 am, ishwarya cishwa...@gmail.com wrote:
 Hi there,

             I am trying to upload image file from my android app to
 amazon s3.The problem is that the files are not getting properly
 uploaded to S3.

 I am using PutObjectRequest as follows to upload file to S3

 PutObjectRequest p=new PutObjectRequest(String

 Bucketname,Stirng key,InputStream in,ObjectMetadata metadata);

 Upload myUpload = tx.upload(p);

 //In ObjectMetadata argument I am passing only the content length

 When viewed through AWS management console to check the properties of
 the uploaded file, I could see
 only 32 Bytes of 5.2 KB image file getting uploaded.

 Also, under the Metadata tab of the file in the AWS console, I am able
 to see the value of the file as application/octet-stream instead of
 image/jpeg

 I tried doing Multipart upload but it seems to be complex.

 Could somebody help me with this???

 Thanks in advance.

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


Re: [android-developers] Re: Inyect Assistance data to the GPS

2011-01-24 Thread Frank Weiss
I think your answer lies in the Andorid source code
http://source.android.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] POSTing to WebView

2011-01-24 Thread Frank Weiss
Admittedly, I haven't used WebView, but accorrding to the API docs, Content
loaded through this mechanism does not have the ability to load content from
the network. I suppose you should be using loadDataWithBaseURL instead.

http://developer.android.com/reference/android/webkit/WebView.html#loadData(java.lang.String,%20java.lang.String,%20java.lang.String
)

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

Re: [android-developers] Re: The curious case of the impossible ArrayIndexOutOfBoundsException

2011-01-19 Thread Frank Weiss
Ok its statically verifiable. I still suggest try catching the exception and
logging diagnostics.
On Jan 19, 2011 2:35 AM, RyanMcNally therealr...@gmail.com wrote:
 Does anyone have any suggestions on what diagnostics to add? The code
 is statically verifiable not to throw AIOOBEs, so I've got no idea
 what to check for at runtime.

 Given that there is no threading, the arrays are defined exactly once,
 and the same indices are successfully written to 8 lines earlier and
 read from 2 lines earlier, I don't know what to check for.

 On Jan 18, 10:07 pm, Frank Weiss fewe...@gmail.com wrote:
 I suggest catching the AIOBE and adding your own diagnostics, via a
toast,
 log, or analytics code.

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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] Read Response from PHP server

2011-01-18 Thread Frank Weiss
You may have already figured this out.

String bytesSent;

is a valid field definition, but the following line:

httppost = new HttpPost(serverURL);

is a statement and belongs in a method or initialized block.

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

Re: [android-developers] Re: The curious case of the impossible ArrayIndexOutOfBoundsException

2011-01-18 Thread Frank Weiss
I suggest catching the AIOBE and adding your own diagnostics, via a toast,
log, or analytics code.

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

Re: [android-developers] Re: XML layout vs. programmatic

2011-01-15 Thread Frank Weiss
Well, I would not have anything against programmatic layouts per se. Indeed,
I've written a couple of layout managers for custom layouts that the
standard layout managers were not designed for. However, one of them was
driven by an XML configuration file,

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

Re: [android-developers] Re: How best to query web repeatedly.

2011-01-15 Thread Frank Weiss
I would suggest being more flexible about *when* the queries are made. You
seem to have fixated on every 50 meters. Why not every two minutes? Or every
n minutes, depending upon the current network latency? Or even a heuristic
scheduler based on multiple factors? I would also suggest considering
decoupling the activity from the provider. Perhaps by using a separate
service that pushes new queries to the activity. Avoid creating your own
threading framework.

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

2011-01-15 Thread Frank Weiss
Another problem with bluntly killing the app's process is that Android keeps
information about the app's state elsewhere.

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

2011-01-14 Thread Frank Weiss
As I recall, there were no indexes on the table. Without indexes I would
expect most every query on a very table to be very slow.

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

2011-01-07 Thread Frank Weiss
This is a familiar question on the Android SDK forum, yet has little to do
with the SDK. Better to search the web where the subject of parsing XML with
Java is covered more broadly.

I would suggest using the SAX push or the SAX pull parsers instead of the
document builder (DOM) parser. All are available in the Andorid SDK, but the
latter scales poorly and uses more memory.

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

Re: [android-developers] How to gracefully terminate a remote service process?

2011-01-07 Thread Frank Weiss
This is a problem that the Google engineers have acknowledged. As you
probably know, the issue is that the Android OS does delayed garbage
collection of - and possibly reuses -  dead porcesses,  however the
process name remains that of the last app it hosted, as reported via DDMS or
via phone's running processes.

Forcefully killing the process may seem to placate your users, but as you
know is frowned upon by the Android engineers. Could you instead explain
that what they see is not a running process, but a process ready to run in
case they need the service soon. It's really a lot like a hybrid car at a
stop sign. The ignition is on, but the engine isn't running, but can start
up instantly if you press on the gas.

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

Re: [android-developers] How to gracefully terminate a remote service process?

2011-01-07 Thread Frank Weiss
I want to say thank you to Dianne Hackborn for correcting my mistaken
assumption that an Android process could serially host different apps. I'll
have to take some time to study how the Android OS manages processes and the
DVK someday.

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

2011-01-06 Thread Frank Weiss
I suggest using AsyncTask for that, but keep it in the activity instead of a
service.

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

Re: [android-developers] eula with asynctask ?

2010-12-30 Thread Frank Weiss
I suppose the main problem is you are expecting the Eula.show() method to
block.

Looking at the referenced code, it is evident that the object you pass to
the show() method should implement the Eula.OnEulaAgreedTo interface (line
69). That interface declares the callback for the acceptance of the EULA,
and I suppose it's in that callback method where you should start the
AsyncTask.

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

2010-12-30 Thread Frank Weiss
I suppose this is primarily an issue of a smoothing algorithm. That is,
transforming a dense list of 2D vectors into a shorter list of lines and/or
arcs that approximate the input to a desired level of accuracy/quality. This
would probably be a bulk algorithm (at least in concept) but perhaps there
are some streaming/incremental solutions.

Googling for that might help.

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

Re: [android-developers] Re: CPU cost of a semi-infinite loop

2010-12-29 Thread Frank Weiss
I'd look into Kostya's suggestion. Ideally, you only need the click sample
and you can program the audio player to play the sample at precise
intervals.

Trying to do precise timing with SDK programming is just frought with
pitfalls, AFAIK.

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

2010-12-29 Thread Frank Weiss
Agreed, creating and keeping a POI database up to date is difficult. AFAIK
Google Places is one attempt at a universal solution and there are others
being considered.

Tell us, what particular POIs are you interested in and for what kind of use
cases? What are the limitations of Google Places API (I haven't studied it)?
Is it just that it's not supported on Android? Could you access it from your
web server?

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

2010-12-29 Thread Frank Weiss
I'm assuming you've studied this article very carefully:
http://developer.android.com/resources/articles/painless-threading.html

Please ask a question about a specific problem you're having.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] AsyncTask why not must be created in UI thread?

2010-12-28 Thread Frank Weiss
It's difficult to understand what you are asking. What problem are you
having with AsyncTask.

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

Re: [android-developers] New Application - advice on how to get started?

2010-12-28 Thread Frank Weiss
Ouch: no Java experience.

I'd suggest you start with the Hello Mapview app. You're also going to need
some expertise setting up your db-backed web server. And then sending a
retrieving data from it via Java networking code.

As your team developed anything similar, mobile or 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

Re: [android-developers] How implement LBS in Android

2010-12-28 Thread Frank Weiss
There are of course many Android LBS apps to date. Most of them use their
own proprietory databases.

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

2010-12-28 Thread Frank Weiss
You may want to check the Yahoo forums.

Parsing XML is a far more general subject than questions about the Android
SDK. So google is you friend, my friend.

The Android SDK provides three packages for parsing XML:

java.xml.parsers (DOM)
org.xml.sax (SAX push)
org.xml.saxpull.v1 (SAX pull)

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

2010-12-27 Thread Frank Weiss
True, you can store a set of weekdays in a single column, but the real
question should be what kind of queries would you make regarding that
column. Consider if that column may be used in join, where, order by, etc.
On Dec 27, 2010 3:49 AM, pramod.deore deore.pramo...@gmail.com wrote:
 Thank you Sir.

 On Dec 27, 4:41 pm, Mark Murphy mmur...@commonsware.com wrote:
 Option #1: Use an INTEGER column and bit positions for the different days

 Option #2: Serialize the strings into a comma-separated list or
 similar structure and store the result in a TEXT column

 On Mon, Dec 27, 2010 at 5:38 AM, pramod.deore deore.pramo...@gmail.com
wrote:
  Hi, I have a String array (which contains some day  from Monday -
  Sunday). But which days are stored is decided at runtime means
  sometime it want to store all day or sometime 1 or none. Now I want to
  store this array in database. How to save array of string in database?
  Or should I create 7 columns in that table?

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

 Warescription: Three Android Books, Plus Updates, One Low Price!

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=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] Cursor.getString() truncating Strings issue

2010-12-27 Thread Frank Weiss
logcat may be truncating, have you also tried

 Log.i(TAG,contents from cursor =
+cursor.getString(Additives.DESCRIPTION_COLUMN).length());

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

Re: [android-developers] Re: How to store date and time in database

2010-12-27 Thread Frank Weiss
milliseconds from midnight jan 1 1970 UTC to midnight dec 27 2010 UTC plus
miliseconds from midnight dec 27 2010 UTC to 15:57 27 dec 2010 UTC

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

Re: [android-developers] how to create irregular polygon and handle events within its boundary

2010-12-27 Thread Frank Weiss
OK, so how hard was it to google android polygon?

The tougher question may be do you already have the polygon as a vertex list
or do you just have an image that has a polygon?

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

Re: [android-developers] Re: how to create irregular polygon and handle events within its boundary

2010-12-27 Thread Frank Weiss
I suppose it seemed simple for me since I'm done it with AWT before.
Basically, you build up a Polygon object with vertices. You pass it to the
Graphics.draw method to display it (or not if you want an invisible hit test
layer over the image). You intercept click or touch events and use the
Polygon's inside() or contains() method to do the hit test.

Depending on the complexity and display size of the image, you may run into
some hit test accuracy issues due to the touch UI.

If you have the original artwork in Adobe Illustrator, you ought to be able
to get a vertex list therefrom. If not, google for a raster-to-vector tool
of your choice, for example:
http://freegeographytools.com/2007/converting-raster-area-images-into-polygon-shapefiles

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

Re: [android-developers] Re: how to create irregular polygon and handle events within its boundary

2010-12-27 Thread Frank Weiss
Vectoring parts of a photographic image is going to be more difficult than
the example I lnked.

I think you'l have to zoom the vertices in the polygon yourself, but you
might try using some drawing transformation methods - you may have to dig
deeper into OpenGL.

Now that you've given more problem details, maybe polygons isn't the only
approach. Are you trying to map the touch coordinates to a certain shade in
the man's arm, or to a particlar part of the arm? In the latter case, it
might work out to just use points for the center of each part (bicep,
tricep, elbow, etc.) and use an algorithm based on the distances of the
centers to the touch point. This may involve additional geometry skills,
such as dividing an area into regions based on such centroids. However,
sometimes looking at a problem from a different perwspective leads to a
better solution.

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

Re: [android-developers] Re: How do you manipulate content in an Activity from an external class or another Activity?

2010-12-26 Thread Frank Weiss
Or you could use the View-Adapter pattern. The adapter is responsible for
the data model changes and informs the view to redraw via notifications.

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

2010-12-24 Thread Frank Weiss
What error does the compiler give?

The code you posted appears to be missing a ; between score++ and
break

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

2010-12-24 Thread Frank Weiss
Eclipse has a Java debugger. Have you used it?

In my experience, breakpointing and stepping through code is the best way to
find out why code isn't working the way you expect it to.

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

Re: [android-developers] How to detect click on complex images/polygons

2010-12-24 Thread Frank Weiss
The first thing that comes to mind is java.awt.Polygon.contains(). I've used
it, but obviously with AWT and also with polygon data from
http://www.census.gov/geo/www/cob/

One approach then would be to find a similar Android polygon class that can
be used to draw and hit test your map and a way to convert the map's bitmap
image into a vector image, or at least a vector overlay for the bounds hit
test.

There are some ways you can get vector from a bitmap. I've used Visio by
putting the image on one layer and tracing out the vector shapes in another
layer, then writing some VB to export the shape vector data to XML. Do you
have Adobe CS? That might have some tools for converting bitmap shapes to
vectors. Or perhaps the image was originally authored with vectors?

There may also be some clever ways to do hit tests on the color values in
the bitmap.

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

2010-12-24 Thread Frank Weiss
I don't have actual experience doing this in Android, but I can offer some
suggestions from general experience with Java and software archtecture.

How much can you exploit MVC? What part of the code is the View? How much of
the code is the Model?

If a large part of the code is the Model, that is the business rules, logic,
data conversion, etc., then there's a good chance that with some
refactoring, you can get that part of the code to run on Android after some
refactoring.

Unless the code was actually architected to run on different platforms -
which it probably wasn't, blinded by the sirens of WORA - chances are
there'll be some painful refactoring. BTW, is the existing code base covered
with unit tests? That would help.

My rule of portable code is: Code isn't portable until it's been ported.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: My App should get information of every Http Get.

2010-12-24 Thread Frank Weiss
It's not possible from the SDK. You'll need to root the phone or run it on a
Wifi network with a packet sniffer or proxy.

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

2010-12-16 Thread Frank Weiss
An SDK application cannot have complete control over an Android device. You
need either build it into the firmware of devices you sell or let the user
update the device with your firmware.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Command line device debugging -- set breakpoint in the code?

2010-12-15 Thread Frank Weiss
Are you debugging Android OS or Android SDK code?

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

Re: [android-developers] Command line device debugging -- set breakpoint in the code?

2010-12-15 Thread Frank Weiss
Well, our perception of Eclipse is 180 degrees from mine. I'm curious, what
did you meant by beast?

In the OP you asked about setting breakpoints right in the code. In Eclipse
debugger (and just about every GUI debugger, including Firebug) you just
double click in the left margin of the source code line to set a breakpoint,
which is indicated by a small dot in the left margin. When the breakpoint
fires, Eclipse highlights that line. From there you can inspect variables,
the stack, etc. and step through the code. I've debugged with the command
line before, but once I started debugging with Eclipse, Visual Studio, and
Firebug, I would think that having to use a command line debugger is
painful.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Command line device debugging -- set breakpoint in the code?

2010-12-15 Thread Frank Weiss
Thanks for the reply. I can understand your perspective about working from
the command line. Tools are just tools, it's how well we use them and how
productive we are with them that counts.

I'm sorry I can't help much with your question. If you're patient maybe
another person will help you with it.

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

Re: [android-developers] Command line device debugging -- set breakpoint in the code?

2010-12-14 Thread Frank Weiss
I'm surprised no one has answered.

Learn how to us the Eclipse debugger.

Fall in love with the Eclipse debugger.

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

2010-12-13 Thread Frank Weiss
Since the API apparently doesn't support a synchronous status, here's
another, somewhat more complicated option. Add a service to your app that
receives the status updates and stores them in the app's preferences, or
somesuch. Then your app can get the most recent value synchronously. Note
that the service would only run when an update is broadcast, but even if
your app's activities are not in the foreground. The complicated part is
handling all the corner cases - reboot, app update, 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: layout editor in 2.3 SDK sucks! Sorry but it does.

2010-12-12 Thread Frank Weiss
Just a thought...

I wonder if any of the developers who are passionate about using the
notoriously buggy ADT layout editor might consider being passionate about
contributing to its development. Correct me if I'm wrong, but the ADT is an
open source project, right?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] What to use instead of a very long ListPreference?

2010-12-11 Thread Frank Weiss
If there are 1,000 entries, perhaps you should consider a different UI
approach such as: map, autocomplete search, drill-down taxonomy, recents,
favorites, most popular, 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] Android WebView

2010-12-11 Thread Frank Weiss
I bit more info please. How many KB does high resolution mean? If you want
to store the images locally, why do you want the HTML to come from the
server? What does performance specifically mean, with respect to the user
experience?

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

Re: [android-developers] Re: Adapter fetches and parses RSS feed to get its data - best practice?

2010-12-11 Thread Frank Weiss
Interesting OOD question posed by the OP. If I understand the question
correctly, I would say it depends

In Android, the Adapter interface is a contract with a class that extends
AdapterView. This is noticably different that the Adapter Pattern, which
generally mediates between two incompatible interfaces. However, It's not
too unusual to have a class that is otherwise unrelated to a AdapterView go
ahead and implement Adapter or ListAdapter instead of having to add an
additional adapter class to mediate. A possible objection may be that if
other clients wish to access the model-ness of the class in question, they
would have to access it via the Adapter interface. This is, however, not
necessarily a problem as the class can easily expose other model-ness
interfaces or be itself a model.

As to single responsibility, I think a more important aspect of OOD with
respect to the design of a class is cohesiveness. It's a question of degree.
A class that does two things that are unrelated or unconnected would be
highly suspect.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Adapter fetches parses RSS feed to get data - Best Practice?

2010-12-11 Thread Frank Weiss
Please see my answer in the repost of this thread.

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

Re: [android-developers] Re: Adapter fetches and parses RSS feed to get data - best practice?

2010-12-08 Thread Frank Weiss
I tend to agree with DanH as well as with Treking. Here's how I can agree
with both:

Best practices, object oriented design, design patterns,
performance, all tend to become *anti-patterns* when used to extreme. For
example, using a Singleton Pattern is considered a best practice by some
developers, but they sometimes fail to understand when and where to apply
it, creating unnecessary code. I think this is called the Golden Hammer
Anti-pattern, to wit: thinking that a particular pattern or technique is
universally applicable.

my $0.02

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

2010-12-07 Thread Frank Weiss
It just doesn't seem like a good idea to use Android Google map to display a
plan view of an apartment and call out POIs within it. On my Droid, at full
zoom-in, my apartment takes up about 1/12 of the screen. Also, if you placed
markers for POIs within your apartment, when you zoom out, they just overlap
and become useless. Is there really a compelling reason to mashup your
floorplan with all the features and layers of Google maps? Is is just a
specifc feature of GM you are interested in? What is that feature?

I suggest you use a different approach, like simply displaying the floorplan
as an image view, displaying markers on that, and providing whatever
detailed callouts you want. Chances are people are working on mobile CAD
apps like this.

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

Re: [android-developers] Re: How to differentiate a tap event generated by system or by user

2010-12-06 Thread Frank Weiss
Sounds a bit like an MVC problem. If the checkbox view is bound to a model
(adapter), only the user should be creating tap events. To programmatically
change the checkbox, change its state in the model.

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

Re: [android-developers] How to which function is calling a function at runtime?

2010-12-06 Thread Frank Weiss
As I recall, in Java there's a way to do this by throwing an exception and
catching it. The Exception object is supposed to allow you to access the
stack trace. See java.lang.Throwable.

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

2010-12-05 Thread Frank Weiss
I'm assuming that by a JPEG or PDF sketch of your apartment you mean an
image of either the architectural plan or elevation, or else some kind of 3D
sketch of the exterior or interior of the apartment.

I'm assuming that you know the location of your apartment and can thus
obtain its geocode manually, perhaps by using http://mapper.acme.com.

It's not clear what you want to obtain by reverse geocoding. You should
already know the address of your apartment, so what kind of nearby addresses
are you interested in?

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

2010-12-02 Thread Frank Weiss
Good ideas, but as has been said, good luck with that.

Some observations, if I may:

1) A developer shouldn't rely so much on ratings for feedback. Built-in bug
reporting, email, a user network, a marketing site with user comments all
provide a better dialog than the market's half-ass rating system.

2) How much do ratings really influence users? Users are either looking for
ratings that support their prejudice (these are not your best users) or they
are looking for a consistent pattern. Your best users understand how ratings
can be gamed and can usually see through the nonsense. Also note that your
pitch in the Android Market is likely going to influence users as much as
the ratings. Do you have computer progammers write that, or do you hire
(read: invest in) an experienced copywriter?

3) Ratings are just a half-assed way of letting potential users sort out
apps on the market. Few, if any are actually objective. Imagine if the auto
industry relied on a rating system like that.

4) I might also note that eBay uses ratings entirely differently. They don't
rate the product. Perhaps that would be a better direction for the Android
Market.

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

2010-12-02 Thread Frank Weiss
Admittedly, I haven't read this thread in detail. It seems to me, that using
an MVC approach is called for. The controller (the click handler) shouldn't
be calling the view directly. The controller should call the model. The
model will update the view accordingly.

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

2010-12-02 Thread Frank Weiss
Use the onRestoreInstanceState() callback, not just onCreate().

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

2010-12-01 Thread Frank Weiss
It would help if you were more specific about the problem.

1) What Unicode character code are you setting in the TextView that displays
as garbage?
2) What exactly does garbage mean, rectangles, or unexpected characters like
upside down question marks, etc?
3) Please post the code you are using to get the contents over the network.
I suspect the issue is converting a stream of bytes to characters.

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

2010-12-01 Thread Frank Weiss
There are a number of scenarios. The basic one is from the home page, but an
app can also run when the device boots, wakes up, an alarm fires, or when
another application sends an intent. The crux is the manifest which tells
the Android OS what interactions the app is expecting and able to respond
to.

Note that an app doesn't really run. Its code gets loaded into a Dalvic VM
and then the Andorid OS calls various lifecycle methods in the app's code. A
lot of newbie developers stumble over this, thinking that an Android app
runs just like a desktop application (even they are really subject to an
event loop as well). If you can think of IOC (inversion of control) you'll
have a better grip on how this works.

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

2010-12-01 Thread Frank Weiss
What would an image of your apartment look like and what specific locations
do you want to mark?

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