[android-developers] Do Android chrome Webkit have a plan about supporting Xpath?

2010-02-18 Thread ElectricEyes
I am developing an AJAX Flatform Solution that activates Whole
Browser(CrossBrowsing) and Whole Machine (even if Smart Phone).

Android Chrome Webkit doesn’t support Xpath like “document.evaluate”,
“document.createNSResolver” and “XpathResult” that is included in
Safari Webkit Javascript Engine, so far.

If Android Chrome Webkit have a plan about it, When it support?

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


[android-developers] Can i delete all address(contact) book?

2010-02-18 Thread 작늑
i want to delete all address(contact).
but, normal android address book application not supported.
only supported one by one.
so, i do, db file delete and then reboot, using file browser in
Eclipse ddms.

i want other way more easier than my way.
how can i delete all address book?

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

2010-02-18 Thread ivar
Try this.
ContentValues values = new ContentValues();
values.put(Contacts.People.NAME, "Dummy Contact"+i);

Uri uri =
Contacts.People.createPersonInMyContactsGroup(getContentResolver(),
values);
Uri newContact = Uri.withAppendedPath(uri,
People.Phones.CONTENT_DIRECTORY);
values.clear();
values.put(People.Phones.TYPE, 
People.Phones.TYPE_MOBILE);
values.put(People.Phones.NUMBER, 
String.valueOf(baseNumber + i));
getContentResolver().insert(newContact, values);

Hope this helps.
Thanks,
Ravi

On Feb 18, 12:43 am, LeGeNDuS  wrote:
> Ok, sorry, in the first case I have wrottenI don't get an error:
>
> ContentValues values = new ContentValues();
>         values.put(People.NAME, etname.toString());
>         Uri uri = getContentResolver().insert(People.CONTENT_URI,
> values);
>         Uri numberUri = Uri.withAppendedPath(uri,
> People.Phones.CONTENT_DIRECTORY);
>         values.clear();
>         values.put(People.NUMBER, etphonenumber.toString());
>         getContentResolver().insert(numberUri, values);
>
> But after that, I don't see the contact on the mobile...
>
> I'm using Eclipse SDK on Windows 7 and the version of the SDK is 1.5.
> All of this is being tested in a HTC Hero.
>
> On 17 feb, 19:21, Dmitri Plotnikov  wrote:
>
>
>
> > Please make sure that whenever you post a question regarding a force close,
> > you copy/paste the exception stack trace into the post and also mention what
> > environment you are using, what version of the SDK, what device.
>
> > On Wed, Feb 17, 2010 at 11:15 AM, LeGeNDuS  wrote:
> > > Thanks...I have added this permission:
>
> > > 
>
> > > And now..it doens't stop, but I don't see the contact anywhere...
> > > here's the code:
>
> > > this one:
>
> > > ContentValues values = new ContentValues();
> > >        values.put(People.NAME, etname.toString());
> > >         Uri uri = getContentResolver().insert(People.CONTENT_URI,
> > > values);
> > >         Uri numberUri = Uri.withAppendedPath(uri,
> > > People.Phones.CONTENT_DIRECTORY);
> > >        values.clear();
> > >        values.put(People.NUMBER, etphonenumber.toString());
> > >        getContentResolver().insert(numberUri, values);
>
> > > other one, but this stops:
>
> > > ContentValues values = new ContentValues();
> > >        values.put(People.NAME, etname.toString());
> > >        values.put(People.PRIMARY_EMAIL_ID, etemail.toString());
> > >        values.put(People.NUMBER, etphonenumber.toString());
> > >         Uri uri = getContentResolver().insert(People.CONTENT_URI,
> > > values);
>
> > > On 17 feb, 16:59, Dmitri Plotnikov  wrote:
> > > > Does your app request permission to write to contacts?
>
> > > > On Feb 17, 2010 4:11 AM, "LeGeNDuS"  wrote:
>
> > > > Hello, I'm trying this code and it's getting stopped in the
> > > > getContentResolver statement
>
> > > >        ContentValues values = new ContentValues();
> > > >        values.put(People.NAME, "hola");
> > > >        Uri uri = getContentResolver().insert(People.CONTENT_URI,
> > > > values);
>
> > > > What am I  doing bad?
>
> > > > 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 > > >  cr...@googlegroups.com> > > cr...@googlegroups.com>
> > > > For more options, visit this group athttp://
> > > groups.google.com/group/android-developers?hl=en
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com > >  cr...@googlegroups.com>
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Tab Bar in Android

2010-02-18 Thread Sasikumar.S
Hi,

How to show tab bar in android?

Please see the below link image.

http://img29.imageshack.us/img29/4307/editmore.png

In that artists, album,
video & more are the tab bar items.

I need like that tab  bar in android .
How to do that?

I need not menu items by pressing menu button. I need a tab bar.

Any suggestions ?

-- 
Thanks & Regards
Sasikumar.S

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

2010-02-18 Thread Jimmy Stewpot
Hello All,

I have very little idea about how the mobile phone networks work at a
low layer so these questions maybe a little strange or in a completely
wrong area so please bear with me.
Most GSM phones have sim cards, I am interested to know if it would be
possible to emulate the sim cards in software, for example would it be
possible to write an application that you could then have multiple
sim's running for the purposes of say having a 'work phone' and a
'personal phone'.

Many years ago I had a phone which supported two sim's however It
seems there are no phones that run android and have this type of
feature.. Any feedback would be really appreciated.

Regards,

Jimmy.

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


[android-developers] cant fetch

2010-02-18 Thread aiden
i am using windows vista, i turn on force to download from setting it
works fine now

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

2010-02-18 Thread Sandy
I am pretty new to Android and have a couple of questions:

1. Is it possible to drag and drop a UI widget from one activity to
another activity?

2. Does android support multiple non fullscreen applications running
active concurently  (say a browser and phone screen next to each
other)?

3. Is it possible to customize the home screen instead of going with
android default home screen? If so, can we change the layout and
widgets in that screen completely?

Waiting for your valuable inputs.

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] LogCat reports"Could not find method foo"

2010-02-18 Thread Kyle
I am trying to use the backport.android.bluetooth library.  I wonder
if I have the library configured correctly.

Here's what I did in Eclipse 3.5:

1) Created Android project.
2) Added backport-android-bluetooth2.jar to my reference libraries
3) Wrote some code that called
backport.android.bluetooth.BluetoothAdapter.getDefaultAdapter()
4) Compiled successfully
5) Did "Run as..." so it was running on my G1 device
6) Saw this error in LogCat


How is it that I can compile successfully, but can't find a method at
run time?  (I have >10 years low level programming experience, but am
new to Java)

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


[android-developers] Is there a normal human way to copy image from one folder to another?

2010-02-18 Thread benderillo
Hi everybody,

Here is the problem:
I'm trying to figure out the best way to copy exisitng jpeg image on
SD card from one folder to another with MediaStore database properly
updated.

First approach I tried:
1) Open IN and OUT streams; 2) Copy file to a new location as byte
stream; 3) Use MediaScannerConnection.scanFile() to update MediaStore
DB.
This way works fine except one problem: image thumbnail is not
generated (MediaStore.Images.Thumbnails is empty). I looked inside
"scanFile" method; it doesn't seem to have any code for thumbnail
generation.

Second approach:
Try to use Images.Media.insertImage() - with this approach I don't
know how to chose the physical location of the new file. You can't
control this. You just get an Uri to a copy of the image which is
copied (re-encoded) to some place but not the folder you need it to be
in.

In other words, my question is: Is there any way to give MediaStore an
image file and say "Please, take this file and fill up your database
with all the information it should have, including thumbnail"?

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


[android-developers] Passing MOTION EVENTS up while transitioning between activities

2010-02-18 Thread Henry
I am working on an application that requires to monitor MotionEvents
between activities of the application. It
consists of a RootActivity and a ChildActivity. The RootActivity will
open the ChildActivity via an intent which
occurs at the moment the ACTION_DOWN event is received. However, the
RootActivity is suppose to perform some action upon receiving the
corresponding ACTION_UP that is to follow the ACTION_DOWN that was
used to create the ChildActivity. Below is a snippet of code to help
with the explanation. This code works fine up to 1.6 of Android.
However, in 2.0 and above of Android this no longer works and I am
unable to receive any MotionEvents on the RootActivity once the
ChildActivity has been created.

Questions:
- How can I recieve the corresponding ACTION_UP on the RootActivity
once the ChildActivity has been created?
- Is there any way to know using code the state of the screen to check
if it is being pressed or not?


Code:
public class RootActivity extends Activity implements OnTouchListener
{
  private ListView list;
  @Override
  protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.rootview);

 list = (ListView) findViewById(R.id.rootlist);
 list.setOnTouchListener(this);
  }

 @Override
 public boolean dispatchTouchEvent(MotionEvent ev) {
 // Print Log

 return super.dispatchTouchEvent(ev);
 }

public boolean onTouch(View v, MotionEvent event) {
  switch( event.getAction() ) {
  case MotionEvent.ACTION_DOWN:
  Intent intent = new
Intent(actions.CREATE_CHILD_ACTIVITY);
  intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
  this.startActivity(intent);
  break;
  case MotionEvent.ACTION_UP:
  //Perform some action
  break;
  }
  return 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] Accessing the /data folder

2010-02-18 Thread Thalisson
I'm working on a android project and we're wondering if there is any
way to access all the data on the "/data" folder. I'm asking this
because we need to copy (and paste) all the data on that folder and,
so far, we couldn't find a way to do that.

I know that normally we don't have access due to security (with access
we could modify/read anything that other apps uses), but is that
anyway (signing the app with a Recognized Certificate Authority to
have full access, like we can with J2ME) to have this kind of "power"?

Once more, I don't care with the files inside this folder, I just need
to copy and paste it (I don't care if it's encrypted, for example).

Thalisson.

PS: I heard that with a rooted device I could have access to that
folder, but this is not something that we can use (we can't ask the
customer to root their cell phones :P)

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


[android-developers] List of existing ACTIONS and Component names

2010-02-18 Thread CChange
Hi All!

New here, love the Android SDK, but not so happy with finding pure
references (lists) of things like possible existing  ACTIONS (Intents)
or component names.

My specific problem is that I am writing a little app that uses the
Android messaging (intent ACTION_SEND). Problem is that I dont want
that chooser to come up, but instead that its always(!) the messaging
(MMS) which is used.

I found that you can set a specific component for an intent, so I
downloaded the Android sourcecode and found an app
com.android.mms.MmsApp

But if I do that:

Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.putExtra("sms_body", message);
sendIntent.putExtra(Intent.EXTRA_STREAM,Uri.parse(APP_DIR
+TEMP_IMAGE));
sendIntent.setType("image/jpg");
sendIntent.setComponent( new ComponentName("com.android.mms",
"com.android.mms.MmsApp" ) );
return sendIntent;


I  get an error that com.android.mms/com.android.mms.MMsApp is not
findable, and whether I declared it in my android manifest file (which
clearly I could not, because its a completely different package).

Does anyone know about sites that provides lists of possible Intents
and components (pre-existing on the android system)??

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] Best use of MediaPlayer?

2010-02-18 Thread erinspice
Hi! This is my first post to the list. I'm working on a kids' game
that plays some small wav files in a predictable order. I need to use
an OnCompletionListener to know when to start the next sound, but I
also need to avoid multiple MediaPlayers using all my memory. Could
someone suggest a smart way to do this? I have tested the following
code snippet, and while it functions well, it does crash eventually.
Why does mp = MediaPlayer.create() not overwrite the previous mp
object/free the memory used previously, and how can I fix that?
Eclipse won't let me use mp.recycle().

// That's right!
mp = MediaPlayer.create(mContext, R.raw.thats_right);
mp.setOnCompletionListener(new OnCompletionListener(){
@Override
public void onCompletion(MediaPlayer arg0) {
// a horse
mp = MediaPlayer.create(mContext, rightAnswer.getName());
mp.setOnCompletionListener(new OnCompletionListener(){

@Override
public void onCompletion(MediaPlayer mp) {
// says
mp = MediaPlayer.create(mContext, R.raw.says);
mp.setOnCompletionListener(new 
OnCompletionListener(){

@Override
public void onCompletion(MediaPlayer 
mp) {
// neighhh
mp = 
MediaPlayer.create(mContext, rightAnswer.getSound());
mp.setOnCompletionListener(new 
OnCompletionListener(){

@Override
public void 
onCompletion(MediaPlayer mp) {
// start all 
over
}
});
mp.start();
}
});
mp.start();
}
});
mp.start();
}
});
mp.start();

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


