[android-developers] Problem with GetLongField JNI

2011-10-18 Thread Ajith Kamath
Hi

I m trying to access a private long variable from my cpp(jni) file.
Problem is when I do GetLongField on Field Id , I get zero , even though i
have set the long variable in Java to non-zero value.

In Java long definition is :
private long mActualTrack = 0;

In Cpp file , filed Id is obtained by :
gf_identifier = env->GetFieldID(clazz, "mActualTrack", "J");
clazz represents Java Class which contains mActualTrack
where gf_identifier is declared as static jfieldID gf_identifier;

Now I used GetLongField as follows
jlong id_j = env->GetLongField(myobj, gf_identifier);

I do identifier = (unsigned long long)id_j; , and print its value, But I am
always getting 0.

Can anyone explain this behavior or  am I doing anything wrong in my
implementation??

Regards,
Ajith

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

[android-developers] Re: Problem with Notification Service and Progress bar

2011-07-20 Thread Ajith Kamath
Hi

You see for my application i need an Indeterminate Progress bar of
Horizontal style.
I think this might be bug with StatusBarService itself. But i'm not sure.
Any suggestions on how to keep animation running?!!

Regards,
Ajith

On Thu, Jul 21, 2011 at 10:44 AM, Yong  wrote:

> Maybe you should update the progress by yourself.
> There is a good example in DownloadProvider.
>
> android/packages/providers/DownloadProvider/src/com/android/providers/
> downloads/DownloadNotification.java
>
>
>
> On Jul 20, 3:55 pm, Ajith Kamath  wrote:
> > Hi
> >
> > I have written code for Progress bar to appear in Notification bar.
> > Its runs fine, if i drag down notification slide after Notification was
> > sent, I can see the Progress bar animation.
> > Now I drag it back up.
> > If I drag that down again ,  Animation has paused.
> >
> > If i turn phone around to landscape now, Animation will start again and
> work
> > for only one time(one drag down and up). After that It gets paused again.
> > I have change perspective(landscape/potrait) to get animation back.
> >
> > Does anyone know solution to this. I might be missing something: flag or
> > parameter.
> > Any help is appreciated.
> >
> > Regards,
> > Ajith
>
> --
> You received this message because you are subscribed to the Google Groups
> "android-platform" group.
> To post to this group, send email to android-platf...@googlegroups.com.
> To unsubscribe from this group, send email to
> android-platform+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/android-platform?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] Problem with Notification Service and Progress bar

2011-07-20 Thread Ajith Kamath
Hi

I have written code for Progress bar to appear in Notification bar.
Its runs fine, if i drag down notification slide after Notification was
sent, I can see the Progress bar animation.
Now I drag it back up.
If I drag that down again ,  Animation has paused.

If i turn phone around to landscape now, Animation will start again and work
for only one time(one drag down and up). After that It gets paused again.
I have change perspective(landscape/potrait) to get animation back.

Does anyone know solution to this. I might be missing something: flag or
parameter.
Any help is appreciated.

Regards,
Ajith

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

Re: [android-developers] Re: Problem with Progress Dialog

2011-07-17 Thread Ajith Kamath
Hi

Thanks for the all the suggestions.
@kamiseq : I create a new Progress Dialog in my Activity and trying to set
its progress from a thread spawned in this activity.
In the thread I'm doing some work and then setting its progress.

@Mike: Even I'm thinking of the same. Is there any way to confirm that
setProgress doesn't work for Spin wheels.

@rambabu: I've kept setCancellable(true) . Still same problem.

Let me know your inputs.

Regards,
Ajith

On Mon, Jul 18, 2011 at 2:18 AM, rambabu mareedu
wrote:

> you have to setCancelable(true); end of the progess dialog ..
>
> On Sun, Jul 17, 2011 at 10:15 AM, Mike  wrote:
>
>> spin wheel you can't set the progress...it is on of off.
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>>
>> To unsubscribe from this group, 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

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

[android-developers] Problem with Progress Dialog

2011-07-17 Thread Ajith Kamath
Hi

I want to use Progress Dialog in my application with default style(Spin
Wheel).
I use setMax() to set the max value. Now when I do setProgress() in the
Thread, it doesn't work. It doesn't stop when progress reaches MAX value.

So after doing setProgress, I tried getProgress() again to see if progress
was set at all.
I found that Progress of that dialog remained 0 always.

Please suggest. Any help is appreciated.

Regards,
Ajith

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

2011-06-21 Thread Ajith Kamath
Hi John

I only had one tag - Mifare Ultralight. I haven't figured out the solution
for this error.
I think it might be the tag error. But I'm not able to prove my contention.
Please let me know if the same thing is happening with multiple tags. Kindly
send your logs too.

Regards,
Ajith


On Wed, Jun 22, 2011 at 6:00 AM, John Hunter
wrote:

> Hi Ajith,
>
> I am encountering the same problem.
> Did you figure out what was causing the IO exception on the write?
>
> -John
>
> --
> You received this message because you are subscribed to the Google Groups
> "android-platform" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/android-platform/-/rYqfkqjKEsAJ.
> To post to this group, send email to android-platf...@googlegroups.com.
> To unsubscribe from this group, send email to
> android-platform+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/android-platform?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: NFC Mifare Ultralight Tag write error

2011-05-16 Thread Ajith Kamath
Hi andrew,

As you can see this code checks for Writable and Size limitations.
I tried to write a Contact info. At this time I got Size limitation error.

Anyways i think by tag is writable and also has sufficient size.
Just that I am not able to figure out why that error is occuring..

Also after this error,  I deliberately tried to "Format" and write the ndef
message.
I got "Tag doesn't support NDEF." error.  But this is not possible since
ndef!=null  code was executed previously.

I am not sure why this is happening.
Please advice.

Regards,
Ajith
On Mon, May 16, 2011 at 1:46 PM, andrew  wrote:

> I have a similar case, and I think I know why it happens, even if the
> API is not ideal for handling it:
>
> If could be that your tag already has data written to it and that data
> is locked or write-protected.
> This happens in a tag I have that is a 1K tag, but I cannot write a
> small Ndef to it.
>
> I suspect that the size reported is the total size of the tag, not the
> size of the writable space that is left after some data has been
> written and then write-protected or locked.
>
> I cannot find any way to confirm that theory in the code, and so as
> (like you) I test almost everything else before trying the write, I
> just surround my write with a Try/catch and assume the exception is
> due to this reason.
>
> The IOException returned on this error has no info related to the
> cause.
>
> So far, my only enhancement request to the Android team on the NFC API
> would be to greatly enhance the IOExceptions returned in all the NFC
> methods to give more information about the cause of the exception.
> ("Not enough space", "Write protected", etc).
>
> If you find anything else that can help deal with this case, then
> please post here and I will do the same.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] NFC Mifare Ultralight Tag write error

2011-05-15 Thread Ajith Kamath
Hi all

I am trying to write Ndef message into Mifare Ultralight Tag.
But I am getting following error:

