[android-developers] Re: can i load pdf url on webview?

2009-05-15 Thread Mark Murphy

>> I came across the similar case, where I have to show thepdfcontent
>> in WebView.

No, you don't. WebView does not display PDF content, and probably never will.

What you may want is a PDF viewer that responds to the PDF MIME type, such
that if a link appears to a PDF document, clicking the link launches the
PDF viewer.

>> 1. It seems, there is no WebView API provided. Please help if there is
>> any.

http://developer.android.com/reference/android/webkit/package-summary.html

>> 2. If there is any freeware, which can be used for proprietary
>> software.

If you mean a freeware PDF viewer for Android, I am not aware of any
decent PDF viewer for Android available at any price.

You may wish to consider creating a Web service that can convert your PDF
into a series of PNG files that can be viewed in Android.

>> 3. If there is some sort of licensed plug-in for webClient which can
>> be used.

To the extent Android supports browser plug-ins, they are only available
at the firmware level, not something that can be downloaded onto existing
devices.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!



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



[android-developers] Re: UI problem

2009-05-15 Thread Mariano Kamp
Hard to say what you really want from the snippets of information and code
you provided.
Generally speaking you normally only call setContent() to setup your screen
from your activity's onCreate() method, not when some state changes that
needs reflection on the UI.
When you have state changes you need to find the GUI element that you want
to change with findViewById() an call setText() (or whatever) on it
directly. It will redraw itself then.

And as Romain said, don't do any sleeps or other long running stuff on the
UI thread. This way you will block, which will in turn lead to
unresponsiveness, e.g. a press of the menu key or a tap on the screen will
not be dispatched until the UI thread is freed up again.

Provide a working, simple, short sample just demoing one concept you are
trying to understand. And it would be easier to help you.

What helped me better understanding this basic concepts was doing the
samples.
http://developer.android.com/guide/tutorials/notepad/index.html

On Thu, May 14, 2009 at 8:37 AM, Sukitha Udugamasooriya wrote:

>
> Hi geniuses,
>
> I have few buttons on the content. When I click on one button,
>
> 1-- I want to change the text of the button.
> 2-- Then I want to change the content view.
>
> this is my method which executes with the onClick event.
>
>private void markUser(int index) {
>
>btnArray[index].setText(mark);
>btnArray[index].setClickable(false);
>
>showGameOverMenu(); // calls the setContentView();
>}
>
> Here the problem is the text change of the button is not visible.
>
> How can I make it visible??? I'm not thorough with how the UI thread
> works in android
>
> Thanks in advance
>
> Sukitha
> (wannaB android master ;))
> >
>

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

2009-05-15 Thread meh.altaf
We have received so many comments regarding the authenticity of the biggest
SCAM which is GMI. It's our open challenge to all the current GMI investors
and GMI officials that if they would be able to answer these simple
questions with solid proofs the next day we will back off from blogging
against GMI. Following are some questions :-

see here
http://emailzz.blogspot.com/search/label/Goldmine%20International%20-%20A%20fraud

Apna Paisa

   - The World's Billionaires Women
2009
   - The Pakistan's Billionaires
2009
   - The World's Billionaires
2009
   - 10 Tips On How To Get Rich
Fast
   - Top 5 AdSense
tips


Apnay Sms

   - Vacancy Post-True
Friend.
   - Frienship is a way
road
   - chalo tum hi mohabbat ki ibtada kr
do
   - plz forgive
me
   - I Know How Angry You Are
...


Jobs Opportunities

   - Latest Jobs from
newspapers
   - SEND RESUME PHOTO RESEARCHER DUBAI The position is full time in a
   boutique photo library and press agency situated in Dubai. The job requires
   
researc
   - EVENTS MANAGER
DUBAI
   - ACCOUNT MANAGER
DUBAI
   - MOTIONS GRAPHICS DIRECTOR
DUBAI

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

2009-05-15 Thread Francesco Pace
Hi developers,
I need a help. I need to display all Logcats Log on console of my emulator,
as do it the simple program "Hello World".
Can you help me?

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



[android-developers] Re: Diplay Logcats logs on console

2009-05-15 Thread Mariano Kamp
Not sure if I understand you correctly.
You can run "adb -e logcat" on the command line to display the output of the
currently running emulator. Is that what are looking for?

On Fri, May 15, 2009 at 9:32 AM, Francesco Pace  wrote:

> Hi developers,
> I need a help. I need to display all Logcats Log on console of my emulator,
> as do it the simple program "Hello World".
> Can you help me?
>
> >
>

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



[android-developers] Re: Obtaining field of view of camera

2009-05-15 Thread blindfold

No. You'd have to calibrate using an external pattern at a known
distance.
There is also no method for obtaining the camera's supported
resolutions.

On May 14, 11:57 pm, mscwd01  wrote:
> Hey,
>
> Quick question:
> Is there a method of obtaining the field of view for a phones camera
> (horizontal and vertical)?
>
> Thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Diplay Logcats logs on console

2009-05-15 Thread Francesco Pace
Hi Mariano, thanks for your time.
Example :

/ CODE APPLICATION
*System.out.println("Hello");
foo1();   // Simple function
System.out.println("World");
foo2();   // Simple function
System.out.println("Today");
System.out.println("Yesterday");*

I know that I can't use "System.out.println" on Android.

/ DISPLAY CONSOLE  (NO WINDOW COMMAND LINE)
*- Hello
- World  (after foo1())
- Today  (after foo2())
- Yesterday*

"adb -e logcat" display the output of the currently running emulator on
window command line, I need to show "logs" on interface.
Can you help me? Thanks for all.

2009/5/15 Mariano Kamp 

> Not sure if I understand you correctly.
> You can run "adb -e logcat" on the command line to display the output of
> the currently running emulator. Is that what are looking for?
>
>
> On Fri, May 15, 2009 at 9:32 AM, Francesco Pace  wrote:
>
>> Hi developers,
>> I need a help. I need to display all Logcats Log on console of my
>> emulator, as do it the simple program "Hello World".
>> Can you help me?
>>
>>
>>
>
> >
>

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



[android-developers] 2-way engine Test Framework execution - crash

2009-05-15 Thread scs sek

Hi All,

When we try to execute the 2 way engine testcases in the test
framework, it is crashing while loading opencorecommon.so.

Please let me know, is it possible to run the test cases in android
1.5 source code version?

Thanks.

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



[android-developers] Re: Diplay Logcats logs on console

2009-05-15 Thread iDeveloper
You can use Log.d for printing debug statements to the LogCat and  
Log.e for error statements.




On 15-May-09, at 1:25 PM, Francesco Pace wrote:

> Hi Mariano, thanks for your time.
> Example :
>
> / CODE APPLICATION
> System.out.println("Hello");
> foo1();   // Simple function
> System.out.println("World");
> foo2();   // Simple function
> System.out.println("Today");
> System.out.println("Yesterday");
>
> I know that I can't use "System.out.println" on Android.
>
> / DISPLAY CONSOLE  (NO WINDOW COMMAND LINE)
> - Hello
> - World  (after foo1())
> - Today  (after foo2())
> - Yesterday
>
> "adb -e logcat" display the output of the currently running emulator  
> on window command line, I need to show "logs" on interface.
> Can you help me? Thanks for all.
>
> 2009/5/15 Mariano Kamp 
> Not sure if I understand you correctly.
>
> You can run "adb -e logcat" on the command line to display the  
> output of the currently running emulator. Is that what are looking  
> for?
>
>
> On Fri, May 15, 2009 at 9:32 AM, Francesco Pace   
> wrote:
> Hi developers,
> I need a help. I need to display all Logcats Log on console of my  
> emulator, as do it the simple program "Hello World".
> Can you help me?
>
>
>
>
>
>
>
> >


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



[android-developers] Using the AudioRecord API

2009-05-15 Thread benmccann

Hi,
I'm trying to figure out how to use the AudioRecord class.  I created
a callback with a logging message, but don't ever see it called.  Do
you see anything wrong with what I'm doing?  Do you have an example of
how to use the API?

Thanks,
Ben


import android.media.AudioFormat;
import android.media.AudioRecord;
import android.media.MediaRecorder;
import android.util.Log;

public class AudioListener {

  public static final int DEFAULT_SAMPLE_RATE = 8000;
  private static final int DEFAULT_BUFFER_SIZE = 4096;
  private static final int CALLBACK_PERIOD = 4000;  // 500 msec
(sample rate / callback period)
  private final AudioRecord recorder;

  public AudioListener() {
this(DEFAULT_SAMPLE_RATE);
  }

  private AudioListener(int sampleRate) {
recorder = new AudioRecord(MediaRecorder.AudioSource.DEFAULT,
sampleRate, AudioFormat.CHANNEL_CONFIGURATION_DEFAULT,
AudioFormat.ENCODING_DEFAULT, DEFAULT_BUFFER_SIZE);
  }