[android-developers] Android app. crashes after exiting settings...

2010-02-18 Thread Schwartz
Dette indlæg er på engelsk fordi jeg sender til flere grupper

I've made a small app. where I use some sound effects the app. crashes
after I've been into option and clicks the go

back button.

I've added a Prefs  class as described in Ed Burnettes book:
---

package com.example.helloandroid;

import android.content.Context;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.preference.PreferenceManager;

public class Prefs extends PreferenceActivity
{
  // Option names
  private static final String  OPT_SOUND = "sound";
  private static final boolean OPT_SOUND_DEF = true;

  @Override
  protected void onCreate(Bundle savedInstanceState)
  {
super.onCreate(savedInstanceState);
addPreferencesFromResource(R.xml.settings);
  }

  public static boolean getSound(Context context)
  {
return PreferenceManager.getDefaultSharedPreferences(context).
  getBoolean(OPT_SOUND, OPT_SOUND_DEF);
  }
}

I've made the settings.xml:
---


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



I've created an activity for it:
---

  
  


I've opened it in the menu handler:
---

  case R.id.settings:
startActivity(new Intent(this, Prefs.class));
return true;


And it gives me the 'App stopped
unexpectedly' dialogue. Here's the
logcat:
---

I/ARMAssembler(   52): generated
scanline__0177:03515104_0A01_ [
 46 ipp] (70 ins) at [0x283360:0x283478] in 791545 ns
I/Number one(  183): Opening Settings
I/ActivityManager(   52): Starting activity: Intent
{ cmp=com.example.helloandro
id/.Prefs }
I/Number one(  183): Returning from Settings
D/PhoneWindow(  183): couldn't save which view has focus because the
focused vie
w com.example.helloandroid.helloandroid$pa...@43770458 has no id.
D/(  183): unable to unlink '/data/data/
com.example.helloandroid/shared_
prefs/com.example.helloandroid_preferences.xml.bak': No such file or
directory (
errno=2)
I/ActivityManager(   52): Displayed activity
com.example.helloandroid/.Prefs: 87
9 ms (total 879 ms)
D/AndroidRuntime(  183): Shutting down VM
W/dalvikvm(  183): threadid=3: thread exiting with uncaught exception
(group=0x4
001aa28)
E/AndroidRuntime(  183): Uncaught handler: thread main exiting due to
uncaught e
xception
E/AndroidRuntime(  183): java.lang.IllegalThreadStateException: Thread
already s
tarted.
E/AndroidRuntime(  183):at java.lang.Thread.start(Thread.java:
1286)
E/AndroidRuntime(  183):at
com.example.helloandroid.HelloAndroid$Panel.s
urfaceCreated(HelloAndroid.java:193)
E/AndroidRuntime(  183):at
android.view.SurfaceView.updateWindow(Surface
View.java:392)
E/AndroidRuntime(  183):at
android.view.SurfaceView.onWindowVisibilityCh
anged(SurfaceView.java:182)
E/AndroidRuntime(  183):at
android.view.View.dispatchWindowVisibilityCha
nged(View.java:3745)
E/AndroidRuntime(  183):at
android.view.ViewGroup.dispatchWindowVisibili
tyChanged(ViewGroup.java:690)
E/AndroidRuntime(  183):at
android.view.ViewGroup.dispatchWindowVisibili
tyChanged(ViewGroup.java:690)
E/AndroidRuntime(  183):at
android.view.ViewRoot.performTraversals(ViewR
oot.java:694)
E/AndroidRuntime(  183):at
android.view.ViewRoot.handleMessage(ViewRoot.
java:1613)
E/AndroidRuntime(  183):at
android.os.Handler.dispatchMessage(Handler.ja
va:99)
E/AndroidRuntime(  183):at android.os.Looper.loop(Looper.java:
123)
E/AndroidRuntime(  183):at
android.app.ActivityThread.main(ActivityThrea
d.java:4203)
E/AndroidRuntime(  183):at
java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime(  183):at
java.lang.reflect.Method.invoke(Method.java:5
21)
E/AndroidRuntime(  183):at com.android.internal.os.ZygoteInit
$MethodAndA
rgsCaller.run(ZygoteInit.java:791)
E/AndroidRuntime(  183):at
com.android.internal.os.ZygoteInit.main(Zygot
eInit.java:549)
E/AndroidRuntime(  183):at
dalvik.system.NativeStart.main(Native Method)

I/Process (   52): Sending signal. PID: 183 SIG: 3
I/dalvikvm(  183): threadid=7: reacting to signal 3
I/dalvikvm(  183): Wrote stack trace to '/data/anr/traces.txt'
D/dalvikvm(   52): GC freed 13746 objects / 647808 bytes in 183ms
I/ARMAssembler(   52): generated
scanline__0077:03515104__ [
 27 ipp] (41 ins) at [0x1ebbb8:0x1ebc5c] in 7870043 ns
I/ARMAssembler(   52): generated
scanline__0077:03515104_1001_ [
 64 ipp] (84 ins) at [0x1ebc60:0x1ebdb0] in 2053210 ns
W/ActivityManager(   52): Launch timeout has expired, giving up wake
lock!
W/ActivityManager(   52): Activity idle timeout for
HistoryRecord{4391abd0 com.e
xample.helloandroid/.HelloAndroid}
W/ActivityManager(   52): Activity destroy timeout for
HistoryRecord{43941108 co
m.example.helloandroid/.Prefs}
D/dalvikvm(  101): GC freed 3342 objects / 1865

[android-developers] Controlling background on an ImageView

2010-02-18 Thread mr.winky
I've searched the forums and docs without too must effect, and feel
like a total newb, but the documentation just doesnt seem to cover my
question. Can you customize the background size within an ImageView? I
dont wish to scale the ImageView, I wish for the image view to stay at
a fixed size/ratio and manipulate the contents of the view with
different images or scaling of images.

I.e if i wish to overlay two image views on top of one another but
manipulate the background within the fixed size set by the layout.
Tried using a ShapeDrawable but ran into issues as any image view
behind the shape (within the same bounds) is always deleted when
writing to the canvas.

What is the better way to do this? A basic example:

There are two images with alpha that need to be blended together to
form an interface. One is larger than the other, say a box, and the
other is a smaller box. Based on user input you wanted the smaller box
to grow to the size of the bigger box (not using an animation, less
frequency of changes) while maintaining alignment.

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


[android-developers] Not receiving MotionEvents when transitioning between activities

2010-02-18 Thread Henry
I am working on an application that requires to monitor MotionEvents
between activities of the application. It consists of a RootActivity
and a ChildActivity. The RootActivity will open the ChildActivity via
an intent which occurs at the moment the ACTION_DOWN event is
received. However, once the Child Activity is created the RootActivity
is suppose to react to the ACTION_UP that is to follow the ACTION_DOWN
that was used to create the ChildActivity. Below is a snippet of code
to help with the explaination. This code works fine up 1.6 of Android.
However, in 2.0 and above of Android the code no longer works and I am
unable to receive any MotionEvents on the RootActivity once the
ChildActivity has been created.

Questions:
- How can I recieve the corresponding ACTION_UP on the RootActivity
once the ChildActivity has been created?
- Is there any way to know using code the state of the screen to check
if it is being pressed or not?


Code:
public class RootActivity extends Activity implements OnTouchListener
{
  private ListView list;
  @Override
  protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.rootview);

 list = (ListView) findViewById(R.id.rootlist);
 list.setOnTouchListener(this);
  }

 @Override
 public boolean dispatchTouchEvent(MotionEvent ev) {
 // Print Log

 return super.dispatchTouchEvent(ev);
 }

public boolean onTouch(View v, MotionEvent event) {
  switch( event.getAction() ) {
  case MotionEvent.ACTION_DOWN:
  Intent intent = new Intent(actions.CHILD_ACTIVITY)
  intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
  this.startActivity(inent);
  break;
  case MotionEvent.ACTION_UP:
  //Perform some other action
  break;
  }
  return 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] MediaStore.ACTION_IMAGE_CAPTURE + Intent.FLAG_GRANT_WRITE_URI_PERMISSION

2010-02-18 Thread Bob Lee
I was hoping to take a photo and enable only the camera app (or whatever
other app is bound to ACTION_IMAGE_CAPTURE) to store a photo in my content
provider.

Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
intent.putExtra(MediaStore.EXTRA_OUTPUT, MyPhotoStore.URI);

// Grant permission to the camera activity to write the photo.
intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
intent.setData(MyPhotoStore.URI);

startActivityForResult(intent, REQUEST_PHOTO);

Calling setData() on the URI enables the other app to write to the URI, but
it also messes up the activity dispatch (I get ActivityNotFoundException).

I'd rather not specify a package with Context.grantUriPermission() because I
want it to work for any activity bound to ACTION_IMAGE_CAPTURE.

Is there any way to use FLAG_GRANT_WRITE_URI_PERMISSION
with ACTION_IMAGE_CAPTURE?

I guess an alternative is to use random URIs instead of the built-in
security.

Thanks,
Bob

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

2010-02-18 Thread Manjunatha M
Hi,

To hide my activity from the list in "Select wallpaper from"
I have actually written a BroadcastReceiver which on boot completed, does
the following.


@Override
public void onReceive(Context context, Intent intent) {

ComponentName componentName = new ComponentName(
"com.android.manju",
"com.android.manju.MyActivity.class");

int component_state = PackageManager.COMPONENT_ENABLED_STATE_DEFAULT;

if (toEnable) {
component_state = PackageManager.COMPONENT_ENABLED_STATE_ENABLED;

} else {
component_state = PackageManager.COMPONENT_ENABLED_STATE_DISABLED;
}

if (context.getPackageManager().getComponentEnabledSetting(
componentName) == component_state)
return;

PackageManager pm = context.getPackageManager();

pm.setComponentEnabledSetting(componentName, component_state,
PackageManager.DONT_KILL_APP);
}


Though the activity is disabled, I could still see my activity in the
"Select wallpaper from" menu..

Please help on this..

On Sun, Feb 14, 2010 at 1:30 AM, Dianne Hackborn wrote:

> Use PackageManager.setComponentEnabledSetting() to disable that activity
> when you don't want it displayed.
>
>
> On Sat, Feb 13, 2010 at 1:44 AM, Manjunatha M  wrote:
>
>> yes.. I want that to be configurable. sometimes to show and sometimes not
>> to show in the list of "select wallpaper from"
>>
>>
>> On Sat, Feb 13, 2010 at 12:07 PM, venkat ranjit wrote:
>>
>>>
>>>
>>>
>>>
>>>
>>> Hi manjuntha  ur question  is not clear , tell me clearly,  in my
>>> understanding u  want shortcut of ur activity (custom activity).  in
>>> wallpaper ,  i want clarity k
>>>
>>>
>>> Regards,
>>> Ranjit
>>>
>>> On Sat, Feb 13, 2010 at 10:03 AM, Manjunatha M  wrote:
>>>
 Hi Folks,

 I want to show my Activity in
 HomeScreen->Menu Press->Wallpapers.

 This should be dynamic, so that, for some check this should show, and
 otherwise it should not show.

 Could anyone please help on this??

 --
 Regards,
 Manjunatha

 --
 You received this message because you are subscribed to the Google
 Groups "Android Developers" group.
 To post to this group, send email to
 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
>>>
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-developers+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>
>>
>>
>>
>> --
>> Regards,
>> Manjunatha
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Regards,
Manjunatha

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

2010-02-18 Thread social hub
I am also having the same issue

But do u need multiple galleries in a layout can you create a view that
encompasses all your child and give that to the gallery view in such a case
u need only one gallery.


On Thu, Feb 18, 2010 at 10:20 AM, racx182  wrote:

> Does anyone have any solution for placing multiple Galleries on a
> layout? The problem is only one Gallery will scroll with multiple
> Galleries on a layout. The other Galleries won't work. Anyone know a
> workaround ?
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

[android-developers] Multiple Gallery Widgets won't scroll

2010-02-18 Thread racx182
Does anyone have any solution for placing multiple Galleries on a
layout? The problem is only one Gallery will scroll with multiple
Galleries on a layout. The other Galleries won't work. Anyone know a
workaround ?

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: Search Market by Publisher Name