05-12 17:50:04.686: INFO/ActivityManager(121): Starting: Intent {
act=android.nfc.action.NDEF_DISCOVERED dat=tel:xxx-xxx- flg=0x3000
cmp=com.android.apps.tag/.WriteTagActivity (has extras) } from pid -1
05-12 17:50:04.799: ERROR/com.android.apps.tag.WriteTagActivity(566): Failed
to write tag
05-12 17:50:04.799: ERROR/com.android.apps.tag.WriteTagActivity(566):
java.io.IOException: Tag is not ndef
05-12 17:50:04.799: ERROR/com.android.apps.tag.WriteTagActivity(566): at
android.nfc.tech.Ndef.writeNdefMessage(Ndef.java:211)
05-12 17:50:04.799: ERROR/com.android.apps.tag.WriteTagActivity(566): at
com.android.apps.tag.WriteTagActivity.writeTag(WriteTagActivity.java:173)
05-12 17:50:04.799: ERROR/com.android.apps.tag.WriteTagActivity(566): at
com.android.apps.tag.WriteTagActivity.onNewIntent(WriteTagActivity.java:136)
05-12 17:50:04.799: ERROR/com.android.apps.tag.WriteTagActivity(566): at
android.app.Instrumentation.callActivityOnNewIntent(Instrumentation.java:1119)
05-12 17:50:04.799: ERROR/com.android.apps.tag.WriteTagActivity(566): at
android.app.ActivityThread.deliverNewIntents(ActivityThread.java:1722)
05-12 17:50:04.799: ERROR/com.android.apps.tag.WriteTagActivity(566): at
android.app.ActivityThread.performNewIntents(ActivityThread.java:1734)
05-12 17:50:04.799: ERROR/com.android.apps.tag.WriteTagActivity(566): at
android.app.ActivityThread.handleNewIntent(ActivityThread.java:1742)
05-12 17:50:04.799: ERROR/com.android.apps.tag.WriteTagActivity(566): at
android.app.ActivityThread.access$2300(ActivityThread.java:117)
05-12 17:50:04.799: ERROR/com.android.apps.tag.WriteTagActivity(566): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:978)
05-12 17:50:04.799: ERROR/com.android.apps.tag.WriteTagActivity(566): at
android.os.Handler.dispatchMessage(Handler.java:99)
05-12 17:50:04.799: ERROR/com.android.apps.tag.WriteTagActivity(566): at
android.os.Looper.loop(Looper.java:123)
05-12 17:50:04.799: ERROR/com.android.apps.tag.WriteTagActivity(566): at
android.app.ActivityThread.main(ActivityThread.java:3683)
05-12 17:50:04.799: ERROR/com.android.apps.tag.WriteTagActivity(566): at
java.lang.reflect.Method.invokeNative(Native Method)
05-12 17:50:04.799: ERROR/com.android.apps.tag.WriteTagActivity(566): at
java.lang.reflect.Method.invoke(Method.java:507)
05-12 17:50:04.799: ERROR/com.android.apps.tag.WriteTagActivity(566): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
05-12 17:50:04.799: ERROR/com.android.apps.tag.WriteTagActivity(566): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
05-12 17:50:04.799: ERROR/com.android.apps.tag.WriteTagActivity(566): at
dalvik.system.NativeStart.main(Native Method)
05-12 17:50:04.799: INFO/com.android.apps.tag.WriteTagActivity(566): in
onResume() mAdapter!=null
05-12 17:50:04.912: ERROR/NFC JNI(248): phLibNfc_RemoteDev_CheckPresence()
returned 0x00ff[NFCSTATUS_FAILED]


I had enabled WriteTagActivity.java and was trying the write application.
Problem is that the code block from where this IOException is occuring tells
me that the tag is already Ndef formatted.

heres the block  which gets excecuted:

Ndef ndef = Ndef.get(tag);
if (ndef != null) {
ndef.connect();
if (!ndef.isWritable()) {
setStatus("Tag is read-only.", false);
return false;
}
if (ndef.getMaxSize() < mSize) {
setStatus("Tag capacity is " + ndef.getMaxSize() + "
bytes, message is " +
mSize + " bytes.", false);
return false;
}
ndef.writeNdefMessage(mMessage);
setStatus("Wrote message to pre-formatted tag.", true);
return true;


Since ndef!=null block is getting executed, i presume its already ndef
formatted.
I don't get "Tag is read-only." or "Tag capacity is " errors..
Exception is happening  when ndef.writeNdefMessage(mMessage) is executed

Let me know if anyone knows why this error is occuring.

Thanks & Regards,
Ajith

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

[android-developers] Out of Memory Exception when exporting vcards

2011-03-21 Thread Ajith Kamath
Hi

I am facing a problem when I need to export vcards overs bluetooth.
Problem is vcards are large in number. Plus If the vcards have images in
them then size is really high.

So when i try sending this I get OutOfMemory Exception , its Coming from
VcardComposer.java. - At onEntryCreated()

Can I make more memory allocation on the go? Is this possible.
Dalvik basically cannot allocate memory to these data.

Please advice.

Thanks & Regards,
Ajith

PS: Log is below :

-17 11:42:31.669 D/dalvikvm(  740): GC_CONCURRENT freed 1943K, 52% free
12605K/26183K, external 3450K/4213K, paused 2ms+4ms
03-17 11:42:31.970 D/dalvikvm(  740): GC_CONCURRENT freed 1954K, 52% free
12576K/26183K, external 3450K/4213K, paused 2ms+4ms
03-17 11:42:32.369 D/dalvikvm(  740): GC_CONCURRENT freed 1980K, 52% free
12642K/26183K, external 3450K/4213K, paused 2ms+3ms
03-17 11:42:32.556 D/dalvikvm(  740): GC_FOR_MALLOC freed 1412K, 53% free
12541K/26183K, external 3450K/4213K, paused 22ms
03-17 11:42:32.556 I/dalvikvm-heap(  740): Forcing collection of
SoftReferences for 16760848-byte allocation
03-17 11:42:32.576 D/dalvikvm(  740): GC_FOR_MALLOC freed <1K, 53% free
12540K/26183K, external 3450K/4213K, paused 19ms
03-17 11:42:32.576 E/dalvikvm-heap(  740): Out of memory on a 16760848-byte
allocation.
03-17 11:42:32.576 I/dalvikvm(  740): "Binder Thread #2" prio=5 tid=8
RUNNABLE
03-17 11:42:32.576 I/dalvikvm(  740):   | group="main" sCount=0 dsCount=0
obj=0x40520920 self=0xea818
03-17 11:42:32.576 I/dalvikvm(  740):   | sysTid=747 nice=10 sched=0/0
cgrp=bg_non_interactive handle=583480
03-17 11:42:32.576 I/dalvikvm(  740):   at
java.io.ByteArrayOutputStream.expand(ByteArrayOutputStream.java:~91)
03-17 11:42:32.576 I/dalvikvm(  740):   at
java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:216)
03-17 11:42:32.576 I/dalvikvm(  740):   at
java.io.OutputStreamWriter.flush(OutputStreamWriter.java:164)
03-17 11:42:32.576 I/dalvikvm(  740):   at
java.io.OutputStreamWriter.convert(OutputStreamWriter.java:236)
03-17 11:42:32.576 I/dalvikvm(  740):   at
java.io.OutputStreamWriter.write(OutputStreamWriter.java:225)
03-17 11:42:32.576 I/dalvikvm(  740):   at
java.io.BufferedWriter.write(BufferedWriter.java:301)
03-17 11:42:32.576 I/dalvikvm(  740):   at
java.io.Writer.write(Writer.java:152)
03-17 11:42:32.576 I/dalvikvm(  740):   at
android.pim.vcard.VCardComposer$HandlerForOutputStream.onEntryCreated(VCardComposer.java:212)
03-17 11:42:32.576 I/dalvikvm(  740):   at
android.pim.vcard.VCardComposer.createOneEntry(VCardComposer.java:512)
03-17 11:42:32.576 I/dalvikvm(  740):   at
android.pim.vcard.VCardComposer.createOneEntry(VCardComposer.java:466)
03-17 11:42:32.576 I/dalvikvm(  740):   at
com.android.providers.contacts.ContactsProvider2.outputRawContactsAsVCard(ContactsProvider2.java:5594)
03-17 11:42:32.580 I/dalvikvm(  740):   at
com.android.providers.contacts.ContactsProvider2.openAssetFile(ContactsProvider2.java:5524)
03-17 11:42:32.580 I/dalvikvm(  740):   at
android.content.ContentProvider$Transport.openAssetFile(ContentProvider.java:242)
03-17 11:42:32.580 I/dalvikvm(  740):   at
android.content.ContentProviderNative.onTransact(ContentProviderNative.java:234)
03-17 11:42:32.580 I/dalvikvm(  740):   at
android.os.Binder.execTransact(Binder.java:320)
03-17 11:42:32.580 I/dalvikvm(  740):   at
dalvik.system.NativeStart.run(Native Method)
03-17 11:42:32.580 I/dalvikvm(  740):
03-17 11:42:32.580 E/JavaBinder(  740): *** Uncaught remote exception!
(Exceptions are not yet supported across processes.)
03-17 11:42:32.580 E/JavaBinder(  740): java.lang.OutOfMemoryError
03-17 11:42:32.580 E/JavaBinder(  740):  at
java.io.ByteArrayOutputStream.expand(ByteArrayOutputStream.java:91)
03-17 11:42:32.580 E/JavaBinder(  740):  at
java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:216)
03-17 11:42:32.580 E/JavaBinder(  740):  at
java.io.OutputStreamWriter.flush(OutputStreamWriter.java:164)
03-17 11:42:32.580 E/JavaBinder(  740):  at
java.io.OutputStreamWriter.convert(OutputStreamWriter.java:236)
03-17 11:42:32.580 E/JavaBinder(  740):  at
java.io.OutputStreamWriter.write(OutputStreamWriter.java:225)
03-17 11:42:32.580 E/JavaBinder(  740):  at
java.io.BufferedWriter.write(BufferedWriter.java:301)
03-17 11:42:32.580 E/JavaBinder(  740):  at
java.io.Writer.write(Writer.java:152)
03-17 11:42:32.580 E/JavaBinder(  740):  at
android.pim.vcard.VCardComposer$HandlerForOutputStream.onEntryCreated(VCardComposer.java:212)
03-17 11:42:32.580 E/JavaBinder(  740):  at
android.pim.vcard.VCardComposer.createOneEntry(VCardComposer.java:512)
03-17 11:42:32.580 E/JavaBinder(  740):  at
android.pim.vcard.VCardComposer.createOneEntry(VCardComposer.java:466)
03-17 11:42:32.580 E/JavaBinder(  740):  at
com.android.providers.contacts.ContactsProvider2.outputRawContactsAsVCard(ContactsProvider2.java:5594)
03-17 11:42:32.580 E/JavaBinder(  740):  at
com.android.providers.contacts.ContactsProvider2.openAssetFile(ContactsProvider2.java:5524)
03-17 11:42:32.580 E/Ja