  public void start() {
recorder.setPositionNotificationPeriod(CALLBACK_PERIOD);
recorder.setRecordPositionUpdateListener(new
AudioRecord.OnRecordPositionUpdateListener() {
  @Override
  public void onMarkerReached(AudioRecord recorder) {
Log.e(this.getClass().getSimpleName(), "onMarkerReached
Called");
  }

  @Override
  public void onPeriodicNotification(AudioRecord recorder) {
Log.e(this.getClass().getSimpleName(), "onPeriodicNotification
Called");
  }
});

recorder.startRecording();
  }

}

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 see information that write /dev/radio

2009-05-15 Thread max

Hi All,

I can see that in logd_write.c,
if (!strcmp(tag, "HTC_RIL") ||
!strcmp(tag, "RILJ") ||
!strcmp(tag, "RILC") ||
!strcmp(tag, "RILD") ||
!strcmp(tag, "RIL") ||
!strcmp(tag, "AT") ||
!strcmp(tag, "GSM") ||
!strcmp(tag, "STK"))
log_id = LOG_ID_RADIO;

for all those TAGS, the information is dumped into LOG_ID_RADIO, which
is /dev/radio

how can I use adb command to see it ?


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

2009-05-15 Thread Francesco Pace
Hi, thanks.
But I want print these informations on my android application.. There is
a particular UI?

2009/5/15 iDeveloper 

> You can use Log.d for printing debug statements to the LogCat and Log.e for
> error statements.
>
>
>
>
> On 15-May-09, at 1:25 PM, Francesco Pace wrote:
>
> Hi Mariano, thanks for your time.
> Example :
>
> / CODE APPLICATION
> *System.out.println("Hello");
> foo1();   // Simple function
> System.out.println("World");
> foo2();   // Simple function
> System.out.println("Today");
> System.out.println("Yesterday");*
>
> I know that I can't use "System.out.println" on Android.
>
> / DISPLAY CONSOLE  (NO WINDOW COMMAND LINE)
> *- Hello
> - World  (after foo1())
> - Today  (after foo2())
> - Yesterday*
>
> "adb -e logcat" display the output of the currently running emulator on
> window command line, I need to show "logs" on interface.
> Can you help me? Thanks for all.
>
> 2009/5/15 Mariano Kamp 
>
>> Not sure if I understand you correctly.
>> You can run "adb -e logcat" on the command line to display the output of
>> the currently running emulator. Is that what are looking for?
>>
>>
>> On Fri, May 15, 2009 at 9:32 AM, Francesco Pace wrote:
>>
>>> Hi developers,
>>> I need a help. I need to display all Logcats Log on console of my
>>> emulator, as do it the simple program "Hello World".
>>> Can you help me?
>>>
>>>
>>>
>>
>>
>>
>
>
>
>
>
> >
>

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



[android-developers] Re: Diplay Logcats logs on console

2009-05-15 Thread iDeveloper
If you just want to print these on the activity, use a TextView and  
set its text to your sysouts

TextView tv = (TextView)findViewById...
tv.setText("Whatever you want to print");




On 15-May-09, at 1:54 PM, Francesco Pace wrote:

> Hi, thanks.
> But I want print these informations on my android application..  
> There is a particular UI?
>
> 2009/5/15 iDeveloper 
> You can use Log.d for printing debug statements to the LogCat and  
> Log.e for error statements.
>
>
>
>
> On 15-May-09, at 1:25 PM, Francesco Pace wrote:
>
>> Hi Mariano, thanks for your time.
>> Example :
>>
>> / CODE APPLICATION
>> System.out.println("Hello");
>> foo1();   // Simple function
>> System.out.println("World");
>> foo2();   // Simple function
>> System.out.println("Today");
>> System.out.println("Yesterday");
>>
>> I know that I can't use "System.out.println" on Android.
>>
>> / DISPLAY CONSOLE  (NO WINDOW COMMAND LINE)
>> - Hello
>> - World  (after foo1())
>> - Today  (after foo2())
>> - Yesterday
>>
>> "adb -e logcat" display the output of the currently running  
>> emulator on window command line, I need to show "logs" on interface.
>> Can you help me? Thanks for all.
>>
>> 2009/5/15 Mariano Kamp 
>> Not sure if I understand you correctly.
>>
>> You can run "adb -e logcat" on the command line to display the  
>> output of the currently running emulator. Is that what are looking  
>> for?
>>
>>
>> On Fri, May 15, 2009 at 9:32 AM, Francesco Pace   
>> wrote:
>> Hi developers,
>> I need a help. I need to display all Logcats Log on console of my  
>> emulator, as do it the simple program "Hello World".
>> Can you help me?
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
>
>
>
>
> >


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



[android-developers] Strange Cupcake Memory Bug with WebViews (that disappears when debugger attached)

2009-05-15 Thread iliketolearn

I've literally spent 15+ hours trying to figure out this one bug (when
I should be studying for finals). Any help is greatly appreciated. The
bug appears on the dev1 phone running cupcake. It was not present
before the upgrade. Basically, the problem is that when a activity
with a webview and 2 threads is run, the service that runs after it
will always crashes the process (but it works fine when the debugger
is attached). The worst part is that it crashes at arbitrarily places
in the service, so I can't isolate the error.

The details:

I have an activity with a WebView. The activity executes two threads,
one after the other using the basic new Thread(new Runnable() {public
void run()...  Both threads use the same handler to report back
results to the main activity. Flow works like this: when the activity
starts, the first thread gets data to construct the URL that the
webview will load (using DefaultHTTPClient). Then when the user
navigates to a certain page, the second thread is again fired (using
DefaultHTTPClient) to get some xml. This works fine.

The problem happens right afterwards. Once the activity with the
webview finishes (it calls finish on itself), a service is started
that has a thread that using DefaultHttpClient to downloaded some xml,
process it, etc. The service crashes at arbitrary points with no error
messages, simply displaying a memory dump, and kills the main process
with it. When I attempt to debug the process, it runs just fine w/ no
crashes. I've repeated this at least 30 times, with the same result.
(no crash w/ debugger, crash when installing signed apk file to device
and running it).

The program doesn't crash when the threads are removed from the
activity with webview. So even if the webview activity runs (but all
threads are removed), the service runs just fine regardless of the
debugger.

Here is how my threads start (both of the ones in the activity with
the webview, and the main thread in the service that is launched
afterwards):

Thread t = new Thread(
new Runnable() {
public void run() {
try {

final HttpParams params1 = new BasicHttpParams();
HttpProtocolParams.setVersion(params1, HttpVersion.HTTP_1_1);
HttpProtocolParams.setContentCharset(params1, "UTF-8");
final SchemeRegistry registry = new SchemeRegistry();
registry.register(new Scheme("http",
PlainSocketFactory.getSocketFactory(), 80));
final ThreadSafeClientConnManager manager =
new ThreadSafeClientConnManager(params1, registry);
 DefaultHttpClient client = new DefaultHttpClient(manager, params1);

.

Here is what logcat displays:

05-15 05:00:03.561: INFO/DEBUG(1022): Build fingerprint: 'android-
devphone1/dream_devphone/dream/trout:1.5/CRB21/147201:userdebug/
adp,test-keys'
05-15 05:00:03.571: INFO/DEBUG(1022): pid: 2540, tid: 2541  >>>
com.macrospecs.friendmobilizer <<<
05-15 05:00:03.571: INFO/DEBUG(1022): signal 11 (SIGSEGV), fault addr
0140
05-15 05:00:03.571: INFO/DEBUG(1022):  r0 0007  r1 0001  r2
411989b4  r3 0140
05-15 05:00:03.571: INFO/DEBUG(1022):  r4 411989b4  r5 000f7418  r6
  r7 0016e170
05-15 05:00:03.571: INFO/DEBUG(1022):  r8 100ffd00  r9 4100aef0  10
4100aedc  fp 0001
05-15 05:00:03.582: INFO/DEBUG(1022):  ip 0011  sp 100ffc48  lr
ad046ca5  pc ad03ed9a  cpsr 0030
05-15 05:00:03.681: INFO/DEBUG(1022):  #00  pc 0003ed9a  /
system/lib/libdvm.so
05-15 05:00:03.691: INFO/DEBUG(1022):  #01  pc 0026d0ce  /
system/lib/libwebcore.so
05-15 05:00:03.691: INFO/DEBUG(1022):  #02  pc 0026d250  /
system/lib/libwebcore.so
05-15 05:00:03.701: INFO/DEBUG(1022):  #03  pc e3b4  /
system/lib/libdvm.so
05-15 05:00:03.711: INFO/DEBUG(1022):  #04  pc 00040a8a  /
system/lib/libdvm.so
05-15 05:00:03.711: INFO/DEBUG(1022):  #05  pc 00013118  /
system/lib/libdvm.so
05-15 05:00:03.711: INFO/DEBUG(1022):  #06  pc 00017b1c  /
system/lib/libdvm.so
05-15 05:00:03.721: INFO/DEBUG(1022):  #07  pc 00017560  /
system/lib/libdvm.so
05-15 05:00:03.721: INFO/DEBUG(1022):  #08  pc 000520ec  /
system/lib/libdvm.so
05-15 05:00:03.731: INFO/DEBUG(1022):  #09  pc 0005210a  /
system/lib/libdvm.so
05-15 05:00:03.731: INFO/DEBUG(1022):  #10  pc 000494c4  /
system/lib/libdvm.so
05-15 05:00:03.741: INFO/DEBUG(1022):  #11  pc 0004954c  /
system/lib/libdvm.so
05-15 05:00:03.741: INFO/DEBUG(1022):  #12  pc 00049896  /
system/lib/libdvm.so
05-15 05:00:03.751: INFO/DEBUG(1022):  #13  pc 00046f6a  /
system/lib/libdvm.so
05-15 05:00:03.751: INFO/DEBUG(1022):  #14  pc f880  /
system/lib/libc.so
05-15 05:00:03.761: INFO/DEBUG(1022):  #15  pc f3f4  /
system/lib/libc.so



--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To u

[android-developers] Re: Diplay Logcats logs on console

2009-05-15 Thread Francesco Pace
Thanks, but I have this error :

ERROR/AndroidRuntime(1096): java.lang.RuntimeException: Unable to start
activity
ComponentInfo{com.cecco.android.hello/com.cecco.android.hello.HelloWorld}:
java.lang.NullPointerException: println needs a message

in my code :

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

TextView tv = (TextView)this.findViewById(R.id.TextView01);
 tv.setText("Hello, Android\n");
 setContentView(tv);
}

But when I use this statement "TextView tv = new TextView(this) my
application running correctly.
My main.xml file is  :

http://schemas.android.com/apk/res/android
">




and my R.java :

public final class R {
public static final class attr {
}
public static final class drawable {
public static final int icon=0x7f02;
}
public static final class id {
public static final int LinearLayout01=0x7f05;
public static final int TextView01=0x7f050001;
}
public static final class layout {
public static final int main=0x7f03;
}
public static final class string {
public static final int app_name=0x7f040001;
public static final int hello=0x7f04;
}

2009/5/15 iDeveloper 

> If you just want to print these on the activity, use a TextView and set its
> text to your sysouts
> TextView tv = (TextView)findViewById...
> tv.setText("Whatever you want to print");
>
>
>
>
> On 15-May-09, at 1:54 PM, Francesco Pace wrote:
>
> Hi, thanks.
> But I want print these informations on my android application.. There
> is a particular UI?
>
> 2009/5/15 iDeveloper 
>
>> You can use Log.d for printing debug statements to the LogCat and Log.e
>> for error statements.
>>
>>
>>
>>
>> On 15-May-09, at 1:25 PM, Francesco Pace wrote:
>>
>> Hi Mariano, thanks for your time.
>> Example :
>>
>> / CODE APPLICATION
>> *System.out.println("Hello");
>> foo1();   // Simple function
>> System.out.println("World");
>> foo2();   // Simple function
>> System.out.println("Today");
>> System.out.println("Yesterday");*
>>
>> I know that I can't use "System.out.println" on Android.
>>
>> / DISPLAY CONSOLE  (NO WINDOW COMMAND LINE)
>> *- Hello
>> - World  (after foo1())
>> - Today  (after foo2())
>> - Yesterday*
>>
>> "adb -e logcat" display the output of the currently running emulator on
>> window command line, I need to show "logs" on interface.
>> Can you help me? Thanks for all.
>>
>> 2009/5/15 Mariano Kamp 
>>
>>> Not sure if I understand you correctly.
>>> You can run "adb -e logcat" on the command line to display the output of
>>> the currently running emulator. Is that what are looking for?
>>>
>>>
>>> On Fri, May 15, 2009 at 9:32 AM, Francesco Pace wrote:
>>>
 Hi developers,
 I need a help. I need to display all Logcats Log on console of my
 emulator, as do it the simple program "Hello World".
 Can you help me?



>>>
>>>
>>>
>>
>>
>>
>>
>>
>>
>>
>
>
>
>
>
> >
>

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



[android-developers] How to remove androids native notifications?

2009-05-15 Thread nowb

Hello!


I´m doing an app that handles sms. Depending on the content of the sms
I want to add dirrerent kind of icons to the status bar. This works
fine with the NotificationManager, however I want to remove the native
sms icon. Anyone knows how to do that?

I guess if I have the notification id for sms I would be able to
remove the notification but I havn't been able to find that.


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

2009-05-15 Thread danielececil...@gmail.com

Hi,

I try to recover data from the phonebook to stock them into an
ArrayList.

I wrote this code to test on phone number data:

 Begin Code
--

Cursor c = getContentResolver().query(People.CONTENT_URI, null, null,
null, null);
int id = c.getColumnIndex(People.PRIMARY_PHONE_ID);

End Code
-

But I don't know how recover values in this column.
I found exemple with a listView on Web, but i don't want to use a
graphic interface.

Somebody can help me please :)

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

2009-05-15 Thread e-satis

Hello,

I just noticed, using the HTC Dream that using a bluetooth headset was
really easy for phone calls, but nothing seemed to be available for
videos / music sound output. V1.0 limitations are not at fault since
when you play a music and start a call, you can hear the music in the
headset for a second. So it's technically possible, just not available
in the settings.

Does anybody knows how to redirect programatically the sound output to
the blutooth headset ?

I'd like to code a little app that let you listen to your music while
looking like a total idiot with a big device hanging to your hear :-)

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] Re: Created APNs don't show up in APN list (fw 1.5)

2009-05-15 Thread jappit

As a possible reason, could it be that 1.5 hides APNs with mmc/mnc
different from the values of the currently installed SIM?

Pit

On May 14, 6:18 pm, jappit  wrote:
> Hi,
>
> I have a piece of code that creates some APNs with this call:
> --
> getContentResolver().insert(Uri.parse("content://telephony/carriers"),
> apnData);
> --
> The APNs are correctly created both on fw 1.1 and 1.5 (a query
> correctly returns them) but on fw 1.5 they don't show up in the device
> APN settings screen.
>
> Has anyone any hints on the reasons of this behavior?
>
> Thanks,
> Pit
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] ContentProvider queries, Contacts and the SDK docs

2009-05-15 Thread Alan Jones

Hi All,

A couple of questions. First thing I was wondering is where to log
bugs in the docs.
The ContentProvider query() docs are missing selectionArgs in the
example code. It also
uses the deprecated addId instead of ContentUris.withAppendedId().

With regards to the selection options - how exactly can these handle?
I've seen a couple
of places where a something + "='" + somevalue "'" is used, but I'm
specifically wondering
if it can handle IN clauses or if there's some form of or statement I
can use to check for
a variety of values in a particular column rather than just the one.

Last question is about the Contacts PERSON_ID and how long-lived that
is. It is guaranteed
to never change (though may be removed obviously). Well not truly
guaranteed but will only
cycle after it runs out of unused integers. Or may they change value
as contacts are removed?

Cheers,

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

2009-05-15 Thread Francesco Pace
Thanks, but I have same error.
New code is :

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView tv = (TextView)this.findViewById(R.id.TextView01);
setContentView(tv);
tv.setText("Hello, Android\n");
}

Boh.

2009/5/15 Robert 

> You can try it to move setcontextview() to the first line in oncreate
> function.good lock.
>
> Francesco Pace 写道:
>
> >Thanks, but I have this error :
> >
> >ERROR/AndroidRuntime(1096): java.lang.RuntimeException: Unable to start
> >activity
> >ComponentInfo{com.cecco.android.hello/com.cecco.android.hello.HelloWorld}:
> >java.lang.NullPointerException: println needs a message
> >
> >in my code :
> >
> >public void onCreate(Bundle savedInstanceState) {
> >super.onCreate(savedInstanceState);
> >
> >TextView tv = (TextView)this.findViewById(R.id.TextView01);
> > tv.setText("Hello, Android\n");
> > setContentView(tv);
> >}
> >
> >But when I use this statement "TextView tv = new TextView(this) my
> >application running correctly.
> >My main.xml file is  :
> >
> > >   android:id="@+id/LinearLayout01"
> >   android:layout_width="fill_parent"
> >   android:layout_height="fill_parent"
> >  xmlns:android="
> http://schemas.android.com/apk/res/android
> >">
> > >  android:text="TextView01"
> >  android:id="@+id/TextView01"
> >  android:layout_width="wrap_content"
> >  android:layout_height="wrap_content">
> >
> >
> >
> >and my R.java :
> >
> >public final class R {
> >public static final class attr {
> >}
> >public static final class drawable {
> >public static final int icon=0x7f02;
> >}
> >public static final class id {
> >public static final int LinearLayout01=0x7f05;
> >public static final int TextView01=0x7f050001;
> >}
> >public static final class layout {
> >public static final int main=0x7f03;
> >}
> >public static final class string {
> >public static final int app_name=0x7f040001;
> >public static final int hello=0x7f04;
> >}
> >
> >2009/5/15 iDeveloper 
> >
> >> If you just want to print these on the activity, use a TextView and set
> its
> >> text to your sysouts
> >> TextView tv = (TextView)findViewById...
> >> tv.setText("Whatever you want to print");
> >>
> >>
> >>
> >>
> >> On 15-May-09, at 1:54 PM, Francesco Pace wrote:
> >>
> >> Hi, thanks.
> >> But I want print these informations on my android application..
> There
> >> is a particular UI?
> >>
> >> 2009/5/15 iDeveloper 
> >>
> >>> You can use Log.d for printing debug statements to the LogCat and Log.e
> >>> for error statements.
> >>>
> >>>
> >>>
> >>>
> >>> On 15-May-09, at 1:25 PM, Francesco Pace wrote:
> >>>
> >>> Hi Mariano, thanks for your time.
> >>> Example :
> >>>
> >>> / CODE APPLICATION
> >>> *System.out.println("Hello");
> >>> foo1();   // Simple function
> >>> System.out.println("World");
> >>> foo2();   // Simple function
> >>> System.out.println("Today");
> >>> System.out.println("Yesterday");*
> >>>
> >>> I know that I can't use "System.out.println" on Android.
> >>>
> >>> / DISPLAY CONSOLE  (NO WINDOW COMMAND LINE)
> >>> *- Hello
> >>> - World  (after foo1())
> >>> - Today  (after foo2())
> >>> - Yesterday*
> >>>
> >>> "adb -e logcat" display the output of the currently running emulator on
> >>> window command line, I need to show "logs" on interface.
> >>> Can you help me? Thanks for all.
> >>>
> >>> 2009/5/15 Mariano Kamp 
> >>>
>  Not sure if I understand you correctly.
>  You can run "adb -e logcat" on the command line to display the output
> of
>  the currently running emulator. Is that what are looking for?
> 
> 
>  On Fri, May 15, 2009 at 9:32 AM, Francesco Pace  >wrote:
> 
> > Hi developers,
> > I need a help. I need to display all Logcats Log on console of my
> > emulator, as do it the simple program "Hello World".
> > Can you help me?
> >
> >
> >
> 
> 
> 
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >>
> >>
> >> >
> >>
> >
> >>
>
> >
>

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



[android-developers] Re: Diplay Logcats logs on console

2009-05-15 Thread iDeveloper
findViewById can only be used if you have set a layout for your  
activity and the layout had a control with the id you've mentioned.
For what you're trying to accomplish, create a TextView using new  
TextView() and then do a setContentView(tv)

You are getting tv as null because you do not have a textview in your  
activity's layout which has an id TextView01



On 15-May-09, at 4:26 PM, Francesco Pace wrote:

> Thanks, but I have same error.
> New code is :
>
> public void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> TextView tv = (TextView)this.findViewById(R.id.TextView01);
> setContentView(tv);
> tv.setText("Hello, Android\n");
> }
>
> Boh.
>
> 2009/5/15 Robert 
> You can try it to move setcontextview() to the first line in  
> oncreate function.good lock.
>
> Francesco Pace 写道:
>
> >Thanks, but I have this error :
> >
> >ERROR/AndroidRuntime(1096): java.lang.RuntimeException: Unable to  
> start
> >activity
> >ComponentInfo{com.cecco.android.hello/ 
> com.cecco.android.hello.HelloWorld}:
> >java.lang.NullPointerException: println needs a message
> >
> >in my code :
> >
> >public void onCreate(Bundle savedInstanceState) {
> >super.onCreate(savedInstanceState);
> >
> >TextView tv = (TextView)this.findViewById(R.id.TextView01);
> > tv.setText("Hello, Android\n");
> > setContentView(tv);
> >}
> >
> >But when I use this statement "TextView tv = new TextView(this) my
> >application running correctly.
> >My main.xml file is  :
> >
> > >   android:id="@+id/LinearLayout01"
> >   android:layout_width="fill_parent"
> >   android:layout_height="fill_parent"
> >  xmlns:android="http://schemas.android.com/apk/res/android
> >">
> > >  android:text="TextView01"
> >  android:id="@+id/TextView01"
> >  android:layout_width="wrap_content"
> >  android:layout_height="wrap_content">
> >
> >
> >
> >and my R.java :
> >
> >public final class R {
> >public static final class attr {
> >}
> >public static final class drawable {
> >public static final int icon=0x7f02;
> >}
> >public static final class id {
> >public static final int LinearLayout01=0x7f05;
> >public static final int TextView01=0x7f050001;
> >}
> >public static final class layout {
> >public static final int main=0x7f03;
> >}
> >public static final class string {
> >public static final int app_name=0x7f040001;
> >public static final int hello=0x7f04;
> >}
> >
> >2009/5/15 iDeveloper 
> >
> >> If you just want to print these on the activity, use a TextView  
> and set its
> >> text to your sysouts
> >> TextView tv = (TextView)findViewById...
> >> tv.setText("Whatever you want to print");
> >>
> >>
> >>
> >>
> >> On 15-May-09, at 1:54 PM, Francesco Pace wrote:
> >>
> >> Hi, thanks.
> >> But I want print these informations on my android  
> application.. There
> >> is a particular UI?
> >>
> >> 2009/5/15 iDeveloper 
> >>
> >>> You can use Log.d for printing debug statements to the LogCat  
> and Log.e
> >>> for error statements.
> >>>
> >>>
> >>>
> >>>
> >>> On 15-May-09, at 1:25 PM, Francesco Pace wrote:
> >>>
> >>> Hi Mariano, thanks for your time.
> >>> Example :
> >>>
> >>> / CODE APPLICATION
> >>> *System.out.println("Hello");
> >>> foo1();   // Simple function
> >>> System.out.println("World");
> >>> foo2();   // Simple function
> >>> System.out.println("Today");
> >>> System.out.println("Yesterday");*
> >>>
> >>> I know that I can't use "System.out.println" on Android.
> >>>
> >>> / DISPLAY CONSOLE  (NO WINDOW COMMAND LINE)
> >>> *- Hello
> >>> - World  (after foo1())
> >>> - Today  (after foo2())
> >>> - Yesterday*
> >>>
> >>> "adb -e logcat" display the output of the currently running  
> emulator on
> >>> window command line, I need to show "logs" on interface.
> >>> Can you help me? Thanks for all.
> >>>
> >>> 2009/5/15 Mariano Kamp 
> >>>
>  Not sure if I understand you correctly.
>  You can run "adb -e logcat" on the command line to display the  
> output of
>  the currently running emulator. Is that what are looking for?
> 
> 
>  On Fri, May 15, 2009 at 9:32 AM, Francesco Pace  >wrote:
> 
> > Hi developers,
> > I need a help. I need to display all Logcats Log on console of  
> my
> > emulator, as do it the simple program "Hello World".
> > Can you help me?
> >
> >
> >
> 
> 
> 
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >>
> >>
> >> >
> >>
> >
> >>
>
>
>
>
> >


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

[android-developers] Sending a data sms to an application port

2009-05-15 Thread Andreas Frey

Hello,

I use Android sdk 1.5 on ubuntu 8.0.4.

In my application I want to use a data sms on a special port to inform
my application about new available information. Then a background
thread should be started to process this information.

Currently i have an application sending data sms to port 12345 to an
application to another emulator. Both emulators can send and receive
sms. However there is no difference between a data sms and a text sms
in the incoming intent.

I send textSMS via:
>>...
String messageText = "Hello World";
SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage(, null, messageText,
sentPi, deliveredPi);


and data messages via
>>...
short DATA_SMS_PORT = 12345;
String messageText = "Hello World";
SmsManager smsManager = SmsManager.getDefault();
smsManager.sendDataMessage(, null, DATA_SMS_PORT,
messageText.getBytes(), null, null);

This is the configuration of my BroadcastReceiver

  






and a litte source code:
public void onReceive(Context context, Intent intent) {
  ...
StringBuilder sb = new StringBuilder();
Bundle bundle = intent.getExtras();
Log.d(LOGTAG, intent.toString());

SmsMessage[] messages = new SmsMessage[pdusObj.length];
for (int i = 0; i < pdusObj.length; i++) {
messages[i] = SmsMessage.createFromPdu((byte[]) 
pdusObj[i]);
}

for (SmsMessage currentMessage : messages) {
sb.append("SMS From: ");

sb.append(currentMessage.getDisplayOriginatingAddress());
}
Toast t = Toast.makeText(context, sb, 
Toast.LENGTH_LONG);
t.show();
}
  ...
}

Whatever method i take to send the sms, I always receive a text sms.
When i log the "intent.toString()" it always returns
Intent {
action=android.provider.Telephony.SMS_RECEIVED
comp={de.mySms/de.mySms.SMSReceiver}
(has extras)
}
I see no possibility to use a intent-filter receiving data-sms
("android.intent.action.DATA_SMS_RECEIVED").

a) can anyone help me here? Is there a possibility to send AND receive
a data sms to a special application port from within the emulator?
b) Can i send, receive data sms from the G1?
c) Is this a known issue?