2010-02-18 Thread polyclefsoftware
On Feb 18, 9:38 am, TreKing  wrote:
> If you're trying to create an actual hyperlink for a website, that won't
> work. The market search URI you're using only works for the mobile version
> of the Android Market. For example if you created an Intent for one of those
> links, it would search the Android Market app for you publisher name.

Yeah, I'm aware of that. I was trying to make a link for the Android
version of my mobile website.

Social hub was right, sort of.

If I want to create a market link that searches by the keyword
"dominoes" and by publisher "Polyclef Software", I have to use the
following:

market://search?q=pub:%22Polyclef%20Software%22 dominoes

The following does not work:

market://search?q=pub:Polyclef%20Software dominoes

It might have been nice for them to include an example for a multiword
search parameter in the documentation. Their only example of searching
based on multiple parameters is this:

http://market.android.com/search?q=world pname:com.android.hello
pub:Android

I still think it's silly that a search based on substrings can
apparently only either search publisher name or app name. The
following link returns no results:

http://market.android.com/search?q=polyclef dominoes

Using the search feature from the Android market, if a user types in
"polyclef software" they get a list of all my apps. If they type in
"dominoes" they get my dominoes app. If they type in "polyclef
dominoes" they get no results. Not so great.

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

2010-02-18 Thread TreKing
On Thu, Feb 18, 2010 at 8:47 AM, Babasaheb  wrote:

> Is it possible to send an intent so that a specific action is taken at
> receiver side without broadcasting the intent?
> Is this correct method?
> How can I do that?
> Is there any other solution?
>

I would recommend you look at the "action" portion of intents in the
documentation. You can specify an action for an intent (using a default one
or your own) and base what you do on that.

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

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Broadcast/notify/messege when app is launched

2010-02-18 Thread Mark Murphy
jw wrote:
> Is there a way of getting broadcasted/notified/messeged when a certain
> app is launched?

No.

> If not, is it possible to reach this down under the SDK, using the
> NDK?

I sure hope not.

In a custom firmware, you could do it, though.

And, note that cross-posting to multiple lists is impolite.

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

_Android Programming Tutorials_ Version 1.9 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] Broadcast/notify/messege when app is launched

2010-02-18 Thread jw
Hi,

Is there a way of getting broadcasted/notified/messeged when a certain
app is launched? I've searched a lot and come up with nothing. I can't
find any support for this in the Android SDK.

Does anybody now if the SDK support this?

If not, is it possible to reach this down under the SDK, using the
NDK?

Thanks in advance.

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


Re: [android-developers] Notification manager question

2010-02-18 Thread Mark Murphy
Petroleum Nasby wrote:
>>> one must apparently overwrite earlier notifications, losing that
> needed information
>> What "needed information"?
> 
> That somebody has died, and attached detail information.

Uh, OK.

Store the "needed information" in a file, database, in the cloud, or
something. Whoever raised the notification has the "needed information"
at that time. Since one application cannot affect other applications'
notifications, the application has full control over the storage medium
and lifetime of the "needed information".

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

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

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


Re: [android-developers] Search Market by Publisher Name

2010-02-18 Thread social hub
space is %20 not + so

poxx%20software

try it on ur browser first to get the exact string it sends then use that
for market. I think they might be using standard url encoding if i am not
mistaken


On Thu, Feb 18, 2010 at 9:27 AM, polyclefsoftware  wrote:

> This link describes how to search the Android Market for apps using
> various parameters:
>
> http://developer.android.com/guide/publishing/publishing.html
>
> I'm having a heck of a time figuring out how to format a link for my
> apps published by my company using this format. For searching by
> developer name, the doc says to use the following format:
>
> market://search?q=pub:
>
> It also says it returns exact matches only. My publisher name is
> "Polyclef Software".
>
> I guess I'm wondering why Google can't make a market search feature
> that searches for substrings in the publisher's name, but aside from
> that, how am I supposed to format the link? Neither of the following
> work:
>
> market://search?q=pub:Polyclef Software
> market://search?q=pub:Polyclef+Software
>
> I've tried a number of variations now and nothing works. 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

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

2010-02-18 Thread ian
I want to read my cursor position so that, after a tap, I can convert
the screen x,y coordinates to a Geopoint for distance calculations. I
found a snippet to convert x,y coordinates to a Geopoint and probably
could use Projection instead, but how do I input those screen x,y
values in the first place?
\
This is probably straightforward, but I'm confused. The class Cursor
seems to be something different than what |I need..

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

2010-02-18 Thread social hub
I wish I could do that that would make my life easier :)

However it has to scroll if top one scrolls as per design so I am stuck with
it.

I got it moving with dispatchtouchevent (interecept and pass). as mentioned
if there is urllink in the edittext then it gets these touch events and
things mess up, it will just stay wont move.

Thanks for your reply.

On Thu, Feb 18, 2010 at 9:28 AM, TreKing  wrote:

> On Thu, Feb 18, 2010 at 9:24 AM, social hub  wrote:
>
>> I have two Gallery widgets one above and one below. If the above one is
>> scrolled then I want to pass the same touch event to the bottom widget so it
>> also scrolls the same way .
>
>
> I have not used Galley widgets, but instead of passing the scroll event,
> could you instead just set the scroll position of the bottom widget to match
> that of the top widget when the top one scrolls?
>
>
>
> -
> TreKing - Chicago transit tracking app for Android-powered devices
> http://sites.google.com/site/rezmobileapps/treking
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Re: [android-developers] Search Market by Publisher Name

2010-02-18 Thread TreKing
On Thu, Feb 18, 2010 at 9:27 AM, polyclefsoftware  wrote:

> I guess I'm wondering why Google can't make a market search feature
> that searches for substrings in the publisher's name, but aside from
> that, how am I supposed to format the link?
>

If you're trying to create an actual hyperlink for a website, that won't
work. The market search URI you're using only works for the mobile version
of the Android Market. For example if you created an Intent for one of those
links, it would search the Android Market app for you publisher name.

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

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

2010-02-18 Thread Petroleum Nasby
On Thu, Feb 18, 2010, Mark Murphy wrote:

>> I need multiple notifications to appear in the dropdown notifier window.
> That's not a good idea in general.

Agreed, in many cases such would not be appropriate.

>> one must apparently overwrite earlier notifications, losing that needed
information
> What "needed information"?

That somebody has died, and attached detail information.

P. V. Nasby

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

2010-02-18 Thread TreKing
On Thu, Feb 18, 2010 at 9:24 AM, social hub  wrote:

> I have two Gallery widgets one above and one below. If the above one is
> scrolled then I want to pass the same touch event to the bottom widget so it
> also scrolls the same way .


I have not used Galley widgets, but instead of passing the scroll event,
could you instead just set the scroll position of the bottom widget to match
that of the top widget when the top one scrolls?

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

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

[android-developers] Search Market by Publisher Name

2010-02-18 Thread polyclefsoftware
This link describes how to search the Android Market for apps using
various parameters:

http://developer.android.com/guide/publishing/publishing.html

I'm having a heck of a time figuring out how to format a link for my
apps published by my company using this format. For searching by
developer name, the doc says to use the following format:

market://search?q=pub:

It also says it returns exact matches only. My publisher name is
"Polyclef Software".

I guess I'm wondering why Google can't make a market search feature
that searches for substrings in the publisher's name, but aside from
that, how am I supposed to format the link? Neither of the following
work:

market://search?q=pub:Polyclef Software
market://search?q=pub:Polyclef+Software

I've tried a number of variations now and nothing works. 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] passing touch events from one Gallery widget to another widget

2010-02-18 Thread social hub
Hi Guys,

I am trying to pass the same touch events on one widget to the other so they
both scroll at the same time and in same way.


I have two Gallery widgets one above and one below. If the above one is
scrolled then I want to pass the same touch event to the bottom widget so it
also scrolls the same way .

I have tried to use dispatchtouchevent events but I am facing an issue where
in if the bottom gallery widget has some edit text then the edit text gets
the key event and both widgets doesnt scroll anymore.. I have tried to set
focussable and editable to false on edittext even then it gets the touch
events. I think I am going in the right direction. However I need some
assistance in doing the right way.

Thanks in advance for your help

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

[android-developers] singleTask + activity stack not preserved?

2010-02-18 Thread Mark Wyszomierski
Hi,

I have an activity, ActivityA, and its launchMode is set to
"singleTask".

I start the application from the app tray. ActivityA launches
ActivityB from a button click. ActivityB is a normal activity with no
launchMode set ("standard").

With ActivityB on top of the activity stack, I hit the home button,
then resume the app, I see ActivityA instead of ActivityB when
resumed.

Shouldn't the history stack be preserved in this case, and B be
showing? When I resume, I see A get onNewIntent() called, and I'm not
sure why this is happening. I thought the stack would be preserved.

Thanks

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


Re: [android-developers] Re: Is it possible to launch an activity on a certain key sequence?

2010-02-18 Thread Mark Murphy
BillS wrote:
> Sorry, I meant the key sequence would launch my activity. Can you
> elaborate on what it would take?

Again, it would only work if you are trying to launch Activity B from
Activity A, where you wrote both B and A.

The precise techniques will vary based on what Activity A is doing, but
you'll want to look at onKeyDown() and onKeyUp() in Activity.

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

Android Consulting/App Development: http://commonsware.com/consulting

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Causing onMeasure() to be called for an EditView

2010-02-18 Thread skink


On Feb 18, 3:57 pm, poohtbear  wrote:
> ah. the x,y secret.
> I'm using FrameLayout to adjust my TextEdit is specific X,Y's on the
> screen, it's possible sue to FrameLayout's margin layout.
> I set the EditText in the screen according to my GUI's list items, so
> i need the ability to set it to a specific place.
> If not obsolete, i would have used AbsoluteLayout.
>
>

finally i understand: dont use FrameLayout at all

create custom Layout extending ViewGroup instead - it's quite easy

pskink

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


[android-developers] Re: Is it possible to launch an activity on a certain key sequence?

2010-02-18 Thread BillS
Mark,

Sorry, I meant the key sequence would launch my activity. Can you
elaborate on what it would take?

Thanks in advance!

On Feb 18, 8:57 am, Mark Murphy  wrote:
> BillS wrote:
> > For example, typing "321" launches my application.
>
> Only from one of your own activities, and then only with some work.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android App Developer Training:http://commonsware.com/training

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


[android-developers] Decryption "pad block corrupted" error ???

2010-02-18 Thread WoodManEXP
Hello,

Anyone know what night be causing a "pad block corrupted" exception to
be raised with decryption on Android? Here is the scenario:

1. On Windows Java app (NetBeans) read a small file, encrypt its
contents and write it as a new encrypted file.
2. adb push the encrypted file to an Android
3. On Android, open the encrypted file and try to decrypt using same
cipher parameters as set on the Windows side and it gets the "pad
block corrupted" error.

(Running the decryption code on within the Windows Java app decrypts
OK, no "pad block corrupted" error)


Thank you for any ideas!


Here are the relevant code fragments with the trying/catching removed
for clarity.


On Windows Java app (NetBeans)

KeyGenerator kgen = KeyGenerator.getInstance("AES");
SecureRandom secureRandom = new
SecureRandom("MyKey".getBytes());
kgen.init(128, secureRandom);
SecretKey skey = kgen.generateKey();
rawKey = skey.getEncoded();
SecretKeySpec skeySpec = new SecretKeySpec(rawKey, "AES");
cipher = Cipher.getInstance("AES");
cipher.init(Cipher.ENCRYPT_MODE, skeySpec);

FileOutputStream fileOutputStream = new FileOutputStream(new
File("filename"));
CipherOutputStream cipherOutputStream = new
CipherOutputStream(fileOutputStream, cipher);

int numRead = 0;
byte[] buf = new byte[1024];
while ((numRead = iS.read(buf)) >= 0) // iS is an input stream
{
cipherOutputStream.write(buf, 0, numRead);
}
cipherOutputStream.close();


Use ADB to push the encrypted file to the Android


On Android

String cryptKey = "MyKey";
KeyGenerator kgen = KeyGenerator.getInstance("AES");
SecureRandom secureRandom = new
SecureRandom(cryptKey.getBytes());
kgen.init(128, secureRandom);
SecretKey skey = kgen.generateKey();
rawKey = skey.getEncoded();
SecretKeySpec skeySpec = new SecretKeySpec(rawKey, "AES");
cipher = Cipher.getInstance("AES");
cipher.init(Cipher.DECRYPT_MODE, skeySpec);


