[android-developers] App is crashing because of android.os.FileUriExposedException
The app is crashing when I'm trying to open a file. I found the log android.os.FileUriExposedException: file:///storage/emulated/0/test.txt exposed beyond app through Intent.getData() I know the solution of this problem. I fixed in the newer version of the app. For new version of app, I used FileProvider for apk installation, but old version of app use Uri.*fromFile*(dest). Now the problem is the auto update of the app. I need to update app automatically from the old version of the app. When I tried to update new app it donload the app, but when try to install app it is crashing. Is there any way to install app from the old version of app? NB: previous developer didn’t use play store for our app. Thanks in advance -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/f8a6c933-349d-4f84-b5bb-85e88eaa79d2n%40googlegroups.com.
Re: [android-developers] Re: Error:Execution failed for task directoryPicker:processReleaseResources
I have no idea what you're saying! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/ebae4322-9b59-4f56-8605-75a1c0c65a08%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Re: Error:Execution failed for task directoryPicker:processReleaseResources
Anyone? On Tuesday, August 8, 2017 at 11:35:34 AM UTC-5, Husain Al-Haboubi wrote: > > Hello developers, > > I am having a problem lately with Android Studio ever since I updated to > 2.3.3. I have searched all the forums for possible solutions. Some say I > need to open Android Studio in Administration Mode, others say that I just > need to clean the project once! > > The error occurs when I try to run or build a project. Here is error > message: > > Error:Execution failed for task ':directoryPicker:processReleaseResources' > . > > java.io.IOException: Could not delete path > 'C:\Users\XXX\Desktop\X\X\directoryPicker\build\generated\source\r\release\android\support\compat' > . > > > Every time I want to build or run the project, I have to "Build > Clean > project" and sometimes I need to close and reopen AS. This happens to all > my projects and not only one project. I did the following: > >1. Ran Android Studio in Administration mode >2. Deleted the build folder >3. Restarted the computer and Android Studio > > > But no luck! Any idea on how to resolve this issue? > > Please be informed that the file path varies. Sometimes it's > "android\support\compact" and sometimes it's something else! > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/e9c92547-52eb-47cb-b1e1-fd765d84e06c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Error:Execution failed for task directoryPicker:processReleaseResources
Hello developers, I am having a problem lately with Android Studio ever since I updated to 2.3.3. I have searched all the forums for possible solutions. Some say I need to open Android Studio in Administration Mode, others say that I just need to clean the project once! The error occurs when I try to run or build a project. Here is error message: Error:Execution failed for task ':directoryPicker:processReleaseResources'. > java.io.IOException: Could not delete path 'C:\Users\XXX\Desktop\X\X\directoryPicker\build\generated\source\r\release\android\support\compat' . Every time I want to build or run the project, I have to "Build > Clean project" and sometimes I need to close and reopen AS. This happens to all my projects and not only one project. I did the following: 1. Ran Android Studio in Administration mode 2. Deleted the build folder 3. Restarted the computer and Android Studio But no luck! Any idea on how to resolve this issue? Please be informed that the file path varies. Sometimes it's "android\support\compact" and sometimes it's something else! -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/9a5e084d-7cd9-46af-a352-47180e7cd72d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Eye Blink detection
Hi I'm trying to do an app for blink detection , I'm a beginner in android . How this can de done in android ? Thanks -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. To post to this group, send email to android-developers@googlegroups.com. Visit this group at https://groups.google.com/group/android-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/android-developers/c98cb0f7-d328-4ed3-bf8d-d1d33f4cf438%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] RTL Languages in Android studio
Hello , Android studio is support writing in RTL languages such as Arabic but the problem is appear in the attached photo . Look at the (//) Its in the wrong place when I write an RTL language comment > Is there any way to make it better ? -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[android-developers] Re: Who decided the new SMS API in 4.4 was a good thing!??
I clearly understand your frustration. And I may not have the right to say something about this since I don't use the SMS API. On the other hand, let me try to take on the users hat: You certainly know that some users have to pay for each SMS, typically significantly more than to transfer a similar amount of data via an internet connection. I actually think using SMS for such a task is the wrong approach to start with. In my opinion, the best solution would be if the bank provides another way to access that information (something like a rest web service?). Of course, if there's no other way provided by the bank and you have no influence, you may have no other chance. However, in this special case, the blame seems to be on the bank and less so on Google (I certainly don't want to defend Google. There do numerous things I don't like , e.g. not fixing bug 3434)... Am Sonntag, 10. November 2013 11:54:28 UTC+1 schrieb BTJ: I have several app on Play that is specialized SMS apps, i.e. they use SMS services provided by others.. Like I have one app that uses the SMS services provided by banks to ask for current amount on an account, transfer money between accounts, etc... All this is done sending SMS and parsing SMS response... And this app is very user friendly and does all the needed SMS handling.. But now with the new 4.4 API, the app no longer can operate without cluttering up the Inbox and Sent box of the SMS application... Why on earth would a user need to save the sent messages for such an app?? And also, before I could stop the response from being written to the inbox, this is no longer possible.. And in the text from Google about this API change it says: this will create a better user experience How on earth is this going to be a better user experience for my users!!??? Now my users have to manually open the default SMS app and delete all the messages that should not have been written to the SMS provider... Question: Can my app delete messages that have been written to the SMS provider without being the default SMS app? Regards, BTJ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Android developer registration with Neteller
anyone with knowledge on this? I am about to do the same as well. On Sunday, May 20, 2012 4:36:12 PM UTC+6, Balint wrote: Hello everyone, I tried to register as an android developer with my Neteller card, but Google asks for the Bank code and my bank account number. I am registered with a local bank now, where I have these data, but I tried to add my Neteller card, so the money I earn would be transferred to that card from next month. How am I supposed to register/add this card? I contacted Neteller and they told me to contact Google... This was my question: I have created a Neteller account and have just activated my Neteller card. I want to register as an Android developer with this card and google asks for the bank code of your bank (Conister Bank?) and my account number. Can you help me? This is their bland answer: WIth regards to your inquiry, I asked my supervisor. I found that you need to put just your card information as usual credit card for purchase something. Therefore it should not be like that. Please ask the company and explain that. I don't even know if that is Conister Bank or Barclays Bank. Thanks, Balint -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Android USB problems
Probably not with the official usb api. I'm not sure if a port of libusb or something on that level may help. Am Freitag, 20. September 2013 16:03:20 UTC+2 schrieb eli: How do I get an app to read data from a USB barcode reader if the usbManager can't even detect that its there. On Thursday, September 19, 2013 3:55:19 PM UTC-4, eli wrote: http://stackoverflow.com/questions/18900666/android-usb-problems# ** I have a tablet, an OTG cable and a barcode reader. I know this works because when I start the Google app I can scan barcodes and see them on the screen. I created a very simple application that starts the USB manager and checks how many devices are attached. When I have a memory flash stick in the OTG cable the program shows 1. (correct) When I have a mouse in the OTG cable it shows 0. (why) Interesting observation. When I connect the mouse to the OTG cable it works fine. I use it to click on the button to ask the usbManager how many devices are attached and the response is 0. When I attach a barcode reader to the OTG cable, the application goes through onDestroy() and then shows 0. (Why does this happen) Basics of my program developed using Eclipse: In onCreate() I have: usbManager = (UsbManager)getSystemService(Context.USB_SERVICE); In onClick() I have (there is a button on the screen): MapString, UsbDevice usbDeviceList = sbManager.getDeviceList();Toast.makeText(this, String.format(Number of devices = %d, usbDeviceList.size()), Toast.LENGTH_SHORT).show(); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Android USB problems
Some device types (like a usb mouse) apparently are handled on system level and are not exposed to apps. Since different Android devices support different usb devices (e.g. usb storage, usb speakers, ...), some types of usb devices may be visible on some android devices only... Am Donnerstag, 19. September 2013 21:55:19 UTC+2 schrieb eli: http://stackoverflow.com/questions/18900666/android-usb-problems# ** I have a tablet, an OTG cable and a barcode reader. I know this works because when I start the Google app I can scan barcodes and see them on the screen. I created a very simple application that starts the USB manager and checks how many devices are attached. When I have a memory flash stick in the OTG cable the program shows 1. (correct) When I have a mouse in the OTG cable it shows 0. (why) Interesting observation. When I connect the mouse to the OTG cable it works fine. I use it to click on the button to ask the usbManager how many devices are attached and the response is 0. When I attach a barcode reader to the OTG cable, the application goes through onDestroy() and then shows 0. (Why does this happen) Basics of my program developed using Eclipse: In onCreate() I have: usbManager = (UsbManager)getSystemService(Context.USB_SERVICE); In onClick() I have (there is a button on the screen): MapString, UsbDevice usbDeviceList = sbManager.getDeviceList();Toast.makeText(this, String.format(Number of devices = %d, usbDeviceList.size()), Toast.LENGTH_SHORT).show(); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: When to close db connection on android?
http://stackoverflow.com/questions/4547461/closing-the-database-in-a-contentprovider https://groups.google.com/forum/#!msg/android-developers/NwDRpHUXt0U/jIam4Q8-cqQJ Am Dienstag, 21. Juni 2011 11:29:52 UTC+2 schrieb Jay: Hi, I am new to Android and I am looking at the Notepad Tutorial sample code now. In the NotesDbAdapter class, it defines a close() method to close the DatabaseHelper. However I cannot find this method get called anywhere. So my question is when shall we close the DB connection. I suppose we should call it in the onDestroy() mehod of each Activity class. Or will Android framework will take care of this so we don't have to worry about it? Please advise. thanks. -Jay -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: USBConnection: bulkTransfer OUT = after sending 10-15 x Data's every 4 seconds = USB is disconnected, every time.
You may be missing a call to UsbDeviceConnection.claimInterface(). Am Donnerstag, 4. Juli 2013 05:44:51 UTC+2 schrieb AndroidYourself: I have a problem, I've connected an USB CSR BT Dongle to my Acer A210 Android Device and all is working fine, I can receive endless data without problems. And also I can send Data with USB bulkTransfer successfully: int send = usbConnection.bulkTransfer(usbEndpointOUT, buf, buf.length, 1); So, all is working fine. But after 10-15 times of sending data's (5 Bytes every 4 Seconds) over the usbEndpointOUT with bulkTransfer... I receive only -1 from: int receive = usbConnection.bulkTransfer(usbEndpointIN, buffer.array(), buffer.array().length, 1000); and then the connection is lost. Do I have to read any other usb EndpointIN's to prevent a Buffer Overflow or something else? I've tested it with Asus TF700, Galaxy Note 2, ... and Android 3.2, Android 4.03, Android 4.1.2, Android 4.2.2. Always the same issue. -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Some tablets marked as Incompatible in Play Store, but not in Developer Console
Funny, you seem to ask for help but don't want to try the suggestions insisting it's Googles problem and thinking they would solve it... Looking at your manifest, I think there may be problems regarding screen compatibility mode. See http://developer.android.com/guide/practices/screen-compat-mode.html and http://android-developers.blogspot.de/2011/07/new-mode-for-apps-on-large-screens.html. Now, why does the problem occur without changes to the manifest? Yes, there may have been changes made by Google. However, I would not wait until Google fixes the problem. That's not necessarily Googles strength. It may even be the case that Google does not think it does something wrong. Instead, I would add a supports-screens element and set android:targetSdkVersionhttp://developer.android.com/guide/topics/manifest/uses-sdk-element.html#target. The values you should use depend on your app. I also would use a current sdk version to build the app. Achim Am Mittwoch, 22. Mai 2013 17:56:30 UTC+2 schrieb Julian Bunn: Hi Bob ... thanks for the input. I really don't want to set such a high minSdk as then I would lose many of my 10,000 customers, who are running older versions of the OS. It's been a few days since this tablet problem appeared so I'm going to check back with those customers to see if the app availability in the Play Store has changed in the meantime. On Tuesday, May 21, 2013 7:39:58 AM UTC-7, bob wrote: I agree that *it probably does not have to do with the 2.2 build*. I was having the same problem and was using the 2.2 build. However, I switched from 2.2 to 4.2 SDK, and this did not remedy the problem. However, I was able to sort of remedy the problem by setting minSdkVersion=15 targetSdkVersion=15 You might want to try that as an experiment. Thanks. On Monday, May 20, 2013 2:15:43 PM UTC-5, jjbunn wrote: I don't think it has anything to do with the 2.2 build (what makes you think it does?) as I already tried a version targeting 4.0 and the result was the same. My users report that there are several other apps in the Play Store that are now marked as incompatible for their tablets, which were compatible a few days ago. So, my impression is that the problem is in the Play Store, but I'd love to be wrong, because then I could fix it myself! Julian On Monday, May 20, 2013 10:41:46 AM UTC-7, Jonathan S wrote: Problem is Android 2.2 SDK build. You can built it on 4.0 and keep minimum API level. Just be very careful. On Monday, May 20, 2013 12:50:39 PM UTC-4, jjbunn wrote: I uploaded a new APK for one of my apps on Friday. There was no change to the manifest or build settings for the app, but some of my customers using tablets like the Note 10 and Nexus 10 tell me that the new APK is marked as incompatible in the Google Play store, whereas they were happily using the previous version on those devices. In my Android Developer Console, the APK is marked as being compatible with those tablets (in fact it is marked as compatible with over 2000 devices, and incompatible with 0 (zero)). So I am very puzzled what has happened, and would really appreciate some help :-) Here is the Manifest. I build with the Android 2.2 SDK. ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.android.com/apk/res/android; package=com.xxx.xxx.xxx android:installLocation=auto android:versionCode=76 android:versionName=5.9.2 uses-permission android:name=android.permission.RECORD_AUDIO/ uses-permission android:name=android.permission.MODIFY_AUDIO_SETTINGS/ uses-permission android:name=android.permission.WRITE_EXTERNAL_STORAGE/ uses-sdk android:minSdkVersion=4/ application android:icon=@drawable/icon android:label=@string/app_name android:theme=@android:style/Theme.NoTitleBar activity android:name=.MyApp android:label=@string/app_name intent-filter action android:name=android.intent.action.MAIN / category android:name=android.intent.category.LAUNCHER / /intent-filter /activity /application /manifest -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: scrollTo not working on Samsung Galaxy browser
Have the same problem, still didnt find a solution:( On Monday, September 12, 2011 9:17:50 AM UTC+4, archana wrote: We use JQuery plaugin 'scrollTo' to navigate to different parts of a big document, or for navigating using thumbnails. Although 'scrollTo' works fine on all desktop browsers and on iPhone and iPad, it's not working on the android browser on Samsung Galaxy tablet. Anyone any clue? -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Google Checkout spreadsheets and currency - how to convert all to U.S.?
The payout reports have 2 columns called Merchant Currency and Merchant Receives. The sales reports seem to be preliminary. It should be sufficient to use a simple script to convert the Charged Amount column. Personally, I use this currency converter class for as part of my own script: http://www.thomasknierim.com/63/java/java-currency-conversion-class/. The result of course does not correspond 100% to the data that you will eventually find in a payout report; it's preliminary... Am Freitag, 8. März 2013 23:21:05 UTC+1 schrieb niko20: Every since Google did a large switchover to currency, when you download a Google Checkout spreadsheet it shows the prices in all different currencies. This is pain in the ass for my recordkeeping and statistics. Anyone know how you can get it to show all currency values only in U.S. dollars? -niko -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: [android-developers] USB host
Yes, it may be. That indicates that the hardware (adapter etc.) is ok and thus the device is recognized on the linux/os level but it's not made visible on the level of the android USB-Host api (it's the same e.g. with usb mice etc.). It may be that android tries to use it as some standard rs232 hardware or as serial mouse or something. That's probably also the reason why Sick USB 2 Serial Terminal does not find your device: it's not visible on the api level. Like Tux, I would recommend using another kind of device too. The IOIO is great, but depending on your use case, it may be overkill. There have been other projects with usb 2 serial adapters. You may find recommendations via Google. Am Donnerstag, 28. Februar 2013 15:05:24 UTC+1 schrieb Marta Ribeiro: Additionally, I just noticed something, the application presents two tabs: Android plus Linux. According to android i have no devices connected. Whereas in the linux tab i find my device. Is this indicative of something? On Thursday, February 28, 2013 1:40:35 PM UTC, Marta Ribeiro wrote: Yes I can see my device. regarding the device file, it is in decimal, which I've head is the correct way. I've check the values with the output of the application and after a conversion hexadecimal to decimal it's a match. Right now,I'm starting to thing the issue may be the usb.host permission. Do you now if i'm missing something? On Thursday, February 28, 2013 10:34:54 AM UTC, al wrote: I would first check the hardware/cable etc. e.g. with the app USB Device Info https://play.google.com/store/apps/details?id=aws.apps.usbDeviceEnumerator If you can see your device in the android tab, then you are right and it's a software issue. I'm not sure about the device_filter.xml. Do you have to specifiy the values in hex or decimal? The docu uses e.g. class=255 and does not use a hex-only digit. That looks to me like it could be decimal? Am Donnerstag, 28. Februar 2013 10:26:01 UTC+1 schrieb Marta Ribeiro: I am connecting the OTG micro B/USB B cable to an USB A/RS232 cable. Any help you can provide I would appreciate! On Wednesday, February 27, 2013 7:03:51 PM UTC, Tux wrote: Hi, what kind of sensor are you using and what protocol (RS232, HID or plain USB) is used? I played around with some RS232 devices. Perhaps I could find the example again. Later I switched to a IOIO divice. Roy 2013/2/27 Marta Ribeiro martacunh...@gmail.com I have the cables needed. I even installed an usb host app and it worked correctly. now i'm trying to make my own application and it's not working, so it must be because of the code. Although i am writing it exactly as it advised in tutorials. On Wednesday, February 27, 2013 5:35:44 AM UTC, softy wrote: Interesting.I don't know much about this but as at the same level you are I would have checked first wether the Samsung Galaxy S3 has a USB OTG sw support or not.You can try this by inserting a USB keyboard into it or a Mouse and see whether it is working. I think it has : *USB:*USB 2.0 client, 480Mbit/s micro-USB What you need is *USB:*USB 2.0 host/client, 480Mbit/s USB A Rgds, -s On Tue, Feb 26, 2013 at 10:50 PM, Marta Ribeiro martacunh...@gmail.com** wrote: I'm using a Samsung Galaxy S3,and connecting to a sensor using USB host and a OTG cable. I'm at the beginning phase just trying to write code to detect the sensor was attached but it's not working. Can someone take a look and tell me what they think: protected void onCreate(Bundle savedInstanceState) { super.onCreate(**savedInstanceState); setContentView(R.layout.**activity_microstrain); find_device = (EditText)findViewById(R.id.**find_device); UsbManager manager = (UsbManager)getSystemService(** Context.USB_SERVICE); //connect(); HashMapString, UsbDevice deviceList = manager.getDeviceList(); IteratorUsbDevice deviceIterator = deviceList.values().iterator()**; while(deviceIterator.hasNext()**){ UsbDevice device = deviceIterator.next(); Toast.makeText(this,Value of device : +device.getDeviceName(), Toast.LENGTH_LONG).show(); } %% manifest %%% ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.** android.com/apk/res/androidhttp://schemas.android.com/apk/res/android package=com.example.**microstrain android:versionCode=1 android:versionName=1.0 android:orientation=vertical** uses-feature android:name=android.**hardware.usb.host/ uses-sdk android:minSdkVersion=16 android:targetSdkVersion=16 / application android:allowBackup=true android:icon=@drawable/ic_**launcher android:label=@string/app_**name android:theme=@style/**AppTheme activity android:name=com.example.**microstrain.MICROSTRAIN
Re: [android-developers] USB host
I would first check the hardware/cable etc. e.g. with the app USB Device Info https://play.google.com/store/apps/details?id=aws.apps.usbDeviceEnumerator If you can see your device in the android tab, then you are right and it's a software issue. I'm not sure about the device_filter.xml. Do you have to specifiy the values in hex or decimal? The docu uses e.g. class=255 and does not use a hex-only digit. That looks to me like it could be decimal? Am Donnerstag, 28. Februar 2013 10:26:01 UTC+1 schrieb Marta Ribeiro: I am connecting the OTG micro B/USB B cable to an USB A/RS232 cable. Any help you can provide I would appreciate! On Wednesday, February 27, 2013 7:03:51 PM UTC, Tux wrote: Hi, what kind of sensor are you using and what protocol (RS232, HID or plain USB) is used? I played around with some RS232 devices. Perhaps I could find the example again. Later I switched to a IOIO divice. Roy 2013/2/27 Marta Ribeiro martacunh...@gmail.com I have the cables needed. I even installed an usb host app and it worked correctly. now i'm trying to make my own application and it's not working, so it must be because of the code. Although i am writing it exactly as it advised in tutorials. On Wednesday, February 27, 2013 5:35:44 AM UTC, softy wrote: Interesting.I don't know much about this but as at the same level you are I would have checked first wether the Samsung Galaxy S3 has a USB OTG sw support or not.You can try this by inserting a USB keyboard into it or a Mouse and see whether it is working. I think it has : *USB:*USB 2.0 client, 480Mbit/s micro-USB What you need is *USB:*USB 2.0 host/client, 480Mbit/s USB A Rgds, -s On Tue, Feb 26, 2013 at 10:50 PM, Marta Ribeiro martacunh...@gmail.com ** wrote: I'm using a Samsung Galaxy S3,and connecting to a sensor using USB host and a OTG cable. I'm at the beginning phase just trying to write code to detect the sensor was attached but it's not working. Can someone take a look and tell me what they think: protected void onCreate(Bundle savedInstanceState) { super.onCreate(**savedInstanceState); setContentView(R.layout.**activity_microstrain); find_device = (EditText)findViewById(R.id.**find_device); UsbManager manager = (UsbManager)getSystemService(** Context.USB_SERVICE); //connect(); HashMapString, UsbDevice deviceList = manager.getDeviceList(); IteratorUsbDevice deviceIterator = deviceList.values().iterator()**; while(deviceIterator.hasNext()**){ UsbDevice device = deviceIterator.next(); Toast.makeText(this,Value of device : +device.getDeviceName(), Toast.LENGTH_LONG).show(); } %% manifest %%% ?xml version=1.0 encoding=utf-8? manifest xmlns:android=http://schemas.**android.com/apk/res/androidhttp://schemas.android.com/apk/res/android package=com.example.**microstrain android:versionCode=1 android:versionName=1.0 android:orientation=vertical** uses-feature android:name=android.**hardware.usb.host/ uses-sdk android:minSdkVersion=16 android:targetSdkVersion=16 / application android:allowBackup=true android:icon=@drawable/ic_**launcher android:label=@string/app_**name android:theme=@style/**AppTheme activity android:name=com.example.**microstrain.MICROSTRAIN android:label=@string/app_**name intent-filter action android:name=android.intent.**action.MAIN / category android:name=android.intent.** category.DEFAULT/ category android:name=android.intent.**category.LAUNCHER / /intent-filter intent-filter action android:name=android.**hardware.usb.action.USB_** DEVICE_ATTACHED/ /intent-filter meta-data android:name=android.** hardware.usb.action.USB_**DEVICE_ATTACHED android:resource=@xml/**device_filter / /activity uses-library android:name=android.test.**runner / /application instrumentation android:name=android.test.** InstrumentationTestRunner android:targetPackage=com.**example.microstrain android:label=microstrain / /manifest % xml/device_filter.xml % resources usb-device vendor-id=199b product-id=3d65/ /resources %% I appreciate all the help. Thanks in advance! -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@**googlegroups.com To unsubscribe from this group, send email to android-developers+**unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/**group/android-developers?hl=enhttp://groups.google.com/group/android-developers?hl=en --- You received this message
[android-developers] Re: Different sets of widgets for pre-3.0 and post-3.0 devices?
You can statically configure this: In AndroidManifest.xml for the widget receivers add: receiver android:enabled=@bool/beforeHoneycomb .. receiver android:enabled=@bool/sinceHoneycomb .. Then define the booleans depending on the versions: In values/bool.xml resources bool name=sinceHoneycombfalse/bool bool name=beforeHoneycombtrue/bool /resources values-v11/bool.xml resources bool name=sinceHoneycombtrue/bool bool name=beforeHoneycombfalse/bool /resources I have an app in the play store using this approach. I'm not aware of problems with it. Am Dienstag, 19. Februar 2013 03:00:40 UTC+1 schrieb Digipom: Hello, I was wondering if it's possible to have a different set of widgets for pre-Honeycomb devices and post-Honeycomb devices? The reason why I ask is because I currently have a 1x1, 2x1, 3x1 etc widget for the different possible sizes, as Gingerbread and earlier didn't support resizeable widgets, but this is redundant for Honeycomb and above because widgets can be resized, and it would be cleaner if there was just one widget in the app drawer rather than several. I've heard that runtime enabling/disabling of widgets is unreliable and doesn't work properly, though I can't remember where I read that now. What do you guys recommend? -- -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en --- You received this message because you are subscribed to the Google Groups Android Developers group. To unsubscribe from this group and stop receiving emails from it, send an email to android-developers+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
[android-developers] Re: Any USB-Serial Adapter on Android Phones?
I would use something like the app USB Device Info (https://play.google.com/store/apps/details?id=aws.apps.usbDeviceEnumerator) to see if it is accessible via the USB host api (http://developer.android.com/guide/topics/connectivity/usb/host.html)... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Any USB-Serial Adapter on Android Phones?
Just checked it with an MT608-2 from HP (like this one http://www.ebay.com/itm/HP-single-port-USB-to-RS-232-serial-adapter-MT608-2-/230642394861). My galaxy nexus recognized it with two bulk endpoints. I think it could work via USB host... Am Mittwoch, 16. Januar 2013 11:39:39 UTC+1 schrieb al: I would use something like the app USB Device Info ( https://play.google.com/store/apps/details?id=aws.apps.usbDeviceEnumerator) to see if it is accessible via the USB host api ( http://developer.android.com/guide/topics/connectivity/usb/host.html)... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Disclaimer in Android Developer Console for Google Play Market
Apparently, yes. See for example https://play.google.com/store/apps/details?id=com.anydo There's a small link Privacy Policy below the description which leads to a page on the any do website. However, if your goal is to include a legal disclaimer or something like Allgemeine Geschäftsbedingungen, this will probably not be sufficient. I'm German too and the last time is poke to a lawyer about it, he said, currently there's no way to include a legal disclaimer in a way that corresponds to European/German law. I.e. if European/German law is applicable, all current disclaimers probably are invalid. I'm no lawyer tough, so don't hold me responsible for this and if you want to be sure, talk to a lawyer! Am Dienstag, 27. November 2012 18:27:23 UTC+1 schrieb phoku: Just wanted to know if the Market App is already using the Privacy Policy when a user wants to install an app which is using one. On Tue, Nov 27, 2012 at 5:11 PM, bob b...@coolfone.comze.comjavascript: wrote: The purpose of a privacy policy is for you to describe all the sneaky stuff you're going to do with the customer's personal info. Then when they complain, you say, Well, it was in the privacy policy. You DID read the privacy policy, didn't you? On Tuesday, November 27, 2012 9:40:48 AM UTC-6, phoku wrote: Yes! Have you ever used this? On Tue, Nov 27, 2012 at 4:31 PM, TreKing treki...@gmail.com wrote: On Tue, Nov 27, 2012 at 8:12 AM, phoku mboe...@fh-muenster.de wrote: In the Android Developer Console one can provide a URL to a disclaimer, Disclaimer? Are you referring to the Privacy Policy (Link to Policy section)? - TreKing - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com javascript: For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Matthias Böhmer Innovative Retail Laboratory DFKI GmbH, Campus D3_4, Stuhlsatzenhausweg 3, D-66123 Saarbrücken, Germany http://www.innovative-retail.de http://dfki.de/~mabo04 Tel.: +496818 5775 5018 Fax.: +496818 5775 5007 - Deutsches Forschungszentrum für Künstliche Intelligenz GmbH Firmensitz: Trippstadter Strasse 122, D-67663 Kaiserslautern Geschaeftsführung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster (Vorsitzender) Dr. Walter Olthoff Amtsgericht Kaiserslautern, HRB 2313 - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-d...@googlegroups.comjavascript: To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com javascript: 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] AppData Folder - How to recreate it
Hello, I have deleted the C:\Users\Your user name\*AppData*\Local\Android\ android-sdk deletefolder. Even when I re-install the Android SDK, it does not recreate. How can I make a complete fresh installation and have that folder back with all its contents again? As IDE I am using Sybase unwired Platform. Many thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Is the 'back' button still kosher?
I disagree with latimerius and his aversion for the android features. Yes, android significantly changed from version 2 to 3/4 and yes, this causes significant work for developers. However, there was a reason: to expand the android way to tablets. Avoiding the platform just guarantees that your apps will feel alien. Platforms change and if you want your app to feel native, you have to adopt. Such is life. Regarding your question: yes, I would use the back button (no matter if it's a hard button or an on-screen button displayed by android itself) to get back to the main screen from the sub-screens. If the back button is pressed while playing, many games pause and aks what to do (continue / Main menu) via a pop-up menu. While that menu is displayed, you may respond to pressing one of the offered menu options and alternatively to pressing back again. However, back button while a menu is displayed normally means just hide the menu. I.e. it should not go to the main screen but continue the game. Am Freitag, 2. November 2012 17:02:58 UTC+1 schrieb Keith Wiley: Thanks for coming back to my original question. So, perhaps we can all consider my situation from a higher level and discuss the possible design options we might choose from (and which options are most in the spirit of intended Android user experience). Although I have a few Android apps, the one I'm concerned with at the moment is a game and the back button is used to move between the various screens. So, when the game launches you get an on-screen menu of options (settings, scoreboard, play, credits). Tapping those takes you to a corresponding screen while tapping the back button takes you from those secondary screens back to the main menu (or from the main menu it exits the app). Likewise, while playing, the back button doesn't immediately exit play mode back to the main menu but rather first pauses the game. From the paused view, a second back button tap cancels play and returns to the main menu...while tapping the paused screen (anywhere) resumes play. That's pretty much it...and my question is whether I need to offer a nonback-button method for these various actions? Should each of the secondary screens have an on-screen return to main menu button? Should the main menu have an explicit quit option? Should in-game-play not rely on the back button to either pause the game or cancel and return to the main menu? These are the things I'm thinking about with as far as this discussion is concerned. Thanks. On Friday, November 2, 2012 6:22:50 AM UTC-7, latimerius wrote: On Fri, Nov 2, 2012 at 1:02 PM, Mark Murphy mmu...@commonsware.com wrote: On Fri, Nov 2, 2012 at 2:10 AM, Keith Wiley kbw...@gmail.com wrote: All right. I brought this up a few weeks ago on this list and some of the advice on the topic was to avoid menus entirely and replace them with in-app soft-menus from now on...despite the action bar. I guess that advice was incorrect. There are developers who do not want to use the action bar, such as game developers who find that an always-present action bar is a distraction or clashes with their game-focused UI. A subset of those developers are clinging desperately to the old options menu behavior (e.g., setting android:targetSdkVersion to be under 11) -- the right answer for these game developers is to add in-app soft menus that blend in with the game UI. The right answer would have been for Google to leave the button alone - but we've talked about that already, the button was universally useful, and there's not always a UI to blend in anyway. Back on topic, my lesson for my remaining days on Android from the Menu button fiasco and other breakages caused by previously guaranteed stuff being pulled at whim from under people using them would be - interact as little as possible with the platform. Don't rely on stuff on being there cause it likely won't, don't rely on APIs cause they will be deprecated or changed. As far as the Back button specifically, one would think that should be safe to rely on. Based on experience though, my advice would be, think hard about what you need it for and what your alternatives are. If you find any half-decent one, consider using it. You might be glad you did once next version of the platform is out. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Nexus 7 USB Host - Not able to enumerate device
HI, first: USB-Host including the USB-Host api works for me on the Nexus 7 - no root required. You could try an app like USB Device Info to validate your hardware setup (usb adapter etc.). I have setup intents and filters, but I also assume they are not necessary if you scan for devices yourself. As I understand it, you just tried a mouse and a phone? I just made a test with a mouse and though USB Device Info saw it on the linux tab, it did not see it on the android tab. My app also did not see the mouse. I assume since android handles the mouse itself, it does not make it visible to the app. I.e. try another usb device. If you can see it on the Android tab in USB Device Info, you probably should see it in your app. Am Sonntag, 28. Oktober 2012 23:41:04 UTC+1 schrieb Kiran: Hi All, I recently bought a Nexus 7 for USB development. I would like to use the USB Host functionality provided by the new Android OS. I was following the USB Host Tutorial at the link: http://developer.android.com/guide/topics/connectivity/usb/host.html. My program is very simple, and here are the relevant parts of the code: *private UsbManager manager; * * * *public void onCreate(Bundle savedInstanceState) {* *super.onCreate(savedInstanceState);* *setContentView(R.layout.activity_main);* ** *Log.i(TAG, in onCreate());* *manager = (UsbManager) getSystemService(Context.USB_SERVICE);* *if(manager==null) {* *Log.i(TAG, USB Manager is NULL);* *}* *else {* *Log.i(TAG, USB Manager = + manager);* *}* *}* ** *public void enumerateUSBDevices() {* *HashMapString, UsbDevice deviceList = manager.getDeviceList();* *CollectionUsbDevice deviceCollection = deviceList.values();* *IteratorUsbDevice deviceIterator = deviceCollection.iterator();* *Log.i(TAG, Number of connected USB Devices = + deviceCollection.size());* *while(deviceIterator.hasNext()){* *UsbDevice device = deviceIterator.next();* *Log.i(TAG, device.getDeviceName());* *}* *}* When the enumerateUSBDevices function is called, it reports that the number of connected USB Devices = 0. I am using a USB OTG cable, and I know that the Nexus 7 is powering the connected USB Device because I plugged in a USB Mouse, and it works properly. I also plugged in another Android phone, and the Nexus 7 was confirmed to be powering the device. However, in both of these instances, the Android program says that there are no USB devices connected. I am unsure what is going wrong in my code. In my Android manifest, I have the following line: *uses-feature android:name=android.hardware.usb.host /* My manifest does not have any intent filters associated with any USB devices. My understanding based on reading the tutorials is that the intent filters need to be in the Manifest only if you want the APP to be notified when the USB device is connected after the App is running? Can anybody shed light into what I may be doing wrong? Do I need to root my device? Thanks, Kiran -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Java SE
http://www.oracle.com/technetwork/java/javase/downloads/jdk7u9-downloads-1859576.html Am Donnerstag, 18. Oktober 2012 16:36:34 UTC+2 schrieb Alana Weaver: Hi I've downloaded Android SDK but the Java jdk wasn't apart of Android SDK download? Where can I find Java SE that's compatible windows 32? So that I can properly install Android SDK on my laptop. Thanks. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Difference between Android and Linux Kernel ?
Yes, the Android linux kernel has been modified. Android uses the bionic c lib. Your test results look like you are comparing apples and oranges. E.g. do you use the same hardware for the test? If so, you need to use Android-x86 or something similar which may not be optimized (drivers etc.) for your platform... Am Freitag, 19. Oktober 2012 08:13:53 UTC+2 schrieb chain_chelliah: I know Android uses the Linux kernel. I hope the Android developers did some modification with original Linux Kernel, especially in standard C libraries. My question is whether the processing speed of Linux and Android kernel are the same or different. I did some tests in different OS like windows and Redhat Linux and unbuntu and android. By the results Android is very slow. Android uses same Linux kernel... why this process variations but i know we cant expect same speed as in Linux, but I had huge differences (for example: Windows take 11 sec, Linux takes 4 sec, but Android takes 55 sec to complete my test) So What is the reason for this speed variation between these two linux kernels (Android and redhat both are 2.6)? I'm using Android Kernel version 3.2.0. Thanks and Regards, Sangili Pandian C -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Does Nexus 7 support USB Host Mode ?
I have several apps in the market (Opus #1 Pro, Grand Piano Pro, Keyboard Sounds) that use USB Host/OTG to connect to midi/usb adapters. They work with my Nexus 7 with both Android 4.1.1 and 4.1.2. I use the originial Samsung OTG adapter (ET-R205UBE). That said, USB Host/OTG support in Android is slightly limited. For example isochronous mode is not supported. If you want to be sure, do as Nikolay suggested and test it with a single/borrowed device. You odds are good. Am Dienstag, 16. Oktober 2012 07:40:59 UTC+2 schrieb Arpan Patel: Hi, Does Nexus 7 support USB Host Mode ? I want to connect the Nexus 7 via USB Host to a SoC and transfer data between them. Connection will be like this *Nexus 7 --- USB OTG -- SoC.* * *I should be able to use *android.hardware.usb *api's to enumerate and communicate between the two devices. I want to be 100% sure before buying several of this tablets for a project. Can anyone confirm and/or share some of their experience. Your help is appreciated. Thanks and Regards, Arpan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: USB to PC connection
I think, you may use port forwarding via adb. This link might be a start http://qtcstation.com/2011/03/connecting-android-to-the-pc-over-usb/ Am Mittwoch, 3. Oktober 2012 12:33:09 UTC+2 schrieb Jasper Horn: Hi Al, You make an interesting point. I was intending to use the keys for authentication, and the phone is playing a server role here, meaning that only the computer would need a private key. Once it has been generated, the public key could indeed be sent over wifi safely. You do still have the two problems left, selecting a phone and getting the key unmodified, but those are solvable indeed. However, I have been thinking about this and I feel it might be necessary to extend the service beyond the original idea of only using it over wifi and allow use over the internet as well. The idea would still be the same: having a phone app and a computer application communicate (possibly through a server). Here it might be necessary to encrypt all data sent and thus we may need to have a key pair on both ends. However, that's not really what changes the situation. What changes the situation is that the two problems above get so much bigger. The data will now be sent over a much less secure connection and there are many more wrong phones you might connect to. I am not saying that isn't solvable, but this makes me want to at least offer USB setup as an option. It is possible to just connect over usb like that? On Monday, October 1, 2012 11:22:24 AM UTC+2, al wrote: Getting cryptography right is non-trivial. So take this with caution. As I understand it, you want to generate a key pair on each side and exchange the public keys. That can be done easily via wifi too since you only exchange _public_ keys. The problem is to be sure you got the right ones (i.e. that they have not been faked by e.g. a man in the middle attack). To ensure this, you might e.g. calculate a cryptographic hash of the public keys (to shorten the data that has to be compared) and display them on both sides. The user may then compare the hashes. Am Samstag, 29. September 2012 15:21:51 UTC+2 schrieb Jasper Horn: I have an idea for an app that will both have a component that runs on the computer of the user and a component that runs on the phone. The idea will be that the two will communicate over wifi. To make this secure, I want to set up a public/private key pair on the computer and the phone. In order to do this in a user-friendly way, I want to do so automatically over usb. However, in exploring how much of what I want is actually possible on android, I have been unable to find out how to have an app communicate over usb to a program on the computer. Technically, it would be similar to using the computer as a USB accessory, but I doubt it would actually be similar enough to make this work. I have also read that it might be possible using ADB port forwarding, but this doesn't really look like it would make it more user-friendly for end users. Finally, I suppose I could solve the problems by only using the file system and mounting it, storing the public key in a file on the s-card, but it's not really the ease of use that I am looking for. Is there a way of communicating between an application running on a pc and an app running on an android device that I have missed? Is there a mistake in my current understanding of the possibilities? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Google has received a subpoena seeking information related to Android applications
Since all answers seem to indicate the opposite: I got the mail but never send a DMCA notice. Am Dienstag, 2. Oktober 2012 22:54:30 UTC+2 schrieb Ian: So it seems to be rather good news, isn't it? The FBI is hunting down pirate sites... Did those who received this email ever made DMCA copyright infringement notices to websites hosting/linking their apps illegaly? I did, several times. And now we've got this email; it may be related. On Tuesday, October 2, 2012 1:46:58 AM UTC+2, Tom wrote: I just spoke to a representative who said Google should not have sent those emails. I just said I received an email and she immediately knew what I was referring to, no reference number needed. She told me to forget it was sent, and that the FBI will contact me directly if there is any issue pertaining to my account specifically (someone uploading one of my applications illegally to another application market). Hope that clears things up for people, I feel bad for the representatives at that number who must be receiving tons of calls. Anyway, nothing to worry about (at least for now). On Monday, October 1, 2012 7:14:18 PM UTC-4, Lew wrote: For more information about the subpoena, you may wish to contact the Federal Bureau of Investigation -- Atlanta Field Office at (404) 679-9000, reference # 2011R00320/FBI/ORKIN. On Monday, October 1, 2012 3:50:20 PM UTC-7, Streets Of Boston wrote: Got the same e-mail. Asked the same question on 'android-discuss' :-) I'm curious what this is all about? BlueStack? Aliyun/Acer? On Monday, October 1, 2012 6:45:39 PM UTC-4, Andrei wrote: I received this email But i am not interested and want my account to be excluded What do i need to do? Thanks Google has received a subpoena seeking information related to Android applications that may have been made available on alternative markets without the consent of the developer. The subpoena seeks information about those Android applications, including contact information for the developers of the applications. Our records show that your Android developer account will be included in the information Google will provide in response to this subpoena. Google is not in a position to provide you with legal advice or discuss the substance of the process in our possession. For more information about the subpoena, you may wish to contact the Federal Bureau of Investigation -- Atlanta Field Office at (404) 679-9000, reference # 2011R00320/FBI/ORKIN. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: USB to PC connection
Getting cryptography right is non-trivial. So take this with caution. As I understand it, you want to generate a key pair on each side and exchange the public keys. That can be done easily via wifi too since you only exchange _public_ keys. The problem is to be sure you got the right ones (i.e. that they have not been faked by e.g. a man in the middle attack). To ensure this, you might e.g. calculate a cryptographic hash of the public keys (to shorten the data that has to be compared) and display them on both sides. The user may then compare the hashes. Am Samstag, 29. September 2012 15:21:51 UTC+2 schrieb Jasper Horn: I have an idea for an app that will both have a component that runs on the computer of the user and a component that runs on the phone. The idea will be that the two will communicate over wifi. To make this secure, I want to set up a public/private key pair on the computer and the phone. In order to do this in a user-friendly way, I want to do so automatically over usb. However, in exploring how much of what I want is actually possible on android, I have been unable to find out how to have an app communicate over usb to a program on the computer. Technically, it would be similar to using the computer as a USB accessory, but I doubt it would actually be similar enough to make this work. I have also read that it might be possible using ADB port forwarding, but this doesn't really look like it would make it more user-friendly for end users. Finally, I suppose I could solve the problems by only using the file system and mounting it, storing the public key in a file on the s-card, but it's not really the ease of use that I am looking for. Is there a way of communicating between an application running on a pc and an app running on an android device that I have missed? Is there a mistake in my current understanding of the possibilities? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] how i can create chat application
dear all i have vBulletin forum and i install chat for my member. i want to create an appliction for chat only. any idea to start with this app. the chat i have http://www.vbulletin.org/forum/showthread.php?t=159654 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] [In-app Billing] Test app always getting error [DF-BPA-13]
Hello All. I've been working on the test app for Android In-App Billing, have published the app, can see the items, but when attempting to purchase I always get the following error: Error processing purchase [DF-BPA-13] I've tried it on several Android Phones (with GB and ICS) and result is always the same. I've looked for answers and they all claim to wipe the device´s cache, and Google Play cache as well, but that didn´t help. Does anybody know what may be wrong or what else I can try? Regards. Al. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: list_selector_background_focused.9.png missing in ldpi
From http://developer.android.com/training/basics/supporting-devices/screens.html *Note:* Low-density (ldpi) resources aren’t always necessary. When you provide hdpi assets, the system scales them down by one half to properly fit ldpi screens Am Donnerstag, 21. Juni 2012 21:33:14 UTC+2 schrieb powder366: Hi, I noticed that the file list_selector_background_focused.9.png is missing in directory ldpi, but exists in mdpi, hdpi and xhdpi platforms/android-15/data/res/drawable-mdpi platforms/android-15/data/res/drawable-hdpi platforms/android-15/data/res/drawable-ldpi - missing platforms/android-15/data/res/drawable-xhdpi Does anyone know why? Regards Jonas. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Java 1.7
Didn't the lawsuit go well for Google? As far as I know, the judgment was that language syntax and api cannot be patented. Of course, implementing the new library would be quite some effort. But supporting the new java syntax should not be such an effort. As far as I know, on bytecode level only invokedynamic was added and that code is not used by the java compiler (only by dynamic languages like jruby). So, a quick way to enable the new syntax features seems to be to 1) remove the errors warnings 2) add an error/warning if invokeDynamic is used Alternatively, it might be possible to add an additional build step (or eclipse builder) to just patch the version number of the class files to pretend they are java 1.6 class files. Am Mittwoch, 13. Juni 2012 16:36:03 UTC+2 schrieb Daniel Drozdzewski: It probably won't be supported soon for multitude of reasons. Simply set compiler compliance to 1.6 in Eclipse and live without funky Java 7 features. I know, it is not, what you asked for, but features of Java 7 are a bit more than the nice way of representing numerals. Have a look here: http://www.oracle.com/technetwork/java/javase/jdk7-relnotes-418459.html ... that's quite a lot to port to Dalvik (even when only looking at HotSpot and language changes). Bear in mind that many new things in Java7 are possible specifically because the platforms that Java7 addresses have different (much more relaxed) constraints compared even to 4 core 1GB RAM mobile device. For example InvokeDynamic allows JVM to run trully dynamic languages, which are high productivity and all that, but cost in terms of processing and memory. Technicalities aside, remember that Google and Oracle only finished one big lawsuit. I don't think big G would like to have another one on their hands just yet. Daniel On 13 June 2012 15:06, bob b...@coolfone.comze.com wrote: I'm trying to use this notation in my code: int x = 5_000_000; So, I need Java 1.7. However, I get this error: [2012-06-13 09:01:43 - wall] Android requires compiler compliance level 5.0 or 6.0. Found '1.7' instead. Please use Android Tools Fix Project Properties. Any thoughts on this? Will 1.7 probably be supported soon? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Daniel Drozdzewski -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Problem refreshing a fragment edittext view from a dialogFragment after rotation
setTargetFragment / getTargetFragment as per my last reply. Am Mittwoch, 6. Juni 2012 16:58:23 UTC+2 schrieb Bluemercury: Also, there's 2 factors: 1- my DateTimePickerDialogFragment is being included in a different library project, so it will not know the sub type of Fragment being passed. 2- in one target fragment i will need, i have two edittexts in the same fragment so the DateTimePickerDialogFragment must somehow point to the correct edittext regards, On Wednesday, June 6, 2012 2:16:42 PM UTC+1, Bluemercury wrote: Hi al! i've read the answer from Dianne, and it seems i can declare an interface in one fragment and then implement it on another. But for this i need the pointer to the fragment in question, she said: take advantage of the FragmentManager APIs to save a fragment pointer in a bundle and later retrieve it, to allow you to maintain direct pointers across state save/restore. What's the best way to do this? Here's my code to call the dialogfragment in the main frag: dialFragment=DateTimePickerDialogFragment.newInstance(DateTimePickerDialogFragment.DATETIME_PICKER, dateBeginTV); dialFragment.show(fragMan, dialog); how can i send the pointer to the dialogfragment, and will it survive the rotation? On Wednesday, June 6, 2012 8:20:30 AM UTC+1, al wrote: Ok, I assumed that text field was part of the activity. In your case https://groups.google.com/forum/?fromgroups#!topic/android-developers/NBlMJnMaGboshould help, especially the answer of Dianne. In short: you might just do dialogfragment.setTargetFragment(textfieldfragment) in the activity to link the fragments. Android will then take care of that reference. In the dialogFragment you can then pass the new value like ((MyFragmentClass)getTargetFragment()).setDateTimeField(curDateTime()). -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Problem refreshing a fragment edittext view from a dialogFragment after rotation
Ok, I assumed that text field was part of the activity. In your case https://groups.google.com/forum/?fromgroups#!topic/android-developers/NBlMJnMaGbo should help, especially the answer of Dianne. In short: you might just do dialogfragment.setTargetFragment(textfieldfragment) in the activity to link the fragments. Android will then take care of that reference. In the dialogFragment you can then pass the new value like ((MyFragmentClass)getTargetFragment()).setDateTimeField(curDateTime()). Am Dienstag, 5. Juni 2012 17:32:09 UTC+2 schrieb Bluemercury: Hi al! The thing is here im using framents, the text field is on the fragment, not on the activity itself. The ideia was to create a dynamic dialofgragment without to mess around with the activity too much, since in this case the fragment is part of a viewpager in the activity. What if i use the this.setRetainInstance(true); on the fragment that holds the text field too? regards, On Tuesday, June 5, 2012 3:14:58 PM UTC+1, al wrote: Of course I'm guessing, but I think you should change the way you transfer the new date/time value to the text widget. In the activity, say A1, you create the dialog and give it a reference to the text field of A1. When the device is rotated, the activity is recreated (= A2), but the dialog is not (due to this.setRetainInstance(true);). I.e. the dialog still references the text field of A1, but you see the activity A2. That's probably the cause of the observed behavior. As far as I understand it, the way to go is to add a setDateTimeField() method to the activity and to replace the code in the onClick method of the dialog with something like ((MyActivityClass)getActivity()).setDateTimeField(curDateTime()). GetActivity() will return the current/correct activity since the dialog will be attached to new activity as part of the configuration change. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Problem refreshing a fragment edittext view from a dialogFragment after rotation
Of course I'm guessing, but I think you should change the way you transfer the new date/time value to the text widget. In the activity, say A1, you create the dialog and give it a reference to the text field of A1. When the device is rotated, the activity is recreated (= A2), but the dialog is not (due to this.setRetainInstance(true);). I.e. the dialog still references the text field of A1, but you see the activity A2. That's probably the cause of the observed behavior. As far as I understand it, the way to go is to add a setDateTimeField() method to the activity and to replace the code in the onClick method of the dialog with something like ((MyActivityClass)getActivity()).setDateTimeField(curDateTime()). GetActivity() will return the current/correct activity since the dialog will be attached to new activity as part of the configuration change. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Is JDK1.7 supported now?
My first thought was: there are probably new bytecodes in java 7 class files. In that case the transformation to dex files has to be changed and it's not clear if that's possible in a backward compatible way, i.e. without replacing the dalvik implementation on all devices, which is obviously not feasible. A quick search lead me to http://www.yworks.com/de/products_yguard_about.html (sorry, German), where they say, only the version number in class files changed and a new instruction (invokedynamic) has been added. However they also say, invokedynamic is not used by current java implementations, only by dynamic languages like JRuby. In that case, it seems possible to work around this issue: just write a small tool to change the version number of the class files to the previous number and add that tool as an additional build step. This way, you know when you get your solution instead of waiting for Google. Google has no obligation to do what you want / when you want. They can decide for themselves what they do and when. BTW: This might be an interesting hack for somebody with some spare time Am Montag, 4. Juni 2012 15:59:07 UTC+2 schrieb sblantipodi: I just tried, nothing has been fixed in months. Il giorno venerdì 1 giugno 2012 12:10:02 UTC+2, sblantipodi ha scritto: As title, some months ago I had some problem signing my android apps using java 1.7 that forced me to switch back to jdk 1.6. Is this problem fixed? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Is JDK1.7 supported now?
http://www.oracle.com/technetwork/java/javase/compatibility-417013.html#incompatibilities seems to confirm it. Thinking about it, it's might be easier to patch the dx source code to accept the new version number? If that works, it should not be that difficult? Am Dienstag, 5. Juni 2012 16:28:33 UTC+2 schrieb al: My first thought was: there are probably new bytecodes in java 7 class files. In that case the transformation to dex files has to be changed and it's not clear if that's possible in a backward compatible way, i.e. without replacing the dalvik implementation on all devices, which is obviously not feasible. A quick search lead me to http://www.yworks.com/de/products_yguard_about.html (sorry, German), where they say, only the version number in class files changed and a new instruction (invokedynamic) has been added. However they also say, invokedynamic is not used by current java implementations, only by dynamic languages like JRuby. In that case, it seems possible to work around this issue: just write a small tool to change the version number of the class files to the previous number and add that tool as an additional build step. This way, you know when you get your solution instead of waiting for Google. Google has no obligation to do what you want / when you want. They can decide for themselves what they do and when. BTW: This might be an interesting hack for somebody with some spare time Am Montag, 4. Juni 2012 15:59:07 UTC+2 schrieb sblantipodi: I just tried, nothing has been fixed in months. Il giorno venerdì 1 giugno 2012 12:10:02 UTC+2, sblantipodi ha scritto: As title, some months ago I had some problem signing my android apps using java 1.7 that forced me to switch back to jdk 1.6. Is this problem fixed? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] instrumenting the android device to log method invocations
Hello Guys, I was thinking that since the Android stack is an open source, is there any possibility to modify the virtual machine that runs the apps to log the method invocations. I am after the call sequence that application performs. I am wondering where I can find a document for instrumenting? Cheers/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Proguard and PreferenceActivity
The error message seems to say there's a problem in an XML file, right? I would look at line 2 in new_profile.xml. Am Donnerstag, 10. Mai 2012 13:35:07 UTC+2 schrieb Mentos: In my release apk I have very strange problem. In debug all works fine. proguard.cfg is normal from examples. Any sugestion ? Unable to start activity ComponentInfo{myclass}: android.view.InflateException: Binary XML file line #2: Error inflating class PreferenceScreen public class MyClas extends PreferenceActivity implements SharedPreferences.OnSharedPreferenceChangeListener { @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); addPreferencesFromResource(R.xml.new_profile); setContentView(R.layout.new_profile); //HERE IS PROBLEM } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Different Font Size on a Button
Using spannables directly is certainly the better way to do it since the supported html tags apparently are not clearly specified as Mark already mentioned. However, out of curiosity, I looked at the source of Html.java. So, just for the sake of completeness: I found that font apparently only supports the attributes color and face, but not size. I also found that it supports big and small, i.e. using an html string like big199/big smallkm/h/small seems to work, although you cannot specify the sizes exactly... Am Sonntag, 6. Mai 2012 09:53:17 UTC+2 schrieb x300: It works! Thanks a lot for sharing your insight :) :) :)My code look as follows: private static final float SMALL_TEXT_RELATIVE_SIZE = 0.6f; public CharSequence setSpeedText(){ CharSequence text = km/h; SpannableStringBuilder smaller = new SpannableStringBuilder(text); smaller.setSpan(new RelativeSizeSpan(SMALL_TEXT_RELATIVE_SIZE), 0, text.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); CharSequence cs = TextUtils.concat(kMph[DID], smaller); return cs; } and the result is displayed beautifully with large 45.6 sitting next to small km/h as I always wanted them to. Thank you very very much! On May 6, 3:26 pm, Zsolt Vasvari zvasv...@gmail.com wrote: Here's the code I use to make an arbitrary CharSequence smaller private static final float SMALL_TEXT_RELATIVE_SIZE = 0.8f; public static CharSequence makeSmaller(CharSequence text) { SpannableStringBuilder smaller = new SpannableStringBuilder(text); smaller.setSpan(new RelativeSizeSpan(SMALL_TEXT_RELATIVE_SIZE), 0, text.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE); return smaller; } Once you have the smaller text, you can use TextUtils.concat() to build up you final text. Just make sure you nowhere cast/toString() the CharSequence to a String because you will lose the formatting info. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: All APK has cracked by apkcracks.net
It's not about software (it's about books), but I found this link interesting in this context too: http://radar.oreilly.com/2012/05/drm-free-day-forever.html Mike Hendrickson (vice president for content strategy at O'reilly) basically thinks it's a marketing expense and that the publishing industry should embrace DRM-free. I think, similar arguments hold for software: the largest enemy is obscurity, not piracy. So, before you invest too much time into DRM, think more about promoting your app first. Now, before people think I'm advocating piracy: I'm an independent software developer and yes, I found some of my apps at apkracks too... Am Donnerstag, 3. Mai 2012 18:04:16 UTC+2 schrieb Giuseppe: In our app we use Proguard and License system from Google. Our app and other thousand of apps are published on this web site http://apkcracks.net Can Google explain what else we must do to protect our night, Sunday and holiday's job ? Giuseppe -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Timer in Android
yes, I set a flag before calling a function which calls the timer, and after calling cancel, I modify the flag value, after calling the function, I checked the flag but this did not work correctly. thanks for your reply On Tue, May 1, 2012 at 5:01 PM, Kristopher Micinski krismicin...@gmail.comwrote: what did you try? How did it not work? Did you set a flag somewhere before calling cancel? Or what? kris On Tue, May 1, 2012 at 7:49 AM, Mai Al-Ammar mai.alam...@gmail.com wrote: I tried to track it by myself but I could not :( could you please help me with an idea of tracking. On Tue, May 1, 2012 at 2:22 PM, Mark Murphy mmur...@commonsware.com wrote: This has nothing to do with Android. There is no method on TimerTask to tell you it is canceled, so you will need to track that yourself by some other means. On Mon, Apr 30, 2012 at 8:16 PM, Mai Al-Ammar mai.alam...@gmail.com wrote: Hello every one, I have a simple question about timer in Android, How can I know if the timer is stopped or not? I have an if statement which see if some condition is satisfied, then it will stop the timer by : if(timerTask != null) timerTask.cancel(); I want to check after calling the timer if the timer is stopped or not? Please help me thanks in advance -- Mai A. Al-Ammar Teacher Assistant Imam Mohammad bin Saud Islamic University College of Computer Science -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mai A. Al-Ammar Teacher Assistant Imam Mohammad bin Saud Islamic University College of Computer Science -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 -- Mai A. Al-Ammar Teacher Assistant Imam Mohammad bin Saud Islamic University College of Computer Science -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Timer in Android
I tried to track it by myself but I could not :( could you please help me with an idea of tracking. On Tue, May 1, 2012 at 2:22 PM, Mark Murphy mmur...@commonsware.com wrote: This has nothing to do with Android. There is no method on TimerTask to tell you it is canceled, so you will need to track that yourself by some other means. On Mon, Apr 30, 2012 at 8:16 PM, Mai Al-Ammar mai.alam...@gmail.com wrote: Hello every one, I have a simple question about timer in Android, How can I know if the timer is stopped or not? I have an if statement which see if some condition is satisfied, then it will stop the timer by : if(timerTask != null) timerTask.cancel(); I want to check after calling the timer if the timer is stopped or not? Please help me thanks in advance -- Mai A. Al-Ammar Teacher Assistant Imam Mohammad bin Saud Islamic University College of Computer Science -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android App Developer Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mai A. Al-Ammar Teacher Assistant Imam Mohammad bin Saud Islamic University College of Computer Science -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 access to a database file
Hi , How can I use and access a database file (.db) ? I've tried many ways but nothing works , the problem is when I try to open a database file the application crashed , so I've tried to check if the database file is exist : File database = context.getDatabasePath(maindb.db); database.exists(); // false database.getPath(); // this gives me the path data/data/MY_Package/databases/maindb.db database.isFile() ; // false // this is my open command if(database.exists()) { myDb=SQLiteDatabase.openDatabase(DB_NAME, null, SQLiteDatabase.NO_LOCALIZED_COLLATORS); } please I need help , I'm so tired , I've been searching for a long time yours, Tareq -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Timer in Android
Hello every one, I have a simple question about timer in Android, How can I know if the timer is stopped or not? I have an if statement which see if some condition is satisfied, then it will stop the timer by : if(timerTask != null) timerTask.cancel(); I want to check after calling the timer if the timer is stopped or not? Please help me thanks in advance -- Mai A. Al-Ammar Teacher Assistant Imam Mohammad bin Saud Islamic University College of Computer Science -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Timer in Android
Thank you but I don't understand what did you mean :( On Tue, May 1, 2012 at 3:57 AM, James Black planiturth...@gmail.com wrote: I would create a remote service for the timer, and query it, since it would run independently from the activity. On Apr 30, 2012 8:16 PM, Mai Al-Ammar mai.alam...@gmail.com wrote: Hello every one, I have a simple question about timer in Android, How can I know if the timer is stopped or not? I have an if statement which see if some condition is satisfied, then it will stop the timer by : if(timerTask != null) timerTask.cancel(); I want to check after calling the timer if the timer is stopped or not? Please help me thanks in advance -- Mai A. Al-Ammar Teacher Assistant Imam Mohammad bin Saud Islamic University College of Computer Science -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 -- Mai A. Al-Ammar Teacher Assistant Imam Mohammad bin Saud Islamic University College of Computer Science -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Audio / Performance Issues on ICS / Android 4
I do something very similar in my apps (Grand Piano and Opus #1) without problems on ICS. Sound generation is quite expensive in my case, so I have problems on slow devices (1Mhz / single core / old android version) but not on the galaxy nexus. One thing I noticed however is that it seems like you use the same size (minSize) for the AudioTrack buffer and the audio creation buffer used as argument to processNativeAudio. Although more jni calls imply more overhead, it might be better to use a smaller buffer size for the jni calls, based on AudioTrack.getNativeFrameCount() or better yet a divisor of it to ensure the audio creation thread does not need to wait that long on the blocking call to AudioTrack.write(). Am Freitag, 27. April 2012 11:25:14 UTC+2 schrieb piezo: Hello I have a music (sequencer/synth) app in Android Market. One of its strengths is that it uses very little resources and plays smoothly even on the oldest and cheapest devices and only requires Android version 1.6. However, since the arrival of ICS, I get more and more complaints about stuttering playback and a sluggish interface, mainly on Galaxy Nexus. The app hasn't changed and still works fine on earlier versions of Android. I wonder what may have changed. My app does the audio processing in native code and I suspect the way data are passed between java and native might be the problem (I still use AudioTrack to maintain 1.6 compatibility and because it always worked fine): public class PlayThread extends Thread { public void run() { ByteBuffer byteBuffer = ByteBuffer.allocateDirect(minSize); byte[] byteArray = new byte[minSize]; android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_URGENT_AUDIO); int minSize =AudioTrack.getMinBufferSize( 44100, AudioFormat.CHANNEL_CONFIGURATION_STEREO, AudioFormat.ENCODING_PCM_16BIT ); myTrack = new AudioTrack( AudioManager.STREAM_MUSIC, 44100, AudioFormat.CHANNEL_CONFIGURATION_STEREO, AudioFormat.ENCODING_PCM_16BIT, minSize, AudioTrack.MODE_STREAM); myTrack.play(); while(1) { byteBuffer.position(0); processNativeAudio(byteBuffer, minSize); byteBuffer.position(0); byteBuffer.get(byteArray, 0, minSize); myTrack.write( puff, 0, minSize ); } } } In the main activity, a new PlayThread is created on startup. The native function looks like this: void Java_com_myapp_ processNativeAudio( JNIEnv * env, jobject this, jobject buffer , jint buflng) { jbyte *jbuffer = (*env)-GetDirectBufferAddress(env, buffer); short *shortBuffer= (short*)(jbuffer); // processing audio here and writing to shortBuffer } Anyone has similar problems or even knows a workaround? Thank you. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: OnTouchEvent disable
Thanks for your reply but since I'm a beginner in Android development, I have a question : what do you mean by view ? thanks a lot On Fri, Apr 27, 2012 at 9:19 AM, moktarul anam mokta...@gmail.com wrote: Dear Memo, try to use view.setFocusable(false) and check Enjoy Moktarul Anam On Friday, 27 April 2012 09:16:39 UTC+5:30, Memo wrote: Hello every one, In my program, I handle a touch event on the screen using OnTouchEvent, if I handle the touch , I will do some tasks and during that, I want to disable touch event handler, i.e the OnTouchEvent does not respond to the touch. Could you please help me. Thanks all in advance. -- Mai A. Al-Ammar Teacher Assistant Imam Mohammad bin Saud Islamic University College of Computer Science -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mai A. Al-Ammar Teacher Assistant Imam Mohammad bin Saud Islamic University College of Computer Science -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] play sound file
Hello every one, I tried to play sound file (*.mp3) in Android application. I used the following code: MediaPlayer m = new MediaPlayer (); m = MediaPlayer.create(this, R.raw.start1); m.start(); first, I play a sound file, then when I tried to play another sound file, it still play the old one although I delete it from the res/raw folder. Please help me. thanks in advance. -- Mai A. Al-Ammar Teacher Assistant Imam Mohammad bin Saud Islamic University College of Computer Science -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] play sound file
I did not delete it at run time, I delete the file before I compile the project and replace it with other file. but the program still play the old one On Sat, Apr 28, 2012 at 5:34 PM, Mark Murphy mmur...@commonsware.comwrote: On Sat, Apr 28, 2012 at 10:23 AM, Mai Al-Ammar mai.alam...@gmail.com wrote: I tried to play sound file (*.mp3) in Android application. I used the following code: MediaPlayer m = new MediaPlayer (); m = MediaPlayer.create(this, R.raw.start1); m.start(); first, I play a sound file, then when I tried to play another sound file Please post the code where you tried to play another sound file. it still play the old one although I delete it from the res/raw folder. It is impossible for you to delete raw resources at runtime. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 4.0 Programming Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mai A. Al-Ammar Teacher Assistant Imam Mohammad bin Saud Islamic University College of Computer Science -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] play sound file
I install the new program every time but it still the old file. On Sat, Apr 28, 2012 at 5:55 PM, Mark Murphy mmur...@commonsware.comwrote: On Sat, Apr 28, 2012 at 10:49 AM, Mai Al-Ammar mai.alam...@gmail.com wrote: I did not delete it at run time, I delete the file before I compile the project and replace it with other file. but the program still play the old one Then you did not install the modified app on the device. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 4.0 Programming Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mai A. Al-Ammar Teacher Assistant Imam Mohammad bin Saud Islamic University College of Computer Science -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] play sound file
I solve it :) I forgot to do clean the project in eclipse , I just compile and build thanks for your effort On Sat, Apr 28, 2012 at 7:12 PM, Mark Murphy mmur...@commonsware.comwrote: On Sat, Apr 28, 2012 at 11:51 AM, Mai Al-Ammar mai.alam...@gmail.com wrote: I install the new program every time but it still the old file. You are mistaken about something. I have no way of telling you what. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android 4.0 Programming Books: http://commonsware.com/books -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mai A. Al-Ammar Teacher Assistant Imam Mohammad bin Saud Islamic University College of Computer Science -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] OnTouchEvent disable
Hello every one, In my program, I handle a touch event on the screen using OnTouchEvent, if I handle the touch , I will do some tasks and during that, I want to disable touch event handler, i.e the OnTouchEvent does not respond to the touch. Could you please help me. Thanks all in advance. -- Mai A. Al-Ammar Teacher Assistant Imam Mohammad bin Saud Islamic University College of Computer Science -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: help in using android USB host mode
64 is the _max_ packet size. A single transfer may be shorter; it does not matter if the rest of the buffer is filled with zeros or some garbage since the data transfered is contained in just the first x bytes of the buffer where x is the return value from bulkTransfer. For continuous transfer, just call bulkTransfer multiple times. I don't know why you want to set a baud rate. You don't do this with usb transfers. Am Dienstag, 3. April 2012 20:14:30 UTC+2 schrieb ashish sharma: Hello, I am working with Lenovo tablet (Android 3.1) and I want to fetch data from Telosb sensor. The sensor has following interface and endpoint Interface 0 Endpoint 0: Inbound, type- bulk, max packet size- 64 Endpoint 1: Outbound, type- bulk, max packet size- 64 I want to read the data from sensor and I used UsbDeviceConnection and bulkTransfer(endpoint, buffer, length, timeout) method to get the data. The byte[] buffer field in the method must have the data from the sensor at endpoint 0 is what I understand from the documentation. When I read in this way, only 2 bytes (length= 64) are read and rest are zeros. Can anyone explain what might be the cause for this? Also, how do I set the baud rate? How do I read data from the sensor continuously? Thanks, Ashish. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Arduino vs Io-Io
The ioio is a controller board with USB host and a firmware designed to communication with android devices (the android devices work as usb devices in this case). I.e. the ioio is kind of a replacement for android accessory boards that works with android = 1.6 (?) while android accessories need android = 3.1(?). Arduino boards typically have a usb device connector (this depends on the concrete arduino variant). As such, it can only communicate with USB host devices, i.e. not with all android devices. I'm also not aware of android software to communicate with arduino via USB. So for an arduino solution, you need either an USB host shield (in that case, you ?fromgroups#%21forum/ioio-userswould have to write something like the firmware oand the android lib of the ioio yourself) or bluetooth (see e.g. http://www.amarino-toolkit.net). The latency via bluetooth will be significantly higher than via usb, which may be problem depending on your application. Normally, I would recommend to use the ioio. However, I don't know if your project has requirements that would change this recommendation. You may ask further questions on the ioio user list https://groups.google.com/forum/?fromgroups#!forum/ioio-users?fromgroups#%21forum/ioio-users. It seems more appropriate than this list. Ytai, the developer behind the ioio, is very active on that list and provides great support. The ioio docu lives at https://github.com/ytai/ioio/wiki Am Samstag, 24. März 2012 03:45:08 UTC+1 schrieb James Cardona: how I can communicate two IO-IO card, controlled by Android. And if android vs arduino communication is better than IO-IO vs android thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] DexClassLoader
Hi Everyone, I am trying to play with DexClassLoader http://developer.android.com/reference/dalvik/system/DexClassLoader.htmland http://www.java2s.com/Open-Source/Android/android-core/platform-libcore/dalvik/system/DexClassLoader.java.htmI am wondering how can I use these classes. I am not expert in Android but I want to use these classes, does anyone has an idea? Your Response Is Much Appreciated. Many Thanks/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Bank Applications
Hello Everyone, I am trying to install online application bank for Android but I couldn't succeed. I installed the Android market in my emulator. However when I search for online apps I couldnt find anything. it seems becasue I am working with emulator. Does anyone know how can I install Android applications in my PC. Thanks/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] DexClassLoader
Hello Everyone, I am trying to play with DexClassLoader http://developer.android.com/reference/dalvik/system/DexClassLoader.htmland http://www.java2s.com/Open-Source/Android/android-core/platform-libcore/dalvik/system/DexClassLoader.java.htmI am wondering how can I use DexClassLoader.I am not expert in Android and I dont know how to use it, does anyone has an idea? Your Response Is Much Appreciated. Many Thanks/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Requires Android in GooglePlay
Hello, update your application android-mainfest.xml file: with api-level: your desire api level. recompile upload to market. hope all ok. Thanks. On Mar 23, 6:03 pm, BearTi mlrti...@googlemail.com wrote: Hi, a few weeks ago I published my own app on google play. On the right site (in about this app) there stand Requires Android: 2.3.7 and up ... Question: How can I change the Version? Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers]
Hi Everyone, I am trying to install Android online banking application in the Emulator. unfortunately I couldn't find any apps, can anyone help to find online applications? 2-Also How can I install application from the Android market in the Emulator. Is it possible to install application from the Android market without having mobile device? Who can Help? Cheers, Mo -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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]
hi Everyone, I am interested in online banking application for my Android research in my PC. Can anybody send me to my email azab_mou...@yahoo.com Thanks, Moutaz -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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]
Hi Everyone, How I can install in my Android online application for banking such as ( Commonwealth, AnZ, wetbac) Cheers, Mo -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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]
Hi Everyone, I am trying to install Android online banking application in my PC then run them in the (Emulator) Who can Help? Cheers, Mo -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: control micro-controller or any Hardware
There are basically three ways: 1) If you can constrict it to Android devices with USB host capability and Android 3.1 (basically good android tablets), you can use the USB APIs with the android device as Master (see http://developer.android.com/sdk/android-3.1.html, section USB APIs). 2) If you don't have USB host capability in the android devices, you can use the USB APIs with a USB accessory (see the same link as above). However, this still requires at least Android 3.1 and USB accessory basically means your USB hardware has to be designed programmed for this. 3) If you want to implement your solution for all (well, actually most) android devices, even prior to Android 3.1, you need special USB Host hardware. A simple way to go is the IOIO board. Basically, it's a microprocessor board based on a PIC microprocessor with USB host support and a (freely available) firmware and an Android library that can communicate with each other. This board can be connected to the normal USB connector you use to connect your android device with a PC. Some links: http://www.sparkfun.com/products/10748 https://github.com/ytai/ioio/wiki https://github.com/ytai/ioio/wiki/Getting-To-Know-The%20Board On 10 Feb., 18:32, abhijeet tomar abhijeet...@gmail.com wrote: How to control micro-controller or any Hardware through Andrroid Apps using USB Cable?? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Read XML file in android application
Hello every one, Could you please help me with a way to read an XML file in android application, I use Android SDK with eclipse and I tried number of ways but unfortunately I did not obtain any result. Almost all ways said put the xml file under the directory res/xml/ , but when I put it and refer to it as : R.xml.my_xml_name, xml unresolved by compiler since the R.java which is generated automatically did not refresh itself and put xml folder as for other folders. please help me I have to prepare a big project with android and I still a beginner :( -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Read XML file in android application
Thank you very much for your responding. This is one way which I tried with it but it did not return a result and not throw an exception : try { DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder(); Document doc = docBuilder.parse (new File(C:\\Users\\Mai\\workspace\\Test\\res\\xml\test.xml)); // normalize text representation doc.getDocumentElement ().normalize (); tv.setText( doc.getDocumentElement().getNodeName()); setContentView(tv); NodeList listOfPersons = doc.getElementsByTagName(person); int totalPersons = listOfPersons.getLength(); System.out.println(Total no of people : + totalPersons); for(int s=0; slistOfPersons.getLength() ; s++){ Node firstPersonNode = listOfPersons.item(s); if(firstPersonNode.getNodeType() == Node.ELEMENT_NODE){ Element firstPersonElement = (Element)firstPersonNode; //--- NodeList firstNameList = firstPersonElement.getElementsByTagName(first); Element firstNameElement = (Element)firstNameList.item(0); NodeList textFNList = firstNameElement.getChildNodes(); System.out.println(First Name : + ((Node)textFNList.item(0)).getNodeValue().trim()); //--- NodeList lastNameList = firstPersonElement.getElementsByTagName(last); Element lastNameElement = (Element)lastNameList.item(0); NodeList textLNList = lastNameElement.getChildNodes(); System.out.println(Last Name : + ((Node)textLNList.item(0)).getNodeValue().trim()); // NodeList ageList = firstPersonElement.getElementsByTagName(age); Element ageElement = (Element)ageList.item(0); NodeList textAgeList = ageElement.getChildNodes(); System.out.println(Age : + ((Node)textAgeList.item(0)).getNodeValue().trim()); //-- */ // }//end of if clause // }//end of for loop with s var }catch (SAXParseException err) { System.out.println (** Parsing error + , line + err.getLineNumber () + , uri + err.getSystemId ()); System.out.println( + err.getMessage ()); }catch (SAXException e) { Exception x = e.getException (); ((x == null) ? e : x).printStackTrace (); }catch (Throwable t) { t.printStackTrace (); } and this is the xml file : book person firstKiran/first lastPai/last age22/age /person person firstBill/first lastGates/last age46/age /person person firstSteve/first lastJobs/last age40/age /person /book please help me, I really very tired with this problem :( :( On Thu, Jan 26, 2012 at 9:56 PM, TreKing treking...@gmail.com wrote: On Wed, Jan 25, 2012 at 12:05 PM, Mai Al-Ammar mai.alam...@gmail.comwrote: the R.java which is generated automatically did not refresh itself and put xml folder as for other folders. Refresh or clean your project. - TreKing http://sites.google.com/site/rezmobileapps/treking - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mai A. Al-Ammar Teacher Assistant Imam Mohammad bin Saud Islamic University College of Computer Science -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Read XML file in android application
Thanks Marks, but I did not understand your response since I'm a beginner in Android. On Thu, Jan 26, 2012 at 10:20 PM, Mark Murphy mmur...@commonsware.comwrote: Your Android device does not have a C: drive. On Thu, Jan 26, 2012 at 2:14 PM, Mai Al-Ammar mai.alam...@gmail.com wrote: Thank you very much for your responding. This is one way which I tried with it but it did not return a result and not throw an exception : try { DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder(); Document doc = docBuilder.parse (new File(C:\\Users\\Mai\\workspace\\Test\\res\\xml\test.xml)); // normalize text representation doc.getDocumentElement ().normalize (); tv.setText( doc.getDocumentElement().getNodeName()); setContentView(tv); NodeList listOfPersons = doc.getElementsByTagName(person); int totalPersons = listOfPersons.getLength(); System.out.println(Total no of people : + totalPersons); for(int s=0; slistOfPersons.getLength() ; s++){ Node firstPersonNode = listOfPersons.item(s); if(firstPersonNode.getNodeType() == Node.ELEMENT_NODE){ Element firstPersonElement = (Element)firstPersonNode; //--- NodeList firstNameList = firstPersonElement.getElementsByTagName(first); Element firstNameElement = (Element)firstNameList.item(0); NodeList textFNList = firstNameElement.getChildNodes(); System.out.println(First Name : + ((Node)textFNList.item(0)).getNodeValue().trim()); //--- NodeList lastNameList = firstPersonElement.getElementsByTagName(last); Element lastNameElement = (Element)lastNameList.item(0); NodeList textLNList = lastNameElement.getChildNodes(); System.out.println(Last Name : + ((Node)textLNList.item(0)).getNodeValue().trim()); // NodeList ageList = firstPersonElement.getElementsByTagName(age); Element ageElement = (Element)ageList.item(0); NodeList textAgeList = ageElement.getChildNodes(); System.out.println(Age : + ((Node)textAgeList.item(0)).getNodeValue().trim()); //-- */ // }//end of if clause // }//end of for loop with s var }catch (SAXParseException err) { System.out.println (** Parsing error + , line + err.getLineNumber () + , uri + err.getSystemId ()); System.out.println( + err.getMessage ()); }catch (SAXException e) { Exception x = e.getException (); ((x == null) ? e : x).printStackTrace (); }catch (Throwable t) { t.printStackTrace (); } and this is the xml file : book person firstKiran/first lastPai/last age22/age /person person firstBill/first lastGates/last age46/age /person person firstSteve/first lastJobs/last age40/age /person /book please help me, I really very tired with this problem :( :( On Thu, Jan 26, 2012 at 9:56 PM, TreKing treking...@gmail.com wrote: On Wed, Jan 25, 2012 at 12:05 PM, Mai Al-Ammar mai.alam...@gmail.com wrote: the R.java which is generated automatically did not refresh itself and put xml folder as for other folders. Refresh or clean your project. - TreKing - Chicago transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mai A. Al-Ammar Teacher Assistant Imam Mohammad bin Saud Islamic University College of Computer Science -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http
Re: [android-developers] Read XML file in android application
I deal with java and c++ previously :) but I'm a newer just in an Android. I put the test.xml file in the res/xml directory and I clean the project and it will be added in R.java but the result is the same :( Please help me On Thu, Jan 26, 2012 at 10:53 PM, Kristopher Micinski krismicin...@gmail.com wrote: You are trying to read the file: new File(C:\\Users\\Mai\\workspace\\Test\\res\\xml\test.xml) But the file (C:\\Users\\Mai\\workspace\\Test\\res\\xml\test.xml does *not* exist when you run the code! You can't open a file which does't exist. Your question suggests you are extremely new to programming, as you are acting like when you read the file it will be coming from your development machine. kris On Thu, Jan 26, 2012 at 2:24 PM, Mai Al-Ammar mai.alam...@gmail.com wrote: Thanks Marks, but I did not understand your response since I'm a beginner in Android. On Thu, Jan 26, 2012 at 10:20 PM, Mark Murphy mmur...@commonsware.com wrote: Your Android device does not have a C: drive. On Thu, Jan 26, 2012 at 2:14 PM, Mai Al-Ammar mai.alam...@gmail.com wrote: Thank you very much for your responding. This is one way which I tried with it but it did not return a result and not throw an exception : try { DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder(); Document doc = docBuilder.parse (new File(C:\\Users\\Mai\\workspace\\Test\\res\\xml\test.xml)); // normalize text representation doc.getDocumentElement ().normalize (); tv.setText( doc.getDocumentElement().getNodeName()); setContentView(tv); NodeList listOfPersons = doc.getElementsByTagName(person); int totalPersons = listOfPersons.getLength(); System.out.println(Total no of people : + totalPersons); for(int s=0; slistOfPersons.getLength() ; s++){ Node firstPersonNode = listOfPersons.item(s); if(firstPersonNode.getNodeType() == Node.ELEMENT_NODE){ Element firstPersonElement = (Element)firstPersonNode; //--- NodeList firstNameList = firstPersonElement.getElementsByTagName(first); Element firstNameElement = (Element)firstNameList.item(0); NodeList textFNList = firstNameElement.getChildNodes(); System.out.println(First Name : + ((Node)textFNList.item(0)).getNodeValue().trim()); //--- NodeList lastNameList = firstPersonElement.getElementsByTagName(last); Element lastNameElement = (Element)lastNameList.item(0); NodeList textLNList = lastNameElement.getChildNodes(); System.out.println(Last Name : + ((Node)textLNList.item(0)).getNodeValue().trim()); // NodeList ageList = firstPersonElement.getElementsByTagName(age); Element ageElement = (Element)ageList.item(0); NodeList textAgeList = ageElement.getChildNodes(); System.out.println(Age : + ((Node)textAgeList.item(0)).getNodeValue().trim()); //-- */ // }//end of if clause // }//end of for loop with s var }catch (SAXParseException err) { System.out.println (** Parsing error + , line + err.getLineNumber () + , uri + err.getSystemId ()); System.out.println( + err.getMessage ()); }catch (SAXException e) { Exception x = e.getException (); ((x == null) ? e : x).printStackTrace (); }catch (Throwable t) { t.printStackTrace (); } and this is the xml file : book person firstKiran/first lastPai/last age22/age /person person firstBill/first lastGates/last age46/age /person person firstSteve/first lastJobs/last age40/age /person /book please help me, I really very tired with this problem :( :( On Thu, Jan 26, 2012 at 9:56 PM, TreKing treking...@gmail.com wrote: On Wed, Jan 25, 2012 at 12:05 PM, Mai Al-Ammar mai.alam...@gmail.com wrote: the R.java which is generated automatically did not refresh itself and put xml folder as for other folders. Refresh or clean your project. - TreKing - Chicago transit tracking app for Android-powered devices -- You received
[android-developers] Re: Obsolete proguard file
Proguard is a tool to shrink and obfuscate apps. For details, see http://proguard.sourceforge.net/#FAQ.html . The proguard documentation is very good. You might want to take a look. On 31 Dez., 09:15, Droid rod...@gmail.com wrote: proguard is some type of 3rd party file for version checking or similar. I normally ignore them or just delete them. On Dec 31, 5:38 am, bob b...@coolfone.comze.com wrote: Can someone explain in a nutshell what this means? Obsolete proguard file; use -keepclasseswithmembers instead of - keepclasseswithmembernames -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: multitouch support again...
It works because returning true signals that the event has been consumed. That's the signal for the parent ViewGroup to set this view as a target. As a result, the pointer multitouch events are delivered to this target view. I think, the corresponding code is in ViewGroup.dispatchTouchEvent. You might want to take a look... On 2 Dez., 00:05, John Goche johngoch...@googlemail.com wrote: On Thu, Dec 1, 2011 at 8:17 PM, al achim.leub...@googlemail.com wrote: OK, your yamtt results mean that your device supports multitouch, but only two simultanious touch points. For your purpose, that should be enough. I might be wrong, but do you return true as the methods result? If not, do so. Thanks, I was returning super.onTouchEvent(event); That made the whole difference, it now works. So somehow super.onTouchEvent(event) was consuming my event when it was not supposed to? Why does this solution work? Thanks, John Goche -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: multitouch support again...
At first glance, I don't see a fundamental problem with your code sketch that might cause your problem. I would check if your device is multitouch-capable. There are many free apps in the market to do this, for example yamtt. If the device supports mutitouch, it may help to debug into the onTouchEvent method or to log the event right at the start of the onTouchEvent method, just to see what's reported... Btw. capacitive touch screen indicates the technology used to recognize touches (a different worse technology to do this are e.g. resistive screens); multi-touch means the screen an recognize multiple touches at the same time. So, that's not the same. means something different than multitouch: On 30 Nov., 22:11, John Goche johngoch...@googlemail.com wrote: Hello, I have posted this message before but got no repiles so I decided to post it again because I need to detect when a single second finger goes down while the first one is still down on my canvas... here is my old post: I have an LG Optimus Net (P690) which as far as I understand claims to support multitouch (as it sais on the following site:http://www.mobilespecs.in/2011/10/lg-optimus-net-also-known-as-p690.html not sure if capacitive touch screen means the same thing as multitouch. However when I try the following code... public boolean onTouchEvent(MotionEvent event) { int pointerIndex = (event.getAction() MotionEvent.ACTION_POINTER_ID_MASK) MotionEvent.ACTION_POINTER_ID_SHIFT; int action = event.getAction() MotionEvent.ACTION_MASK; switch (action) { case MotionEvent.ACTION_DOWN: System.out.println(got down); case MotionEvent.ACTION_POINTER_DOWN: System.out.println(got pointer down); int screenX = (int) (event.getX(pointerIndex) * scaleX); int screenY = (int) (event.getY(pointerIndex) * scaleY); I see the code run when I place the first finger down. When I place the second finger down without lifting the first one I don't see the ACTION_POINTER_DOWN. Not sure what I'm doing wrong if anything. Thanks for your help, John Goche -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: multitouch support again...
OK, your yamtt results mean that your device supports multitouch, but only two simultanious touch points. For your purpose, that should be enough. I might be wrong, but do you return true as the methods result? If not, do so. On 1 Dez., 19:07, John Goche johngoch...@googlemail.com wrote: Thank you for your reply, I downloaded and installed yamtt (Yet Another MutltiTouch Test) from Android Market. When I place the second finger down it's detected but not when I place the third one down. Still not sure what I'm doing wrong in my code... On Thu, Dec 1, 2011 at 10:41 AM, al achim.leub...@googlemail.com wrote: At first glance, I don't see a fundamental problem with your code sketch that might cause your problem. I would check if your device is multitouch-capable. There are many free apps in the market to do this, for example yamtt. If the device supports mutitouch, it may help to debug into the onTouchEvent method or to log the event right at the start of the onTouchEvent method, just to see what's reported... Not sure about what to do. I have tried with System.out.println() statements but I don't see the ACTION_POINTER_DOWN which should result in a single printf statement since there's no break statement in the code. Btw. capacitive touch screen indicates the technology used to recognize touches (a different worse technology to do this are e.g. resistive screens); multi-touch means the screen an recognize multiple touches at the same time. So, that's not the same. means something different than multitouch: Thanks for the clarification, I would be satisfied if I could get the second finger going down detected. Any ideas? John Goche On 30 Nov., 22:11, John Goche johngoch...@googlemail.com wrote: Hello, I have posted this message before but got no repiles so I decided to post it again because I need to detect when a single second finger goes down while the first one is still down on my canvas... here is my old post: I have an LG Optimus Net (P690) which as far as I understand claims to support multitouch (as it sais on the following site: http://www.mobilespecs.in/2011/10/lg-optimus-net-also-known-as-p690.html not sure if capacitive touch screen means the same thing as multitouch. However when I try the following code... public boolean onTouchEvent(MotionEvent event) { int pointerIndex = (event.getAction() MotionEvent.ACTION_POINTER_ID_MASK) MotionEvent.ACTION_POINTER_ID_SHIFT; int action = event.getAction() MotionEvent.ACTION_MASK; switch (action) { case MotionEvent.ACTION_DOWN: System.out.println(got down); case MotionEvent.ACTION_POINTER_DOWN: System.out.println(got pointer down); int screenX = (int) (event.getX(pointerIndex) * scaleX); int screenY = (int) (event.getY(pointerIndex) * scaleY); I see the code run when I place the first finger down. When I place the second finger down without lifting the first one I don't see the ACTION_POINTER_DOWN. Not sure what I'm doing wrong if anything. Thanks for your help, John Goche -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Multi-touch with multiple buttons
getRawX/Y return the absolute coordinates off the current event on the screen (i.e. they are not relative to the view that received the coordinates). I don't know about getLocalVisibleRect(). It's not documented in the api docs. It may return coordinates relative to the parent view? In that case, it would help to use getX/Y. It's also interessting to take a look into the source code of ViewGroup.dispatchTouchEvent(). Basically, what happens there is: int scrolledX = (int)(event.getX() + view.getScrollX) int scrolledY = (int)(event.getY() + view.getScrollY) Rect frame = ... for each child child.getHitRect(frame) if (frame.contains(scrolledX, scrolledY) On 29 Nov., 13:24, ColletJb collet...@gmail.com wrote: Thanks for your answer. I tried what you mentioned and put this on my onTouch method: this.aRect = new Rect(); this.aBtn.getLocalVisibleRect(aRect); if(aRect.contains((int)event.getRawX(), (int)event.getRawY())){ Log.i(TAG, inA); if(action == MotionEvent.ACTION_DOWN){ updateAState(true); }else if(action == MotionEvent.ACTION_UP){ updateAState(false); } }else but unfortunately, it seems i got wrong infos from getLocalVisibleRect... Do you have any idea ? On 29 nov, 10:38, al achim.leub...@googlemail.com wrote: There are some basic principles in android regarding multi-touch that you should be aware of. Especially, wrt. your code these two come to my mind: 1) If the first finger touches view A, all other touches will be directed to view A as long as the first finger is still there, even if the subsequent touches touch another view. I think, the reason to implement it this way, was to ease implementation of gestures like pinchzoom. 2) The action codes you will typically see during a multitouch gesture are: - ACTION_DOWN: this signals that the first finger touches the display - ACTION_POINTER_DOWN: the second, third, ... finger touches the display - ACTION_POINTER_UP: a finger was lifted, but there are still fingers on the display - ACTION_UP: the last finger was lifted Of course, you may also see ACTION_MOVE events in between and after a POINTER_UP, another POINTER_DOWN event may occur, if another finger touches the display before all fingers are lifted, etc. Regarding your code: 1) means that you have to capture the events at a view that is an ancestor to all the buttons that should be part of the multi-touch. I.e. put both buttons into a common parent and listen for the touch events at the parent. You can then analyze the event to determine the coordinates of the new touch point and use the coordinates to determine the touched button. Be aware though, that some devices have terrible hardware limitations (i.e. problems). Seehttp://androidandme.com/2010/03/news/is-multitouch-broken-on-the-nexu... for an example. I.e. the code has to take some strange behaviour into account. Regarding analyzing the event, don't confuse pointer id's with pointer indizes. That's a problem that can be seen in various code examples online. 2) means, you have to listen for ACTION_POINTER_DOWN and ACTION_POINTER_UP (as well as ACTION_CANCEL) too. On 28 Nov., 15:13, ColletJb collet...@gmail.com wrote: Hi, I'm facing an very simple (and stupid) issue and I hope someone will be able to provide me an explanation... I'm trying to develop an Activity with 2 buttons (let's call them btnA and btnB), they are in my xml layout. My goal is to be able to handle click on both button (easy), even on the same time with multi-touch. First, I retrieve them on the onCreate method and I set them the OnTouchListener to this (my Activity implements OnTouchListener): @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); this.btnA = (ImageButton) this.findViewById(R.id.btnA); this.btnB = (ImageButton) this.findViewById(R.id.btnB); this.btnA.setOnTouchListener(this); this.btnB.setOnTouchListener(this); } I did override the onTouch method that way : @Override public boolean onTouch(View v, MotionEvent event) { int action = event.getAction() MotionEvent.ACTION_MASK; if(v.equals((View)this.btnA)){ if(action == MotionEvent.ACTION_DOWN){ updateAState(true); }else if(action == MotionEvent.ACTION_UP){ updateAState(false); } }else if(v.equals((View)this.btnB)){ if(action == MotionEvent.ACTION_DOWN){ updateBState(true
[android-developers] Re: Multi-touch with multiple buttons
There are some basic principles in android regarding multi-touch that you should be aware of. Especially, wrt. your code these two come to my mind: 1) If the first finger touches view A, all other touches will be directed to view A as long as the first finger is still there, even if the subsequent touches touch another view. I think, the reason to implement it this way, was to ease implementation of gestures like pinchzoom. 2) The action codes you will typically see during a multitouch gesture are: - ACTION_DOWN: this signals that the first finger touches the display - ACTION_POINTER_DOWN: the second, third, ... finger touches the display - ACTION_POINTER_UP: a finger was lifted, but there are still fingers on the display - ACTION_UP: the last finger was lifted Of course, you may also see ACTION_MOVE events in between and after a POINTER_UP, another POINTER_DOWN event may occur, if another finger touches the display before all fingers are lifted, etc. Regarding your code: 1) means that you have to capture the events at a view that is an ancestor to all the buttons that should be part of the multi-touch. I.e. put both buttons into a common parent and listen for the touch events at the parent. You can then analyze the event to determine the coordinates of the new touch point and use the coordinates to determine the touched button. Be aware though, that some devices have terrible hardware limitations (i.e. problems). See http://androidandme.com/2010/03/news/is-multitouch-broken-on-the-nexus-one/ for an example. I.e. the code has to take some strange behaviour into account. Regarding analyzing the event, don't confuse pointer id's with pointer indizes. That's a problem that can be seen in various code examples online. 2) means, you have to listen for ACTION_POINTER_DOWN and ACTION_POINTER_UP (as well as ACTION_CANCEL) too. On 28 Nov., 15:13, ColletJb collet...@gmail.com wrote: Hi, I'm facing an very simple (and stupid) issue and I hope someone will be able to provide me an explanation... I'm trying to develop an Activity with 2 buttons (let's call them btnA and btnB), they are in my xml layout. My goal is to be able to handle click on both button (easy), even on the same time with multi-touch. First, I retrieve them on the onCreate method and I set them the OnTouchListener to this (my Activity implements OnTouchListener): @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); this.btnA = (ImageButton) this.findViewById(R.id.btnA); this.btnB = (ImageButton) this.findViewById(R.id.btnB); this.btnA.setOnTouchListener(this); this.btnB.setOnTouchListener(this); } I did override the onTouch method that way : @Override public boolean onTouch(View v, MotionEvent event) { int action = event.getAction() MotionEvent.ACTION_MASK; if(v.equals((View)this.btnA)){ if(action == MotionEvent.ACTION_DOWN){ updateAState(true); }else if(action == MotionEvent.ACTION_UP){ updateAState(false); } }else if(v.equals((View)this.btnB)){ if(action == MotionEvent.ACTION_DOWN){ updateBState(true); }else if(action == MotionEvent.ACTION_UP){ updateBState(false); } } return true; } With this implementation, I can capture the DOWN and UP event on both buttons, but not with multi-touch (ex: btnA DOWN, btnB DOWN, btnB UP, btnB DOWN, btnB UP, btnA UP). Who can tell me how I can fix my onTouch method to support such feature ? Thanks a lot. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Is this a joke??
http://developer.android.com/guide/developing/tools/monkey.html Monkeys can thrash test your app like nothing else :). Al. -- T: @alsutton W: www.funkyandroid.com The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, it's associates, or it's subsidiaries. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Multipart Messages - Is there an example how to get them work now. (Uploading to a web API)
I think there is another way to approach this which cuts out the need for the libraries, but you'll need to get the AOSP source. Once you've checked out the source from frameworks_base you can re-use an implementation available internally in Android from; frameworks/base/core/java/com/android/internal/http/multipart The instructions on how to use it are in the header comments of MultipartEntity.java Given the problems with kernel.org you can pick up the source code from the **unofficial** github mirror at https://github.com/android/platform_frameworks_base as a quick workaround to the kernel.org issues. Al. P.S. Don't forget to keep to the licensing terms :). -- T: @alsutton W: www.funkyandroid.com The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, it's associates, or it's subsidiaries. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: USB - IR drivers
You are right, Frank, for android versions before 3.1. Using the USB framework introduced with android 3.1, it should be possible from within a java app. On 16 Sep., 13:58, FrankG frankgru...@googlemail.com wrote: Hello ! IMHO to add a new usb mode, you need to change nearly all parts of the platform .. change the kernel ( new usb gadget) add some kernel to framework communication stuff and so on .. Without full platform access something like this is not possible. Good luck ! Frank On 16 Sep., 04:00, warriorinjapan chandanpratih...@gmail.com wrote: Dear All, Does any one of you have experience of writing the USB drivers on Android SDK for InfraRed transmitters. Thank you. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Programming in Android
*Thank you all , * *it is helpful information and good beginning * * * -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to create a x509 certificate?
You could include e.g. bouncycastle (http://bouncycastle.org/ java.html). By the way, older android versions contain a non-public version of it. On 2 Sep., 02:10, Simon Trigona simon.trig...@gmail.com wrote: Hi, did you find a solution? Thanks, Simon -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Programming in Android
Hi guys, Good morning , I'm proud that I'm a member in this great group I need your help to start programming in Android,just the beginning . Thanks in advance, hope to hear from you, yours Tareq, tariq.mam...@gmail.com facebook.com/tareq.mamari twitter.com/tareq_mamari -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Home Screen
Hi, I am wondering if i can switch between Home Screens to the right and left programmatically through a service for example. If not, would it be possible if i created my own Home Screen?!?! Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to prematurely stop a long-running SQLite query?
This all sounds to me like full-text search. So I would check if the full-text search support of sqlite (see http://www.sqlite.org/fts3.html) is available on android. A quick google search finds pages like http://bakhtiyor.com/2009/08/sqlite-full-text-search/;. According to that page, full-text search seems to be available... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
RE: [android-developers] gaming
how to use these engines? Well I have downloaded these engines, but still i don't know how to use them for developing games? i found some tutorials that shows how to use these engines to create objects , animation , but how can we use these engines for developing games say like Angry Birds ?? Date: Sat, 18 Jun 2011 14:36:28 +0530 Subject: Re: [android-developers] gaming From: r.o.b.i.n.abhis...@gmail.com To: android-developers@googlegroups.com Blender jmonkeyrunner unity3D there are so many out there you just need patience and time Best of luck On Sat, Jun 18, 2011 at 1:41 PM, kaushik p kaushiks...@gmail.com wrote: Hi all, Can anyone suggest the best gaming engines for android ?? -- ThanksRegardsKaushik Pendurthi http://kaushikpendurthi.blogspot.com/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Regards Abhishek Talwar9953395712 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] new to android
Hi dear I'm new to android world and I want to know what to download on my computer to start making apps do i need an experience or it is easy to make programs ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] live video streaming from webcam to Android using Flash Media Server 3.5
Hello Android developers, I have installed Flash Media Server 3.5 and Flash Media Live Encoder 3.1 on my PC. I want to stream live video from my PC to my Android device (android 2.3.4) right now I can stream live video from my pc to another pc. for that I used flash player to run the live video streaming. can any body guide on how to use these tools to stream live video from my pc to Android device. for example what is the encoding technique, what is the frame rate and so on. thanks in advance. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Error Message Help
I need help with my programme. I am writing the prograame in Eclipse and it complies ok and says there are no errors, but when I run it in the android emulator it comes up with a box that says the following message: Sorry! The application Weapon List (process com.example) has stopped unexpectedly. Please try again. It has a button that says force close and that is my only option. When I try to run the programme again it does the same thing. Is there anyway to log or look at a log that can tell me why the programme keeps crashing? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] String Array help
I need help with my programme. I am creating an epandable list from an xml file that contains data that can change at anytime. My question is the data in the xml file is stored in a string-array and I need to transfer it to a multi dimensional string array so I can use it to create the children for the expandable list. So is it possible to do this? If so, how do I do this? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Multiple Layout within an expandable list
I am writing a program where I use an expandable list created from a string array in an xml file and wish to have the program create the children from an xml file string but display them in a table. For example: The parent group would be Comp Sci and the children group would be a table with a headings row of Test 1, Test 2, Test 3, Test 4 with on the next row the results and a final row of one cell for notes. Sorry I could give a picture of what I want. Is this possible? Thanks in advance Big Al -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Log.d messages in frameworks/.../android/internal/telephony not appearing
do you every try 'logcat -b radio' ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Honeycomb Sourcecode
From Andy Rubins recent post at http://android-developers.blogspot.com/2011/04/i-think-im-having-gene-amdahl-moment.html ; Finally, we continue to be an open source platform and will continue releasing source code when it is ready. As I write this the Android team is still hard at work to bring all the new Honeycomb features to phones. As soon as this work is completed, we’ll publish the code. This temporary delay does not represent a change in strategy. We remain firmly committed to providing Android as an open source platform across many device types. Al. -- T: @alsutton W: www.funkyandroid.com The views expressed in this email are those of the author and not necessarily those of Funky Android Limited, it's associates, or it's subsidiaries. On Apr 7, 9:41 am, Marcin Orlowski webnet.andr...@gmail.com wrote: On 7 April 2011 10:40, Marcin Orlowski webnet.andr...@gmail.com wrote: So my question is: where can I ask for the sourcecode ? AFAIK you can't, unless you are sort of hw manufacturer etc. ... or sign sign a licensing agreement. Try using your publisher consoler's Help - Contacting Us form Regards, Marcin Orlowski *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy... WebnetMobile on *Facebook http://webnetmobile.com/fb/* and *Twitterhttp://webnetmobile.com/twitter/ * -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android MediaPlayer sometimes stops playing a sound file early
hello... i really need some help here.. my app is absolutely complete. just this little flaw is there... this mediaPlayer_stops_playing_soundFile_early_problem happens with only a few particular .ogg files in my raw resources folder. i have played those .ogg files independently in my PCs media player, sounds are perfectly okay but the mediaPlayer_stops_playing_soundFile_early_problem shows up whenever i am trying this app in the emulator or in the test device. PLEASE PLEASE PLEASE HELP... SOS -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: onWindowFocusChanged() happens more than once when resuming the application from homescreen or app drawer
hello anyone has any idea about this -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android MediaPlayer sometimes stops playing a sound file early
hahaha. how silly. okay.. this is so stupid. here is the solution the problem that I have been facing this problem is occurring because I did not pay much attention while trimming my sound clip. i had recorded my voice in .ogg format and i am trying to use these voice clips as sounds for my button click actions. apparently, what i found is that, the android.media.MediaPlayerhttp://developer.android.com/reference/android/media/MediaPlayer.html *cannot* play a sound file upto its absolute completion - it ceases playback about 300 milliseconds before the actual end of the sound file data. Hence, in order to avoid this pre-matured stop of our recorded or edited sound-clips that we were facing (*i believe john.p was having a similar issue*), we must ensure that there is at least 300 milliseconds of silence after the last sound wave oscillation in the file. i have used the open source sound editing tool called *Audacity* to record my voice, normalize the voice, remove background noise, trim the sound clip, and additional 300 millisecond silence - it's an easy software and can be found here http://audacity.sourceforge.net/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android MediaPlayer sometimes stops playing a sound file early
i face the SAME issue. it happens in both the emulator and also in my test device - both of which run android 2.2 i have included my sound files in the raw folder. but still i have the same problem - the sound cuts off near the end upon button click -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: onWindowFocusChanged() happens more than once when resuming the application from the homescreen or app drawer
## HOME BUTTON PRESSED TO MINIMIZE THE APPLICATION ## 04-05 15:00:17.801: INFO/System.out(357): onWindowFocusChanged() - hasFocus:false ## APPLICATION BUTTON PRESSED TO RETURN TO THE RUNNING APPLICATION ## 04-05 15:00:28.354: INFO/System.out(357): onWindowFocusChanged() - hasFocus:true 04-05 15:00:28.354: INFO/System.out(357): mySoundPlaybackMethods() ## now the window focus has already become true. why should the following occur again 04-05 15:00:29.251: INFO/System.out(357): onWindowFocusChanged() - hasFocus:false 04-05 15:00:29.301: INFO/System.out(357): onWindowFocusChanged() - hasFocus:true 04-05 15:00:29.352: INFO/System.out(357): mySoundPlaybackMethods() -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] onWindowFocusChanged() happens more than once when resuming the application from homescreen or app drawer
## HOME BUTTON PRESSED TO MINIMIZE THE APPLICATION ## 04-05 15:00:17.801: INFO/System.out(357): onWindowFocusChanged() - hasFocus:false ## APPLICATION BUTTON PRESSED TO RETURN TO THE RUNNING APPLICATION ## 04-05 15:00:28.354: INFO/System.out(357): onWindowFocusChanged() - hasFocus:true 04-05 15:00:28.354: INFO/System.out(357): mySoundPlaybackMethods() Now the windowFocus has already become true. why should the following occur again??? # 04-05 15:00:29.251: INFO/System.out(357): onWindowFocusChanged() - hasFocus:false 04-05 15:00:29.301: INFO/System.out(357): onWindowFocusChanged() - hasFocus:true 04-05 15:00:29.352: INFO/System.out(357): mySoundPlaybackMethods() -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] destruction and creation of android activity happens TWICE upon changing the screen orientation
*Scenario 1 - NORMAL* *## application activity started ###* 03-31 17:52:18.413: INFO/System.out(589): onCreate() 03-31 17:52:18.974: INFO/System.out(589): onWindowFocusChanged() - hasFocus:true 03-31 17:52:18.974: INFO/System.out(589): mySoundPlaybackMethods() *## back button pressed to remove activity from the task ###* 03-31 17:54:54.113: INFO/System.out(589): onWindowFocusChanged() - hasFocus:false 03-31 17:54:54.514: INFO/System.out(589): onDestroy() *## application activity finished ##* *Scenario 2 - ABNORMAL* * application activity started ##* 03-31 17:52:18.413: INFO/System.out(589): onCreate() 03-31 17:52:18.974: INFO/System.out(589): onWindowFocusChanged() - hasFocus:true 03-31 17:52:18.974: INFO/System.out(589): mySoundPlaybackMethods() *### screen orientation changed #* 03-31 17:52:38.393: INFO/System.out(589): onSaveInstanceState() - state saved 03-31 17:52:38.403: INFO/System.out(589): onDestroy() 03-31 17:52:38.514: INFO/System.out(589): onCreate() 03-31 17:52:39.464: INFO/System.out(589): onRestoreInstanceState() - state restored from old bundle * --- * *?? in the following output, why should the same steps of destruction/creation of activity happen ONCE AGAIN ??* * --- * 03-31 17:52:39.504: INFO/System.out(589): onSaveInstanceState() - state saved 03-31 17:52:39.504: INFO/System.out(589): onDestroy() 03-31 17:52:39.524: INFO/System.out(589): onCreate() 03-31 17:52:40.024: INFO/System.out(589): onRestoreInstanceState - state restored from old bundle 03-31 17:52:40.104: INFO/System.out(589): onWindowFocusChanged() - hasFocus:true * --- * * the last call to onWindowFocusChanged() occured with hasFocus=TRUE; * * this call to to onWindowFocusChanged() also occured with hasFocus=TRUE;* * when did the windowFocus even change to FALSE?* * --- * 03-31 17:52:40.104: INFO/System.out(589): mySoundPlaybackMethods() *## back button pressed to remove activity from the task * 03-31 17:54:54.113: INFO/System.out(589): onWindowFocusChanged() - hasFocus:false 03-31 17:54:54.514: INFO/System.out(589): onDestroy() *# application activity finished * -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] onWindowFocusChanged() happens more than once when resuming the application from the homescreen or app drawer
*Scenario 1 - NORMAL* *## application activity started ###* 03-31 17:52:18.413: INFO/System.out(589): onCreate() 03-31 17:52:18.974: INFO/System.out(589): onWindowFocusChanged() - hasFocus:true 03-31 17:52:18.974: INFO/System.out(589): mySoundPlaybackMethods() *## back button pressed to remove activity from the task ###* 03-31 17:54:54.113: INFO/System.out(589): onWindowFocusChanged() - hasFocus:false 03-31 17:54:54.514: INFO/System.out(589): onDestroy() *## application activity finished ##* *Scenario 3 - ABNORMAL* * application activity started ##* 03-31 18:16:55.823: INFO/System.out(589): onCreate() 03-31 18:16:56.124: INFO/System.out(589): onWindowFocusChanged() - hasFocus:true 03-31 18:16:56.139: INFO/System.out(589): mySoundPlaybackMethods() *# HOME button pressed ##* 03-31 18:17:03.244: INFO/System.out(589): onSaveInstanceState() - state saved 03-31 18:17:03.424: INFO/System.out(589): onWindowFocusChanged() - hasFocus:false *### Landed onto homescreen launcher ##* *### Pressed on the application button to go back to the task #* 03-31 18:18:51.544: INFO/System.out(589): onWindowFocusChanged() - hasFocus:true 03-31 18:18:51.593: INFO/System.out(589): mySoundPlaybackMethods() * --- * *?? in the following output, why should the same steps of windowFocusChanged false-true and soundPlayback happen ONCE AGAIN ??* * --- * 03-31 18:18:52.404: INFO/System.out(589): onWindowFocusChanged() - hasFocus:false 03-31 18:18:52.424: INFO/System.out(589): onWindowFocusChanged() - hasFocus:true 03-31 18:18:52.484: INFO/System.out(589): mySoundPlaybackMethods() *## back button pressed to remove activity from the task * 03-31 18:20:00.204: INFO/System.out(589): onWindowFocusChanged() - hasFocus:false 03-31 18:20:00.344: INFO/System.out(589): onDestroy() *# application activity finished * -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en