Any help is welcome.
Greetings Andy



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

2009-05-15 Thread SGAdrian

Hi,

When you are developing on an application level(Services, Activities)
you always get this Context reference automatically.

But what if I am on a lower level and developing a program started
with app_process, how can I get hold of a Context then? Its a huge
part of the API that need this context.

What the proper way to create a Context instance?

I've tried :

ActivityThread main = ActivityThread.systemMain();
Context context = main.getSystemContext();

But when I use this context with the MediaScannerService for example,
I get the following error :

"Unable to find app for caller
android.app.applicationthreadpr...@433f92e8 (pid=1049) when binding
service Intent { action=android.media.IMediaScannerService } "

BR,
Sven
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Installing the USB driver for HTC Magic on Vista

2009-05-15 Thread cberger


On May 14, 5:49 pm, Raphael  wrote:
> - If you want to debug with adb, ant or Eclipse, you need to use the
> USB driver that comes with your SDK. You need to enable debugging on
> the device first in the settings. 
> Seehttp://d.android.com/guide/developing/device.html#setting-up
>

Does this work ?
Mounting sdcard works ok for me, but I cannot install usb driver for
adb
And instructions on android developer site only talk about G1, not the
magic. The driver infos may have to be updated with the HTC Magic
device id ?

Anyway, just like initial poster, windows (XP) does not prompt me
about a new device. It installed a generic drive (active even when not
mounted).
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] sharing database

2009-05-15 Thread Peterman


hi to all

Anybody knows if we can share databases between applications? How can
I access to a database from an A application to another B application?

It is possible? What uri I would have to put?

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



[android-developers] Re: sharing database

2009-05-15 Thread Mark Murphy

> Anybody knows if we can share databases between applications? How can
> I access to a database from an A application to another B application?
>
> It is possible? What uri I would have to put?

The preferred way to do this is by creating a ContentProvider to make data
in one project available to other projects.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!



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



[android-developers] Re: Creating context, how?

2009-05-15 Thread Mark Murphy

> When you are developing on an application level(Services, Activities)
> you always get this Context reference automatically.
>
> But what if I am on a lower level and developing a program started
> with app_process, how can I get hold of a Context then? Its a huge
> part of the API that need this context.

Have it passed to you via the API to your lower level. In other words,
just as the Android API requires you to pass in a Context, your API to
your higher levels will require those higher levels to pass in a Context.

> What the proper way to create a Context instance?

AFAIK, you don't create Context instances -- you use the ones created for
you by Android (e.g., Activity, Service).

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!



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



[android-developers] Re: Access my own provider in another app

2009-05-15 Thread Peterman

Hi

could you tell me how to access from an Application to the database
from another application?

thanks a lot
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Creating context, how?

2009-05-15 Thread SGAdrian

Sorry but I dont get it.

I am starting my java program with app_process, i.e I am not running
any Service or Activity. Just like the Monkey.java program is doing.

Ex.

public class Main {
public static void main(String[] args) {
   // How can I get hold of a Context instance here?
   //
   }
}

BR,
Sven

On May 15, 2:50 pm, "Mark Murphy"  wrote:
> > When you are developing on an application level(Services, Activities)
> > you always get this Context reference automatically.
>
> > But what if I am on a lower level and developing a program started
> > with app_process, how can I get hold of a Context then? Its a huge
> > part of the API that need this context.
>
> Have it passed to you via the API to your lower level. In other words,
> just as the Android API requires you to pass in a Context, your API to
> your higher levels will require those higher levels to pass in a Context.
>
> > What the proper way to create a Context instance?
>
> AFAIK, you don't create Context instances -- you use the ones created for
> you by Android (e.g., Activity, Service).
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Accelerometer is cukoo???

2009-05-15 Thread doubleslash

This problem occurs only when activity is set explicitly to landscape
in manifest. Anyway to make it work in landscape?
Thanks

On May 14, 10:16 pm, doubleslash  wrote:
> I see an acceleration of -9 in the y-direction ( due to gravity, of
> course). Now, keeping the phone fixed, not rotating the screen or
> anything, I interrupt the app my pressing the call button and then
> coming back, I see an acceleration of +9 in the x-direction. This
> switching of the coordinates happens without onAccuracyChanged being
> called, so how on Earth can we consistently use the accelerometer's
> output?
>
> Please shed some light on this. Is this fixed in SDK 1.5?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Animated progress in Imageview

2009-05-15 Thread Al

On May 14, 8:29 pm, Romain Guy  wrote:
> The title bar uses a RotateDrawable. The animation is driven by the
> ProgressBar widget.

Thanks Romain, it works perfectly now.


@Mark, I was expecting to be able to do something like RotateAnimation
r = new RotateAnimation(this, R.drawable.progress), which is why I was
quite confused when looked at the available constructors. Thanks for
your input :)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Cascading deletion?

2009-05-15 Thread arnouf

Hi all,

If I delete a contact using contentresolver.delete(...), all
information is deleted - even information presents in contact_methods,
phones...?

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



[android-developers] Re: Location.convert possible bug

2009-05-15 Thread ellipsoidmob...@googlemail.com

You are right!

I reproduced in my own GPS app and if seconds>59 you get a conversion
error. I took a quick look in the android source (location/java/
android/location/location.java) and the bug is clearly visible:

Currently reads:

 if (sec < 0 || sec > 59) {
throw new IllegalArgumentException("coordinate=" +
coordinate);
}

Should (I think) read:

 if (sec < 0 || sec >= 60) {
throw new IllegalArgumentException("coordinate=" +
coordinate);
}

I was going to raise a bug report but it's already there - issue 2667
and 2668

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

2009-05-15 Thread rico_1

Hi,
Does any one know structure of tables in Android? I know structure of
table sms (content://sms/):
_id, thread_id, address, person, date, protocol, read, status, type,
reply_path_present, subject, body, service_center.

Does any one know structure of the rest sms tables? and what tables
are in Android ?

Thanks


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



[android-developers] Re: Prevent clearing Canvas in onDraw() ?

2009-05-15 Thread alan

draw everything to an offscreen image then just draw the image onto
the canvas for each ondraw

On May 14, 5:21 pm, "ellipsoidmob...@googlemail.com"
 wrote:
> By overriding onDraw you're taking responsibility for drawing the
> whole view, so you have to draw everything everytime
>
> I don't know the layout of your UI, but possibly you can use a view
> layout with view subclasses such as ImageView - these will then take
> care of their own drawing evenrs.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 can i parse epub file

2009-05-15 Thread alan

if its not encrypted then I imagine you could probably just extract
the html and view the individual pages in a webview

On May 14, 4:24 pm, zeeshan  wrote:
> Hi,
>
> i am wondering if there is any way to parse and display epub file in
> android?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to connect to a wireless network

2009-05-15 Thread Ventrix Kostis P.

I would like to give me an example on how to connect to a wireless
network.

The following code I have tested does not work...

WifiManager mainWifi = (WifiManager) getSystemService
(Context.WIFI_SERVICE);
WifiConfiguration wfc = new WifiConfiguration();
wfc.SSID = "\"foobar\"";
wfc.priority = 1;
wfc.status = 1;
int idt = mainWifi.addNetwork(wfc);
mainWifi.enableNetwork(idt, true);

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

2009-05-15 Thread Streets Of Boston

You want a delay between changing the button's text and showing the
new content-view?

If that's the case,

private void markUser(int index) {


btnArray[index].setText(mark);
btnArray[index].setClickable(false);

postDelayed(new Runnable() {
  public void run() {
showGameOverMenu(); // calls the setContentView
();
  }
}, delay);
}


(postDelayed may have to be called using a View or Handler instance)

On May 14, 2:37 am, Sukitha Udugamasooriya  wrote:
> Hi geniuses,
>
> I have few buttons on the content. When I click on one button,
>
> 1-- I want to change the text of the button.
> 2-- Then I want to change the content view.
>
> this is my method which executes with the onClick event.
>
>         private void markUser(int index) {
>
>                 btnArray[index].setText(mark);
>                 btnArray[index].setClickable(false);
>
>                 showGameOverMenu();     // calls the setContentView();
>         }
>
> Here the problem is the text change of the button is not visible.
>
> How can I make it visible??? I'm not thorough with how the UI thread
> works in android
>
> Thanks in advance
>
> Sukitha
> (wannaB android master ;))
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] 1.5 ListView disabled items