FileInputStream fileInputStream = new FileInputStream("filename");
CipherInputStream cipherInputStream = new
CipherInputStream(fileInputStream, cipher);
int numRead;
byte[] buf = new byte[1024];
try {
while ((numRead = cipherInputStream.read(buf)) >= 0)
{
if (retStr==null)
retStr = new String(buf, 0, numRead);
else
retStr = retStr.concat(new String(buf, 0, 
numRead));
}
cipherInputStream.close();
} catch (IOException e1) {

// *
// This exception is raised with message "pad block 
corrupted"
// *

}

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Causing onMeasure() to be called for an EditView

2010-02-18 Thread poohtbear
ah. the x,y secret.
I'm using FrameLayout to adjust my TextEdit is specific X,Y's on the
screen, it's possible sue to FrameLayout's margin layout.
I set the EditText in the screen according to my GUI's list items, so
i need the ability to set it to a specific place.
If not obsolete, i would have used AbsoluteLayout.



On Feb 18, 4:43 pm, skink  wrote:
> On Feb 18, 2:52 pm, poohtbear  wrote:
>
> > Here is the code snippet of the C'tor:
> >                 editControl = new MyEditText(context);
> >                 editControl.setBackgroundColor(Color.GREEN);
> >                 editControl.setVisibility(EditText.GONE);
> >                 editControl.setPadding(0, 0, 0, 0);
> >                 editControl.setFocusableInTouchMode(true);
> >                 FrameLayout.LayoutParams params = new
> > FrameLayout.LayoutParams(0, 0,Gravity.TOP|Gravity.LEFT);
> >                 params.setMargins(0, 0, 0, 0);
> >                 editControl.setLayoutParams(params);
> > //              addView(editControl);
> >                 context.addContentView(editControl, params);
> >         }
>
> i don't understand why you use such strange LayoutParams params
> why can't you simply do:
>
> editControl = new EditText(context);
> editControl.setFocusableInTouchMode(true);editControl.setBackgroundColor(Color.GREEN);
> editControl.setVisibility(View.INVISIBLE);
> addView(editControl);
>
> ?
>
> > Basically i didn't have to create my own layout, it allowed later on
> > to use it's onSizeChnaged but basically i don't have to.
>
> ok so probably it will be better to use std FrameLayout

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


Re: [android-developers] Is it possible to launch an activity on a certain key sequence?

2010-02-18 Thread Mark Murphy
BillS wrote:
> For example, typing "321" launches my application.

Only from one of your own activities, and then only with some work.

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

Android App Developer Training: http://commonsware.com/training

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


[android-developers] Is it possible to launch an activity on a certain key sequence?

2010-02-18 Thread BillS
For example, typing "321" launches my application.

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: howto extend LinearLayout?

2010-02-18 Thread Holger
I finally foudn the answer myself. The parameters to layout are
relative to
the parent and should hence not be passed down to the children.

The following works fine:

@Override
protected void onLayout( boolean changed, int l, int t, int r, int b )
{
         int len = getChildCount();
         int w = ((r-l)-(len-1)*PADDING)/len;
         int pos = 0;
         for( int i=0; ihttp://groups.google.com/group/android-developers?hl=en


[android-developers] Deciding which method to call when intent is received

2010-02-18 Thread Babasaheb
Hi,

I am calling a method (say 'action method') of a service from
activity. In that method I am creating a thread which starts some
background process. When that process is complete, an intent (say
'resultIntent') should be sent to activity. Now I want to make sure
that when that intent is received by activity, a specific method (say
'onResultIntentReceived')should handle that, as I can have more than
one methods ('onResultIntentReceived1' and 'onResultIntentReceived2')
to handle that intent depending upon the situation at the time of
calling the service's method. One solution can be somehow registering
the intent handling method with service at the time of calling
service's 'action method'.

Is it possible to send an intent so that a specific action is taken at
receiver side without broadcasting the intent?
Is this correct method?
How can I do that?
Is there any other solution?

Thanks a lot,
Babasaheb

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Causing onMeasure() to be called for an EditView

2010-02-18 Thread skink


On Feb 18, 2:52 pm, poohtbear  wrote:
> Here is the code snippet of the C'tor:


>                 editControl = new MyEditText(context);
>                 editControl.setBackgroundColor(Color.GREEN);
>                 editControl.setVisibility(EditText.GONE);
>                 editControl.setPadding(0, 0, 0, 0);
>                 editControl.setFocusableInTouchMode(true);
>                 FrameLayout.LayoutParams params = new
> FrameLayout.LayoutParams(0, 0,Gravity.TOP|Gravity.LEFT);
>                 params.setMargins(0, 0, 0, 0);
>                 editControl.setLayoutParams(params);
> //              addView(editControl);
>                 context.addContentView(editControl, params);
>         }
>

i don't understand why you use such strange LayoutParams params
why can't you simply do:

editControl = new EditText(context);
editControl.setFocusableInTouchMode(true);editControl.setBackgroundColor(Color.GREEN);
editControl.setVisibility(View.INVISIBLE);
addView(editControl);

?

> Basically i didn't have to create my own layout, it allowed later on
> to use it's onSizeChnaged but basically i don't have to.
>

ok so probably it will be better to use std FrameLayout

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

2010-02-18 Thread wtray
SDK location is a dir where your Android SDK was unpacked and placed.
Are you downloaded Android SDK?

2010/2/17 Sean Magnusen :
> In this section:
> -
> Now modify your Eclipse preferences to point to the Android SDK
> directory:
>
>   1. Select Window > Preferences... to open the Preferences panel
> (Mac OS X: Eclipse > Preferences).
>   2. Select Android from the left panel.
>   3. For the SDK Location in the main panel, click Browse... and
> locate your downloaded SDK directory.
>   4. Click Apply, then OK.
> -
>
> What does "locate your downloaded SDK directory" refer to?  I can't
> find the directory or file on my PC that the Eclipse interface is
> referring to...
>
> Thanks,
> Sean
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


[android-developers] urgent help needed for Home Screen Customization problem

2010-02-18 Thread satish bhoyar
Hi all,

Cant I have my desired content on the HomeScreen of the android?
I want to add some button or any other view.
Only widgets are possible or is there any help related to this.
please give some inputs.

thanks
sat

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

2010-02-18 Thread Arpit
Hello,

Is there a way to change file permission to world readable  when we
use File Api to create a file like this

File file = new File((File)directory, "hello.txt");

here "directory" is private directory other then "files".

Thanks
Arpit Pradhan

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

2010-02-18 Thread Mark Murphy
Kabita wrote:
> Are you working on 2.1? When i power off the phone it hangs? Have you
> face the same thing?

I have had no problems with the Nexus One in terms of powering off the
phone.

Touchscreen issues, yes; power-off issues, no.

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

_Beginning Android_ from Apress Now 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: power down

2010-02-18 Thread Kabita
Hi Mark,
Are you working on 2.1? When i power off the phone it hangs? Have you
face the same thing?


On Feb 17, 7:09 pm, Mark Murphy  wrote:
> Kabitawrote:
> > the problem is..  i have upgrade my h/w device with Eclair 2.1 while
> > playing with the device.
>
> AFAIK, there are no upgrades to 2.1 for any Android device presently on
> the market.
>
> If you are using a modded firmware, please contact the source of that
> firmware.
>
> If this is your own firmware, as I indicated earlier, please ask your
> question on [android-porting].
>
> If this is legitimate firmware from your device manufacturer or mobile
> provider, contact them for technical support.
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 1.9 Available!

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


Re: [android-developers] Re: How to play a media file on emulator

2010-02-18 Thread Saurav
sdcard...

u cant access the hard disk of the system from ur android code.




Regards,
Saurav Mukherjee.
Sent from Coimbatore, TN, India


On Thu, Feb 18, 2010 at 7:16 PM, Dilli rao  wrote:

> one more Q.  local disk means (hard disk or sdcard of emulator)
>
>
>
> On Thu, Feb 18, 2010 at 7:15 PM, Dilli rao wrote:
>
>> you have to start the player in onprepared listener
>>
>> and also check the android media player compatibility with the media file
>> codec ( which you want to play)
>>
>>
>> On Wed, Feb 17, 2010 at 3:39 PM, prachi  wrote:
>>
>>> hey hiii
>>>
>>> I didnt get u u mean to say dat the prob is wid the emulator
>>>
>>> actually my code looks lyk dis --->i hav saved my audio file on
>>> server...
>>> n den runnig dis code
>>>
>>> MediaPlayer m=new MediaPlayer();
>>> m.setDataSource(path);  //path is a String variable containing the
>>> path of audio file stored on server side
>>> m.prepare();
>>> m.start();
>>>
>>> Error it shows is>>>java.io.IOException:Prepare Failed:status=0x1
>>>
>>> can u plzz tell dat this error is coming bcozz dere is some problem
>>> with the emulator.
>>> On Feb 4, 10:37 am, prachi  wrote:
>>> > Hey hii all
>>> >
>>> > I hav a code toruna start a media player a play anaudiofilesaved
>>> > in my local disk.But the code is not running and it is showing an
>>> > exception:
>>> >
>>> > PlayerDriver< PVMFInfoErrorHandlingComplete
>>> >
>>> > Plzz help me out!!
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-developers+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>>
>>
>>
>>
>> --
>> Thank you
>> Dilli Rao
>>
>
>
>
> --
> Thank you
> Dilli 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
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Causing onMeasure() to be called for an EditView

2010-02-18 Thread poohtbear
Here is the code snippet of the C'tor:
 public class CanvasLayout extends FrameLayout
{
public CanvasView canvasView;

public CanvasLayout(Activity context)
{
super(context);
//  setFocusableInTouchMode(true);

canvasView = new CanvasView(context);
canvasView.setFocusableInTouchMode(true);
addView(canvasView);

editControl = new MyEditText(context);
editControl.setBackgroundColor(Color.GREEN);
editControl.setVisibility(EditText.GONE);
editControl.setPadding(0, 0, 0, 0);
editControl.setFocusableInTouchMode(true);
FrameLayout.LayoutParams params = new
FrameLayout.LayoutParams(0, 0,Gravity.TOP|Gravity.LEFT);
params.setMargins(0, 0, 0, 0);
editControl.setLayoutParams(params);
//  addView(editControl);
context.addContentView(editControl, params);
}


Basically i didn't have to create my own layout, it allowed later on
to use it's onSizeChnaged but basically i don't have to.

On Feb 18, 1:15 pm, skink  wrote:
> poohtbear wrote:
> > EditText and Canvas View are both created in the FrameLayout's C'tor
> > (sorry i forgot to to mention it's my own class inheriting from
> > FramLayout and not the original).
> > The first LAyoutParams i give EditText are w:0 h:0 x:0 y:0, each time
> > on resize is called and the item that the EditText is bounded to
> > changes it's size i take that size and set it in the margins and width
> > and height of the layoutParams.
> > The FramLayout is created in onCreate and added with setContentView()
>
> > On Feb 18, 12:26 pm, skink  wrote:
> > > On Feb 18, 10:43 am, poohtbear  wrote:
>
> > > > the hirarchy ?
> > > > It's created in runtime
>
> > > > FramLayout
> > > >        |
> > > >        -CanvasView(extends view) - responsible for drawing
> > > > our UI, overrides onSizeChanged and onDraw.
> > > >        |
> > > >        - EditText, used for binding our UI's focused
> > > > textFields to android's.
>
> > > > So when resize happens:
> > > > 1. FrameLayout onMeasure is called.
> > > >    1.1 CanvasView onMeasure is called.
> > > >    1.2 EditText onMeasure is called <-- problem since new LayoutParams
> > > > are not set yet!
> > > > 2. onLayout called on FrameLayout <-- here the FramLayout will use the
> > > > meausredWidth of Edit Text to lay it out.But the size is wrong
> > > > 3. onSizeChanged is called on FrameLayout and CanvasView <--- here the
> > > > new LayoutParams are set for EditText.
>
> > > > what i need is step no 4: cause onMeasure to be called again, at least
> > > > on EditText and onLayout for FrameLayout, can't manage to do it.
>
> > > ok, when at runtime, you create EditText, how you add it to
> > > FrameLayout?
>
> > > i mean what LayoutParams does your EditText have?
>
> > > pskink
>
> can you post some code snippet how you add children to your custom
> FrameLayout?
>
> and why did you have to create your custom FrameLayout?
>
> pskink

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


Re: [android-developers] Re: How to play a media file on emulator

2010-02-18 Thread Dilli rao
one more Q.  local disk means (hard disk or sdcard of emulator)



On Thu, Feb 18, 2010 at 7:15 PM, Dilli rao  wrote:

> you have to start the player in onprepared listener
>
> and also check the android media player compatibility with the media file
> codec ( which you want to play)
>
>
> On Wed, Feb 17, 2010 at 3:39 PM, prachi  wrote:
>
>> hey hiii
>>
>> I didnt get u u mean to say dat the prob is wid the emulator
>>
>> actually my code looks lyk dis --->i hav saved my audio file on
>> server...
>> n den runnig dis code
>>
>> MediaPlayer m=new MediaPlayer();
>> m.setDataSource(path);  //path is a String variable containing the
>> path of audio file stored on server side
>> m.prepare();
>> m.start();
>>
>> Error it shows is>>>java.io.IOException:Prepare Failed:status=0x1
>>
>> can u plzz tell dat this error is coming bcozz dere is some problem
>> with the emulator.
>> On Feb 4, 10:37 am, prachi  wrote:
>> > Hey hii all
>> >
>> > I hav a code toruna start a media player a play anaudiofilesaved
>> > in my local disk.But the code is not running and it is showing an
>> > exception:
>> >
>> > PlayerDriver< PVMFInfoErrorHandlingComplete
>> >
>> > Plzz help me out!!
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>
>
> --
> Thank you
> Dilli Rao
>



-- 
Thank you
Dilli 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

Re: [android-developers] Re: How to play a media file on emulator

2010-02-18 Thread Dilli rao
you have to start the player in onprepared listener

and also check the android media player compatibility with the media file
codec ( which you want to play)

On Wed, Feb 17, 2010 at 3:39 PM, prachi  wrote:

> hey hiii
>
> I didnt get u u mean to say dat the prob is wid the emulator
>
> actually my code looks lyk dis --->i hav saved my audio file on
> server...
> n den runnig dis code
>
> MediaPlayer m=new MediaPlayer();
> m.setDataSource(path);  //path is a String variable containing the
> path of audio file stored on server side
> m.prepare();
> m.start();
>
> Error it shows is>>>java.io.IOException:Prepare Failed:status=0x1
>
> can u plzz tell dat this error is coming bcozz dere is some problem
> with the emulator.
> On Feb 4, 10:37 am, prachi  wrote:
> > Hey hii all
> >
> > I hav a code toruna start a media player a play anaudiofilesaved
> > in my local disk.But the code is not running and it is showing an
> > exception:
> >
> > PlayerDriver< PVMFInfoErrorHandlingComplete
> >
> > Plzz help me out!!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Thank you
Dilli 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

Re: [android-developers] Down Tab Bar in Android

2010-02-18 Thread Sasikumar.S
Thanks for ur reply

I will try it

On Thu, Feb 18, 2010 at 7:12 PM, Dilli rao  wrote:

> implement your own layout with *tabhost, framelayout *and *tabwidget* you
> can arrange the tabs at bottom of the layout
>
> On Thu, Feb 18, 2010 at 11:06 AM, Sasikumar S 
> wrote:
>
>> Hi,
>>
>>
>> How to show tab bar in down in android like iphone ?
>>
>> Any suggestion?
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>
>
> --
> Thank you
> Dilli 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




-- 
Thanks & Regards
Sasikumar.S

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

2010-02-18 Thread Dilli rao
implement your own layout with *tabhost, framelayout *and *tabwidget* you
can arrange the tabs at bottom of the layout

On Thu, Feb 18, 2010 at 11:06 AM, Sasikumar S wrote:

> Hi,
>
>
> How to show tab bar in down in android like iphone ?
>
> Any suggestion?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
Thank you
Dilli 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

Re: [android-developers] Re: Listview Text Filter Slow

2010-02-18 Thread Sasikumar.S
Thanks for reply...

I will see it & then i will intimate you.

On Thu, Feb 18, 2010 at 7:00 PM, skink  wrote:

>
>
> Sasikumar.S wrote:
> > Thanks for reply.
> >
> > Its helps for me.?
> >
> > Any particular part to read in that ?
> >
>
> step 2 & 12
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Thanks & Regards
Sasikumar.S

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

Re: [android-developers] Re: Listview Text Filter Slow

2010-02-18 Thread skink


Sasikumar.S wrote:
> Thanks for reply.
>
> Its helps for me.?
>
> Any particular part to read in that ?
>

step 2 & 12

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

2010-02-18 Thread Mark Murphy
Petroleum Nasby wrote:
> I need multiple notifications to appear in the dropdown notifier window.

That's not a good idea in general.

> But when I add multiple notifications, multiple icons appear in the
> status bar. 

Correct. That's part of the reason why that's not a good idea in general.

I only advise this if the notifications are substantially different. For
example, having one notification per unread email message is a poor UI.
Having one notification for unread email and one notification for unread
Twitter messages is better, though of uncertain value to the user.

> It
> is possible to have a red number overlaid on the icon, but in order to
> do this,
> one must apparently overwrite earlier notifications, losing that needed
> information.

What "needed information"?

> How do I have multiple notifications represented by a single overlaid
> red number on
> one icon, which matches the number of notifications in the dropdown,
> without losing them?

You can't. The number of icons in the status bar will match the number
of icons in the notification drawer ("dropdown").

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

Android Training...At Your Office: http://commonsware.com/training

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


Re: [android-developers] Re: Listview Text Filter Slow

2010-02-18 Thread Sasikumar.S
Thanks for reply.

Its helps for me.?

Any particular part to read in that ?

On Thu, Feb 18, 2010 at 6:43 PM, skink  wrote:

>
>
> On Feb 18, 2:09 pm, "Sasikumar.S"  wrote:
> > Why you sent empty mail?..
> >
> >
> >
> >
>
> i was too fast...
>
> read notepad tutorial
>
>
> http://developer.android.com/intl/de/resources/tutorials/notepad/notepad-ex1.html
>
> pskink
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Thanks & Regards
Sasikumar.S

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

[android-developers] Re: Listview Text Filter Slow

2010-02-18 Thread skink


On Feb 18, 2:09 pm, "Sasikumar.S"  wrote:
> Why you sent empty mail?..
>
>
>
>

i was too fast...

read notepad tutorial

http://developer.android.com/intl/de/resources/tutorials/notepad/notepad-ex1.html

pskink

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


Re: [android-developers] Hide address bar while launching native browser

2010-02-18 Thread Mark Murphy
SAM wrote:
> I am able to launch browser and open site "google.com" and from my App
> succesfully. I have a requirement that when the browser is laucnhed
> from my application, I have to hide the address bar visible at top for
> that browser session.
> 
> So can think of that I dont want the address that I am trying to open
> to be visible to users.
> 
> Please let me if this is possible and and if yes how.

You will need to implement your own browser using WebView. You have no
way of controlling that aspect of the Browser application's behavior
from an SDK application.

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

Android Training...At Your Office: http://commonsware.com/training

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


Re: [android-developers] Re: Listview Text Filter Slow

2010-02-18 Thread Sasikumar.S
Why you sent empty mail?..

On Thu, Feb 18, 2010 at 6:38 PM, skink  wrote:

>
>
> On Feb 18, 1:39 pm, "Sasikumar.S"  wrote:
> > Thanks for reply.
> > I'm new to android.
> > can u please tell how to use cursor adapter? or any sample program ?.
> >
> >
> >
> >
> >
> > On Thu, Feb 18, 2010 at 6:08 PM, skink  wrote:
> >
> > > On Feb 18, 12:53 pm, "Sasikumar.S"  wrote:
> > > > Thanks for reply
> > > > See my code.. How i'm filtering text.
> >
> > > > public class ListviewFilterExample extends Activity
> > > > {
> > > >  private ListView lv1;
> > > >  private String
> > > > lv_arr[]={"Android","iPhone","BlackBerry","AndroidPeople","J2ME",
> > > > "Listview","ArrayAdapter","ListItem","Us","UK","India"};
> > > > @Override
> > > >  public void onCreate(Bundle icicle)
> > > >  {
> > > >  super.onCreate(icicle);
> > > >  setContentView(R.layout.main);
> > > >  lv1=(ListView)findViewById(R.id.ListView01);
> > > >  lv1.setAdapter(new
> > > > ArrayAdapter(this,android.R.layout.simple_list_item_1 ,
> lv_arr));
> > > >  lv1.setTextFilterEnabled(true);
> >
> > > > }
> > > > }
> >
> > > > Here in string lv_arr[] i'm giving less than 15 items. But in my
> program
> > > i'm
> > > > adding more than 2500 items.
> >
> > > > Please see my code and give some suggestion.
> >
> > > > On Thu, Feb 18, 2010 at 5:19 PM, skink  wrote:
> >
> > > > > On Feb 18, 12:35 pm, "Sasikumar.S" 
> wrote:
> > > > > > Thank for your reply.
> > > > > > Ya pskink.
> >
> > > > > > But i must give 2500 items in list.
> > > > > > Its like A,B,C,D in Alphabet.
> > > > > > we need to show all 26 Alphabets, not some alphabets.
> >
> > > > > > can you please some other idea ?...
> >
> > > > > > On Thu, Feb 18, 2010 at 5:01 PM, skink  wrote:
> >
> > > > > > > On Feb 18, 12:06 pm, "Sasikumar.S"  >
> > > wrote:
> > > > > > > > Hi,
> >
> > > > > > > > In my listview i'm adding more than 2500 items. When i try to
> use
> > > > > text
> > > > > > > > filter option it is taking more time to filter.
> >
> > > > > > > > I asked this question in android groups already.
> > > > > > > > But i can't get the answer what i expected.
> >
> > > > > > > > Please any one know about these ?..
> >
> > > > > > > > --
> > > > > > > > Thanks & Regards
> > > > > > > > Sasikumar.S
> >
> > > > > > > i think you have to think your ui over
> >
> > > > > > > even with filtering nobody will be happy seeing 2k+ items in
> the
> > > list
> >
> > > > > > > pskink
> >
> > > > > > > --
> > > > > > > You received this message because you are subscribed to the
> Google
> > > > > > > Groups "Android Developers" group.
> > > > > > > To post to this group, send email to
> > > > > android-developers@googlegroups.com
> > > > > > > To unsubscribe from this group, send email to
> > > > > > > android-developers+unsubscr...@googlegroups.com
> 
> > > 
> > > > > 
> > > > > > > For more options, visit this group at
> > > > > > >http://groups.google.com/group/android-developers?hl=en
> >
> > > > > > --
> > > > > > Thanks & Regards
> > > > > > Sasikumar.S
> >
> > > > > what adapter do you use and how you filter out your items?
> >
> > > > > pskink
> >
> > > > > --
> > > > > You received this message because you are subscribed to the Google
> > > > > Groups "Android Developers" group.
> > > > > To post to this group, send email to
> > > android-developers@googlegroups.com
> > > > > To unsubscribe from this group, send email to
> > > > > android-developers+unsubscr...@googlegroups.com
> 
> > > 
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/android-developers?hl=en
> >
> > > > --
> > > > Thanks & Regards
> > > > Sasikumar.S
> >
> > > seems that ArrayAdapter is not efficient in filtering that many items
> >
> > > try to use CursorAdapter
> >
> > > pskink
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> 
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
> >
> > --
> > Thanks & Regards
> > Sasikumar.S
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Thanks & Regards
Sasikumar.S

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

Re: [android-developers] Re: Restarting a MediaPlayer

2010-02-18 Thread Mark Murphy
Steeler wrote:
> But is the GC deleting the old ones? 

Eventually, presumably, yes. Bear in mind that MediaPlayer probably
holds onto some buffers outside of the GC-able space. Also, bear in mind
that GC is not necessarily immediate.

> And if not, are they clogging a
> page file?

I am not aware of Android having a page file.

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

Android Training...At Your Office: http://commonsware.com/training

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


[android-developers] Re: Listview Text Filter Slow

2010-02-18 Thread skink


On Feb 18, 1:39 pm, "Sasikumar.S"  wrote:
> Thanks for reply.
> I'm new to android.
> can u please tell how to use cursor adapter? or any sample program ?.
>
>
>
>
>
> On Thu, Feb 18, 2010 at 6:08 PM, skink  wrote:
>
> > On Feb 18, 12:53 pm, "Sasikumar.S"  wrote:
> > > Thanks for reply
> > > See my code.. How i'm filtering text.
>
> > > public class ListviewFilterExample extends Activity
> > > {
> > >  private ListView lv1;
> > >  private String
> > > lv_arr[]={"Android","iPhone","BlackBerry","AndroidPeople","J2ME",
> > > "Listview","ArrayAdapter","ListItem","Us","UK","India"};
> > > @Override
> > >  public void onCreate(Bundle icicle)
> > >  {
> > >  super.onCreate(icicle);
> > >  setContentView(R.layout.main);
> > >  lv1=(ListView)findViewById(R.id.ListView01);
> > >  lv1.setAdapter(new
> > > ArrayAdapter(this,android.R.layout.simple_list_item_1 , lv_arr));
> > >  lv1.setTextFilterEnabled(true);
>
> > > }
> > > }
>
> > > Here in string lv_arr[] i'm giving less than 15 items. But in my program
> > i'm
> > > adding more than 2500 items.
>
> > > Please see my code and give some suggestion.
>
> > > On Thu, Feb 18, 2010 at 5:19 PM, skink  wrote:
>
> > > > On Feb 18, 12:35 pm, "Sasikumar.S"  wrote:
> > > > > Thank for your reply.
> > > > > Ya pskink.
>
> > > > > But i must give 2500 items in list.
> > > > > Its like A,B,C,D in Alphabet.
> > > > > we need to show all 26 Alphabets, not some alphabets.
>
> > > > > can you please some other idea ?...
>
> > > > > On Thu, Feb 18, 2010 at 5:01 PM, skink  wrote:
>
> > > > > > On Feb 18, 12:06 pm, "Sasikumar.S" 
> > wrote:
> > > > > > > Hi,
>
> > > > > > > In my listview i'm adding more than 2500 items. When i try to use
> > > > text
> > > > > > > filter option it is taking more time to filter.
>
> > > > > > > I asked this question in android groups already.
> > > > > > > But i can't get the answer what i expected.
>
> > > > > > > Please any one know about these ?..
>
> > > > > > > --
> > > > > > > Thanks & Regards
> > > > > > > Sasikumar.S
>
> > > > > > i think you have to think your ui over
>
> > > > > > even with filtering nobody will be happy seeing 2k+ items in the
> > list
>
> > > > > > pskink
>
> > > > > > --
> > > > > > You received this message because you are subscribed to the Google
> > > > > > Groups "Android Developers" group.
> > > > > > To post to this group, send email to
> > > > android-developers@googlegroups.com
> > > > > > To unsubscribe from this group, send email to
> > > > > > android-developers+unsubscr...@googlegroups.com
> > 
> > > > 
> > > > > > For more options, visit this group at
> > > > > >http://groups.google.com/group/android-developers?hl=en
>
> > > > > --
> > > > > Thanks & Regards
> > > > > Sasikumar.S
>
> > > > what adapter do you use and how you filter out your items?
>
> > > > pskink
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to
> > android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscr...@googlegroups.com
> > 
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
>
> > > --
> > > Thanks & Regards
> > > Sasikumar.S
>
> > seems that ArrayAdapter is not efficient in filtering that many items
>
> > try to use CursorAdapter
>
> > pskink
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Thanks & Regards
> Sasikumar.S

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


[android-developers] Delay Tolerant Networking (DTN) Protocol

2010-02-18 Thread Emre A. Yavuz


Hi,

 

Does anybody know whether Delay Tolerant Networking (DTN) protocol has been 
added to Android's mobile stack or not ? Any references or links would be great 
if you're aware of a group, webpage, code repository etc.

 

Cheers,

 

Emre
  
_
Introducing Windows® phone.
http://go.microsoft.com/?linkid=9708122

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

[android-developers] A good opportunity to investment

2010-02-18 Thread anitha raj
Social Networking has been effectively used in reaching the goal of
bringing down the prices of costly items through volume shopping. Go
shopping with  http://www.shoppingreps.com?SourceId=1243
You can earn online, NO INVESTMENT, NO DEPOSIT, NO MLM and NO JOINING
FEES! http://www.shoppingreps.com?SourceId=1243  DON'T miss this
opportunity, join today for free, and earn more without paying single
rupees...NO SCAM ALL THE BEST

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


Re: [android-developers] Re: Listview Text Filter Slow

2010-02-18 Thread Sasikumar.S
Thanks for reply.
I'm new to android.
can u please tell how to use cursor adapter? or any sample program ?.

On Thu, Feb 18, 2010 at 6:08 PM, skink  wrote:

>
>
> On Feb 18, 12:53 pm, "Sasikumar.S"  wrote:
> > Thanks for reply
> > See my code.. How i'm filtering text.
> >
> > public class ListviewFilterExample extends Activity
> > {
> >  private ListView lv1;
> >  private String
> > lv_arr[]={"Android","iPhone","BlackBerry","AndroidPeople","J2ME",
> > "Listview","ArrayAdapter","ListItem","Us","UK","India"};
> > @Override
> >  public void onCreate(Bundle icicle)
> >  {
> >  super.onCreate(icicle);
> >  setContentView(R.layout.main);
> >  lv1=(ListView)findViewById(R.id.ListView01);
> >  lv1.setAdapter(new
> > ArrayAdapter(this,android.R.layout.simple_list_item_1 , lv_arr));
> >  lv1.setTextFilterEnabled(true);
> >
> > }
> > }
> >
> > Here in string lv_arr[] i'm giving less than 15 items. But in my program
> i'm
> > adding more than 2500 items.
> >
> > Please see my code and give some suggestion.
> >
> >
> >
> >
> >
> > On Thu, Feb 18, 2010 at 5:19 PM, skink  wrote:
> >
> > > On Feb 18, 12:35 pm, "Sasikumar.S"  wrote:
> > > > Thank for your reply.
> > > > Ya pskink.
> >
> > > > But i must give 2500 items in list.
> > > > Its like A,B,C,D in Alphabet.
> > > > we need to show all 26 Alphabets, not some alphabets.
> >
> > > > can you please some other idea ?...
> >
> > > > On Thu, Feb 18, 2010 at 5:01 PM, skink  wrote:
> >
> > > > > On Feb 18, 12:06 pm, "Sasikumar.S" 
> wrote:
> > > > > > Hi,
> >
> > > > > > In my listview i'm adding more than 2500 items. When i try to use
> > > text
> > > > > > filter option it is taking more time to filter.
> >
> > > > > > I asked this question in android groups already.
> > > > > > But i can't get the answer what i expected.
> >
> > > > > > Please any one know about these ?..
> >
> > > > > > --
> > > > > > Thanks & Regards
> > > > > > Sasikumar.S
> >
> > > > > i think you have to think your ui over
> >
> > > > > even with filtering nobody will be happy seeing 2k+ items in the
> list
> >
> > > > > pskink
> >
> > > > > --
> > > > > You received this message because you are subscribed to the Google
> > > > > Groups "Android Developers" group.
> > > > > To post to this group, send email to
> > > android-developers@googlegroups.com
> > > > > To unsubscribe from this group, send email to
> > > > > android-developers+unsubscr...@googlegroups.com
> 
> > > 
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/android-developers?hl=en
> >
> > > > --
> > > > Thanks & Regards
> > > > Sasikumar.S
> >
> > > what adapter do you use and how you filter out your items?
> >
> > > pskink
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> 
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
> >
> > --
> > Thanks & Regards
> > Sasikumar.S
>
> seems that ArrayAdapter is not efficient in filtering that many items
>
> try to use CursorAdapter
>
> pskink
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Thanks & Regards
Sasikumar.S

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

[android-developers] Re: Listview Text Filter Slow

2010-02-18 Thread skink


On Feb 18, 12:53 pm, "Sasikumar.S"  wrote:
> Thanks for reply
> See my code.. How i'm filtering text.
>
> public class ListviewFilterExample extends Activity
> {
>  private ListView lv1;
>  private String
> lv_arr[]={"Android","iPhone","BlackBerry","AndroidPeople","J2ME",
> "Listview","ArrayAdapter","ListItem","Us","UK","India"};
> @Override
>  public void onCreate(Bundle icicle)
>  {
>  super.onCreate(icicle);
>  setContentView(R.layout.main);
>  lv1=(ListView)findViewById(R.id.ListView01);
>  lv1.setAdapter(new
> ArrayAdapter(this,android.R.layout.simple_list_item_1 , lv_arr));
>  lv1.setTextFilterEnabled(true);
>
> }
> }
>
> Here in string lv_arr[] i'm giving less than 15 items. But in my program i'm
> adding more than 2500 items.
>
> Please see my code and give some suggestion.
>
>
>
>
>
> On Thu, Feb 18, 2010 at 5:19 PM, skink  wrote:
>
> > On Feb 18, 12:35 pm, "Sasikumar.S"  wrote:
> > > Thank for your reply.
> > > Ya pskink.
>
> > > But i must give 2500 items in list.
> > > Its like A,B,C,D in Alphabet.
> > > we need to show all 26 Alphabets, not some alphabets.
>
> > > can you please some other idea ?...
>
> > > On Thu, Feb 18, 2010 at 5:01 PM, skink  wrote:
>
> > > > On Feb 18, 12:06 pm, "Sasikumar.S"  wrote:
> > > > > Hi,
>
> > > > > In my listview i'm adding more than 2500 items. When i try to use
> > text
> > > > > filter option it is taking more time to filter.
>
> > > > > I asked this question in android groups already.
> > > > > But i can't get the answer what i expected.
>
> > > > > Please any one know about these ?..
>
> > > > > --
> > > > > Thanks & Regards
> > > > > Sasikumar.S
>
> > > > i think you have to think your ui over
>
> > > > even with filtering nobody will be happy seeing 2k+ items in the list
>
> > > > pskink
>
> > > > --
> > > > You received this message because you are subscribed to the Google
> > > > Groups "Android Developers" group.
> > > > To post to this group, send email to
> > android-developers@googlegroups.com
> > > > To unsubscribe from this group, send email to
> > > > android-developers+unsubscr...@googlegroups.com
> > 
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/android-developers?hl=en
>
> > > --
> > > Thanks & Regards
> > > Sasikumar.S
>
> > what adapter do you use and how you filter out your items?
>
> > pskink
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Thanks & Regards
> Sasikumar.S

seems that ArrayAdapter is not efficient in filtering that many items

try to use CursorAdapter

pskink

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


[android-developers] We need a Drag and Drop control for Android

2010-02-18 Thread Kumar Bibek
Hello folks,

Android lacks Drag and Drop feature/control. I don't really know why
it's not there. It's still possible to implement this feature, but you
will have a to do a lot of coding. I think this should be a part of
the framework. The iPhone has it already. :(

I do understand that people at google must be working on this, but
there has been so many releases, and we still don't have any updates
about this. Please make it simpler.

Thanks and Regards,
Kumar Bibek

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


[android-developers] Camera on HTC Hero: Calling camera.autoFocus(...) gives a IOException .. ?

2010-02-18 Thread Streets Of Boston
This is the stack trace:

Android OS: 1.5
Model: HERO200
Make: heroc:sprint

Caused by: java.io.IOException: autoFocus failed
at android.hardware.Camera.native_autoFocus(Native Method)
at android.hardware.Camera.autoFocus(Camera.java:313)
at com.streetsofboston.smugdroid.snapfx.camera.SmugCamera
$Preview.autoFocus(SmugCamera.java:1492)


This exception is not documented. The JavaDoc of Camea.autoFocus does
not mention this exception at all.
How can i prevent this from happening or can i just catch it and
continue to instruct the camera to take a picture.

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] Notification manager question

2010-02-18 Thread Petroleum Nasby
I need multiple notifications to appear in the dropdown notifier window.
But when I add multiple notifications, multiple icons appear in the status
bar. It
is possible to have a red number overlaid on the icon, but in order to do
this,
one must apparently overwrite earlier notifications, losing that needed
information.
I can have multiple icons, each with a overlaid "1", but that defeats the
purpose
of the overlay. I saw the "tag" argument, thinking clearly that it is
supposed to
solve exactly this problem. But "tag" seems to have no effect, so I am
not sure of its purpose now.

How do I have multiple notifications represented by a single overlaid red
number on
one icon, which matches the number of notifications in the dropdown, without
losing them?

P. V. Nasby

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

2010-02-18 Thread Tze Yun, Glenn Poh
Thanks! :) Will give tat a try :)