[android-developers] Re: Bluetooth UUID receive delayed

2011-03-18 Thread Ajith Kamath
9:56.038: DEBUG/GPSD(274): dns_query_loop: gethostbyname failed.
h_errno 2
03-18 18:29:56.038: DEBUG/GPSD(274): dns_query_loop: retrying in 30 sec
03-18 18:30:26.046: DEBUG/GPSD(274): dns_query_loop: gethostbyname failed.
h_errno 2
03-18 18:30:26.046: DEBUG/GPSD(274): dns_query_loop: retrying in 30 sec
03-18 18:30:56.054: DEBUG/GPSD(274): dns_query_loop: gethostbyname failed.
h_errno 2
03-18 18:30:56.054: DEBUG/GPSD(274): dns_query_loop: retrying in 30 sec
03-18 18:31:16.054: INFO//system/bin/bluetoothd(482): bluetoothd[483]: probe
failed with driver input-headset for device
/org/bluez/483/hci0/dev_12_47_C5_EA_B1_8A
03-18 18:31:16.089: INFO//system/bin/bluetoothd(482): Ajith: In
emit_array_property_changed
03-18 18:31:16.089: ERROR/BluetoothEventLoop.cpp(112): event_filter:
Received signal org.bluez.Device:PropertyChanged from
/org/bluez/483/hci0/dev_12_47_C5_EA_B1_8A
03-18 18:31:16.089: INFO/Ajith(112): In onDevicePropertyChanged, propValues
==[Ljava.lang.String;@4077d498
03-18 18:31:16.089: INFO/Ajith(112): Ajith: In setRemoteDeviceProperty
address :12:47:C5:EA:B1:8A name : UUIDs value
:1103--1000-8000-00805f9b34fb,1105--1000-8000-00805f9b34fb,1106--1000-8000-00805f9b34fb,110a--1000-8000-00805f9b34fb,110c--1000-8000-00805f9b34fb,1112--1000-8000-00805f9b34fb,111f--1000-8000-00805f9b34fb,112d--1000-8000-00805f9b34fb,112f--1000-8000-00805f9b34fb,
03-18 18:31:16.089: INFO/Ajith(112): Ajith: putting properties for adderss:
12:47:C5:EA:B1:8A into mDeviceProperties , name =UUIDs value
=1103--1000-8000-00805f9b34fb,1105--1000-8000-00805f9b34fb,1106--1000-8000-00805f9b34fb,110a--1000-8000-00805f9b34fb,110c--1000-8000-00805f9b34fb,1112--1000-8000-00805f9b34fb,111f--1000-8000-00805f9b34fb,112d--1000-8000-00805f9b34fb,112f--1000-8000-00805f9b34fb,
03-18 18:31:16.089: INFO/Ajith(112): Ajith: In
updateDeviceServiceChannelCache()
03-18 18:31:16.089: INFO/Ajith(112): Ajith: Calling getUuidFromCache()
03-18 18:31:16.089: INFO/Ajith(112): Ajith:In getUuidFromCache, calling
getRemoteDeviceProperty


On Fri, Mar 18, 2011 at 3:52 PM, Ajith Kamath  wrote:

> Hi
>
> I am working on Bluez stack and currently facing a problem.
> I am able to pair with another phone.
>
> As soon as pairing occurs , it will take about nearly 1 min to get UUID
> property changed signal from bluez.
> This is happening only with phones
>
> If I try doing it with headsets, I will get UUID signal  immediately after
> I receive  property changed signal for "Paired"
>
> Can someone Please tell me what might be causing this error.
> any help is highly aprreciated.
>
> Regards,
> Ajith
>
>
>
>
>

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

[android-developers] Bluetooth UUID receive delayed

2011-03-18 Thread Ajith Kamath
Hi

I am working on Bluez stack and currently facing a problem.
I am able to pair with another phone.

As soon as pairing occurs , it will take about nearly 1 min to get UUID
property changed signal from bluez.
This is happening only with phones

If I try doing it with headsets, I will get UUID signal  immediately after I
receive  property changed signal for "Paired"

Can someone Please tell me what might be causing this error.
any help is highly aprreciated.

Regards,
Ajith

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

[android-developers] Bluetooth SyncML Server

2011-03-11 Thread Ajith Kamath
Hi all

I am trying to implement Bluetooth SyncML server in Android. But we are
facing few problems.
SDP record registration and connection establishment is successfully done.
Now we get wbml data from Client in form of Obex PUT request.

My problem is I'm not able to cleary define Obex-SynML binding.

1.What should be my response for PUT request of Client. When decoded the
wbxml, it sends Dev Inf and Met Inf data and other Dev CAP(capability) data.
   Should I send Obex -  http ok or Send my Device Capabilities info to
client as response to this PUT request?
2.I had sent my Dev Cap info for that PUT request and got GET request with
empty body.What does this mean??
3.I also changed my response and instead of sending Dev CAP , i just send
Obex - Http ok as response to that PUT request. Again I Got GET request with
empty body. What does this mean??

So I now assume that my Dev CAP info should be sent after we get GET
request. Hence for Client's PUT request I just sent Obex http ok response
and once I get GET request , I send my DevCAP data.
But when I do this I got Disconnect request.

I am not able to understand SyncML- Obex Binding here especially for
different types of sync like Two way Slow sync, One way from client to
server etc.
All I want to do is One way Sync from Client to Server.

The Client that I'm trying to work with is Nokia N8

Any help is highly appreciated.

Thanks & Regards,
Ajith

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

[android-developers] Android 2.3.3 NFC capabilities concerns

2011-02-09 Thread Ajith Kamath
Hi

I went through the changes mentioned about NFC in  2.3.3.
As for the improved Tag read/write support is good, I'm not able to see what
P2P related changes they brought about?!

I cheched the git and was not able to find P2P related commits.
Can some please suggest what P2P related support/changes were made in 2.3.3

Regards,
Ajith

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

2011-02-08 Thread Ajith Kamath
Hi

Checked the logs. Everything seems to be fine.
I'm not sure what the prob is. Try adding some delay before bluetooth socket
connect takes place.
this might be needed if you are connecting to some headsets/handsfree.

If Still it doesn solve the problem.. Add logs upto jni level and send the
logs.
The logs which you have added so far does not point out any problems .

Also tell what kind of device are you trying to connect to you mobile.?

Regards,
Ajith

On Tue, Feb 8, 2011 at 7:40 PM, Laurent Lugon wrote:

> Hi Ajith,
>
> I've add logs in the connectThread and connectedThread.
>
> See the result in attached files.
>
>
> Thank you for your help !
>
>   Best regards
>
>
> SECU4 SA
> Laurent Lugon Moulin
>
> Technical & Development Assistant
> Technopôle 5
> 3960 Sierre – Switzerland
>
> Office  :   +4127 4567 931
> Fax  :   +4127 4567
> 935
> Mobile :   +4179 4509 566
>
> Skype :   laurent.lugon.moulin
>
> www.secu4.com
>
>
>
>
>
>
> On Tue, Feb 8, 2011 at 06:10, Ajith Kamath  wrote:
>
>> Hi
>>
>> Sorry I rechecked logs again. *BEGIN mConnectedThread *seems to be
>> called.
>> my bad.
>>
>> Still please add logs before and after connect and send
>>
>> Regards,
>> Ajith
>>
>>   On Tue, Feb 8, 2011 at 10:39 AM, Ajith Kamath wrote:
>>
>>>
>>> Hi
>>>
>>> From the attached logs, its unclear what is the error.
>>> Discovery seems to be stopped in an odd manner, but that should not
>>> generate any problem
>>> You need to rig the code , add more logs.
>>>
>>> Since the connect thread was called, add more logs in Connect thread
>>> It seems that "*BEGIN mConnectedThread*" is never displayed.
>>> I think there exists problem in connect thread. Please check this.
>>>
>>> Also what I meant by my previous question is that, What kind of h/w are
>>> you trying to connect to your mobile(Ex: headset, handsfree, carkit etc etc)
>>>
>>> Regards,
>>> Ajith
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Mon, Feb 7, 2011 at 6:16 PM, Laurent Lugon 
>>> wrote:
>>>
>>>> Hi Ajith,
>>>>
>>>> You will find the logs attached.
>>>>
>>>> I use our own hardware device. It's the product we develop :
>>>> http://www.secu4.com/en/product.html
>>>> It's works realy good with the actual software so it's not a hardware
>>>> issue. I'm developing the new version of the software related to our 
>>>> product
>>>> and we change different things on the bluetooth connection procedure.
>>>>
>>>>   Best regards
>>>>
>>>>
>>>> SECU4 SA
>>>> Laurent Lugon Moulin
>>>>
>>>> Technical & Development Assistant
>>>> Technopôle 5
>>>> 3960 Sierre – Switzerland
>>>>
>>>> Office  :   +4127 4567 931 
>>>> Fax  :   +4127 4567 935 
>>>>
>>>> Mobile :   +4179 4509 566 
>>>>
>>>> Skype :   laurent.lugon.moulin
>>>>
>>>> www.secu4.com
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Mon, Feb 7, 2011 at 12:01, Ajith Kamath wrote:
>>>>
>>>>> please paste the logs. And what bluetooth h/w are you trying to connect
>>>>> to your mobile device
>>>>>
>>>>> Regards,
>>>>> Ajith
>>>>>
>>>>>   On Mon, Feb 7, 2011 at 4:21 PM, Laurent Lugon <
>>>>> laurent.lu...@secu4.com> wrote:
>>>>>
>>>>>>  Hi all,
>>>>>>
>>>>>> I use a hardware bluetooth device and I need to connect it to my
>>>>>> mobile phone. I've follow the instruction on developer.android.com to
>>>>>> set up a bluetooth connection but I still have a problem. When I'm
>>>>>> connecting to the Bluetooth Socket with bluetoothSocket.connect() I don't
>>>>>> catch any exception so according to the docs, that mean I'm connected to 
>>>>>> my
>>>>>> device. The problem is I'm not... Here is my code :
>>>>>>
>>>>>> private class AcceptThread extends Thread {
>>>>>> // The local server socket
>>>>>>

Re: [android-developers] Bluetooth socket connection issue

2011-02-07 Thread Ajith Kamath
Hi

Sorry I rechecked logs again. *BEGIN mConnectedThread *seems to be called.
my bad.

Still please add logs before and after connect and send

Regards,
Ajith

On Tue, Feb 8, 2011 at 10:39 AM, Ajith Kamath  wrote:

>
> Hi
>
> From the attached logs, its unclear what is the error.
> Discovery seems to be stopped in an odd manner, but that should not
> generate any problem
> You need to rig the code , add more logs.
>
> Since the connect thread was called, add more logs in Connect thread
> It seems that "*BEGIN mConnectedThread*" is never displayed.
> I think there exists problem in connect thread. Please check this.
>
> Also what I meant by my previous question is that, What kind of h/w are you
> trying to connect to your mobile(Ex: headset, handsfree, carkit etc etc)
>
> Regards,
> Ajith
>
>
>
>
>
>
> On Mon, Feb 7, 2011 at 6:16 PM, Laurent Lugon wrote:
>
>> Hi Ajith,
>>
>> You will find the logs attached.
>>
>> I use our own hardware device. It's the product we develop :
>> http://www.secu4.com/en/product.html
>> It's works realy good with the actual software so it's not a hardware
>> issue. I'm developing the new version of the software related to our product
>> and we change different things on the bluetooth connection procedure.
>>
>>   Best regards
>>
>>
>> SECU4 SA
>> Laurent Lugon Moulin
>>
>> Technical & Development Assistant
>> Technopôle 5
>> 3960 Sierre – Switzerland
>>
>> Office  :   +4127 4567 931
>> Fax  :   +4127 4567
>> 935
>> Mobile :   +4179 4509 566
>>
>> Skype :   laurent.lugon.moulin
>>
>> www.secu4.com
>>
>>
>>
>>
>>
>>
>> On Mon, Feb 7, 2011 at 12:01, Ajith Kamath  wrote:
>>
>>> please paste the logs. And what bluetooth h/w are you trying to connect
>>> to your mobile device
>>>
>>> Regards,
>>> Ajith
>>>
>>>   On Mon, Feb 7, 2011 at 4:21 PM, Laurent Lugon >> > wrote:
>>>
>>>>  Hi all,
>>>>
>>>> I use a hardware bluetooth device and I need to connect it to my mobile
>>>> phone. I've follow the instruction on developer.android.com to set up a
>>>> bluetooth connection but I still have a problem. When I'm connecting to the
>>>> Bluetooth Socket with bluetoothSocket.connect() I don't catch any exception
>>>> so according to the docs, that mean I'm connected to my device. The problem
>>>> is I'm not... Here is my code :
>>>>
>>>> private class AcceptThread extends Thread {
>>>> // The local server socket
>>>> private final BluetoothServerSocket mmServerSocket;
>>>>
>>>> public AcceptThread() {
>>>> BluetoothServerSocket tmp = null;
>>>>
>>>> // Create a new listening server socket
>>>> try {
>>>> tmp = mAdapter
>>>> .listenUsingRfcommWithServiceRecord(NAME,
>>>> MY_UUID);
>>>> } catch (IOException e) {
>>>> Log.e(TAG, "listen() failed", e);
>>>> }
>>>> mmServerSocket = tmp;
>>>> }
>>>>
>>>> public void run() {
>>>> if (D)
>>>> Log.d(TAG, "BEGIN mAcceptThread" + this);
>>>> setName("AcceptThread");
>>>> BluetoothSocket socket = null;
>>>>
>>>> // Listen to the server socket if we're not connected
>>>> while (mState != STATE_CONNECTED) {
>>>> try {
>>>> // This is a blocking call and will only return on a
>>>> // successful connection or an exception
>>>> socket = mmServerSocket.accept();
>>>> } catch (IOException e) {
>>>> Log.e(TAG, "accept() failed", e);
>>>> break;
>>>> }
>>>>
>>>> // If a connection was accepted
>>>> if (socket != null) {
>>>> synchronized (BluetoothConnectionService.this) {
>>>> switch (mState) {
>>>> case STATE_LISTEN:
&g

Re: [android-developers] Bluetooth socket connection issue

2011-02-07 Thread Ajith Kamath
Hi

>From the attached logs, its unclear what is the error.
Discovery seems to be stopped in an odd manner, but that should not generate
any problem
You need to rig the code , add more logs.

Since the connect thread was called, add more logs in Connect thread
It seems that "*BEGIN mConnectedThread*" is never displayed.
I think there exists problem in connect thread. Please check this.

Also what I meant by my previous question is that, What kind of h/w are you
trying to connect to your mobile(Ex: headset, handsfree, carkit etc etc)

Regards,
Ajith






On Mon, Feb 7, 2011 at 6:16 PM, Laurent Lugon wrote:

> Hi Ajith,
>
> You will find the logs attached.
>
> I use our own hardware device. It's the product we develop :
> http://www.secu4.com/en/product.html
> It's works realy good with the actual software so it's not a hardware
> issue. I'm developing the new version of the software related to our product
> and we change different things on the bluetooth connection procedure.
>
>   Best regards
>
>
> SECU4 SA
> Laurent Lugon Moulin
>
> Technical & Development Assistant
> Technopôle 5
> 3960 Sierre – Switzerland
>
> Office  :   +4127 4567 931
> Fax  :   +4127 4567
> 935
> Mobile :   +4179 4509 566
>
> Skype :   laurent.lugon.moulin
>
> www.secu4.com
>
>
>
>
>
>
> On Mon, Feb 7, 2011 at 12:01, Ajith Kamath  wrote:
>
>> please paste the logs. And what bluetooth h/w are you trying to connect to
>> your mobile device
>>
>> Regards,
>> Ajith
>>
>>   On Mon, Feb 7, 2011 at 4:21 PM, Laurent Lugon 
>> wrote:
>>
>>>  Hi all,
>>>
>>> I use a hardware bluetooth device and I need to connect it to my mobile
>>> phone. I've follow the instruction on developer.android.com to set up a
>>> bluetooth connection but I still have a problem. When I'm connecting to the
>>> Bluetooth Socket with bluetoothSocket.connect() I don't catch any exception
>>> so according to the docs, that mean I'm connected to my device. The problem
>>> is I'm not... Here is my code :
>>>
>>> private class AcceptThread extends Thread {
>>> // The local server socket
>>> private final BluetoothServerSocket mmServerSocket;
>>>
>>> public AcceptThread() {
>>> BluetoothServerSocket tmp = null;
>>>
>>> // Create a new listening server socket
>>> try {
>>> tmp = mAdapter
>>> .listenUsingRfcommWithServiceRecord(NAME,
>>> MY_UUID);
>>> } catch (IOException e) {
>>> Log.e(TAG, "listen() failed", e);
>>> }
>>> mmServerSocket = tmp;
>>> }
>>>
>>> public void run() {
>>> if (D)
>>> Log.d(TAG, "BEGIN mAcceptThread" + this);
>>> setName("AcceptThread");
>>> BluetoothSocket socket = null;
>>>
>>> // Listen to the server socket if we're not connected
>>> while (mState != STATE_CONNECTED) {
>>> try {
>>> // This is a blocking call and will only return on a
>>> // successful connection or an exception
>>> socket = mmServerSocket.accept();
>>> } catch (IOException e) {
>>> Log.e(TAG, "accept() failed", e);
>>> break;
>>> }
>>>
>>> // If a connection was accepted
>>> if (socket != null) {
>>> synchronized (BluetoothConnectionService.this) {
>>> switch (mState) {
>>> case STATE_LISTEN:
>>> case STATE_CONNECTING:
>>> // Situation normal. Start the connected
>>> thread.
>>> connected(socket, socket.getRemoteDevice());
>>> break;
>>> case STATE_NONE:
>>> case STATE_CONNECTED:
>>> // Either not ready or already connected.
>>> Terminate
>>> // new socket.
>>> try {
>>> socket.close();
>>>

Re: [android-developers] Bluetooth socket connection issue

2011-02-07 Thread Ajith Kamath
please paste the logs. And what bluetooth h/w are you trying to connect to
your mobile device

Regards,
Ajith

On Mon, Feb 7, 2011 at 4:21 PM, Laurent Lugon wrote:

> Hi all,
>
> I use a hardware bluetooth device and I need to connect it to my mobile
> phone. I've follow the instruction on developer.android.com to set up a
> bluetooth connection but I still have a problem. When I'm connecting to the
> Bluetooth Socket with bluetoothSocket.connect() I don't catch any exception
> so according to the docs, that mean I'm connected to my device. The problem
> is I'm not... Here is my code :
>
> private class AcceptThread extends Thread {
> // The local server socket
> private final BluetoothServerSocket mmServerSocket;
>
> public AcceptThread() {
> BluetoothServerSocket tmp = null;
>
> // Create a new listening server socket
> try {
> tmp = mAdapter
> .listenUsingRfcommWithServiceRecord(NAME, MY_UUID);
> } catch (IOException e) {
> Log.e(TAG, "listen() failed", e);
> }
> mmServerSocket = tmp;
> }
>
> public void run() {
> if (D)
> Log.d(TAG, "BEGIN mAcceptThread" + this);
> setName("AcceptThread");
> BluetoothSocket socket = null;
>
> // Listen to the server socket if we're not connected
> while (mState != STATE_CONNECTED) {
> try {
> // This is a blocking call and will only return on a
> // successful connection or an exception
> socket = mmServerSocket.accept();
> } catch (IOException e) {
> Log.e(TAG, "accept() failed", e);
> break;
> }
>
> // If a connection was accepted
> if (socket != null) {
> synchronized (BluetoothConnectionService.this) {
> switch (mState) {
> case STATE_LISTEN:
> case STATE_CONNECTING:
> // Situation normal. Start the connected
> thread.
> connected(socket, socket.getRemoteDevice());
> break;
> case STATE_NONE:
> case STATE_CONNECTED:
> // Either not ready or already connected.
> Terminate
> // new socket.
> try {
> socket.close();
> } catch (IOException e) {
> Log.e(TAG, "Could not close unwanted
> socket", e);
> }
> break;
> }
> }
> }
> }
> if (D)
> Log.i(TAG, "END mAcceptThread");
> }
>
> public void cancel() {
> if (D)
> Log.d(TAG, "cancel " + this);
> try {
> if (mmServerSocket != null)
> mmServerSocket.close();
> } catch (Exception e) {
> Log.e(TAG, "close() of server failed", e);
> }
> }
> }
>
> /**
>  * This thread runs while attempting to make an outgoing connection
> with a
>  * device. It runs straight through; the connection either succeeds or
>  * fails.
>  */
> private class ConnectThread extends Thread {
> private final BluetoothSocket mmSocket;
> private final BluetoothDevice mmDevice;
>
>
> public ConnectThread(BluetoothDevice device) {
> mmDevice = device;
> BluetoothSocket connection = null;
>
> // Get a BluetoothSocket for a connection with the
> // given BluetoothDevice
> try {
> // device.createRfcommSocketToServiceRecord(MY_UUID);
> Method m =
> device.getClass().getMethod("createRfcommSocket",
> new Class[] { int.class });
> connection = (BluetoothSocket) m.invoke(device, 1);
> Utils.pause(100);
> } catch (Exception e) {
> Log.e(TAG, "create() failed", e);
> }
> mmSocket = connection;
> }
>
> public void run() {
> Log.i(TAG, "BEGIN mConnectThread");
> setName("ConnectThread");
>
> if (mmSocket != null) {
> // Always cancel discovery because it will slow down a
> // connection
> mAdapter.cancelDiscovery();
>
> // Make a connection to the BluetoothSocket
> try {
> // This is a blocking call and will only return on a
> // successful connecti

Re: [android-developers] Status of NFC card emulation capabilities in android 2.3.2

2011-02-06 Thread Ajith Kamath
Hi

Card emualtion is not completely supported on Application level yet.
Although stack level support is provided by libnfc-nxp
You can tweak the app and native layer to provide decent enough card
emulation.

Please refer to older posts. There has already been discussion on this and
card emulation related changes were stated.

Regards,
Ajith



On Tue, Feb 1, 2011 at 6:51 PM, flavio  wrote:

> Hi,
>
> Is it possible to use the NFC device in "card emulation" mode on the
> Nexus-S with android 2.3.2 ?
>
> if yes, where can i find the native library interface
> documentation  ?
>
> Regards
>
> Flavio
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] Re: NFC Secure Element

2011-01-30 Thread Ajith Kamath
great mtk, my doubts are getting cleared...
So to work on WI mode , i need to set the SE to wired -interface mode like u
said.

After this if i Use RawTagconenction to send GP commands to SE , Will this
work for WI mode?
I mean can u select the 0 AID with this? . Sorry i dont have device yet, so
still working on with code

If this is the case, then for Credit card emulation , Is my assumptions
correct :
* The cardlet in SE will be given by TSM
* the midlet in mobile application will access SE cardlet via the method you
described earlier(for gingerbread) , but only if its digitally signed by TSM

Are these 2 assuptions correct.? Also can you share doc/link on GP
complaince and commands?
Please advice

Regards,
Ajith

On Fri, Jan 28, 2011 at 9:19 PM, mtk  wrote:

> I added the code to set wired mode in
> com_android_nfc_NativeNfcManager.cpp. I also added some additional
> methods on NFcService so I can conveniently call it from my test
> activity. For sending APDU commands in SWP mode, I use another
> activity with "TAG_DISCOVERED" action in android manifest, (just like
> the tag reader same program) and then use RawTagConnection to send
> APDU bytes. Btw I think the SE is GP compliant! When I send the select
> command with zero AID (Select ISD per GP, 00 a4 04 00 00) - it
> promptly responds back with FCI template! So it looks like we can use
> install apps into the SE, once we have the keys? Sorry I'm new to GP
> so learning stuff as I go...
>
> On Jan 27, 10:25 pm, nemik  wrote:
> > mtk, very cool! So when you did that call directly (somewhere in init
> > of the jni code?) you got it to detect? How are you sending APDU
> > commands? Also, if I understand wired mode correctly, the tag is not
> > emulated externally to other readers; it's only available internally
> > using the NFC API?
> >
> > gusdgg, yes, I saw the secure elements using the
> > getSecureElementList() and just doing logging with those and observing
> > them using `adb logcat`. I think that is in one of the diffs I posted.
> > It worked OK for me and I wasn't seeing any permission errors. Though
> > I never even bothered to do it via reflection on the stock firmware
> > since I figured it would just deny it. Your findings clearly confirm
> > that.
> > As for the SmartMX chip, maybe you're right. But I suppose it could
> > also be built into the PN544 chip itself. I have no idea, I wasn't
> > able to find any datasheets that talk about it and have no details on
> > the NXP chips Samsung's been sourcing for the Nexus S.
> >
> > On Jan 21, 11:28 am, gusdgg  wrote:
> >
> >
> >
> > > Nemik,
> >
> > > Thanks for posting the diff's and great work! I'll patch the codebase
> > > and see what happen. In the meantime and coming back to your question
> > > about the Nexus S hardware containing a secure element like SmartMX,
> > > did you get the secure element list with the method
> > > getSecureElementList() in the patched version? I called this method
> > > (via reflection, no patched yet) but it gets the error message
> > > "WRITE_SECURE_SETTINGS permission required"
> >
> > > As you may know, there are an excelent nexus s teardown (
> http://www.ifixit.com/Teardown/Nexus-S-Teardown/4365/1) from iFixit.
> You'll
> > > see there, in the step 7 - 2nd picture, the NXP PN544NFCchip closely
> > > located to the UICC slot, but as far I can see there isn't any SmartMx
> > > chip in that picture, nor in the others.
> >
> > > Regards,
> > > gusdgg
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Re: [android-developers] Re: NFC Intents: Reacting on specific NDEF types

2011-01-18 Thread Ajith Kamath
I dont think there is such a thing.
You will have to write intermediate receiver for
android.nfc.action.TAG_DISCOVERED

Then separate ndef messages like i said before and generate separate intents
which ever is needed.

Regards,
Ajith



On Tue, Jan 18, 2011 at 12:54 PM, andrew wrote:

> I think he only wants his activity started by the NFC intent, if the
> tag has a specific type of indefinite message.
>
> I.e. he wants to be able to specify an intent filter for his activity
> by indefinite message type and not be started on all tag discoveries.
>
> On Jan 18, 4:19 am, Ajith Kamath  wrote:
> > Hi Dominik
> >
> > The EXTRA_NDEF_MESSAGES<
> http://developer.android.com/reference/android/nfc/NfcAdapter.html#EX...>
> > will
> > be in that Intent which will contain all ndef messages of detected tag.
> So
> > once you get that intent, get all records from that Ndef Message. Check
> the
> > type (getTnf ) for
> > TNF_EXTERNAL_TYPE<
> http://developer.android.com/reference/android/nfc/NdefRecord.html#TN...>
> > and
> > then check for uri
> >
> > I hope this answers your question
> >
> > Regards,
> > Ajith
> >
> >
> >
> > On Tue, Jan 18, 2011 at 6:07 AM, Dominik  wrote:
> > > Is it possible to restrict the type of tags an application is reacting
> > > on?
> >
> > > The intent filter used e.g. by the Tags application on the Nexus-S is
> > > defined as
> > >   
> > >  
> > >  
> > >  
> > > When a tag is detected, the user has to choose the application which
> > > should handle the intent.
> >
> > > I would like to react depending on the NDEF type of the record, e.g.
> > > my application should be started if the NDEF record is of type
> > > EXTERNAL and if the uri is "urn:nfc:ext:company.com:demo".
> >
> > > Is such an extension of the intent filter possile?
> > > If not, is it planned?
> >
> > > Dominik
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To 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
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] NFC Intents: Reacting on specific NDEF types

2011-01-17 Thread Ajith Kamath
Hi Dominik

The 
EXTRA_NDEF_MESSAGES
will
be in that Intent which will contain all ndef messages of detected tag. So
once you get that intent, get all records from that Ndef Message. Check the
type (getTnf ) for
TNF_EXTERNAL_TYPE
and
then check for uri

I hope this answers your question

Regards,
Ajith




On Tue, Jan 18, 2011 at 6:07 AM, Dominik  wrote:

> Is it possible to restrict the type of tags an application is reacting
> on?
>
> The intent filter used e.g. by the Tags application on the Nexus-S is
> defined as
>   
>  
>  
>  
> When a tag is detected, the user has to choose the application which
> should handle the intent.
>
> I would like to react depending on the NDEF type of the record, e.g.
> my application should be started if the NDEF record is of type
> EXTERNAL and if the uri is "urn:nfc:ext:company.com:demo".
>
> Is such an extension of the intent filter possile?
> If not, is it planned?
>
> Dominik
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: NFC Secure Element

2011-01-17 Thread Ajith Kamath
I still dont have nexus s but there is a high probability that its Embedded

Yes Keys are private and most likely needs to be provided by Service
Provider. The same thing has been mentioned in nokia forum
But I am not sure  how this will be done for nexus S.(may be there are ties
with Service Provider)

If anyone can explain OTA agent and its communication with TSM, it would be
very helpful. Since this too is not clear (w.r.t android)

Regards,
Ajith



On Tue, Jan 18, 2011 at 5:41 AM, Dominik  wrote:

> According to the NXP documentation of PN544, three SE variants are
> supported:
> - SIM Card (via UICC)
> - Embedded (SmartMX security chip)
> - SD Card
>
> Do you know which version is intended to be used by the Nexus S
> device?
>
> The above messages describe attempts to enable SmartMX. As soon as
> access to this SE is possible:
> Which keys do you use to access the SE? Such keys should be private
> and not generally be known.
>
> I am at a loss.
>
> - Dominik
>

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

[android-developers] NFC Smart poster and Tag reader

2011-01-13 Thread Ajith Kamath
Hi

Is it possible to have Android NFC device configured as both Smart poster
and Tag reader?
Will Smart poster require separate h/w config?

Please advice

Regards,
Ajith

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

2011-01-11 Thread Ajith Kamath
Please go through previous threads already on nfc in the developers group
Tag reading demo provided is just a simulation.

Regards,
Ajith

On Tue, Jan 11, 2011 at 11:27 AM, kampy  wrote:

> Hi All,
>
> I read the docs about the NFC on android and tried with the sample
> provided in the develoers group, but i am unable to understand the
> execution of the sample .
>
> Here Mock tags are provided and after clicking on the list i am
> getting the tags encoded in an another view. anyone explain me what is
> the procedure and the theme of using the NFC
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

Re: [android-developers] Re: NFC Secure Element

2011-01-09 Thread Ajith Kamath
Hi Nemik

I'm running over the libnfc code.
I can see these 4 files to be prominent for communication with SE

phHciNfc_CE_A.c
phHciNfc_CE_B.c

I am thinking the above two might be used for R/W into SE from App
Processor.
And the below two is used for communication between NFC Controller and SE.

phHciNfc_SWP.c
phHciNfc_WI.c

Please go through these files and let me know if I'm in right path.

Regards,
Ajith




On Mon, Jan 10, 2011 at 11:44 AM, nemik  wrote:

> Ajith,
>
> According to
> http://discussion.forum.nokia.com/forum/showthread.php?199442-6212-device-how-to-work-with-the-secure-element
> the CN072 is a secure element in the Smart MX family. I'm not sure the
> same one is in the Nexus S, but I presume the one in there is at least
> very similar.
>
> Here is the info on it:
> http://www.nxp.com/acrobat_download2/other/identification/SFS107710.pdf
>
> I'm still trying to figure out how to get access to it as well, for
> reading or writing. I doubt there are any specific commands for it
> though, it just takes regular commands over ISO14443 just like other
> MiFare cards.
>
> On Jan 9, 11:31 pm, Ajith Kamath  wrote:
> > Hi Nemik
> >
> > * I have small doubt with current implementation. Is SmartMX a Secure
> > Element ?If so can you give me examples?
> > * I have checked libnfc-nxp , enabling P2P parameter was  at
> phnfcconfig.h.
> > what needs to be done to enable Secure element?
> > what are MifarePlus, Desfire, Topaz . Is it a Card type or Secure
> Element?
> >
> > * Also where is the general read-write methods for entry of Secure
> element.
> > All I can see is phLibNfc_SE.c is methods for getting list of secured
> > element, selecting secure element, deselecting.
> > * But method for exchange of data is not present. Can you tell me where
> can
> > I find this?
> >
> > * In libnfc-nxp There are files like  phFriNfc_NdefMap.c,
> > phFriNfc_MifareULMap.c,  phFriNfc_TopazMap.c, phFriNfc_TopazDynamicMap.c,
> > phFriNfc_DesfireMap.c, phFriNfc_FelicaMap.c.
> > Can you tell me what these files are used for. The current comments in
> the
> > file do not provide sufficient information
> >
> > * I am trying to use Wired Mode, Hence phHciNfc_WI.c will be used to
> > communicate between Controller and Secure element right?
> >
> > Please advice.
> >
> > Regards,
> > Ajith
> >
> > Hi
> >
> >
> >
> >
> >
> >
> >
>  > On Sun, Jan 9, 2011 at 1:00 AM, nemik  wrote:
> > > I was able to enable a secure element the other day by messing around
> > > with this external/libnfc-nxp library. I enabled SMX (SmartMX) in the
> > > config headers, and upon booting and monitoring `adb logcat` during
> > > boot I saw 1 secure elements (a SmartMX one) had been enabled. I was
> > > then able to change the mode in NfcService.java to card emulation
> > > mode.
> >
> > > The Nexus S is now emulating a MiFare Classic 4k card. However, I am
> > > not able to read sectors from the card directly. I've been trying to
> > > use the micmd tool to do that but things act pretty strangely. For
> > > example, I tried to read block 0 and micmd tells me "Could not read
> > > the data block! Tag halted, reconnecting..." but what's even stranger
> > > is that at that point, 'adb logcat' shuts itself off. As if that read
> > > command somehow interfered with USB or logging?
> > > However trying `a` commands to authenticate in micmd always works for
> > > some reason and it'll even pretent to write and persist data to
> > > blocks; but of course that data never actually gets persisted to the
> > > emulated card. Maybe this is a bug in micmd?
> >
> > > Does anyone know if the Nexus S hardware (or its PN544 NFC chipset)
> > > even contains a hardware secure element like SmartMX? I tried also
> > > enabling UICC but that didn't seem to work at all and NFC service
> > > wouldn't even start in that case. Plus my SIM card is MANY years old
> > > and not sure it'd even work...
> >
> > > Either way, I used libnfc.org's `nfc-mfclassic` tool to dump out the
> > > contents of that emulated 4k card. It is here:
> > >http://pastebin.com/zKZ2ELcw
> >
> > > Seems to be entirely blank which is why I'm wondering if these aren't
> > > some default values it would spit out anyway even if no SmartMX module
> > > existed?
> >
> > > If anyone has any more insights into this, I'd be very happy to hear
> > &

Re: [android-developers] Re: NFC Secure Element

2011-01-09 Thread Ajith Kamath
Hi Nemik

* I have small doubt with current implementation. Is SmartMX a Secure
Element ?If so can you give me examples?
* I have checked libnfc-nxp , enabling P2P parameter was  at phnfcconfig.h.
what needs to be done to enable Secure element?
what are MifarePlus, Desfire, Topaz . Is it a Card type or Secure Element?


* Also where is the general read-write methods for entry of Secure element.
All I can see is phLibNfc_SE.c is methods for getting list of secured
element, selecting secure element, deselecting.
* But method for exchange of data is not present. Can you tell me where can
I find this?

* In libnfc-nxp There are files like  phFriNfc_NdefMap.c,
phFriNfc_MifareULMap.c,  phFriNfc_TopazMap.c, phFriNfc_TopazDynamicMap.c,
phFriNfc_DesfireMap.c, phFriNfc_FelicaMap.c.
Can you tell me what these files are used for. The current comments in the
file do not provide sufficient information

* I am trying to use Wired Mode, Hence phHciNfc_WI.c will be used to
communicate between Controller and Secure element right?

Please advice.

Regards,
Ajith



Hi

On Sun, Jan 9, 2011 at 1:00 AM, nemik  wrote:

> I was able to enable a secure element the other day by messing around
> with this external/libnfc-nxp library. I enabled SMX (SmartMX) in the
> config headers, and upon booting and monitoring `adb logcat` during
> boot I saw 1 secure elements (a SmartMX one) had been enabled. I was
> then able to change the mode in NfcService.java to card emulation
> mode.
>
> The Nexus S is now emulating a MiFare Classic 4k card. However, I am
> not able to read sectors from the card directly. I've been trying to
> use the micmd tool to do that but things act pretty strangely. For
> example, I tried to read block 0 and micmd tells me "Could not read
> the data block! Tag halted, reconnecting..." but what's even stranger
> is that at that point, 'adb logcat' shuts itself off. As if that read
> command somehow interfered with USB or logging?
> However trying `a` commands to authenticate in micmd always works for
> some reason and it'll even pretent to write and persist data to
> blocks; but of course that data never actually gets persisted to the
> emulated card. Maybe this is a bug in micmd?
>
> Does anyone know if the Nexus S hardware (or its PN544 NFC chipset)
> even contains a hardware secure element like SmartMX? I tried also
> enabling UICC but that didn't seem to work at all and NFC service
> wouldn't even start in that case. Plus my SIM card is MANY years old
> and not sure it'd even work...
>
> Either way, I used libnfc.org's `nfc-mfclassic` tool to dump out the
> contents of that emulated 4k card. It is here:
> http://pastebin.com/zKZ2ELcw
>
> Seems to be entirely blank which is why I'm wondering if these aren't
> some default values it would spit out anyway even if no SmartMX module
> existed?
>
> If anyone has any more insights into this, I'd be very happy to hear
> them.
>
> -Nemanja
>
> On Dec 19 2010, 7:26 pm, nemik  wrote:
> > Dominik,
> >
> > Yea, that's right. All it does currently is read; at least via the
> > Java API. If you look at the kernel source though, a bunch of ifdefs
> > which allow for emulation were all disabled. So full compliance with
> > theNFCstandard will have to wait for a future kernel release.
> >
> > On Dec 7, 5:42 am, Gruntz Dominik  wrote:
> >
> >
> >
> >
> >
> >
> >
> > > Hi everyone,
> >
> > > Do I see it right, that the Android 2.3NFCAPI does not provide
> functionality to access a secure element? A secure element is a smartcard
> connected to theNFCcontroller, i.e. a secure storage in the device, either
> embedded in the mobile phone, on the SIM card or on a SD card.
> >
> > > With JavaME access to the secure element was provided with JSR177 which
> supported the communication with smart card applications usind APDU
> commands. I have not seen comparable functionality in package android.nfc.
> >
> > > Thanks for any hints
> > > Dominik
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] NFC Card emulation and P2P

2011-01-06 Thread Ajith Kamath
Hi

I saw your discussion on
http://groups.google.com/group/android-developers/browse_thread/thread/165bad53856ea1/fb2620bb1002e5cd?lnk=gst&q=nfc#fb2620bb1002e5cd

My question is we have libnfc-nxp which seems to be entire protocol stack
for nfc.
For Card Emulation i went through the NfcService.java and other nfc package
and framework , it only provides getting, selecting, deselecting
SecureElement.

So my question is that can writing to Secure element be possible with
current code?
If not , Is this support provided in libnfc-nxp?
I personally couldn't find any methods to write into Secure Element in
libnfc-nxp.

Also is P2P read and write provided? For example if i want a contact sharing
service, then LLCP has to be connected to OBEX via protocol Bindings.
Is this support provided in libnfc-nxp? If so has these been made accessible
through nfc app/framework?

Please advice

Regards,
Ajith

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

[android-developers] Ginger bread - NFC Card Emulation & p2p

2011-01-05 Thread Ajith Kamath
Hi

I am trying to use NFC on Gingerbread.
I wanted to know if Card Emulation and Peer 2 Peer is possible on present
gingerbread code.

Because looking into api's and framework files I'm clear that Tag reading is
possible.
But Will this code support Card Emualtion & P2P  is doubtful.

*Can some please tell me if these two features can be supported by
gingerbread or not?

Because Card Emulation app will require access to Secure Element(SE) for
example UICC(for LTE devices)
These API's / framework is not provided(atleast I could't find it).

 * Can Someone please tell me if Access to SE is Implementation specific and
code(app and frame) will be provided based on SE separately?

Regards,
Ajith

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

2010-12-28 Thread Ajith Kamath
Hi

in init.rc i had attached my bluetooth to uart like this :

service hciattach /system/bin/logwrapper /system/bin/hciattach -s 115200
/dev/s3c_serial1 any 115200 flow
 user root
 group bluetooth net_bt_admin
 disabled
 oneshot

Does 115200 baud rate have any interferance with transfer speed
I am using broadcom bluetooth chip bcm4325

Please advice

Regards,
Ajith


On Tue, Dec 28, 2010 at 1:00 PM, Ajith Kamath  wrote:

> Hi
>
> I have implemented FTP server V1.1 for Android over Bluez.
> But when I do the transfer to/fro , my speed is max 10.2~10.8KBps
>
> But then i checked Opp which is already implemented by google. This is over
> eclair.
> Speed is same 10KBps
>
> I used Widcomm Bluetooth 2.0 Dongle Model : BU-2083-J
> and
> Class 1 BillionTon Dongle(IVT) - HCI version 2.1 manufactured by Cambridge
> Silicon Radio and LMP version 2.1
>
> Same speed in both dongles.
>
> Can you please let me know reason of this low speed?
> Am I overlooking something here?
>
> Regards,
> Ajith
>
>

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

[android-developers]

2010-11-05 Thread Ajith Kamath
Hi all

I'm facing peculiar problem with Jabra BT8010 headset , when connected to
bluetooth in  Android.
After connecting the headset, if i do power reset of phone. Then after
restart I receive a call . Nothing will be heard.
This happened very few times but still prominent

What can be the problem. I heard SLC connection is delayed in Jabra BT8010.
I have made sleep of 2600 ms for it in BluetoothHandsfree.java.
But still same problem

Please suggest.

Thanks & Regards,
Ajith

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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-porting] Re: [android-developers] KeyCharacterMap problem and Bluetooth Headset

2010-10-12 Thread Ajith Kamath
Hi Dianne

Thanks for info..

I found out the problem was in Avrcp.kl , Its file my system is using for
scancode -keycode generation.
I added following in avrcp.kl after i found that 164,128 and 159  has no
entry at all:

key 164   MEDIA_PLAY_PAUSEWAKE
key 128   MEDIA_STOP  WAKE
key 159   MEDIA_FAST_FORWARD  WAKE

Anyways, Its working now.

Thanks ,
Ajith


On Tue, Oct 12, 2010 at 12:43 PM, Dianne Hackborn wrote:

> This is unrelated to keycharmap files, which are used for converting key
> events to printable characters.  Generally the Linux driver for the device
> should be reporting the key as the standard Linux key code, and there is a
> generic scan code -> key code mapping the platform has for turning those to
> Android key code.s
>
> On Mon, Oct 11, 2010 at 8:34 PM, Ajith Kamath wrote:
>
>> Hi
>>
>> I am facing a problem with Bluetooth Headset and KeyCharacter Mapping
>> When I press play/pause button from Samsung sbh-170 , its not getting
>> reflected in Phone.
>> I traced and  came to know that , normally scan code of 164, keycode of 85
>> is formed when i press Headset play/pause. And PhoneWindow manager will
>> intercept this and send ACTION_MEDIA_BUTTON if keycode =85
>> (KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE).
>>
>> But keycode that I'm getting is 0 even when i press headset play/pause in
>> PhoneWindow Manager. Even in KeyInputQueue, the keycode that is obtained is
>> 0
>> Does anybody when keycode gets generated??
>>
>> Also I got following error in log :
>>
>>  AVRCP: Send key 164 (1) fd=23
>> WARN/KeyCharacterMap(2550): Can't open keycharmap file
>> WARN/KeyCharacterMap(2550): Error loading keycharmap file
>> '/system/usr/keychars/AVRCP.kcm.bin'. hw.keyboards.131077.devname='AVRCP'
>> WARN/KeyCharacterMap(2550): Using default keymap:
>> /system/usr/keychars/qwerty.kcm.bin
>>
>> Can this be a problem ? If so , how??
>> Please suggest.
>>
>> Regards,
>> Ajith
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, 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.
>
>  --
> unsubscribe: 
> android-porting+unsubscr...@googlegroups.com
> website: http://groups.google.com/group/android-porting
>

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

[android-developers] KeyCharacterMap problem and Bluetooth Headset

2010-10-11 Thread Ajith Kamath
Hi

I am facing a problem with Bluetooth Headset and KeyCharacter Mapping
When I press play/pause button from Samsung sbh-170 , its not getting
reflected in Phone.
I traced and  came to know that , normally scan code of 164, keycode of 85
is formed when i press Headset play/pause. And PhoneWindow manager will
intercept this and send ACTION_MEDIA_BUTTON if keycode =85
(KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE).

But keycode that I'm getting is 0 even when i press headset play/pause in
PhoneWindow Manager. Even in KeyInputQueue, the keycode that is obtained is
0
Does anybody when keycode gets generated??

Also I got following error in log :

 AVRCP: Send key 164 (1) fd=23
WARN/KeyCharacterMap(2550): Can't open keycharmap file
WARN/KeyCharacterMap(2550): Error loading keycharmap file
'/system/usr/keychars/AVRCP.kcm.bin'. hw.keyboards.131077.devname='AVRCP'
WARN/KeyCharacterMap(2550): Using default keymap:
/system/usr/keychars/qwerty.kcm.bin

Can this be a problem ? If so , how??
Please suggest.

Regards,
Ajith

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

2010-10-05 Thread Ajith Kamath
Hi Garima

If you are developing application, to control media and phone audio, You
will need to implement it in Framework.
For ex: You can go by sending At commands to Phone - (BluetoothHandsfree)
and immitate as though Headset itself is sending it.
You can refer the HFP spec of Bluetooth for At commands and operation. For
Voice gain and reduction there are specific at commands.
I think you will need to send this to socket of BluetoothAudioGateway.
I'm not sure if this is what you require and if it answers your question.
Let me know.

Regards,
Ajith

On Tue, Oct 5, 2010 at 12:53 AM, Garima
wrote:

> I have read that in-call audio is not available to SDK applications.
> Does that mean that there is no way by which we can access the uplink/
> downlink audio stream?
>
> I don't want to do any call recording but instead I would like to use
> VOICE_CALL or VOICE_UPLINK or VOICE_DOWNLINK through my app which is
> interfaced with the bluetooth headset, so that I can use the Noise
> Cancellation capability of my bluetooth (which gets activated only
> when you are in phone-call mode). But am not sure how to go about
> doing it. To record and playback am using AudioRecord and AudioTrack
> classes.
>
> Any help or suggestions would be greatly appreciated.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

[android-developers] Task Manager Killing process. Incomplete kill.

2010-09-24 Thread Ajith Kamath
Hi all

I am facing following issue with respect to FORCE KILL :

Following is done after BT is on:

1. idle - applications - gallery - camera - Select any one image
2. menu - share - bluetooth - 'scan for devices' touch

After this our task manager app is activated by home key longpress.
i kill Gallery and Opp app.
Now when i push back button , Device picker screen is still displaying.

This is because BluetoothSettings was not killed by taskmanager when opp was
killed.

Can you please suggest any solution for this.

Also When you kill the process , even onPause, onStop or onDestroy is NOT
called.
Is there any function which is called when Force kill of Process is done?!!

Please advice.

Thanks & Regards,
Ajith

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

[android-developers] Need info on LOCAL_CFLAGS

2010-09-13 Thread Ajith Kamath
Hi

Can anyone please tell me usage of  LOCAL_CFLAGS in android.mk.

Regards,
Ajith

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

[android-developers] Bluetooth FTP Server Service implementation

2010-09-07 Thread Ajith Kamath
Hi,

I have written FTP server for Eclair 2.1.
I'm stuck in browsing service. Here I'm able to do forward browsing (i.e
descend into folders).
But when I give up(back), Client(laptop dongle) which I'm using to browse,
is not sending me SET Path request.
But FTP spec v 1.1 says Obex SET PATH request has to be sent when you need
to go back up in folder hierarchy(parent folder).

Because of this anamoly I'm not able to determine if I need to make any
changes in my FTP server code.
Dongle which I'm using as client is  WIDCOMM bluetooth 5.1.0.3300 with
Bluetooth 2.0 fucntionaity.

Please advice

Regards,
Ajith

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