2009-05-15 Thread Alexey

Hi all , i've noticed after i've switched to 1.5 that if ListView item
is not enabled the divider(s) for this item are not rendering. Is this
intentional ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] startActivity from subclass - strange problem

2009-05-15 Thread mscwd01

Hey,

I have a Activity and I have a class which extends this Activity. In
this subclass I call:

startActivity(new Intent(this, CameraView.class))

Which should start the "CameraView" Activity. However, I always get
this error:

ERROR/AndroidRuntime(876): java.lang.NullPointerException
ERROR/AndroidRuntime(876): at
android.content.ContextWrapper.getPackageName(ContextWrapper.java:119)
ERROR/AndroidRuntime(876): at android.content.ComponentName.
(ComponentName.java:74)
ERROR/AndroidRuntime(876): at android.content.Intent.
(Intent.java:2093)

If it makes any difference the subclass creates a ListView and when a
row of the ListView is clicked it calls startActivity();

Any help is appreciated! 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] OpenGL ES portability...

2009-05-15 Thread Shrinivas

Hi All,

I am very new to this domain. I want to port OpenGL-ES + Android on
some HW platform.
I have following queries regarding the same.

1) Does Android use OpenGL-ES for both 2D & 3D applications?
2) I want to use hardware accelerators for the OpenGL-ES Library. I
want to know what difficulties i come across while porting this
library. Please help in getting some knowledge of how to go about
using the hardware accelerators for OpenGL-ES on Android platform.

I appreciate your help for the same...

BR,
Shrinivas Rao

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



[android-developers] Re: Android 1.5 bug with earphone detection

2009-05-15 Thread Brad

Have just bought the YC A300 and agreed that this does not work.

I am hoping this can be fixed.


On May 5, 4:07 pm, archinform  wrote:
> On my Google dev phone there is a problem with the new 1.5 version in
> combination with an official HTC adapter cable YC A300 and 3.5mm
> earphones. Android doesn't recognize the earphones (it worked on
> 1.1!). Android still recognizes the HTC earphones with ExtUSB.

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



[android-developers] Android Theme Customization

2009-05-15 Thread salman.geek

Hi to all...
Im having some problem in the Android W

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



[android-developers] Re: Google Login Service not working on SDK 1.5

2009-05-15 Thread kk

Hi All,

I experience the same behavior Farida is reporting. It appears the
GoogleLoginService is not found on emulator.

Here is my emulator info:

 Target: Google APIs (Google Inc.)
 Based on Android 1.5 (API level 3)
   Skin: HVGA
 Sdcard: 100M

Here is my logCat output:

05-16 01:04:02.467: WARN/ActivityManager(579): Unable to start service
Intent { comp={com.goo
gle.android.googleapps/
com.google.android.googleapps.GoogleLoginService} }: not found
05-16 01:04:03.017: VERBOSE/GLSTester(795): hello, world!
05-16 01:04:04.426: INFO/ActivityManager(579): Displayed activity
com.android.development/.GL
STester: 2257 ms
05-16 01:04:10.356: DEBUG/dalvikvm(621): GC freed 302 objects / 13592
bytes in 450ms
05-16 01:04:12.416: WARN/KeyCharacterMap(795): No keyboard for id 0
05-16 01:04:12.459: WARN/KeyCharacterMap(795): Using default keymap: /
system/usr/keychars/qwe
rty.kcm.bin
05-16 01:04:37.006: DEBUG/dalvikvm(795): GC freed 1384 objects / 91288
bytes in 1136ms
05-16 01:04:37.487: WARN/KeyCharacterMap(795): No keyboard for id 0
05-16 01:04:37.679: WARN/KeyCharacterMap(795): Using default keymap: /
system/usr/keychars/qwe
rty.kcm.bin
05-16 01:04:54.737: DEBUG/dalvikvm(579): GC freed 15406 objects /
738856 bytes in 1187ms
05-16 01:04:54.858: WARN/InputManagerService(579): Window already
focused, ignoring focus gai
n of: com.android.internal.view.iinputmethodclient$stub$pr...@437a9c38
05-16 01:05:00.976: DEBUG/AndroidRuntime(795): Shutting down VM
05-16 01:05:01.027: WARN/dalvikvm(795): threadid=3: thread exiting
with uncaught exception (g
roup=0x4000fe70)
05-16 01:05:01.037: ERROR/AndroidRuntime(795): Uncaught handler:
thread main exiting due to u
ncaught exception
05-16 01:05:01.166: ERROR/AndroidRuntime(795):
java.lang.NullPointerException
05-16 01:05:01.166: ERROR/AndroidRuntime(795): at
com.android.development.GLSTester$4.onC
lick(GLSTester.java:166)
05-16 01:05:01.166: ERROR/AndroidRuntime(795): at
android.view.View.performClick(View.jav
a:2179)
05-16 01:05:01.166: ERROR/AndroidRuntime(795): at
android.view.View.onTouchEvent(View.jav
a:3828)
05-16 01:05:01.166: ERROR/AndroidRuntime(795): at
android.widget.TextView.onTouchEvent(Te
xtView.java:6291)
05-16 01:05:01.166: ERROR/AndroidRuntime(795): at
android.view.View.dispatchTouchEvent(Vi
ew.java:3368)
05-16 01:05:01.166: ERROR/AndroidRuntime(795): at
android.view.ViewGroup.dispatchTouchEve
nt(ViewGroup.java:863)
05-16 01:05:01.166: ERROR/AndroidRuntime(795): at
android.view.ViewGroup.dispatchTouchEve
nt(ViewGroup.java:863)
05-16 01:05:01.166: ERROR/AndroidRuntime(795): at
android.view.ViewGroup.dispatchTouchEve
nt(ViewGroup.java:863)
05-16 01:05:01.166: ERROR/AndroidRuntime(795): at
android.view.ViewGroup.dispatchTouchEve
nt(ViewGroup.java:863)
05-16 01:05:01.166: ERROR/AndroidRuntime(795): at
android.view.ViewGroup.dispatchTouchEve
nt(ViewGroup.java:863)
05-16 01:05:01.166: ERROR/AndroidRuntime(795): at
com.android.internal.policy.impl.PhoneW
indow$DecorView.superDispatchTouchEvent(PhoneWindow.java:1707)
05-16 01:05:01.166: ERROR/AndroidRuntime(795): at
com.android.internal.policy.impl.PhoneW
indow.superDispatchTouchEvent(PhoneWindow.java:1197)
05-16 01:05:01.166: ERROR/AndroidRuntime(795): at
android.app.Activity.dispatchTouchEvent
(Activity.java:1993)
05-16 01:05:01.166: ERROR/AndroidRuntime(795): at
com.android.internal.policy.impl.PhoneW
indow$DecorView.dispatchTouchEvent(PhoneWindow.java:1691)
05-16 01:05:01.166: ERROR/AndroidRuntime(795): at
android.view.ViewRoot.handleMessage(Vie
wRoot.java:1525)
05-16 01:05:01.166: ERROR/AndroidRuntime(795): at
android.os.Handler.dispatchMessage(Hand
ler.java:99)
05-16 01:05:01.166: ERROR/AndroidRuntime(795): at
android.os.Looper.loop(Looper.java:123)

05-16 01:05:01.166: ERROR/AndroidRuntime(795): at
android.app.ActivityThread.main(Activit
yThread.java:3948)
05-16 01:05:01.166: ERROR/AndroidRuntime(795): at
java.lang.reflect.Method.invokeNative(N
ative Method)
05-16 01:05:01.166: ERROR/AndroidRuntime(795): at
java.lang.reflect.Method.invoke(Method.
java:521)
05-16 01:05:01.166: ERROR/AndroidRuntime(795): at
com.android.internal.os.ZygoteInit$Meth
odAndArgsCaller.run(ZygoteInit.java:782)
05-16 01:05:01.166: ERROR/AndroidRuntime(795): at
com.android.internal.os.ZygoteInit.main
(ZygoteInit.java:540)
05-16 01:05:01.166: ERROR/AndroidRuntime(795): at
dalvik.system.NativeStart.main(Native M
ethod)
05-16 01:05:01.306: INFO/Process(579): Sending signal. PID: 795 SIG: 3
05-16 01:05:01.318: INFO/dalvikvm(795): threadid=7: reacting to signal
3
05-16 01:05:01.386: ERROR/ActivityThread(579): Failed to find provider
info for android.serve
r.checkin
05-16 01:05:01.436: ERROR/Checkin(579): Error reporting crash:
java.lang.IllegalArgumentExcep
tion: Unknown URL content://android.server.checkin/crashes
05-16 01:05:01.667: INFO/dalvikvm(795): Wrote stack trace to '/data/
anr/traces.txt'

On Apr 29, 12:48 am, farida  wrote:
> I downloa

[android-developers] How to restart scheduled jobs no phone restart

2009-05-15 Thread Viresh

I am developing a ToDo reminder type of app for android.

on creation of a new reminder an alarm and vibrator scheduler is
created with a toast. This works on intents and broadcasts and is
pretty straight forward stuff with putextras using the reminder id
from the db.

My problem is, if some one restart the phone, i guess all the
scheduled alarm and vibrator tasks for the reminder will be killed.
Once the phone restart again how to recreate the scheduler tasks.

Can some one help me with this please?

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

2009-05-15 Thread GAYET Thierry
Hello,

I am asking if Android already include a GBA (Generic Bootstrapping 
Architecture) authentification system ? If not, does any other group have ever 
try to add this protocol (almost the same as SSL) within the Android framework ?

The GBA architecture is defined with 2 documents from the 3GPP : 

 - TS 33.220 for the global architecture

 - TS 24.109 which add more details on the Ua and Ub interfaces from the 
mobile. 

The Ua interface is between the mobile and the application ; the Ub interface 
is between the mobile and the BSF server). The Ub interface should be made ont 
HTTP/AKA - RFC 3310.

Is it possible to access  to the sim card ?

Some detail about GBA: 
http://en.wikipedia.org/wiki/Generic_Bootstrapping_Architecture

Thanks in advance for any reply.

 Best regards.


Thierry GAYET
NextInnovation.org
+33(0)663.849.589


  
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Browser Download Manager - GETs, but doesn't POST

2009-05-15 Thread brian

I posted this on android-platform a while ago, but didn't see any
response, so I'll try here.

I've been combing through the browser app's source trying to make sure
I understand this, and I think I do.

I found http://code.google.com/p/android/issues/detail?id=1978 which
details a question about the way that the download manager "double
downloads" a URL.  I have a slightly different question.

I'd like to develop an application that interacts with a web
application (that I don't control) that requires a login to download
specific files.  Specifically, I'd like my users to be able to click a
button in the browser, have the browser download the file, and then
start my application to use that file.

In order to actually download the files, a form must be POSTed to a
URL.  If the URL is accessed through a GET request, the application
returns an error page.  If certain form fields are missing from the
POST request, the same error page is returned.  The only way to get to
the content is to POST to the URL with the proper form fields and
cookies, and the server then returns a page with a specific mimetype
and Content-Disposition: attachment.  Desktop browsers handle this
fine, because they see the response from the POST and immediately ask
the user to save the attached file.

Android's browser, however, does not do that.  The initial POST from
the browser goes just fine, and then the URL, content disposition,
mimetype, and other header information are handed off to the Download
Manager.  From what I've traced, this ultimately ends in an insert to
a DownloadProvider, which launches a thread to handle the actual HTTP
connection.  That thread seems to be only capable of a GET, which does
not work in the scenario I detailed above.

I understand that certain architectural decisions were made that
support the "double download."  Was this POST scenario considered?  Is
this something that could possibly be patched in a future release of
the browser?  I'll consider working on the patch myself, but I'd hate
to put in a ton of time to find out later that this doesn't fit within
the vision of the Android browser as a whole.  It looks like a fairly
complicated patch too, since I think it'd mean modifications to the
DownloadProvider, its underlying database, and the browser in order to
pass the POST parameters all the way down to the point where the
DownloadThread is ready to go get the file.

Thanks,
-brian

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 the setRouting() and doRouting which is to select endpoint audio device is implemented.

2009-05-15 Thread zhiguo

I want to add one more endpoint audio device in android and am trying
to modify the setRouting() functions to support the selection of the
new added audio device. As far I traced, the doRouting() in class
AudioHardwareOss should perform the audio endpoint device selection.
However, donRouting() just returns NO_ERROR without any other
functionalities. So, my question is where and how endpoint audio
device selection is achieved.  thanks!

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



[android-developers] Android Theme Customization

2009-05-15 Thread salman.geek

Hi to all...
I want to override the default behavour of the Android Application.

For example In Android Hyperlinks are by default have orange color
border and i want to change the border according to my requirements.
Please help me out of this...
I will be really gratefull to all of u

Regards,
Salman Khursheed Khaleequi Naqshbandi
Software Engineer Eagersoft (PVT) Ltd.

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



[android-developers] Android and the Generic Bootstrapping Architecture authentification system

2009-05-15 Thread GAYET Thierry
Hi,

I
am asking if Android already include a GBA (Generic Bootstrapping
Architecture) authentification system ? If not, does any other group
have ever try to add this protocol (almost the same as SSL) within the
Android framework ?

The GBA architecture is defined with 2 documents from the 3GPP : 

 - TS 33.220 for the global architecture

 - TS 24.109 which add more details on the Ua and Ub interfaces from the 
mobile. 

The
Ua interface is between the mobile and the application ; the Ub
interface is between the mobile and the BSF server). The Ub interface
should be made ont HTTP/AKA - RFC 3310.