On Feb 16, 7:38 pm, Андрей Бабинов  wrote:
> How I know, better to transform the scene, not a camera. It would be faster.
> And you can use rotationMatrix directly for scene transformation.
>
> 2010/2/15 Tze Yun, Glenn Poh :
>
>
>
> > I'm using getRotationMatrix and getOrientation to change the camera's
> > view (eyeX, eyeY and eyeZ for the gluLookAt method) on the 3D objects
> > generated depending on the movement of the user but I'm not getting
> > any results. All I'm getting is a blank screen. Which part of the
> > process am I doing it wrong? Any help will be great. :)
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: AudioTrack lag

2010-02-18 Thread ani
we would really appreciate if you can explain "both buffers"?Which
buffers are you referring here.

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

2010-02-18 Thread ani
we would really appreciate if you can explain "both buffers"?Which
buffers are you referring here.

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

2010-02-18 Thread ani
we would really appreciate if you can explain "both buffers"?Which
buffers are you referring here.

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

2010-02-18 Thread ani
we would really appreciate if you can explain "both buffers"?Which
buffers are you referring here.

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

2010-02-18 Thread Sasikumar S
Thanks for reply to both of you.

On Feb 18, 12:47 pm, jotobjects  wrote:
> Also see android.app.TabActivity
>
> On Feb 17, 10:17 pm, Sandeep Phansekar 
> wrote:
>
>
>
> > Hi
>
> > used ImageButton with AbsoluteLayout
>
> >  > android:layout_width="64px"
> > android:layout_height="wrap_content"
> > android:layout_x="0px"
> > android:layout_y="370px"
> > android:background="@drawable/image1"/>
>
> > may this help you.
> > --
> > Regards
> > Sandeep
>
> > On Thu, Feb 18, 2010 at 11:00 AM, Sasikumar S 
> > wrote:
>
> > > Hi,
>
> > > How to show tab bar in android?
>
> > > How to do that?
>
> > > I need not menu items by pressing menu button. I need a tab bar.
>
> > > Any suggestions ?
>
> > > --
> > > Thanks & Regards
> > > Sasikumar.S
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com > >  cr...@googlegroups.com>
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Re: Listview Text Filter Slow

