[android-developers] NFC Ndef Read Write using Services in android
Hi I am using NFC for Tag reading / Writing capability, I want to make a library service, which will run in background to listen to the NDEF or Tag related intents. Is it possible to design application, where Service would listen to the NDEF intents and not activity, using Broadcast Receivers, provided that I cannot use onNewIntent() and onResume() for intent discovery. Please suggest if it is possible and a snippet code would be appreciated. Thanks in advance, Pallavi Roy. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Ndef Read Write using Services in android
Yes I have tried using Service /Broadcast reciever, having intent filter, not sure how to catch / read the intent filter while NFC tag is read @Override public void onCreate() { // TODO Auto-generated method stub super.onCreate(); System.out.println(on create); } Manifest service android:name=.NfcService intent-filter action android:name=android.nfc.action.TAG_DISCOVERED / !-- action android:name=android.intent.action.VIEW / -- category android:name=android.intent.category.DEFAULT / !-- data android:mimeType=text/plain / -- data android:mimeType=text/plain / /intent-filter /service BroadcastReciever public class NfcIntentReciever extends BroadcastReceiver{ @Override public void onReceive(Context context, Intent intent) { // TODO Auto-generated method stub if(intent.getAction().equals(NfcAdapter.ACTION_NDEF_DISCOVERED)){ System.out.println(Receiver : ACTION_NDEF_DISCOVERED); } if(intent.getAction().equals(NfcAdapter.ACTION_TAG_DISCOVERED)){ System.out.println(Reciever : ACTION_TAG_DISCOVERED ); } } } Manifest for Reciever receiver android:name=.NfcIntentReciever intent-filter action android:name=android.nfc.action.NDEF_DISCOVERED / !-- action android:name=android.intent.action.VIEW / -- category android:name=android.intent.category.DEFAULT / data android:mimeType=text/plain / /intent-filter /receiver I can see few logs whenever NFC tag is scanned 01-08 05:05:59.093: D/NfcDispatcher(473): dispatch tag: TAG: Tech [*android.nfc.tech.MifareUltralight, android.nfc.tech.NfcA, android.nfc.tech.Ndef*] message: NdefMessage [NdefRecord tnf=2 type=6170706C69636174696F6E2F636F6D2E776970726F2E6E66637461676C696272617279 payload=557365204D4D54206174204D63446E6C6420333025206F207573696E672049434943492044656269742043617264, NdefRecord tnf=2 type=6170706C69636174696F6E2F636F6D2E776970726F2E6E66637461676C696272617279 payload=6F65722E68746D6C] 01-08 05:05:59.117: D/NfcHandover(473): tryHandover(): NdefMessage [NdefRecord tnf=2 type=6170706C69636174696F6E2F636F6D2E776970726F2E6E66637461676C696272617279 payload=557365204D4D54206174204D63446E6C6420333025206F207573696E672049434943492044656269742043617264, NdefRecord tnf=2 type=6170706C69636174696F6E2F636F6D2E776970726F2E6E66637461676C696272617279 payload=6F65722E68746D6C] 01-08 05:05:59.128: I/*ActivityManager(258): START* {flg=0x10008000 cmp=com.android.nfc/.NfcRootActivity (has extras) u=0} from pid 473 01-08 05:05:59.160: I/*NfcDispatcher(473)*: matched multiple TECH 01-08 05:05:59.164: I/*ActivityManager(258)*: START {cmp=com.android.nfc/.TechListChooserActivity (has extras) u=0} from pid 473 01-08 05:05:59.238: D/dalvikvm(473): GC_CONCURRENT freed 368K, 10% free 8323K/9159K, paused 12ms+8ms, total 52ms 01-08 05:05:59.312: I/*ActivityManager(258): Displayed com.android.nfc/.TechListChooserActivity*: +142ms (total +160ms) Does the above log means that it only allows to start Activity component from the NFC framework, whenever Tag is scaned, coz in case of Activity, we can see onNewIntent() is invoked whenevr Tag is detected with New Intent and singleTask flag is defined, but no such overriden method Im able to identify to detect the Intent discovery. Same with Receiver, not sure if it is dependent with the framework, which needs to send a broadcast for this intent at all. Let me know, if anybody has information with the same. Thanks, Pallavi Roy On Monday, September 24, 2012 2:10:18 PM UTC+5:30, Nikolay Elenkov wrote: On Mon, Sep 24, 2012 at 5:24 PM, android_solutions androidso...@gmail.com javascript: wrote: Hi I am using NFC for Tag reading / Writing capability, I want to make a library service, which will run in background to listen to the NDEF or Tag related intents. Is it possible to design application, where Service would listen to the NDEF intents and not activity, using Broadcast Receivers, provided that I cannot use onNewIntent() and onResume() for intent discovery. Did you try it? Unless there are some additional checks in place, it should work since you are simply getting an intent, and if you have the proper filters your service should receive it. However, you cannot intercept all NFC events, since activities using foreground dispatch have priority if they register for the same tech, etc. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] NFC Ndef Read Write using Services in android
The logs that I have posted, shows that NFC framework itself is starting Activity Manager, is this a correct assumption. 01-08 05:05:59.128: I/*ActivityManager(258): START* {flg=0x10008000 cmp=com.android.nfc/.NfcRootActivity (has extras) u=0} from pid 473 01-08 05:05:59.312: I/*ActivityManager(258): Displayed com.android.nfc/.TechListChooserActivity*: +142ms (total +160ms) Please suggest, if anybody has worked on the same. thanks, Pallavi On Monday, September 24, 2012 3:03:57 PM UTC+5:30, android_solutions wrote: Yes I have tried using Service /Broadcast reciever, having intent filter, not sure how to catch / read the intent filter while NFC tag is read @Override public void onCreate() { // TODO Auto-generated method stub super.onCreate(); System.out.println(on create); } Manifest service android:name=.NfcService intent-filter action android:name=android.nfc.action.TAG_DISCOVERED / !-- action android:name=android.intent.action.VIEW / -- category android:name=android.intent.category.DEFAULT / !-- data android:mimeType=text/plain / -- data android:mimeType=text/plain / /intent-filter /service BroadcastReciever public class NfcIntentReciever extends BroadcastReceiver{ @Override public void onReceive(Context context, Intent intent) { // TODO Auto-generated method stub if(intent.getAction().equals(NfcAdapter.ACTION_NDEF_DISCOVERED)){ System.out.println(Receiver : ACTION_NDEF_DISCOVERED); } if(intent.getAction().equals(NfcAdapter.ACTION_TAG_DISCOVERED)){ System.out.println(Reciever : ACTION_TAG_DISCOVERED ); } } } Manifest for Reciever receiver android:name=.NfcIntentReciever intent-filter action android:name=android.nfc.action.NDEF_DISCOVERED / !-- action android:name=android.intent.action.VIEW / -- category android:name=android.intent.category.DEFAULT / data android:mimeType=text/plain / /intent-filter /receiver I can see few logs whenever NFC tag is scanned 01-08 05:05:59.093: D/NfcDispatcher(473): dispatch tag: TAG: Tech [*android.nfc.tech.MifareUltralight, android.nfc.tech.NfcA, android.nfc.tech.Ndef*] message: NdefMessage [NdefRecord tnf=2 type=6170706C69636174696F6E2F636F6D2E776970726F2E6E66637461676C696272617279 payload=557365204D4D54206174204D63446E6C6420333025206F207573696E672049434943492044656269742043617264, NdefRecord tnf=2 type=6170706C69636174696F6E2F636F6D2E776970726F2E6E66637461676C696272617279 payload=6F65722E68746D6C] 01-08 05:05:59.117: D/NfcHandover(473): tryHandover(): NdefMessage [NdefRecord tnf=2 type=6170706C69636174696F6E2F636F6D2E776970726F2E6E66637461676C696272617279 payload=557365204D4D54206174204D63446E6C6420333025206F207573696E672049434943492044656269742043617264, NdefRecord tnf=2 type=6170706C69636174696F6E2F636F6D2E776970726F2E6E66637461676C696272617279 payload=6F65722E68746D6C] 01-08 05:05:59.128: I/*ActivityManager(258): START* {flg=0x10008000 cmp=com.android.nfc/.NfcRootActivity (has extras) u=0} from pid 473 01-08 05:05:59.160: I/*NfcDispatcher(473)*: matched multiple TECH 01-08 05:05:59.164: I/*ActivityManager(258)*: START {cmp=com.android.nfc/.TechListChooserActivity (has extras) u=0} from pid 473 01-08 05:05:59.238: D/dalvikvm(473): GC_CONCURRENT freed 368K, 10% free 8323K/9159K, paused 12ms+8ms, total 52ms 01-08 05:05:59.312: I/*ActivityManager(258): Displayed com.android.nfc/.TechListChooserActivity*: +142ms (total +160ms) Does the above log means that it only allows to start Activity component from the NFC framework, whenever Tag is scaned, coz in case of Activity, we can see onNewIntent() is invoked whenevr Tag is detected with New Intent and singleTask flag is defined, but no such overriden method Im able to identify to detect the Intent discovery. Same with Receiver, not sure if it is dependent with the framework, which needs to send a broadcast for this intent at all. Let me know, if anybody has information with the same. Thanks, Pallavi Roy On Monday, September 24, 2012 2:10:18 PM UTC+5:30, Nikolay Elenkov wrote: On Mon, Sep 24, 2012 at 5:24 PM, android_solutions androidso...@gmail.com wrote: Hi I am using NFC for Tag reading / Writing capability, I want to make a library service, which will run in background to listen to the NDEF or Tag related intents. Is it possible to design application, where Service would listen to the NDEF intents and not activity, using Broadcast Receivers, provided that I cannot use onNewIntent() and onResume() for intent discovery. Did you try it? Unless there are some additional checks in place, it should work since you are simply getting
Re: [android-developers] Writing Proxy Settings in Settings.Secure
Hi I am using Samsung Nexus S phone(Android version 4.1.1), and I am not able to do the Proxy setting and enabling user authentication for web applications. I am not able to hit google.com url. Though I found to set the Proxy url / port in the Advanced Wifi settings, but Im not able to configure enabling user authentication.Also that setting is only for Web browsers and not for any other application. My web server is within bacbone, and I have to set the proxy configuration, please help me in letting the same. Thanks in advance, Pallavi Roy On Saturday, February 18, 2012 9:24:26 PM UTC+5:30, Marco Pagliari wrote: Have a look here http://www.android-proxy.com/. I'm working on that. Please be patient. If you want to be involved the APL http://code.google.com/p/android-proxy-library/project is FOSS. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Writing Proxy Settings in Settings.Secure
If possible, any code snippet to set the Proxy configuration in the System Content Resolver. Thanks, Pallavi On Wednesday, September 19, 2012 12:54:21 PM UTC+5:30, android_solutions wrote: Hi I am using Samsung Nexus S phone(Android version 4.1.1), and I am not able to do the Proxy setting and enabling user authentication for web applications. I am not able to hit google.com url. Though I found to set the Proxy url / port in the Advanced Wifi settings, but Im not able to configure enabling user authentication.Also that setting is only for Web browsers and not for any other application. My web server is within bacbone, and I have to set the proxy configuration, please help me in letting the same. Thanks in advance, Pallavi Roy On Saturday, February 18, 2012 9:24:26 PM UTC+5:30, Marco Pagliari wrote: Have a look here http://www.android-proxy.com/. I'm working on that. Please be patient. If you want to be involved the APL http://code.google.com/p/android-proxy-library/project is FOSS. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Android Emulator not starting up
Hi, I am getting exactly the same issue, 10 hours or so for boot up emulator and then cant think of closing the emulator. Please suggest solution, nothing works out with snapshot option.Even for API level 10 and below, Im not getting , enabling of the snapshot option.Please suggest. Thanks, Pallavi Roy On Monday, August 6, 2012 10:55:31 PM UTC+5:30, MagouyaWare wrote: Wait 10 hours... or maybe even longer. And then don't ever turn your machine off or close your emulator. Ever again. :-) Here, Let Me Google That For You... http://lmgtfy.com/?q=android+emulator+long+boot+time Maybe in the future you will someday learn how to use Google yourself. P.S. Sorry for the snide remarks, but this has seriously been asked numerous times on this forum and in general... There is lots of information out there that can be found with little to no effort on your part... Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Mon, Aug 6, 2012 at 12:24 AM, Shivdeep Roy shivde...@gmail.comjavascript: wrote: I'm new to android programming. I have installed SDK and AVD Managers when i start my emulator with the AVD manager it doesn't start up. It only shows the Android Boot Screen, i keep it on for more than 5 hrs but no response. I also tried with the snapshot option but it also seem to be of no help. Please help ASAP. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Android Emulator not starting up
Is this at all any installation issue, due to any corruption of file? Let me know, if anybody having solution. Thanks, Pallavi On Friday, September 14, 2012 10:47:35 AM UTC+5:30, android_solutions wrote: Hi, I am getting exactly the same issue, 10 hours or so for boot up emulator and then cant think of closing the emulator. Please suggest solution, nothing works out with snapshot option.Even for API level 10 and below, Im not getting , enabling of the snapshot option.Please suggest. Thanks, Pallavi Roy On Monday, August 6, 2012 10:55:31 PM UTC+5:30, MagouyaWare wrote: Wait 10 hours... or maybe even longer. And then don't ever turn your machine off or close your emulator. Ever again. :-) Here, Let Me Google That For You... http://lmgtfy.com/?q=android+emulator+long+boot+time Maybe in the future you will someday learn how to use Google yourself. P.S. Sorry for the snide remarks, but this has seriously been asked numerous times on this forum and in general... There is lots of information out there that can be found with little to no effort on your part... Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Mon, Aug 6, 2012 at 12:24 AM, Shivdeep Roy shivde...@gmail.comwrote: I'm new to android programming. I have installed SDK and AVD Managers when i start my emulator with the AVD manager it doesn't start up. It only shows the Android Boot Screen, i keep it on for more than 5 hrs but no response. I also tried with the snapshot option but it also seem to be of no help. Please help ASAP. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email 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 Video contents from Break.com
I am developing an app in android, where I want to get videos from Break.com http://www.break.com/ Is there any API exposed(sdk) from Break for android developers to access the contents or is there any way to do REST communication to get the data, like youtube data apis. Thanks in advance. Pallavi. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Apis for accessing video data from Break.com using Android apps
I am developing an app in android, where I want to get videos from Break.com http://www.break.com/ Is there any API exposed(sdk) from Break for android developers to access the contents or is there any way to do REST communication to get the data, like youtube data apis. Thanks in advance. Pallavi. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en