Is it possible to access  to the sim card ?

Some detail about GBA: 
http://en.wikipedia.org/wiki/Generic_Bootstrapping_Architecture

Thanks in advance for any reply.

 Best regards.


Thierry GAYET
NextInnovation.org
+33(0)663.849.589


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



[android-developers] Re: Android SDK Content Loader gets stuck....

2009-05-15 Thread az9...@gmail.com

Stack trace was sent  by email. Part of it is shown below.

Trace was captured on Eclipse start (after turning back on "Projects-
>Build Automatically") &  Android SDK Content Loader stuck at 60%.

Let us know what you find or send more detailed info on capturing
trace dump.

##-


StackTrace Remote Thread" prio=6 tid=0x36afc800 nid=0xfac runnable
[0x..0x38a9fa60]
   java.lang.Thread.State: RUNNABLE

"Timer-1" prio=6 tid=0x36ed4000 nid=0x12cc in Object.wait()
[0x3b69f000..0x3b69fd94]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x071a7cd8> (a java.util.TaskQueue)
at java.util.TimerThread.mainLoop(Unknown Source)
- locked <0x071a7cd8> (a java.util.TaskQueue)
at java.util.TimerThread.run(Unknown Source)

"Worker-46" prio=6 tid=0x36d8d800 nid=0x16c in Object.wait()
[0x3b49f000..0x3b49fa94]
   java.lang.Thread.State: TIMED_WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at org.eclipse.core.internal.jobs.ThreadJob.joinRun(ThreadJob.java:
189)
- locked <0x05678bb8> (a java.lang.Object)
at org.eclipse.core.internal.jobs.ImplicitJobs.begin
(ImplicitJobs.java:87)
at org.eclipse.core.internal.jobs.JobManager.beginRule
(JobManager.java:230)
at org.eclipse.core.internal.resources.WorkManager.checkIn
(WorkManager.java:117)
at org.eclipse.core.internal.resources.Workspace.prepareOperation
(Workspace.java:1747)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:
1795)
at
org.eclipse.jdt.internal.core.ProjectReferenceChange.updateProjectReferencesIfNecessary
(ProjectReferenceChange.java:107)
at
org.eclipse.jdt.internal.core.ChangeClasspathOperation.classpathChanged
(ChangeClasspathOperation.java:59)
at
org.eclipse.jdt.internal.core.SetContainerOperation.executeOperation
(SetContainerOperation.java:110)
at org.eclipse.jdt.internal.core.JavaModelOperation.run
(JavaModelOperation.java:716)
at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:
1800)
at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation
(JavaModelOperation.java:782)
at org.eclipse.jdt.core.JavaCore.setClasspathContainer(JavaCore.java:
4616)
at
com.android.ide.eclipse.adt.project.internal.AndroidClasspathContainerInitializer.updateProjects
(Unknown Source)
at com.android.ide.eclipse.adt.AdtPlugin$13.run(Unknown Source)
- locked <0x0629aef8> (a java.util.ArrayList)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

On May 14, 8:37 am, Raphael  wrote:
> On Fri, May 8, 2009 at 11:11 PM, az9...@gmail.com  wrote:
>
> > After I switched to SDK 1.5,  the Android SDK Content Loader is stuck
> > when Eclipse starts.
> > In my case, it is always stuck at 60%.
>
> Interesting. Can you help me debug this? I'd like to understand where
> it gets stuck.
>
> If you're on Linux, start Eclipse from the command-line. IIRC when it
> gets stuck press Control-C and it will dump a stack trace of all the
> threads.
>
> In case the Control-C trick doesn't work, e.g. if you're on Windows, I
> successfully used the StackTrace tool 
> fromhttp://www.adaptj.com/main/downloadin the past, it's a web start for
> Linux, MacOS and Windows : point it to the Eclipse JVM and it will
> create a stack trace of the running threads.
>
> Please do that if you can and email me the stack trace privately (it's
> quite long).
>
> Thanks in advance
> R/

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



[android-developers] PV2wayEngine crash

2009-05-15 Thread srinu gorle

Hi,
i want to test 324 in the existing code.

i couldnt find any test case document in the
http://android.git.kernel.org/?p=platform/external/opencore.git;a=tree


i have tried to run
$adb shell
#cd system
#cd bin
./pv2way_omx_engine_test
i tried without any arguments

to give arguments i couldnt find any document related to test case numbers


please find Log :


I/DEBUG   (  539): *** *** *** *** *** *** *** *** *** *** *** *** ***
*** *** ***
I/DEBUG   (  539): Build fingerprint:
'generic/generic/generic/:1.5/CUPCAKE/eng.root.20090513.180712:eng/test-keys'
I/DEBUG   (  539): pid: 720, tid: 722  >>> ./pv2way_omx_engine_test <<<
I/DEBUG   (  539): signal 11 (SIGSEGV), fault addr 
I/DEBUG   (  539):  r0   r1   r2 a70d989c  r3 0001
I/DEBUG   (  539):  r4 0013c800  r5 000c  r6 0001  r7 0013c800
I/DEBUG   (  539):  r8 be9779a0  r9 afe39dd0  10 a73c4a05  fp 0001
I/DEBUG   (  539):  ip a7116444  sp 4000cc70  lr a7350a61  pc a7350a28
 cpsr 0030
I/DEBUG   (  539):  #00  pc 00050a28  /system/lib/libopencore_common.so
I/DEBUG   (  539):  #01  pc 00050a5c  /system/lib/libopencore_common.so
I/DEBUG   (  539):  #02  pc 00050aaa  /system/lib/libopencore_common.so
I/DEBUG   (  539):  #03  pc 0005d69a  /system/lib/libopencore_2way.so
I/DEBUG   (  539):  #04  pc 00067a86  /system/lib/libopencore_2way.so
I/DEBUG   (  539):  #05  pc 00067d18  /system/lib/libopencore_2way.so
I/DEBUG   (  539):  #06  pc 00067d44  /system/lib/libopencore_2way.so
I/DEBUG   (  539):  #07  pc 00067df2  /system/lib/libopencore_2way.so
I/DEBUG   (  539):  #08  pc 000c516c  /system/lib/libopencore_common.so
I/DEBUG   (  539):  #09  pc 0005705a  /system/lib/libopencore_common.so
I/DEBUG   (  539):  #10  pc 00057110  /system/lib/libopencore_common.so
I/DEBUG   (  539):  #11  pc 000571c6  /system/lib/libopencore_common.so
I/DEBUG   (  539):  #12  pc 000c4112  /system/lib/libopencore_common.so
I/DEBUG   (  539):  #13  pc 000c499c  /system/lib/libopencore_common.so
I/DEBUG   (  539):  #14  pc 000c4a8c  /system/lib/libopencore_common.so
I/DEBUG   (  539):  #15  pc f880  /system/lib/libc.so
I/DEBUG   (  539):  #16  pc f3f4  /system/lib/libc.so
I/DEBUG   (  539): stack:
I/DEBUG   (  539): 4000cc30  00dc
I/DEBUG   (  539): 4000cc34  2bb0
I/DEBUG   (  539): 4000cc38  be9779a0  [stack]
I/DEBUG   (  539): 4000cc3c  afe0b663  /system/lib/libc.so
I/DEBUG   (  539): 4000cc40  afe39dd0
I/DEBUG   (  539): 4000cc44  000c
I/DEBUG   (  539): 4000cc48  000f
I/DEBUG   (  539): 4000cc4c  fff3ff4d
I/DEBUG   (  539): 4000cc50  0018
I/DEBUG   (  539): 4000cc54  afe0e940  /system/lib/libc.so
I/DEBUG   (  539): 4000cc58  0015a860  [heap]
I/DEBUG   (  539): 4000cc5c  afe0ecd4  /system/lib/libc.so
I/DEBUG   (  539): 4000cc60  0015a860  [heap]
I/DEBUG   (  539): 4000cc64  01b4
I/DEBUG   (  539): 4000cc68  df002777
I/DEBUG   (  539): 4000cc6c  e3a070ad
I/DEBUG   (  539): #00 4000cc70  be9779a0  [stack]
I/DEBUG   (  539): 4000cc74  4000
I/DEBUG   (  539): 4000cc78  a70d989c  /system/lib/libopencore_2way.so
I/DEBUG   (  539): 4000cc7c  
I/DEBUG   (  539): 4000cc80  0014f4c0  [heap]
I/DEBUG   (  539): 4000cc84  0013c800  [heap]
I/DEBUG   (  539): 4000cc88  
I/DEBUG   (  539): 4000cc8c  4000
I/DEBUG   (  539): 4000cc90  a70d989c  /system/lib/libopencore_2way.so
I/DEBUG   (  539): 4000cc94  a7350a61  /system/lib/libopencore_common.so
I/DEBUG   (  539): #01 4000cc98  0001
I/DEBUG   (  539): 4000cc9c  001493a8  [heap]
I/DEBUG   (  539): 4000cca0  
I/DEBUG   (  539): 4000cca4  a70d989c  /system/lib/libopencore_2way.so
I/DEBUG   (  539): 4000cca8  a7116380
I/DEBUG   (  539): 4000ccac  a7350aaf  /system/lib/libopencore_common.so
D/dalvikvm(  606): GC freed 9824 objects / 554896 bytes in 193ms
D/dalvikvm(  567): GC freed 12801 objects / 597064 bytes in 195ms
D/dalvikvm(  606): GC freed 9637 objects / 541336 bytes in 253ms



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] How the setRouting() and doRouting which is to select endpoint audio device is implemented.

2009-05-15 Thread zhiguo

I want to add one more endpoint audio device in android and am trying
to modify the setRouting() functions to support the selection of the
new added audio device. As far I traced, the doRouting() in class
AudioHardwareOss should perform the audio endpoint device selection.
However, donRouting() just returns NO_ERROR without any other
functionalities. So, my question is where and how endpoint audio
device selection is achieved.  thanks!

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



[android-developers] Re: Creating context, how?

2009-05-15 Thread Maulin

In your main activity you can create something like this

Context context = this;

Then you can pass the context object to any other methods that need it
as a parameter.

On May 15, 9:41 am, SGAdrian  wrote:
> Sorry but I dont get it.
>
> I am starting my java program with app_process, i.e I am not running
> any Service or Activity. Just like the Monkey.java program is doing.
>
> Ex.
>
> public class Main {
>         public static void main(String[] args) {
>                // How can I get hold of a Context instance here?
>                //
>        }
>
> }
>
> BR,
> Sven
>
> On May 15, 2:50 pm, "Mark Murphy"  wrote:
>
> > > When you are developing on an application level(Services, Activities)
> > > you always get this Context reference automatically.
>
> > > But what if I am on a lower level and developing a program started
> > > with app_process, how can I get hold of a Context then? Its a huge
> > > part of the API that need this context.
>
> > Have it passed to you via the API to your lower level. In other words,
> > just as the Android API requires you to pass in a Context, your API to
> > your higher levels will require those higher levels to pass in a Context.
>
> > > What the proper way to create a Context instance?
>
> > AFAIK, you don't create Context instances -- you use the ones created for
> > you by Android (e.g., Activity, Service).
>
> > --
> > Mark Murphy (a Commons Guy)http://commonsware.com
> > _The Busy Coder's Guide to Android Development_ Version 2.0 Available!

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



[android-developers] How to start the intent contacts with a query

2009-05-15 Thread prihei

Hello,

how can i open the contact view with a query?
I try this:

Intent intent = new Intent(Intent.ACTION_SEARCH, People.CONTENT_URI);
intent.putExtra(SearchManager.QUERY, "Heiko");
startActivity(intent);

I get this error:
android.content.ActivityNotFoundException: No Activity found to handle
Intent { action=android.intent.action.SEARCH data=content://contacts/
people (has extras) }


Second Question:
Is it possible to search also for address and telephone numbers?
I have no problems in my own activity, it works fine. But i will start
the device contact list search.



Thank you for your help.

Heiko

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

2009-05-15 Thread latha...@gmail.com

Hi All

This query is regarding android  UI & Worker threads.

I am writing an application in which I have

1.An Activity with a button in it. On clicking this button, i need to
start a new thread which would do some graphics rendering by calling
native C calls.(these are loaded in the form of a shared object.)
This rendering screen inturn has some menus like pause/stop etc.

2.Now on seleting any of these menus, i want to call the respective
native C functions.(All that needs to call the native C fucntions
should be done in a child thread.)

For example, when the rendering is going on(Worker thread), if the
user clicks on pause button on that screen, the Main thread should
pick this event and send a msg to Worker thread saying a pause event
has come and based on this msg, child thread will cal its own native C
pause function to pause the animation.( I donot want to do any
animation related stuffs in my main thread for better performance & I
have all native pause/run/stop/et all been implemented too.)

3. In total,i need to handle all native C related acivities in a child
thread and all the notification related to UI in a main thread.


Is there any good way of doing this? The APIs in Handler make child to
post a message to the main thread after its execution. But what i want
is, any UI event shud be notified to Main first which would then tell
child to act accordingly.


This looks like a typical scenario in almost all mobile games. Hope
there is a good solution!! Please do suggest. Any ideas in this regard
are highly appreciable

Thanks
Latha


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



[android-developers] Re: Google Login Service not working on SDK 1.5

2009-05-15 Thread kk

Hi Farida,

I am experiencing the same issue.

Has anybody responded to your inquiry?

Regards,

KK

On Apr 29, 12:48 am, farida  wrote:
> I downloaded the latest release of android SDK 1.5, but unable to give
> the credentials for the "Google Login Service" from devTools. Clicking
> on the Google button or any other button crashes. I need to specify
> the google credentials to access the calendar application so that I
> can customize it as per the requirements. Can you please let me know
> if there is any other work around of doing this and accessing the
> calendar application?
>
> Thanks
> Farida

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