2010-02-18 Thread Sasikumar.S
Thanks for reply
See my code.. How i'm filtering text.

public class ListviewFilterExample extends Activity
{
 private ListView lv1;
 private String
lv_arr[]={"Android","iPhone","BlackBerry","AndroidPeople","J2ME",
"Listview","ArrayAdapter","ListItem","Us","UK","India"};
@Override
 public void onCreate(Bundle icicle)
 {
 super.onCreate(icicle);
 setContentView(R.layout.main);
 lv1=(ListView)findViewById(R.id.ListView01);
 lv1.setAdapter(new
ArrayAdapter(this,android.R.layout.simple_list_item_1 , lv_arr));
 lv1.setTextFilterEnabled(true);
}
}

Here in string lv_arr[] i'm giving less than 15 items. But in my program i'm
adding more than 2500 items.

Please see my code and give some suggestion.


On Thu, Feb 18, 2010 at 5:19 PM, skink  wrote:

>
>
> On Feb 18, 12:35 pm, "Sasikumar.S"  wrote:
> > Thank for your reply.
> > Ya pskink.
> >
> > But i must give 2500 items in list.
> > Its like A,B,C,D in Alphabet.
> > we need to show all 26 Alphabets, not some alphabets.
> >
> > can you please some other idea ?...
> >
> >
> >
> >
> >
> > On Thu, Feb 18, 2010 at 5:01 PM, skink  wrote:
> >
> > > On Feb 18, 12:06 pm, "Sasikumar.S"  wrote:
> > > > Hi,
> >
> > > > In my listview i'm adding more than 2500 items. When i try to use
> text
> > > > filter option it is taking more time to filter.
> >
> > > > I asked this question in android groups already.
> > > > But i can't get the answer what i expected.
> >
> > > > Please any one know about these ?..
> >
> > > > --
> > > > Thanks & Regards
> > > > Sasikumar.S
> >
> > > i think you have to think your ui over
> >
> > > even with filtering nobody will be happy seeing 2k+ items in the list
> >
> > > pskink
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> 
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
> >
> > --
> > Thanks & Regards
> > Sasikumar.S
>
> what adapter do you use and how you filter out your items?
>
> pskink
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Thanks & Regards
Sasikumar.S

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

[android-developers] Re: Listview Text Filter Slow

2010-02-18 Thread skink


On Feb 18, 12:35 pm, "Sasikumar.S"  wrote:
> Thank for your reply.
> Ya pskink.
>
> But i must give 2500 items in list.
> Its like A,B,C,D in Alphabet.
> we need to show all 26 Alphabets, not some alphabets.
>
> can you please some other idea ?...
>
>
>
>
>
> On Thu, Feb 18, 2010 at 5:01 PM, skink  wrote:
>
> > On Feb 18, 12:06 pm, "Sasikumar.S"  wrote:
> > > Hi,
>
> > > In my listview i'm adding more than 2500 items. When i try to use text
> > > filter option it is taking more time to filter.
>
> > > I asked this question in android groups already.
> > > But i can't get the answer what i expected.
>
> > > Please any one know about these ?..
>
> > > --
> > > Thanks & Regards
> > > Sasikumar.S
>
> > i think you have to think your ui over
>
> > even with filtering nobody will be happy seeing 2k+ items in the list
>
> > pskink
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Thanks & Regards
> Sasikumar.S

what adapter do you use and how you filter out your items?

pskink

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


[android-developers] Android SDK 1.5 Folder import in Project Explorer

2010-02-18 Thread Sasikumar.S
Hi,

How to import all android sdk 1.5 sample programs in eclipse?..

any one know ?

-- 
Thanks & Regards
Sasikumar.S

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

Re: [android-developers] Re: Listview Text Filter Slow

2010-02-18 Thread Sasikumar.S
Thank for your reply.
Ya pskink.

But i must give 2500 items in list.
Its like A,B,C,D in Alphabet.
we need to show all 26 Alphabets, not some alphabets.

can you please some other idea ?...

On Thu, Feb 18, 2010 at 5:01 PM, skink  wrote:

>
>
> On Feb 18, 12:06 pm, "Sasikumar.S"  wrote:
> > Hi,
> >
> > In my listview i'm adding more than 2500 items. When i try to use text
> > filter option it is taking more time to filter.
> >
> > I asked this question in android groups already.
> > But i can't get the answer what i expected.
> >
> > Please any one know about these ?..
> >
> > --
> > Thanks & Regards
> > Sasikumar.S
>
> i think you have to think your ui over
>
> even with filtering nobody will be happy seeing 2k+ items in the list
>
> pskink
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en




-- 
Thanks & Regards
Sasikumar.S

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

[android-developers] Re: Listview Text Filter Slow

2010-02-18 Thread skink


On Feb 18, 12:06 pm, "Sasikumar.S"  wrote:
> Hi,
>
> In my listview i'm adding more than 2500 items. When i try to use text
> filter option it is taking more time to filter.
>
> I asked this question in android groups already.
> But i can't get the answer what i expected.
>
> Please any one know about these ?..
>
> --
> Thanks & Regards
> Sasikumar.S

i think you have to think your ui over

even with filtering nobody will be happy seeing 2k+ items in the list

pskink

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


[android-developers] Re: Causing onMeasure() to be called for an EditView

2010-02-18 Thread skink


poohtbear wrote:
> EditText and Canvas View are both created in the FrameLayout's C'tor
> (sorry i forgot to to mention it's my own class inheriting from
> FramLayout and not the original).
> The first LAyoutParams i give EditText are w:0 h:0 x:0 y:0, each time
> on resize is called and the item that the EditText is bounded to
> changes it's size i take that size and set it in the margins and width
> and height of the layoutParams.
> The FramLayout is created in onCreate and added with setContentView()
>
>
> On Feb 18, 12:26 pm, skink  wrote:
> > On Feb 18, 10:43 am, poohtbear  wrote:
> >
> >
> >
> > > the hirarchy ?
> > > It's created in runtime
> >
> > > FramLayout
> > >        |
> > >        -CanvasView(extends view) - responsible for drawing
> > > our UI, overrides onSizeChanged and onDraw.
> > >        |
> > >        - EditText, used for binding our UI's focused
> > > textFields to android's.
> >
> > > So when resize happens:
> > > 1. FrameLayout onMeasure is called.
> > >    1.1 CanvasView onMeasure is called.
> > >    1.2 EditText onMeasure is called <-- problem since new LayoutParams
> > > are not set yet!
> > > 2. onLayout called on FrameLayout <-- here the FramLayout will use the
> > > meausredWidth of Edit Text to lay it out.But the size is wrong
> > > 3. onSizeChanged is called on FrameLayout and CanvasView <--- here the
> > > new LayoutParams are set for EditText.
> >
> > > what i need is step no 4: cause onMeasure to be called again, at least
> > > on EditText and onLayout for FrameLayout, can't manage to do it.
> >
> > ok, when at runtime, you create EditText, how you add it to
> > FrameLayout?
> >
> > i mean what LayoutParams does your EditText have?
> >
> > pskink

can you post some code snippet how you add children to your custom
FrameLayout?

and why did you have to create your custom FrameLayout?

pskink

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


[android-developers] Listview Text Filter Slow

2010-02-18 Thread Sasikumar.S
Hi,

In my listview i'm adding more than 2500 items. When i try to use text
filter option it is taking more time to filter.

I asked this question in android groups already.
But i can't get the answer what i expected.

Please any one know about these ?..


-- 
Thanks & Regards
Sasikumar.S

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Causing onMeasure() to be called for an EditView

2010-02-18 Thread poohtbear
EditText and Canvas View are both created in the FrameLayout's C'tor
(sorry i forgot to to mention it's my own class inheriting from
FramLayout and not the original).
The first LAyoutParams i give EditText are w:0 h:0 x:0 y:0, each time
on resize is called and the item that the EditText is bounded to
changes it's size i take that size and set it in the margins and width
and height of the layoutParams.
The FramLayout is created in onCreate and added with setContentView()


On Feb 18, 12:26 pm, skink  wrote:
> On Feb 18, 10:43 am, poohtbear  wrote:
>
>
>
> > the hirarchy ?
> > It's created in runtime
>
> > FramLayout
> >        |
> >        -CanvasView(extends view) - responsible for drawing
> > our UI, overrides onSizeChanged and onDraw.
> >        |
> >        - EditText, used for binding our UI's focused
> > textFields to android's.
>
> > So when resize happens:
> > 1. FrameLayout onMeasure is called.
> >    1.1 CanvasView onMeasure is called.
> >    1.2 EditText onMeasure is called <-- problem since new LayoutParams
> > are not set yet!
> > 2. onLayout called on FrameLayout <-- here the FramLayout will use the
> > meausredWidth of Edit Text to lay it out.But the size is wrong
> > 3. onSizeChanged is called on FrameLayout and CanvasView <--- here the
> > new LayoutParams are set for EditText.
>
> > what i need is step no 4: cause onMeasure to be called again, at least
> > on EditText and onLayout for FrameLayout, can't manage to do it.
>
> ok, when at runtime, you create EditText, how you add it to
> FrameLayout?
>
> i mean what LayoutParams does your EditText have?
>
> pskink

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


[android-developers] Re: Causing onMeasure() to be called for an EditView

2010-02-18 Thread skink


On Feb 18, 10:43 am, poohtbear  wrote:
> the hirarchy ?
> It's created in runtime
>
> FramLayout
>        |
>        -CanvasView(extends view) - responsible for drawing
> our UI, overrides onSizeChanged and onDraw.
>        |
>        - EditText, used for binding our UI's focused
> textFields to android's.
>
> So when resize happens:
> 1. FrameLayout onMeasure is called.
>    1.1 CanvasView onMeasure is called.
>    1.2 EditText onMeasure is called <-- problem since new LayoutParams
> are not set yet!
> 2. onLayout called on FrameLayout <-- here the FramLayout will use the
> meausredWidth of Edit Text to lay it out.But the size is wrong
> 3. onSizeChanged is called on FrameLayout and CanvasView <--- here the
> new LayoutParams are set for EditText.
>
> what i need is step no 4: cause onMeasure to be called again, at least
> on EditText and onLayout for FrameLayout, can't manage to do it.
>
>

ok, when at runtime, you create EditText, how you add it to
FrameLayout?

i mean what LayoutParams does your EditText have?

pskink

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


[android-developers] Store contact name in emulator phonebook.

2010-02-18 Thread Pranav
Hi all,

I am able to retrieve contact name from emulator phonebook using the
above code:


public  class TestContacts extends  Activity {
/** Called when the activity is first created. */

 ContentResolver contentResolver;
 Cursor cursor;
 String id, name;
 TextView tv;

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

tv = (TextView)findViewById(R.id.txtView);

contentResolver = getContentResolver();
cursor =
contentResolver.query(ContactsContract.Contacts.CONTENT_URI, null,
null, null, null);
if (cursor.getCount() > 0) {
  while (cursor.moveToNext()) {
   String id =
cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts._ID));
   System.out.println("ID: "+id);

   String name =
cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));
   System.out.println("Name: "+name);
   tv.append("ID: "+id+" "+"Name: "+name+"\n");
  }
}
}
}
___

But i want to add contact name in emulator phonebook and i tried it
using the below code but anyhow i could not able to see the contact
name in phonebook where as i also trace out something from logcat.
___
...
ContentValues values = new ContentValues();
values.put(People.NAME, "Test");
Uri uri = getContentResolver().insert(People.CONTENT_URI, values);
if(uri == null){
 System.out.println("NEW URI");
}
...
___

Infect, when i run the application for adding the new contact, i found
this from the logcat:

___
02-18 13:18:53.667: DEBUG/AccountManagerService(60): bind attempt
failed for Session: expectLaunch false, connected false, stats
(0/0/0), lifetime 0.082, getAccountsByTypeAndFeatures,
legacy_hosted_or_google
02-18 13:18:53.727: ERROR/ContactsProvider(108): Cannot determine the
default account for contacts compatibility
02-18 13:18:53.727: ERROR/ContactsProvider(108):
android.accounts.AuthenticatorException: bind failure
02-18 13:18:53.727: ERROR/ContactsProvider(108): at
android.accounts.AccountManager.convertErrorToException(AccountManager.java:
659)
02-18 13:18:53.727: ERROR/ContactsProvider(108): at
android.accounts.AccountManager.access$500(AccountManager.java:53)
02-18 13:18:53.727: ERROR/ContactsProvider(108): at
android.accounts.AccountManager$BaseFutureTask
$Response.onError(AccountManager.java:566)
02-18 13:18:53.727: ERROR/ContactsProvider(108): at
android.accounts.IAccountManagerResponse
$Stub.onTransact(IAccountManagerResponse.java:69)
02-18 13:18:53.727: ERROR/ContactsProvider(108): at
android.os.Binder.execTransact(Binder.java:287)
02-18 13:18:53.727: ERROR/ContactsProvider(108): at
dalvik.system.NativeStart.run(Native Method)
02-18 13:18:54.037: INFO/ContactAggregator(108): Contact aggregation:
1
02-18 13:18:54.197: INFO/ContactAggregator(108): Contact aggregation
complete: 1, 157 ms per contact
___

After that i had also tried to run the application for retrieving the
contacts from phonebook. It works fine and also giving perfect result
but somehow it doesn't show me the contact which i have added named
"Test" that i could not find in phonebook.

What is really happening inside, i don't know. Can anybody give me any
advice or idea or any code to resolve this problem.

Please help me out to resolve this problem.

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: Causing onMeasure() to be called for an EditView

2010-02-18 Thread poohtbear
the hirarchy ?
It's created in runtime

FramLayout
   |
   -CanvasView(extends view) - responsible for drawing
our UI, overrides onSizeChanged and onDraw.
   |
   - EditText, used for binding our UI's focused
textFields to android's.

So when resize happens:
1. FrameLayout onMeasure is called.
   1.1 CanvasView onMeasure is called.
   1.2 EditText onMeasure is called <-- problem since new LayoutParams
are not set yet!
2. onLayout called on FrameLayout <-- here the FramLayout will use the
meausredWidth of Edit Text to lay it out.But the size is wrong
3. onSizeChanged is called on FrameLayout and CanvasView <--- here the
new LayoutParams are set for EditText.

what i need is step no 4: cause onMeasure to be called again, at least
on EditText and onLayout for FrameLayout, can't manage to do it.



On Feb 18, 12:31 am, skink  wrote:
> On Feb 17, 10:13 pm, skink  wrote:
>
> > On Feb 17, 10:01 pm, poohtbear  wrote:
>
> > > setMeasuredDimension(int, int) takes the size you want the view to be,
> > > this is why you have to call it in the end of onMeasure() the params
> > > you writ are parameters to onMeasure() no setMEasureDimension().
>
> > my question was if you just pass parameters like 100. 50 which is
> > wrong way.
>
> > you have to pass values returned by MeasureSpec#makeMeasureSpec method
>
> > pskink
>
> i'm sorry, yes, you are right, i mixed up onMeasure with
> setMEasureDimension
>
> again my apologies
>
> pskink

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


[android-developers] Hide address bar while launching native browser

2010-02-18 Thread SAM
Hi,
I am able to launch browser and open site "google.com" and from my App
succesfully. I have a requirement that when the browser is laucnhed
from my application, I have to hide the address bar visible at top for
that browser session.

So can think of that I dont want the address that I am trying to open
to be visible to users.

Please let me if this is possible and and if yes how.


Thanks
Sam

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email 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: Background on text part of TextView with an image

2010-02-18 Thread skink


On Feb 18, 6:18 am, Gregory Moore  wrote:
> I am using setCompoundDrawables on the TextView to set an image above
> the text.   I would like to set a background on just the text part of
> the TextView to ensure it is visible on various backgrounds.  From
> your response it seems that their is a way to set the background just
> for the text?  "TextView has text & background drawable..."

TextView has android:background attribute

you can set it to any @rawable/* or #xxx solid color from xml

if you want both solid color & image you can creade e.g. LayerDrawable
containing several primitive drawables

pskink

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


Re: [android-developers] Send Email

2010-02-18 Thread kavitha sunil
There is an exchange server option, configure that and you will be able to
send the same.

On Thu, Feb 18, 2010 at 1:59 PM, Sasikumar.S wrote:

> Hi,
>
> How to send a email in android?.
>
> I need to send from some other website email id's like goo...@android.com(or)
> i...@cricinfo.com
>
> I need not want Gmail.
>
> Any suggestion ?
>
> --
> Thanks & Regards
> Sasikumar.S
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

[android-developers] Send Email

2010-02-18 Thread Sasikumar.S
Hi,

How to send a email in android?.

I need to send from some other website email id's like goo...@android.com(or)
i...@cricinfo.com

I need not want Gmail.

Any suggestion ?

-- 
Thanks & Regards
Sasikumar.S

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

2010-02-18 Thread Droider
If you are trying to sort out the 3D cube demo and OpenGL ES I have
written a tutorial that is best viewed on an Android mobile phone (or
iPhone):
 http://billlondon.wordpress.com/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] distributing an app packaged with emulator (for windows with sdk 2.1)

2010-02-18 Thread tansaku
Hi All,

So previously, thanks to help on this forum I worked out how to
package up an app with emulator and send it as a bundle for a non-tech
person to check out on their desktop:

http://groups.google.com/group/android-developers/browse_thread/thread/2454e80af0efd4b8/2ba19ee202c7e0c9?q=#2ba19ee202c7e0c9

The key was to create a file called run.sh like this:

#!/bin/bash

./emulator -sysdir . -datadir . -skindir . -skin HVGA -sdcard
sd256m.img

and copy the avd images into the current directory, along with
emulator executable, skins and an sdcard image.  That was back on SDK
1.5, and for OSX

Now here we are, new year and all, with SDK 2.1, and I need to do the
same thing for a Windows platform.  I've got most of the way there
with a run.bat like this:

set ANDROID_SDK_ROOT=.\android-sdk-windows

emulator.exe -avd 1.5 -sdcard sdcard1.iso

and I've dumped the entire android windows sdk into the package.
However I can't seem to get the avd to be in the same package.  On
windows the avd by default gets created under Document and Settings.
The same files like userdata.img and userdata-qemu.img are there, and
things run fine if I set create the avd separately, but that is an
extra step for the non-tech user, and I was hoping to get this into a
single bundle, that runs out of the box so to speak.

I've tried all sorts of variants of:

emulator.exe -avd 1.5 -sdcard sdcard1.iso -sysdir . -datadir .

to no avail, and I keep getting the error:

emulator: ERROR: unknown virtual device name "1.5"

Has anyone had any luck getting the latest SDK to work with a non-
standard avd location on Windows?

Many thanks in advance
CHEERS> SAM

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


[android-developers] dollars

2010-02-18 Thread riya
click the link and get the dollars


!!!

http://www.adbrite.com/mb/commerce/purchase_form.php?opid=1003278&afsid=1

http://deve12.regeasy.hop.clickbank.net/

http://www.cuteonly.com/?a_aid=bcc2d3c1&a_bid=d75df85d

http://secure.bidvertiser.com/performance/bdv_rd.dbm?enparms2=1152,492129,1014264,1103,1222,1212,1197,1774,1322,1107,1368,497761,181825,74940,1102,1102,-442966671&ioa=0&ncm=1&bd_ref_v=http://operationalrisk.50webs.com/&TREF=1&WIN_NAME=null&frdto=&jloc=http://bdv.bidvertiser.com/bidvertiser.dbm%3Fpid%3D201326%26bid%3D491027%26RD%3D13%26DIF%3D1%26bd_ref_v%3Dhttp%253A//operationalrisk.50webs.com/%26tref%3D1%26win_name%3Dnull%26docref%3D%26jsrand%3D786269%26js1loc%3Dhttp%253A//operationalrisk.50webs.com/

!!

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


Re: [android-developers] Re: headset button

2010-02-18 Thread Porting beginner
On Sun, Feb 1, 2009 at 1:01 AM, Nick Pelly  wrote:

> For wired headsets, you can use Intent.ACTION_MEDIA_BUTTON as mentioned in
> the other thread. This is how the built in media app does pause/play on
> wired headset button presses, and where I recommend that you hook in.
>
> For Bluetooth headsets, they do not work like you think. There is no
> 'button pressed event' sent by the headset. We don't know when the button is
> pressed. Instead the headset maps its buttons presses to commands depending
> on its state machine. We receive commands, not button presses from the
> headset.
>
> Nick
>
> Hi,
Can you please write in some more details relate to headset button mapping ?
I got stuck here, I don't know how to go ahead. I am trying to find out
where I should hook my headset button press event ?



>
> On Sat, Jan 31, 2009 at 2:07 AM, deepdr...@googlemail.com <
> deepdr...@googlemail.com> wrote:
>
>>
>> you may want to look at
>>
>>
>> http://groups.google.com/group/android-developers/browse_thread/thread/1c64cf65f87c9895/1d9464c96b91dbd8?show_docid=1d9464c96b91dbd8
>>
>>
>>
>> On Jan 30, 8:20 pm, Brodsky  wrote:
>> > Hi!  Does anyone know how to tell when the headset button is being
>> > pressed?  I'd like to support the usb headsets and possibly bluetooth
>> > headsets.  My app is a media player and ideally, I could register it
>> > somewhere so that if no app that uses the headset button has focus it
>> > button press would act as a play/pause command in my app. If the phone
>> > is ringing or a call is in progress, I'd like to be sensitive to that
>> > and let the button do what it normally does: pickup and hang up
>> > calls.  we've been trying to chase the button down using this:
>> >
>> > IntentFilter headsetFilter = new IntentFilter
>> > (Intent.ACTION_HEADSET_PLUG);
>> > headsetFilter.addAction
>> > ("android.intent.action.HEADSET_STATE_CHANGED");
>> > headsetFilter.addAction("android.bluetooth.intent.HEADSET_STATE");
>> > headsetFilter.addAction
>> > ("android.bluetooth.intent.HEADSET_STATE_CHANGED");
>> > headsetFilter.addAction
>> > ("android.bluetooth.intent.action.MODE_CHANGED");
>> > headsetFilter.addAction("android.intent.action.MODE_CHANGED");
>> >
>> > no luck as of yet.  Any help would be greatly 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
> -~--~~~~--~~--~--~---
>
>


-- 
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

<    1   2