[android-developers] Android and the GBA (Generic Bootstrapping Architecture) authentification system

2009-05-15 Thread GAYET Thierry
Hello,

I
am asking if Android already include a GBA (Generic Bootstrapping
Architecture) authentification system ? If not, does any other group
have ever try to add this protocol (almost the same as SSL) within the
Android framework ?

The GBA architecture is defined with 2 documents from the 3GPP : 

 - TS 33.220 for the global architecture

 - TS 24.109 which add more details on the Ua and Ub interfaces from the 
mobile. 

The
Ua interface is between the mobile and the application ; the Ub
interface is between the mobile and the BSF server). The Ub interface
should be made ont HTTP/AKA - RFC 3310.

Is it possible to access  to the sim card ?

Some detail about GBA: 
http://en.wikipedia.org/wiki/Generic_Bootstrapping_Architecture

Thanks in advance for any reply.

 Best regards.


Thierry GAYET
NextInnovation.org
+33(0)663.849.589



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

2009-05-15 Thread pibada

Hello,

In logger_event structure, it exists msg[] as payload's message.
Just I'm curious that how to write the payload's message in Android.

The reason is that I want to change the specific part of the msg
array,
for example msg[0] do always 05 when the msg exists.

If you know anythig about this question, plz help me.

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] broadcast data to other application

2009-05-15 Thread gour

Hi
I create an application where i get the various data from net (say
for example i am getting the temperature information of particular
city and another data is the information of stock value of a
particular company) now i want to broadcast that various data to all
application. I create a registration process for diff application for
diff data (EX app A is registrar for temp of city). so application is
registrar for  particular data will get that data.

How can i broadcast the information to all application which are
registrar .

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



[android-developers] Issue with orientation change: Dialog above activity with fixed orientation

2009-05-15 Thread André

Hi all,

I have created an activity for my game which handles all orientation
changes by itself and has a fixed "portrait" layout. Actually it uses
the accelerometer and is rendered using 2D canvas methods. If the
level has been completed I show up a highscore dialog in which the
user can enter his name. The dialog is floating above the underlying
level screen which gets blurred out nicely. This generally works.

Problem is that the dialog does not get rotated if the orientation of
the phone changes. So even if the keyboard is exposed the dialog is
shown in portrait mode instead of landscape. I have tried to use an
activity with dialog theme instead but the behavior didn't change.
After several tries it seems that I have found the reason for this:
Once there's an activity with fixed orientation in the activity stack
then all subsequent activities keep this orientation, too. They will
not react on orientation changes anymore (e.g. if the keyboard gets
exposed).

After upgrading to 1.5 SDK the described behavior changed a little
bit. Now at subactivities indead react on orientation changes like
expected. However, the need to have an opaque background! That means
that neither dialogs nor activities with dialog theme will work. Those
will stick with the orientation of the underlaying activity.

So my workaround is to first start a sub-activity with an opaque black
background. This activity then shows my highscore dialog on top. It
looks quite okay but I wonder if there's a better solution?

Is it possible to show a dialog above a fixed portrait or landscape
activity which automatically adapts to orientation changes?

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Polite discussion of lite/trial vs pro distribution

2009-05-15 Thread Keith Wiley

Whether on or off topic, I don't know, but my approach has been to
keep a lite/demo version and pro version of my app.  This requires
more effort on my part, but it seems like the best solution.  I've
been chided for calling my lite version "lite" instead of "demo", but
that is a matter of perspective.  One person's interpretation as demo
might be another's lite because it suits their limited needs.  Users
are so rude in their comments, I just can't get over how horrible some
people can be.

On May 14, 5:31 am, Mariano Kamp  wrote:
> On Thu, May 14, 2009 at 1:33 PM, mirko  wrote:
> > If you are interested in a pro license you can have a
> > look at
>
> >http://groups.google.com/group/android-developers/browse_thread/threa...
>
> Thanks for the link.
>
> > P.S. Great little app your NewsRob, I loaded it 2 months ago ;-)
>
> Thanks.
>
> Besides the monetary benefits or the lack thereof I learned a lot during the
> development. I also now have an app that does exactly what I think a Google
> Reader client should do - and what I've never found on any other platform.
> No matter how cool Palm's pre or the iPhone 3.0/4G will be, I am staying
> with Android as a user, until somebody brings out a better app for this
> purpose on another platform.
>
> So even though my comments from above (about the Android Market and its
> rollout) may sound like I am bitter, I am 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: 1.5 ListView disabled items

2009-05-15 Thread Romain Guy

Yes, it is intentional.

On Fri, May 15, 2009 at 9:02 AM, Alexey  wrote:
>
> Hi all , i've noticed after i've switched to 1.5 that if ListView item
> is not enabled the divider(s) for this item are not rendering. Is this
> intentional ?
> >
>



-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  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: How to restart scheduled jobs no phone restart

2009-05-15 Thread Mark Murphy

> I am developing a ToDo reminder type of app for android.
>
> on creation of a new reminder an alarm and vibrator scheduler is
> created with a toast. This works on intents and broadcasts and is
> pretty straight forward stuff with putextras using the reminder id
> from the db.
>
> My problem is, if some one restart the phone, i guess all the
> scheduled alarm and vibrator tasks for the reminder will be killed.
> Once the phone restart again how to recreate the scheduler tasks.
>
> Can some one help me with this please?

Register a receiver to receive the ACTION_BOOT_COMPLETED broadcast Intent,
then re-register your AlarmManager alarms at that point.

http://developer.android.com/reference/android/content/Intent.html#ACTION_BOOT_COMPLETED

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!



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



[android-developers] Re: Issue with orientation change: Dialog above activity with fixed orientation

2009-05-15 Thread Dianne Hackborn
Dialogs can't have an impact on the orientation.  Just make an activity with
a dialog theme, and set the orientation of the activity to the one providing
the behavior you want.

On Thu, May 14, 2009 at 9:11 AM, André  wrote:

>
> Hi all,
>
> I have created an activity for my game which handles all orientation
> changes by itself and has a fixed "portrait" layout. Actually it uses
> the accelerometer and is rendered using 2D canvas methods. If the
> level has been completed I show up a highscore dialog in which the
> user can enter his name. The dialog is floating above the underlying
> level screen which gets blurred out nicely. This generally works.
>
> Problem is that the dialog does not get rotated if the orientation of
> the phone changes. So even if the keyboard is exposed the dialog is
> shown in portrait mode instead of landscape. I have tried to use an
> activity with dialog theme instead but the behavior didn't change.
> After several tries it seems that I have found the reason for this:
> Once there's an activity with fixed orientation in the activity stack
> then all subsequent activities keep this orientation, too. They will
> not react on orientation changes anymore (e.g. if the keyboard gets
> exposed).
>
> After upgrading to 1.5 SDK the described behavior changed a little
> bit. Now at subactivities indead react on orientation changes like
> expected. However, the need to have an opaque background! That means
> that neither dialogs nor activities with dialog theme will work. Those
> will stick with the orientation of the underlaying activity.
>
> So my workaround is to first start a sub-activity with an opaque black
> background. This activity then shows my highscore dialog on top. It
> looks quite okay but I wonder if there's a better solution?
>
> Is it possible to show a dialog above a fixed portrait or landscape
> activity which automatically adapts to orientation changes?
>
> >
>


-- 
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] Intermittent service start

2009-05-15 Thread Ward Willats

Man, we are pulling our out over this

We have a service. bindService() returns true. But our 
ServiceConnection is never called with onConnect(). The onCreate() of 
the service is never executed (neither is the onBind(), of course).

Except sometimes! (twice now, out of many many tries).

Remote service, local service, intent-filter, direct class 
invocation, "procedure" attribute, no procedure attribute, cupcake, 
1.1, emulator, device ... we've tried 'em all!

We belive the service is found, and in the remote case, we see the 
new process always created ... but the dang service just isn't 
started. We aren't specifying any security settings and writing the 
simplest manifest entry we can

Does this sound familiar to anyone? What can we check?

Thanks, as always.

-- Ward

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

2009-05-15 Thread Dianne Hackborn
You are in the wrong group -- this group is for programming against the SDK,
which you are well outside the bounds of.

That said, you can't really get a functional Context from outside of
processes not launched by the activity manager.  You'll notice that the
monkey, am, and pm commands all don't use a Context for this reason.

On Fri, May 15, 2009 at 6:41 AM, SGAdrian  wrote:

>
> Sorry but I dont get it.
>
> I am starting my java program with app_process, i.e I am not running
> any Service or Activity. Just like the Monkey.java program is doing.
>
> Ex.
>
> public class Main {
>public static void main(String[] args) {
>   // How can I get hold of a Context instance here?
>   //
>   }
> }
>
> BR,
> Sven
>
> On May 15, 2:50 pm, "Mark Murphy"  wrote:
> > > When you are developing on an application level(Services, Activities)
> > > you always get this Context reference automatically.
> >
> > > But what if I am on a lower level and developing a program started
> > > with app_process, how can I get hold of a Context then? Its a huge
> > > part of the API that need this context.
> >
> > Have it passed to you via the API to your lower level. In other words,
> > just as the Android API requires you to pass in a Context, your API to
> > your higher levels will require those higher levels to pass in a Context.
> >
> > > What the proper way to create a Context instance?
> >
> > AFAIK, you don't create Context instances -- you use the ones created for
> > you by Android (e.g., Activity, Service).
> >
> > --
> > Mark Murphy (a Commons Guy)http://commonsware.com
> > _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
> >
>


-- 
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: startActivity from subclass - strange problem

2009-05-15 Thread Dianne Hackborn
Please include the complete stack crawl.

On Fri, May 15, 2009 at 9:14 AM, mscwd01  wrote:

>
> Hey,
>
> I have a Activity and I have a class which extends this Activity. In
> this subclass I call:
>
> startActivity(new Intent(this, CameraView.class))
>
> Which should start the "CameraView" Activity. However, I always get
> this error:
>
> ERROR/AndroidRuntime(876): java.lang.NullPointerException
> ERROR/AndroidRuntime(876): at
> android.content.ContextWrapper.getPackageName(ContextWrapper.java:119)
> ERROR/AndroidRuntime(876): at android.content.ComponentName.
> (ComponentName.java:74)
> ERROR/AndroidRuntime(876): at android.content.Intent.
> (Intent.java:2093)
>
> If it makes any difference the subclass creates a ListView and when a
> row of the ListView is clicked it calls startActivity();
>
> Any help is appreciated! Thanks
>
>
>
>
> >
>


-- 
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: Intermittent service start

2009-05-15 Thread Dianne Hackborn
Are you passing the flag to have the service created?  What is the output of
"adb shell dumpsys activity.service" during this time?  (And what is the
name of your service to be able to find it?)

On Fri, May 15, 2009 at 10:09 AM, Ward Willats  wrote:

>
> Man, we are pulling our out over this
>
> We have a service. bindService() returns true. But our
> ServiceConnection is never called with onConnect(). The onCreate() of
> the service is never executed (neither is the onBind(), of course).
>
> Except sometimes! (twice now, out of many many tries).
>
> Remote service, local service, intent-filter, direct class
> invocation, "procedure" attribute, no procedure attribute, cupcake,
> 1.1, emulator, device ... we've tried 'em all!
>
> We belive the service is found, and in the remote case, we see the
> new process always created ... but the dang service just isn't
> started. We aren't specifying any security settings and writing the
> simplest manifest entry we can
>
> Does this sound familiar to anyone? What can we check?
>
> Thanks, as always.
>
> -- Ward
>
> >
>


-- 
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: Notification without expanded View

2009-05-15 Thread Dianne Hackborn
I'm not sure if there is a way to do this, but please don't.  There is less
room in the status bar for icons than there is in the panel for the expanded
view, so the icon are actually MORE of an annoyance than the expanded view.
Plus, having an icon without an associated expanded view is just a plain
crummy user experience, as there is nothing to tell you what that icon means
or how to get rid of it.  Just don't do this.

On Thu, May 14, 2009 at 11:49 PM, vovkab  wrote:

>
> Hi
>
> I want create just notification icon without text and expanded view.
> How to remove expanded view?
> >
>


-- 
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: sharing database

2009-05-15 Thread Peterman

but the database has to be in the path of the application package or
can be in another path of the filesystem?

for example, can I access to a database created in gears (the path
would be com.android.browser/gears/...)

thanks a lot

On May 15, 2:46 pm, "Mark Murphy"  wrote:
> > Anybody knows if we can share databases between applications? How can
> > I access to a database from an A application to another B application?
>
> > It is possible? What uri I would have to put?
>
> The preferred way to do this is by creating a ContentProvider to make data
> in one project available to other projects.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Question for SDK developers - behavior of setFeatureInt

2009-05-15 Thread Dianne Hackborn
On Thu, May 14, 2009 at 11:11 PM, idev  wrote:

> private void setCustomTitle(int value) {
>try {
>// retrieve value for
> com.android.internal.R.id.title_container
>int titleContainerId = (Integer) Class.forName(
>"com.android.internal.R$id").getField
> ("title_container").get(null);
>
>// remove all views from titleContainer
>((ViewGroup) getWindow().findViewById
> (titleContainerId)).removeAllViews();


Good lord, DO NOT DO THIS.  Do you see what you are doing?  You are using
reflection to get at private information, and then using that information to
rip apart the system's decoration layout.  You WILL break in the future.  I
guarantee it.

Please, for me, slap whoever gave you this code.

And yes, this is how setFeatureInt() works.  It would be nice to have it be
more flexible, but for now you need to set these things up before
setContentView().  If you want a changing title bar, you'll need to set your
own custom title bar view up-front and just manage it all yourself.

Okay now I am going to go cry silently in the corner.

-- 
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: How to start the intent contacts with a query

2009-05-15 Thread Jeff Sharkey

The ACTION_SEARCH intent doesn't take a data Uri, so new
Intent(Intent.ACTION_SEARCH) should be enough.

j

On Thu, May 14, 2009 at 9:02 AM, prihei  wrote:
>
> Hello,
>
> how can i open the contact view with a query?
> I try this:
>
> Intent intent = new Intent(Intent.ACTION_SEARCH, People.CONTENT_URI);
> intent.putExtra(SearchManager.QUERY, "Heiko");
> startActivity(intent);
>
> I get this error:
> android.content.ActivityNotFoundException: No Activity found to handle
> Intent { action=android.intent.action.SEARCH data=content://contacts/
> people (has extras) }
>
>
> Second Question:
> Is it possible to search also for address and telephone numbers?
> I have no problems in my own activity, it works fine. But i will start
> the device contact list search.
>
>
>
> Thank you for your help.
>
> Heiko
>
> >
>



-- 
Jeff Sharkey
jshar...@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
-~--~~~~--~~--~--~---



[android-developers] Re: broadcast data to other application

2009-05-15 Thread Jeff Sharkey

This sounds like a perfect candidate for a ContentProvider mixed with
a broadcast Intent.  When you finish an update pass, you can send off
a custom broadcast that other apps can listen for.  Then they wrap
around to your ContentProvider to obtain the actual data.

http://d.android.com/guide/topics/providers/content-providers.html

j

On Fri, May 15, 2009 at 3:45 AM, gour  wrote:
>
> Hi
>    I create an application where i get the various data from net (say
> for example i am getting the temperature information of particular
> city and another data is the information of stock value of a
> particular company) now i want to broadcast that various data to all
> application. I create a registration process for diff application for
> diff data (EX app A is registrar for temp of city). so application is
> registrar for  particular data will get that data.
>
> How can i broadcast the information to all application which are
> registrar .
>
> >
>



-- 
Jeff Sharkey
jshar...@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
-~--~~~~--~~--~--~---



[android-developers] Accessing rild socket

2009-05-15 Thread alexdonnini

Hello,

Below, you will find the source code for a simple application testing
access to the rild socket in dev/socket.

Before running the application, I manually changed permissions on rild
in dev/socket to allow r/w/x for all users.

The application below is based in large part on code I found at
http://all4dev.blogspot.com/2009/02/android-localsocket-localserversocket.html

As originally written, the application works.

When I changed it to use rild socket as the conduit for communication
between receiver and sender, it stopped working.

Specifically, I believe that connection to the rild socket (s.connect
()) never completes. No exceptions are produced either.

I would greatly appreciate it if anyone could let me know where they
think I made a mistake, why the application does not work, and what I
should do to fix it.

Thanks.

Alex Donnini

package com.android.sockettest;

import java.io.IOException;
import java.io.InputStream;

import android.app.Activity;
import android.net.LocalServerSocket;
import android.net.LocalSocket;
import android.net.LocalSocketAddress;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;

/**
*
* @author Denis Migol
*
*/

public class SocketTest extends Activity {

private static String TAG = "sockettest";

LocalSocket mServer;

static final String SOCKET_NAME_RIL = "rild";

static final int SOCKET_OPEN_RETRY_MILLIS = 4 * 1000;

LocalSocketAddress mLocalSocketAdress =
new LocalSocketAddress(SOCKET_NAME_RIL,
LocalSocketAddress.Namespace.RESERVED);

// background threads use this Handler to post messages to
// the main application thread
private final Handler handler = new Handler();

public class NotificationRunnable implements Runnable {
private String message = null;

public void run() {
if (message != null && message.length() > 0) {
showNotification(message);
}
}

/**
* @param message the message to set
*/
public void setMessage(String message) {
this.message = message;
}
}

// post this to the Handler when the background thread notifies
private final NotificationRunnable notificationRunnable = new
NotificationRunnable();

public void showNotification(String message) {
Toast.makeText(this, message, Toast.LENGTH_SHORT).show();
}

class SocketListener extends Thread {
private Handler handler = null;
private NotificationRunnable runnable = null;

public SocketListener(Handler handler, NotificationRunnable
runnable) {
this.handler = handler;
this.runnable = runnable;
this.handler.post(this.runnable);
}

/**
* Show UI notification.
* @param message
*/
private void showMessage(String message) {
this.runnable.setMessage(message);
this.handler.post(this.runnable);
}

@Override
public void run() {
showMessage("DEMO: SocketListener started!");
try {

while (true) {

Log.i(TAG, "running socket listener --- ");

LocalSocket s = null;
LocalSocketAddress l;

try {
s = new LocalSocket();
l = new LocalSocketAddress(SOCKET_NAME_RIL,
 
LocalSocketAddress.Namespace.RESERVED);
s.connect(l);

Log.i(TAG, "Successfully connected to socket s
- "+s.toString());

} catch (Exception ex){
try {
if (s != null) {

Log.i(TAG, "About to close socket after
Exception --- ");
s.close();
}
} catch (Exception ex2) {
Log.i(TAG, "Failed to close socket s");
}
}

mServer = s;

Log.i(TAG, "Connected to mServer --- ");

if (mServer != null) {

Log.i(TAG, "mServer is not null");

InputStream input = mServer.getInputStream();

// simply for java.util.ArrayList
int readed = input.read();
int size = 0;
int capacity = 0;
byte[] bytes = new byte[capacity];

// reading
while (readed != -1) {
// java.util.ArrayList.Add(E e);
capacity = (capacity * 3)/2 + 1;
//bytes = Arrays.copyOf(byte

[android-developers] Re: sharing database

2009-05-15 Thread Mark Murphy

> but the database has to be in the path of the application package or
> can be in another path of the filesystem?

Generally speaking, you do not have access to "another path of the
filesystem".

> for example, can I access to a database created in gears (the path
> would be com.android.browser/gears/...)

No. That would be a security violation.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!



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



[android-developers] Re: ContentProvider queries, Contacts and the SDK docs

2009-05-15 Thread Mark Murphy

> A couple of questions. First thing I was wondering is where to log
> bugs in the docs.

http://b.android.com

> With regards to the selection options - how exactly can these handle?

That's up to the individual content provider and how it stores its data.

> I've seen a couple
> of places where a something + "='" + somevalue "'" is used, but I'm
> specifically wondering
> if it can handle IN clauses or if there's some form of or statement I
> can use to check for
> a variety of values in a particular column rather than just the one.

That may work for content providers that pass WHERE clauses straight on to
SQLite.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
_The Busy Coder's Guide to Android Development_ Version 2.0 Available!



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



[android-developers] Widget in 1.5 not deleted???

2009-05-15 Thread guruk

Hi, i created a widget and when i look what widgets are still open i
do this like:

public void onUpdate(Context context, AppWidgetManager
appWidgetManager, int[] appWidgetIds) {
final int N = appWidgetIds.length;
for (int i=0; ihttp://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Widget in 1.5 not deleted???

2009-05-15 Thread guruk

I tested right now also the addwidgetdemo from the api 1.5 examples.

also there:

1.  it always calls : static void updateAppWidget(Context context,
AppWidgetManager appWidgetManager, int appWidgetId, String
titlePrefix)

2. but never comes to the : public void onDeleted(Context context, int
[] appWidgetIds)   ...

And that happen in the official Demo.. so I guess there is a bug!

Greets
Chris

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Strange Cupcake Memory Bug with WebViews (that disappears when debugger attached)

2009-05-15 Thread fadden

On May 15, 1:58 am, iliketolearn  wrote:
> I've literally spent 15+ hours trying to figure out this one bug (when
> I should be studying for finals). Any help is greatly appreciated. The
> bug appears on the dev1 phone running cupcake. It was not present
> before the upgrade. Basically, the problem is that when a activity
> with a webview and 2 threads is run, the service that runs after it
> will always crashes the process (but it works fine when the debugger
> is attached). The worst part is that it crashes at arbitrarily places
> in the service, so I can't isolate the error.

You're getting a native crash, so if you're trying to use a Java
debugger it's not going to help.

Unfortunately I can't decode that trace.  If you have a reproducible
case, please post the details in a bug report on b.android.com, and
attach a copy of the APK.

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

2009-05-15 Thread SGAdrian

So where can ask this question? Could you move this thread to the
correct forum?

So how can I get hold of a functional Context, if that means I have to
go through the ActivityManager?

Can I create a Service without an Activity? I dont want anything
visible to the user.

BR,
Sven

On 15 Maj, 19:09, Dianne Hackborn  wrote:
> You are in the wrong group -- this group is for programming against the SDK,
> which you are well outside the bounds of.
>
> That said, you can't really get a functional Context from outside of
> processes not launched by the activity manager.  You'll notice that the
> monkey, am, and pm commands all don't use a Context for this reason.
>
>
>
> On Fri, May 15, 2009 at 6:41 AM, SGAdrian  wrote:
>
> > Sorry but I dont get it.
>
> > I am starting my java program with app_process, i.e I am not running
> > any Service or Activity. Just like the Monkey.java program is doing.
>
> > Ex.
>
> > public class Main {
> >public static void main(String[] args) {
> >   // How can I get hold of a Context instance here?
> >   //
> >   }
> > }
>
> > BR,
> > Sven
>
> > On May 15, 2:50 pm, "Mark Murphy"  wrote:
> > > > When you are developing on an application level(Services, Activities)
> > > > you always get this Context reference automatically.
>
> > > > But what if I am on a lower level and developing a program started
> > > > with app_process, how can I get hold of a Context then? Its a huge
> > > > part of the API that need this context.
>
> > > Have it passed to you via the API to your lower level. In other words,
> > > just as the Android API requires you to pass in a Context, your API to
> > > your higher levels will require those higher levels to pass in a Context.
>
> > > > What the proper way to create a Context instance?
>
> > > AFAIK, you don't create Context instances -- you use the ones created for
> > > you by Android (e.g., Activity, Service).
>
> > > --
> > > Mark Murphy (a Commons Guy)http://commonsware.com
> > > _The Busy Coder's Guide to Android Development_ Version 2.0 Available!
>
> --
> 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: How to get OpenGLContext class in Android 1.5 SDK

2009-05-15 Thread Himadri Sekhar Das
Thank you so much Yusuf..
-Himadri / APT

On Fri, May 15, 2009 at 12:22 AM, Yusuf T. Mobile
wrote:

>
> OpenGLContext appears to have disappeared in 1.5, including the
> Android platform source code and documentation (except a residual
> mention here:
> http://developer.android.com/guide/topics/graphics/opengl.html).
> Depending on what you are doing, you may want to use the new API
> GLSurfaceView, which was added in Android 1.5.
>
> To answer your second question for extra credit, there is a
> considerable amount of free online learning material for budding
> Android developers, among them:
> http://developer.android.com/guide/tutorials/hello-world.html
> http://learningandroid.org/
>
> Yusuf Saib
> Android
> ·T· · ·Mobile· stick together
> The views, opinions and statements in this email are those of the
> author solely in their individual capacity, and do not necessarily
> represent those of T-Mobile USA, Inc.
>
>
>
> On May 14, 4:25 am, Himu  wrote:
> > How to get OpenGLContext class in Android 1.5 SDK?
> >
> > Is it atall possible.
> >
> > Is there any e-book/open-book for android SDK ?
> >
> > Thanks
> > Himadri Sekhar
> > APT / Kolkata
> >
>

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Equivalent to .classpath when building with ant, or how to add more source directories to build.xml.

2009-05-15 Thread Anton

Is there a way to add more source directories to an ant build
using the build.properties file?  I've been using the .classpath file
in Eclipse to reference additional shared source files that are used
by multiple projects.  Now that I'm trying to build my project using
ant I can't figure out if I'm supposed to just edit the build.xml file
to reference all of the external source directories?  Or if there is
something I should put in the build.properties file to cause the tools
to find these files.  My .classpath file looks like:









The part I want to replicate in an ant build is the classpathentry
that specifies the path to my OpenGL source.

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

2009-05-15 Thread Dianne Hackborn
Like I said, you can't do this.  The appropriate list would probably be
android-porting; I can't move the thread for you.

You can create a Service without an Activity, that's one of the points of a
Service, but you still need to be running in a process created by the
activity manager (from an .apk with a manifest etc).

It might help if you describe what you are actually trying to do, what
context this is coming from (you are building your own platform, creating
something to upload to market, etc).

On Fri, May 15, 2009 at 11:35 AM, SGAdrian  wrote:

>
> So where can ask this question? Could you move this thread to the
> correct forum?
>
> So how can I get hold of a functional Context, if that means I have to
> go through the ActivityManager?
>
> Can I create a Service without an Activity? I dont want anything
> visible to the user.
>
> BR,
> Sven
>
> On 15 Maj, 19:09, Dianne Hackborn  wrote:
> > You are in the wrong group -- this group is for programming against the
> SDK,
> > which you are well outside the bounds of.
> >
> > That said, you can't really get a functional Context from outside of
> > processes not launched by the activity manager.  You'll notice that the
> > monkey, am, and pm commands all don't use a Context for this reason.
> >
> >
> >
> > On Fri, May 15, 2009 at 6:41 AM, SGAdrian 
> wrote:
> >
> > > Sorry but I dont get it.
> >
> > > I am starting my java program with app_process, i.e I am not running
> > > any Service or Activity. Just like the Monkey.java program is doing.
> >
> > > Ex.
> >
> > > public class Main {
> > >public static void main(String[] args) {
> > >   // How can I get hold of a Context instance here?
> > >   //
> > >   }
> > > }
> >
> > > BR,
> > > Sven
> >
> > > On May 15, 2:50 pm, "Mark Murphy"  wrote:
> > > > > When you are developing on an application level(Services,
> Activities)
> > > > > you always get this Context reference automatically.
> >
> > > > > But what if I am on a lower level and developing a program started
> > > > > with app_process, how can I get hold of a Context then? Its a huge
> > > > > part of the API that need this context.
> >
> > > > Have it passed to you via the API to your lower level. In other
> words,
> > > > just as the Android API requires you to pass in a Context, your API
> to
> > > > your higher levels will require those higher levels to pass in a
> Context.
> >
> > > > > What the proper way to create a Context instance?
> >
> > > > AFAIK, you don't create Context instances -- you use the ones created
> for
> > > > you by Android (e.g., Activity, Service).
> >
> > > > --
> > > > Mark Murphy (a Commons Guy)http://commonsware.com
> > > > _The Busy Coder's Guide to Android Development_ Version 2.0
> Available!
> >
> > --
> > 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.
> >
>


-- 
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] targeting custom-android 1.5 to dev phone

2009-05-15 Thread devi prasad

hi, I have a custom build of android-1.5_r1 code, where I have made a
few modifications to AudioFlinger.I want to flash this build to my dev
phone. Can someone guide me in "building for dream"? After reading
through various posts, I'm somewhat confused about the overall state
of this process.

thanks a lot.

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

2009-05-15 Thread Alexey Volovoy

Ok thanks for the answer. Although i must say it really does look ugly
if the item happen to be in the middle of the list.

On May 15, 12:02 pm, Romain Guy  wrote:
> Yes, it is intentional.
>
> On Fri, May 15, 2009 at 9:02 AM, Alexey  wrote:
>
> > Hi all , i've noticed after i've switched to 1.5 that if ListView item
> > is not enabled the divider(s) for this item are not rendering. Is this
> > intentional ?
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  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: Widget in 1.5 not deleted???

2009-05-15 Thread Romain Guy
It's a known bug :)

On May 15, 2009 11:27 AM, "guruk"  wrote:


I tested right now also the addwidgetdemo from the api 1.5 examples.

also there:

1.  it always calls : static void updateAppWidget(Context context,
AppWidgetManager appWidgetManager, int appWidgetId, String
titlePrefix)

2. but never comes to the : public void onDeleted(Context context, int
[] appWidgetIds)   ...

And that happen in the official Demo.. so I guess there is a bug!

Greets

Chris --~--~-~--~~~---~--~~ You received
this message because you a...

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

2009-05-15 Thread Ward Willats

Thanks Diane. We just fixed it. Seems like the moment you post to the 
list in desperation, the answer appears. Wonderful magick.

Turns out our initialization is so crazy complicated we were 
wait()-ing the UI thread (instead of the worker thread we thought we 
were on) waiting for the service connection to fire. Well, not too 
surprisingly, hanging the UI thread keeps stuff from happening

Not sure what the best idiom is for insuring a service is up before 
you proceed, but that's another (straightforward) problem.

-- Ward

At 10:16 AM -0700 5/15/09, Dianne Hackborn wrote:
>Are you passing the flag to have the service created?  What is the 
>output of "adb shell dumpsys activity.service" during this time? 
>(And what is the name of your service to be able to find it?)
>
>On Fri, May 15, 2009 at 10:09 AM, Ward Willats 
><goo...@wardco.com> wrote:
>
>
>Man, we are pulling our out over this
>
>We have a service. bindService() returns true. But our
>ServiceConnection is never called with onConnect(). The onCreate() of
>the service is never executed (neither is the onBind(), of course).
>
>Except sometimes! (twice now, out of many many tries).
>
>Remote service, local service, intent-filter, direct class
>invocation, "procedure" attribute, no procedure attribute, cupcake,
>1.1, emulator, device ... we've tried 'em all!
>
>We belive the service is found, and in the remote case, we see the
>new process always created ... but the dang service just isn't
>started. We aren't specifying any security settings and writing the
>simplest manifest entry we can
>
>Does this sound familiar to anyone? What can we check?
>
>Thanks, as always.
>
>-- Ward
>
>
>
>
>--
>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: Another question about Animation - animate an imageview across several layouts

2009-05-15 Thread Sheepz

I can maybe add more information if needed - please answer if you
think it's needed.

On May 12, 5:23 pm, Sheepz  wrote:
> Hi, I want to be able to make an imageview move from point a to b
> while going through several different views.
> For example, say I have a table layout, is there any way an imageview
> can move from the topleft cell to the bottomright cell?
> Everything I tried seems to indicate that an imageview will only be
> shown in it's own container - none of it's parents, siblings or
> children will show it.
> Is that correct? is there any way around it? like creating an overlay
> or a transparent canvas on top of the entire thing so I can do it?
> thanks,
> Sh.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: 1.5 ListView disabled items

2009-05-15 Thread Romain Guy

Disabled items are badly named. They are supposed to act as separators
(for instance, that's who the group names are implemented in the
Settings pages.) If you don't want the user to click the item, you
should disable the view itself. If you look at the Settings page
you'll see why not drawing the dividers make sense for separators.

On Fri, May 15, 2009 at 12:19 PM, Alexey Volovoy  wrote:
>
> Ok thanks for the answer. Although i must say it really does look ugly
> if the item happen to be in the middle of the list.
>
> On May 15, 12:02 pm, Romain Guy  wrote:
>> Yes, it is intentional.
>>
>> On Fri, May 15, 2009 at 9:02 AM, Alexey  wrote:
>>
>> > Hi all , i've noticed after i've switched to 1.5 that if ListView item
>> > is not enabled the divider(s) for this item are not rendering. Is this
>> > intentional ?
>>
>> --
>> Romain Guy
>> Android framework engineer
>> romain...@android.com
>>
>> Note: please don't send private questions to me, as I don't have time
>> to provide private support.  All such questions should be posted on
>> public forums, where I and others can see and answer them
> >
>



-- 
Romain Guy
Android framework engineer
romain...@android.com

Note: please don't send private questions to me, as I don't have time
to provide private support.  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] Found bug in WebView which makes JVM crash!

2009-05-15 Thread Matt

The following code will crash on the 1.5 emulator:

WebView wv = new WebView(context);
wv.loadUrl("file://assets/myfile.html");
int i = wv.findAll("to");

It turns out "findAll" leads to a native method, which is where it is
crashing (instead of throwing an exception).

- Matt
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: No translucency when xml file present

2009-05-15 Thread andreas

Hi,

I have a similar problem, but I have not preferences.xml file anywhere
in res/xml.

On the emulator my theme works fine and I can see the other activity
in the background. But on my device (G1) the screen is rendered black.

Anybody any idea?

On 24 Mrz., 00:20, "jonlerne...@gmail.com" 
wrote:
> I am experiencing a very strange problem. In my application, I have a
> theme that I use for one of my activities:
>     android:theme="@style/Theme.Translucent"
>
> The theme is defined as follows:
>     
>         @drawable/
> translucent_background
>         true
>         #fff
>     
>
> where #c000
>
> This is used for an activity that does not take up the entire screen,
> so the previous activity can be seen through translucency in the
> background. Everything works well, until I add a preferences.xml file
> into res/xml. After adding this file (without adding any code), the
> translucency stops working entirely. The background around the
> activity becomes black all the time. Note however, that this only
> happens on the device, it works fine on theemulator. If I delete this
> single file, all goes back to normal.
>
> Any ideas?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Set a few lists in one layout?

2009-05-15 Thread daehoon

How to set a few lists in one layout include their own data from DB?

here is source code about set list in Android guide. List id is
@android:list
why the id must be android:list?, may I use my own id?
If I can, how to set lists to main layout including their own data
(title)?

Cursor notesCursor = mDbHelper.fetchAllNotes();
startManagingCursor(notesCursor);
String[] from = new String[]{NotesDbAdapter.KEY_TITLE};
int[] to = new int[]{R.id.text1};
SimpleCursorAdapter notes =
new SimpleCursorAdapter(this, R.layout.notes_row_weekly,
notesCursor, from, to);
setListAdapter(notes);

I want to set lists like this :

 
 |   List1  List2|
 |   title1   |   title |
 |   title2   |   title |
 |   title3   |   title |
 | |   title |
 | | |
 |   |
 |   |

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

2009-05-15 Thread Yusuf T. Mobile

Sorry, I am not familiar with the logger_event structure you are
referring to. I did not find it in the Android documentation, not in
the platform source code. Could you point me to where I might find it?

This may not be what you're looking for, but as described in
http://developer.android.com/reference/android/util/Log.html , you
call a function like Log.v(string1, string 2), which the Android
platform uses for logging, which you can then see in Eclipse and other
places.

What are you trying to accomplish?



Yusuf Saib
Android
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.





On May 15, 1:50 am, pibada  wrote:
> Hello,
>
> In logger_event structure, it exists msg[] as payload's message.
> Just I'm curious that how to write the payload's message in Android.
>
> The reason is that I want to change the specific part of the msg
> array,
> for example msg[0] do always 05 when the msg exists.
>
> If you know anythig about this question, plz help me.
>
> 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: Widget in 1.5 not deleted???

2009-05-15 Thread Jeff Sharkey

A little more detail about the issue, and a workaround:

http://groups.google.com/group/android-developers/msg/e405ca19df2170e2

j

On Fri, May 15, 2009 at 12:20 PM, Romain Guy  wrote:
> It's a known bug :)
>
> On May 15, 2009 11:27 AM, "guruk"  wrote:
>
>
> I tested right now also the addwidgetdemo from the api 1.5 examples.
>
> also there:
>
> 1.  it always calls : static void updateAppWidget(Context context,
> AppWidgetManager appWidgetManager, int appWidgetId, String
> titlePrefix)
>
> 2. but never comes to the : public void onDeleted(Context context, int
> [] appWidgetIds)   ...
>
> And that happen in the official Demo.. so I guess there is a bug!
>
> Greets
>
> Chris >
>



-- 
Jeff Sharkey
jshar...@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
-~--~~~~--~~--~--~---



[android-developers] Re: Using the AudioRecord API

2009-05-15 Thread benmccann

Any ideas?

Thanks,
Ben


On May 15, 1:02 am, benmccann  wrote:
> Hi,
> I'm trying to figure out how to use theAudioRecordclass.  I created
> a callback with a logging message, but don't ever see it called.  Do
> you see anything wrong with what I'm doing?  Do you have an example of
> how to use the API?
>
> Thanks,
> Ben
>
> import android.media.AudioFormat;
> import android.media.AudioRecord;
> import android.media.MediaRecorder;
> import android.util.Log;
>
> public class AudioListener {
>
>   public static final int DEFAULT_SAMPLE_RATE = 8000;
>   private static final int DEFAULT_BUFFER_SIZE = 4096;
>   private static final int CALLBACK_PERIOD = 4000;  // 500 msec
> (sample rate / callback period)
>   private finalAudioRecordrecorder;
>
>   public AudioListener() {
>     this(DEFAULT_SAMPLE_RATE);
>   }
>
>   private AudioListener(int sampleRate) {
>     recorder = newAudioRecord(MediaRecorder.AudioSource.DEFAULT,
>         sampleRate, AudioFormat.CHANNEL_CONFIGURATION_DEFAULT,
>         AudioFormat.ENCODING_DEFAULT, DEFAULT_BUFFER_SIZE);
>   }
>
>   public void start() {
>     recorder.setPositionNotificationPeriod(CALLBACK_PERIOD);
>     
> recorder.setRecordPositionUpdateListener(newAudioRecord.OnRecordPositionUpdateListener()
>  {
>       @Override
>       public void onMarkerReached(AudioRecordrecorder) {
>         Log.e(this.getClass().getSimpleName(), "onMarkerReached
> Called");
>       }
>
>       @Override
>       public void onPeriodicNotification(AudioRecordrecorder) {
>         Log.e(this.getClass().getSimpleName(), "onPeriodicNotification
> Called");
>       }
>     });
>
>     recorder.startRecording();
>   }
>
> }
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: ContentProvider queries, Contacts and the SDK docs

2009-05-15 Thread Jeff Sharkey

> Last question is about the Contacts PERSON_ID and how long-lived that
> is. It is guaranteed
> to never change (though may be removed obviously). Well not truly
> guaranteed but will only
> cycle after it runs out of unused integers. Or may they change value
> as contacts are removed?

_ID values are typically meant for short-term reference only, such as
when referring to an item through Intent.setData().  So, don't trust
them to be static and unique.

If you're looking for a permanent reference to a contact, use a
combination of _SYNC_ACCOUNT and _SYNC_ID, which will uniquely
identify each contact.  This also applies to any other provider on the
system that offers syncing, such as Calendar.


-- 
Jeff Sharkey
jshar...@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
-~--~~~~--~~--~--~---



[android-developers] Re: 1.5 ListView disabled items

2009-05-15 Thread Alexey Volovoy

Romain, thanks for the explanation, the name enable/disable is
definitely misleading. I used it for dynamic content ( ads :) ) if i
had content i enabled the item if not disabled it. I'll make a change
to make it on the view level.


On May 15, 3:12 pm, Romain Guy  wrote:
> Disabled items are badly named. They are supposed to act as separators
> (for instance, that's who the group names are implemented in the
> Settings pages.) If you don't want the user to click the item, you
> should disable the view itself. If you look at the Settings page
> you'll see why not drawing the dividers make sense for separators.
>
>
>
> On Fri, May 15, 2009 at 12:19 PM, Alexey Volovoy  wrote:
>
> > Ok thanks for the answer. Although i must say it really does look ugly
> > if the item happen to be in the middle of the list.
>
> > On May 15, 12:02 pm, Romain Guy  wrote:
> >> Yes, it is intentional.
>
> >> On Fri, May 15, 2009 at 9:02 AM, Alexey  wrote:
>
> >> > Hi all , i've noticed after i've switched to 1.5 that if ListView item
> >> > is not enabled the divider(s) for this item are not rendering. Is this
> >> > intentional ?
>
> >> --
> >> Romain Guy
> >> Android framework engineer
> >> romain...@android.com
>
> >> Note: please don't send private questions to me, as I don't have time
> >> to provide private support.  All such questions should be posted on
> >> public forums, where I and others can see and answer them
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  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: Extending over Apache License 2.0

2009-05-15 Thread info+farm

Thanks, I will be looking at the about example and contacting the
owner of the code.
jojo

On May 12, 1:55 pm, Zero  wrote:
> the best solution would be to ask the original author of the source
> you're using how he/she would like to have that.
> you may also check out OI 
> About,http://openintents.googlecode.com/files/AboutApp-1.0.0.apk
> which is a comfortable about screen for all kinds of apps and allows
> easy handling of stuff like that.
>
> or you just build your own "about/license" screen
>
> cheers,
> zero
>
> On May 12, 10:41 am, "info+farm"  wrote:
>
> > Dear all,
>
> > I am going to create an application via improving an existing code
> > which hasApacheLicense 2.0. In the license, it is implied that I
> > need to attach "Notice" and "License" files for the previous code
> > while distributing my new application.
>
> > Where is the best place to put these files, before publishing the new
> > version on Android Market?
>
> > Regards,
> > jojo
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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   >