[android-developers] Add Email/Sync Account from an App
I created an app that connects to my schools network and authenticates the device when in range, using the users pre-configured username/password and the schools web based authentication. Several people have also approached me wondering how to configure their school email account on their device, so would it be possible to, using my app, create a new account on the device? If so, how would one go about doing this? The type is exchange, if that makes a difference. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Add Email/Sync Account from an App
Also, how would I request permission to use the account manager only when I click the button to add the account? On Thursday, July 19, 2012 8:35:22 PM UTC-4, Matt Clark wrote: I created an app that connects to my schools network and authenticates the device when in range, using the users pre-configured username/password and the schools web based authentication. Several people have also approached me wondering how to configure their school email account on their device, so would it be possible to, using my app, create a new account on the device? If so, how would one go about doing this? The type is exchange, if that makes a difference. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Clearing a system set notification, can it be done?
At my school we have an internet security system, that every time your network connection goes inactive, it disconnects you, and you have to use the web browser to log back into the network. I created an app for my campus that detects the disconnect, and loggs the user back in with broadcast receivers, this part works fine, however, with my phone, it also detects that the network requires a login, and sets a notification: Login to the [SSID] network. Is there a way to after my application runs, dismiss this system set notification? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Distribution of App Containing Google Maps API
Per Section 8.3, is it illegal to sell an app containing the Maps API without permission of Google? https://developers.google.com/maps/documentation/android/maps-api-signup -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Per Google Terms of Service: Am I permitted to...?
I am developing an android app that will utilize the Google Maps API. The app is a Dispatch Manager and Fleet Management system. It does all of the actual management system on my own server and SQL Databases using the GPS information from the phone, however, in the Google terms of service, it says something about using the API for fleet management and dispatch, but I know nothing of law language, and don't understand what it is telling me I can and can not do. Section 8.7: https://developers.google.com/maps/documentation/android/maps-api-signup Can someone tell me if I am permitted to use the API for this app? I am just using the API to display current location, and destinations. Also, per Section 8.3, am I allowed to sell this app that utilizes the API? Thanks ~Matt -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Android to PHP error- Unidentified Index
If you wish... Here is an Network Class that I made that I use for all of my requests, Create a new Class, and import the following, use it as follows: Network network = new Network(); String response = network.getResponse(http://www.google.com;, postName1, postData1); Code: /**/ /*** tinyClark Development 2011(Matt Clark)**/ /***http://www.tinyclark.com **/ /**/ package tinyClark.libs; import java.io.BufferedReader; import java.io.InputStream; import java.io.InputStreamReader; import java.util.ArrayList; import java.util.List; import org.apache.http.HttpResponse; import org.apache.http.NameValuePair; import org.apache.http.client.HttpClient; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpPost; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.message.BasicNameValuePair; import android.util.Log; public class Network { boolean Logging_LogCat = true; public Network(boolean EnableLogging) { Logging_LogCat = EnableLogging; } public Network(){ Logging_LogCat = false; } public String getResponse(String URL) { return (getFinalResponse(URL, null, null, null, null, null, null, null, null)); } public String getResponse(String URL, String postName1, String postData1) { return (getFinalResponse(URL, postName1, postData1, null, null, null, null, null, null)); } public String getResponse(String URL, String postName1, String postData1, String postName2, String postData2) { return (getFinalResponse(URL, postName1, postData1, postName2, postData2, null, null, null, null)); } public String getResponse(String URL, String postName1, String postData1, String postName2, String postData2, String postName3, String postData3) { return (getFinalResponse(URL, postName1, postData1, postName2, postData2, postName3, postData3, null, null)); } public String getResponse(String URL, String postName1, String postData1, String postName2, String postData2, String postName3, String postData3, String postName4, String postData4) { return (getFinalResponse(URL, postName1, postData1, postName2, postData2, postName3, postData3, postName4, postData4)); } private String getFinalResponse(String URL, String postName1, String postData1, String postName2, String postData2, String postName3, String postData3, String postName4, String postData4) { HttpResponse response; HttpClient httpclient; HttpPost httppost; ListNameValuePair nameValuePairs = new ArrayListNameValuePair(2); String finalReturn = err; if (Logging_LogCat) { Log.d(tinyClark.lib.Network, Network Request); } try { httpclient = new DefaultHttpClient(); httppost = new HttpPost(URL); if (postName1 != null) { nameValuePairs.add(new BasicNameValuePair(postName1, postData1)); } if (postName2 != null) { nameValuePairs.add(new BasicNameValuePair(postName2, postData2)); } if (postName3 != null) { nameValuePairs.add(new BasicNameValuePair(postName3, postData3)); } if (postName4 != null) { nameValuePairs.add(new BasicNameValuePair(postName4, postData4)); } httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs)); response = httpclient.execute(httppost); finalReturn = (inputStreamToString(response.getEntity().getContent()).toString()); if (Logging_LogCat) { Log.d(tinyClark.lib.Network, finalReturn); } return finalReturn; } catch (Exception e) { if(Logging_LogCat){ Log.d(tinyCLark.lib.Network.Error, e.toString()); } return err; } } private StringBuilder inputStreamToString(InputStream is) { String line = ; StringBuilder total = new StringBuilder(); BufferedReader rd = new BufferedReader(new InputStreamReader(is)); try { while ((line = rd.readLine()) != null) { total.append(line); } } catch (Exception e) { } return total; } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Per Google Terms of Service: Am I permitted to...?
The more you know xD Well thanks anyway, I guess I will have to have an actual lawyer read over it for me. :p On Sunday, May 13, 2012 3:50:00 AM UTC-4, Matt Clark wrote: I am developing an android app that will utilize the Google Maps API. The app is a Dispatch Manager and Fleet Management system. It does all of the actual management system on my own server and SQL Databases using the GPS information from the phone, however, in the Google terms of service, it says something about using the API for fleet management and dispatch, but I know nothing of law language, and don't understand what it is telling me I can and can not do. Section 8.7: https://developers.google.com/maps/documentation/android/maps-api-signup Can someone tell me if I am permitted to use the API for this app? I am just using the API to display current location, and destinations. Also, per Section 8.3, am I allowed to sell this app that utilizes the API? Thanks ~Matt -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Get SubView Location in MapView
In my app I am using a mapView with ImageViews within. When I click on one of the contained imageviews, how would I get its location withing the mapView so that I can center the mapview on the clicked ImageView. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Confirmation with pressing back button
Probably not the most efficient way to do things... but it works on all devices that I have used... Not neat.. but hey, it works. xD boolean quitOnBack = false; public void onBackPressed() { if (menuLayout.getVisibility() == View.VISIBLE) { menuLayout.startAnimation(Anim_SlideOut_Bottom); menuLayout.setVisibility(View.GONE); } else { if (quitOnBack) { finish(); } else { quitOnBack = true; Toast.makeText(this, Press {Back} again to quit., Toast.LENGTH_SHORT).show(); new Thread() { @Override public void run() { try { Thread.sleep(2500); } catch (Exception e) { } quitOnBack = false; } }.start(); } } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Confirmation with pressing back button
Probably not the most efficient way to do things... but it works on all devices that I have used... Not neat.. but hey, it works. xD boolean quitOnBack = false; public void onBackPressed() { if (quitOnBack) { finish(); } else { quitOnBack = true; Toast.makeText(this, Press {Back} again to quit., Toast.LENGTH_SHORT).show(); new Thread() { @Override public void run() { try { Thread.sleep(2500); } catch (Exception e) { } quitOnBack = false; } }.start(); } } -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] In App Navigation
I am working on an app that will utilize navigation, but I have no idea where to start when it comes to this. Does anyone have ans suggestions on something to read on learning navigation on android? Or would it just be better to bring the user just into the native Android Navigation app? ~Matt -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] How to force quit a Thread
I am creating an app that sends various HTTP requests in seperate threads, while doing so brings up a loading screen. If the network request is taking longer then the user expects, I want them to be able to press the back button to force quit the thread, and dismiss the loading screen. I have my thread set up as: dataThread = new Thread(new Runnable() { public void run() { //... //Networking Data and Handlers //... } }); dataThread.start(); and where I want to force quit at onBackPressed() I have tried: dataThread.stop(); dataThread.destroy(); dataThread.interrupt(); And none of them work, Android does not support stop(), or destroy(), and interrupt() does nothing to stop the thread. I do not care about exceptions as everything will be caught, I just want it to allow the user to resume doing what they want, if it hangs on requests, or even retry the request.. Any and all help is greatly appreciated. ~Matt -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to force quit a Thread
What do you mean use flags? The app hangs on lines that wait for an HTTP response, so i want to be able to just cut them off mid execution if I have to, i cant call check statements before and after. Sorry, I do not know a whole lot about Threading. On Monday, April 30, 2012 12:09:25 AM UTC-4, Ankita wrote: stop(),destroy() etc. methods were deprecated by JDK versions, so must have not got support now. To stop thread, you should try to use flags, AFAIK. On Mon, Apr 30, 2012 at 9:34 AM, Matt Clark mrclark32...@gmail.comwrote: I am creating an app that sends various HTTP requests in seperate threads, while doing so brings up a loading screen. If the network request is taking longer then the user expects, I want them to be able to press the back button to force quit the thread, and dismiss the loading screen. I have my thread set up as: dataThread = new Thread(new Runnable() { public void run() { //... //Networking Data and Handlers //... } }); dataThread.start(); and where I want to force quit at onBackPressed() I have tried: dataThread.stop(); dataThread.destroy(); dataThread.interrupt(); And none of them work, Android does not support stop(), or destroy(), and interrupt() does nothing to stop the thread. I do not care about exceptions as everything will be caught, I just want it to allow the user to resume doing what they want, if it hangs on requests, or even retry the request.. Any and all help is greatly appreciated. ~Matt -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Find Image Resource Id From Image View
I have a screen full of image views, and depending on which one is clicked, it opens a second activity passing the values. I.E.: ImageView android:id=@+id/img01 android:layout_width=wrap_content android:layout_height=wrap_content android:layout_alignParentLeft=true android:layout_alignParentTop=true android:onClick=gridClick android:padding=1px android:src=@drawable/geo_cell_01 / ImageView android:id=@+id/img02 android:layout_width=wrap_content android:layout_height=wrap_content android:layout_alignParentTop=true android:layout_toRightOf=@id/img01 android:onClick=gridClick android:padding=1px android:src=@drawable/geo_cell_02 / Java Code: public void gridClick(View v) { Intent gridInfo = new Intent(Master.this, GridInfo.class); ImageView img = (ImageView)findViewById(v.getId()); //Here is my problem startActivity(gridInfo); } I now have the ImageView assigned to a variable, but the value I need to pass to the second activity is the R.id.xxx of the drawable inside of the image view.. How would I go about getting this ID? Thanks ~Matt -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] New Windows Install - AdMob Errors
I just had to reformat my install of windows, but was lucky enough to be able to save all of my apps, however, whenever i try and build them now, i get the following error: 03-23 16:31:44.668: E/AndroidRuntime(918): java.lang.NoClassDefFoundError: com.google.ads.AdRequest I fixed all of the paths, the AdMob SDK is included in the projects, but every one of my apps that utilizes AdMob now error, and I have no idea how to fit it... Any and all suggestions would be greatly appreciated as I am completely stuck... ~Matt Clark -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] New Windows Install - AdMob Errors
Ah!!! Thanks so much! Worked perfectly! On Friday, March 23, 2012 12:41:05 PM UTC-4, Mark Murphy (a Commons Guy) wrote: If you are now on the R17 version of the tools, try: https://plus.google.com/u/0/109385828142935151413/posts/RL91VJd1ytihttps://plus.google.com/u/0/109385828142935151413/posts/RL91VJd1yti On Fri, Mar 23, 2012 at 12:35 PM, Matt Clark mrclark32...@gmail.com wrote: I just had to reformat my install of windows, but was lucky enough to be able to save all of my apps, however, whenever i try and build them now, i get the following error: 03-23 16:31:44.668: E/AndroidRuntime(918): java.lang.NoClassDefFoundError: com.google.ads.AdRequest I fixed all of the paths, the AdMob SDK is included in the projects, but every one of my apps that utilizes AdMob now error, and I have no idea how to fit it... Any and all suggestions would be greatly appreciated as I am completely stuck... ~Matt Clark -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 4.1 Available! On Friday, March 23, 2012 12:41:05 PM UTC-4, Mark Murphy (a Commons Guy) wrote: If you are now on the R17 version of the tools, try: https://plus.google.com/u/0/109385828142935151413/posts/RL91VJd1ytihttps://plus.google.com/u/0/109385828142935151413/posts/RL91VJd1yti On Fri, Mar 23, 2012 at 12:35 PM, Matt Clark mrclark32...@gmail.com wrote: I just had to reformat my install of windows, but was lucky enough to be able to save all of my apps, however, whenever i try and build them now, i get the following error: 03-23 16:31:44.668: E/AndroidRuntime(918): java.lang.NoClassDefFoundError: com.google.ads.AdRequest I fixed all of the paths, the AdMob SDK is included in the projects, but every one of my apps that utilizes AdMob now error, and I have no idea how to fit it... Any and all suggestions would be greatly appreciated as I am completely stuck... ~Matt Clark -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@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 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy _Android Programming Tutorials_ Version 4.1 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] Adjust Screen Size When Soft Keyboard Shown
Ahhh, i always wrap everything in scroll view, but did not know to set this property. 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] Adjust Screen Size When Soft Keyboard Shown
Right now in my app, when the soft keyboard is shown, it does not resize my activity to the upper half of the screen that is not being covered by the keyboard, higing some important elements. How would I detect that the soft keyboard has been shown, and then change my layout to fit? ~tinyClark -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Manifest Not Building : android:configChanges=screenOrientation
I am trying to get my app to handle its own Screen Orientation changing as opposed to the app reloading the activity every time. I found that to get the app to do this I need to add android:configChanges=screenOrientation however the Manifest will no longer build giving me this error: error: Error: String types not allowed (at 'configChanges' with value 'screenOrientation'). I found in Google's Android docs that this is the correct method of use, and the only support i was able to fin on this is that i need to set my project target to 13+, which it is currently at 15. Any and all help is greatly appreciated! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Manifest Not Building : android:configChanges=screenOrientation
Thanks for that. Now i am feeling pretty stupid. xD On Feb 20, 3:50 pm, Kostya Vasilyev kmans...@gmail.com wrote: It's orientation not screenOrientation http://developer.android.com/guide/topics/manifest/activity-element.h... -- K 21.02.2012 0:47, Matt Clark ?: I found that to get the app to do this I need to add android:configChanges=screenOrientation however the Manifest will no longer build giving me this error: error: Error: String types not allowed (at 'configChanges' with value 'screenOrientation'). -- Kostya Vasilyev -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Fail to connect to camera service - Camera.open();
{ Log.e(TAG, FLASH_MODE_OFF not supported); } } } } } 2012/2/8 Matt Clark mrclark32...@gmail.com package tinyClark.util.flashlite; import java.util.List; import android.app.Activity; import android.hardware.Camera; import android.hardware.Camera.CameraInfo; import android.hardware.Camera.Parameters; import android.os.Bundle; import android.util.Log; import android.view.View; import android.widget.Button; public class Master extends Activity { String TAG = tinyClark; boolean mIsFlashOpen; Camera mCamera; // Camera.Parameters CameraInfo; Button btn1; Boolean lightToggle; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); btn1 = (Button)findViewById(R.id.btn1); btn1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if(lightToggle == false){ turnLightOn(); lightToggle = true; }else{ turnLightOff(); lightToggle = false; } } }); } private void turnLightOn() { if (false == mIsFlashOpen) { if (null == mCamera) { try { Log.e(TAG, open); mCamera = Camera.open(CameraInfo.CAMERA_FACING_BACK); } catch (RuntimeException e) { try { Thread.sleep(500); Log.e(TAG, second open); mCamera = Camera.open(CameraInfo.CAMERA_FACING_BACK); } catch (Exception sube) { Log.e(TAG, fail to open camera); sube.printStackTrace(); mCamera = null; } } } if (null != mCamera) { Parameters parameters = mCamera.getParameters(); if (parameters == null) { return; } ListString flashModes = parameters.getSupportedFlashModes(); // Check if camera flash exists if (flashModes == null) { return; } String flashMode = parameters.getFlashMode(); if (!Parameters.FLASH_MODE_TORCH.equals(flashMode)) { // Turn on the flash if (flashModes.contains(Parameters.FLASH_MODE_TORCH)) { parameters.setFlashMode(Parameters.FLASH_MODE_TORCH); mCamera.startPreview(); mCamera.setParameters(parameters); // mRightBtn.setEnabled(true); } else { Log.e(TAG, FLASH_MODE_TORCH not supported); } } } } } private void turnLightOff() { if (mIsFlashOpen) { mIsFlashOpen = false; if (mCamera == null) { return; } Parameters parameters = mCamera.getParameters(); if (parameters == null) { return; } ListString flashModes = parameters.getSupportedFlashModes(); String flashMode = parameters.getFlashMode(); // Check if camera flash exists if (flashModes == null) { return; } if (!Parameters.FLASH_MODE_OFF.equals(flashMode
[android-developers] Re: Fail to connect to camera service - Camera.open();
Anything? On Feb 7, 12:14 am, Matt Clark mrclark32...@gmail.com wrote: Even as hundreds of other have made them, i am trying my hand at a flashlight app. I have the basic GUI and widget working and toggling, and i just attempted to implement the actual flash from the phone. I have found many places that this is most easily done with this snippet of code: Camera mCamera = Camera.open(); Parameters params = mCamera.getParameters(); params.setFlashMode( Parameters.FLASH_MODE_TORCH ); mCamera.setParameters( params ); I have tried this code, and every time i run the app it crashes, giving me an output in LogCat of the following: 02-07 00:04:49.130: E/AndroidRuntime(4861): Caused by: java.lang.RuntimeException: Fail to connect to camera service Every other app that uses the camera or flash works fine, and i have no idea what is causing it to fail. In my android manifest i have: uses-permission android:name=android.permission.FLASHLIGHT / uses-parmission android:name=android.permission.CAMERA / uses-feature android:name=android.hardware.camera / uses-feature android:name=android.hardware.camera.flash / Any and all help is greatly appreciated as I am completely stuck after sitting at this for the last several hours... Thanks ~Matt -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: voice input for people with tremors (or large fingers)
https://market.android.com/details?id=com.jb.gokeyboard ^ My favorite keyboard. There are hundreds, but this is one of the largest that i have seen, and they offer a lot of different themes, so it may be just as easy as to have the develop a new theme for it. On Feb 7, 1:24 pm, James Hadley hop1ju...@gmail.com wrote: Contact your favorite alternative keyboard developer and tell this to them. Can you recommend anyone? How about a contest? I mean, hear is a chance for fame by making Android more accessible :) Cheers, JH -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Fail to connect to camera service - Camera.open();
Even using your code, in LogCat i get: open second open fail to open camera This happens even after rebooting the phone, however all other applications that use the camera still work. On Feb 7, 2:45 am, v bobbywink vvnevercha...@gmail.com wrote: well, i think camera has crashed and in the condition u can't get camera service. U must reboot phone. when using hardware , u should be careful. u can open Camera in onStart() and release Camera in onStop(). Can't open camera many times in activity, when task finish u must release it . sample code private void turnLightOn() { if (false == mIsFlashOpen) { if (null == mCamera) { try { Log.e(TAG, open); mCamera =Camera.open(CameraInfo.CAMERA_FACING_BACK); } catch (RuntimeException e) { try { Thread.sleep(500); Log.e(TAG, second open); mCamera =Camera.open(CameraInfo.CAMERA_FACING_BACK); } catch (Exception sube) { Log.e(TAG, fail to open camera); sube.printStackTrace(); mCamera = null; } } } if (null != mCamera) { Parameters parameters = mCamera.getParameters(); if (parameters == null) { return; } ListString flashModes = parameters.getSupportedFlashModes(); // Check if camera flash exists if (flashModes == null) { return; } String flashMode = parameters.getFlashMode(); if (!Parameters.FLASH_MODE_TORCH.equals(flashMode)) { // Turn on the flash if (flashModes.contains(Parameters.FLASH_MODE_TORCH)) { parameters.setFlashMode(Parameters.FLASH_MODE_TORCH); mCamera.startPreview(); mCamera.setParameters(parameters); mRightBtn.setEnabled(true); } else { Log.e(TAG, FLASH_MODE_TORCH not supported); } } } } } private void turnLightOff() { if (mIsFlashOpen) { mIsFlashOpen = false; if (mCamera == null) { return; } Parameters parameters = mCamera.getParameters(); if (parameters == null) { return; } ListString flashModes = parameters.getSupportedFlashModes(); String flashMode = parameters.getFlashMode(); // Check if camera flash exists if (flashModes == null) { return; } if (!Parameters.FLASH_MODE_OFF.equals(flashMode)) { // Turn off the flash if (flashModes.contains(Parameters.FLASH_MODE_OFF)) { parameters.setFlashMode(Parameters.FLASH_MODE_OFF); mCamera.setParameters(parameters); mCamera.stopPreview(); } else { Log.e(TAG, FLASH_MODE_OFF not supported); } } } } On 2月7日, 下午1时14分, Matt Clark mrclark32...@gmail.com wrote: Even as hundreds of other have made them, i am trying my hand at a flashlight app. I have the basic GUI and widget working and toggling, and i just attempted to implement the actual flash from the phone. I have found many places that this is most easily done with this snippet of code: Camera mCamera =Camera.open(); Parameters params = mCamera.getParameters(); params.setFlashMode( Parameters.FLASH_MODE_TORCH ); mCamera.setParameters( params ); I have tried this code, and every time i run the app it crashes, giving me an output in LogCat of the following: 02-07 00:04:49.130: E/AndroidRuntime(4861): Caused by: java.lang.RuntimeException: Fail to connect to camera service Every other app that uses the camera or flash works fine, and i have no idea what is causing it to fail. In my android manifest i have: uses-permission android:name=android.permission.FLASHLIGHT / uses-parmission android:name=android.permission.CAMERA / uses-feature android:name=android.hardware.camera / uses-feature android:name=android.hardware.camera.flash / Any and all help is greatly appreciated as I am completely stuck after sitting at this for the last several hours... Thanks ~Matt -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group
[android-developers] Re: Fail to connect to camera service - Camera.open();
); mCamera.setParameters(parameters); mCamera.stopPreview(); } else { Log.e(TAG, FLASH_MODE_OFF not supported); } } } } } That is the full source, and the layout is one big button named btn1. On Feb 8, 12:37 am, Raghav Sood raghavs...@androidactivist.org wrote: The camera can only be used by one application at a time. You must release it when you are done with it, so that you may use it again. The other applications can still use the camera as your app force closes, which frees up the camera. Thanks 2012/2/8 v bobbywink vvnevercha...@gmail.com So strange, can u post all code in this activity? 2012/2/8 Matt Clark mrclark32...@gmail.com Even using your code, in LogCat i get: open second open fail to open camera This happens even after rebooting the phone, however all other applications that use the camera still work. On Feb 7, 2:45 am, v bobbywink vvnevercha...@gmail.com wrote: well, i think camera has crashed and in the condition u can't get camera service. U must reboot phone. when using hardware , u should be careful. u can open Camera in onStart() and release Camera in onStop(). Can't open camera many times in activity, when task finish u must release it . sample code private void turnLightOn() { if (false == mIsFlashOpen) { if (null == mCamera) { try { Log.e(TAG, open); mCamera =Camera.open(CameraInfo.CAMERA_FACING_BACK); } catch (RuntimeException e) { try { Thread.sleep(500); Log.e(TAG, second open); mCamera =Camera.open(CameraInfo.CAMERA_FACING_BACK); } catch (Exception sube) { Log.e(TAG, fail to open camera); sube.printStackTrace(); mCamera = null; } } } if (null != mCamera) { Parameters parameters = mCamera.getParameters(); if (parameters == null) { return; } ListString flashModes = parameters.getSupportedFlashModes(); // Check if camera flash exists if (flashModes == null) { return; } String flashMode = parameters.getFlashMode(); if (!Parameters.FLASH_MODE_TORCH.equals(flashMode)) { // Turn on the flash if (flashModes.contains(Parameters.FLASH_MODE_TORCH)) { parameters.setFlashMode(Parameters.FLASH_MODE_TORCH); mCamera.startPreview(); mCamera.setParameters(parameters); mRightBtn.setEnabled(true); } else { Log.e(TAG, FLASH_MODE_TORCH not supported); } } } } } private void turnLightOff() { if (mIsFlashOpen) { mIsFlashOpen = false; if (mCamera == null) { return; } Parameters parameters = mCamera.getParameters(); if (parameters == null) { return; } ListString flashModes = parameters.getSupportedFlashModes(); String flashMode = parameters.getFlashMode(); // Check if camera flash exists if (flashModes == null) { return; } if (!Parameters.FLASH_MODE_OFF.equals(flashMode)) { // Turn off the flash if (flashModes.contains(Parameters.FLASH_MODE_OFF)) { parameters.setFlashMode(Parameters.FLASH_MODE_OFF); mCamera.setParameters(parameters); mCamera.stopPreview(); } else { Log.e(TAG, FLASH_MODE_OFF not supported); } } } } On 2月7日, 下午1时14分, Matt Clark mrclark32...@gmail.com wrote: Even as hundreds of other have made them, i am trying my hand at a flashlight app. I have the basic GUI and widget working and toggling, and i just attempted to implement the actual flash from the phone. I have found many places that this is most easily done with this snippet of code: Camera mCamera =Camera.open(); Parameters params = mCamera.getParameters(); params.setFlashMode( Parameters.FLASH_MODE_TORCH ); mCamera.setParameters( params ); I have tried this code
[android-developers] Fail to connect to camera service - Camera.open();
Even as hundreds of other have made them, i am trying my hand at a flashlight app. I have the basic GUI and widget working and toggling, and i just attempted to implement the actual flash from the phone. I have found many places that this is most easily done with this snippet of code: Camera mCamera = Camera.open(); Parameters params = mCamera.getParameters(); params.setFlashMode( Parameters.FLASH_MODE_TORCH ); mCamera.setParameters( params ); I have tried this code, and every time i run the app it crashes, giving me an output in LogCat of the following: 02-07 00:04:49.130: E/AndroidRuntime(4861): Caused by: java.lang.RuntimeException: Fail to connect to camera service Every other app that uses the camera or flash works fine, and i have no idea what is causing it to fail. In my android manifest i have: uses-permission android:name=android.permission.FLASHLIGHT / uses-parmission android:name=android.permission.CAMERA / uses-feature android:name=android.hardware.camera / uses-feature android:name=android.hardware.camera.flash / Any and all help is greatly appreciated as I am completely stuck after sitting at this for the last several hours... Thanks ~Matt -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Developing Android App For A Forum
What I would do personally is, if you have access to the source of the forum, create small web scripts that will be called by the app. On the sever have a .php file that takes POST data and process it and returns a result to be processed by the app. I do however believe that vBulletin has an app of its own which requires just a plugin to be installed on the site. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Database Access from Android Application
I am making an application for users to take notes about other teams they are competing against at robotics competitions, which will be collaborative will all member of the same team across devices, so all information will be stored in an SQL database on my webhost. My first question is what would be the best way to give my application access to the database? Is there some kind of SQL library that i could just use insted of sending HTTP requests parsed by PHP files? And Secondly, what would be the best way to store in information? All members info in a single table, the query will just sort by id or the author? Or have each member assigned to a different table of their own? Any and all input is greatly appreciated. ~Matt -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: ScrollView (fill_parent)
I use RelativeLayout for everything, so i do not know if it works for LinearLayout, but you could try android:layout_alignParentBottom=true On Jan 22, 1:55 am, John j...@julientech.com wrote: Hi, I have a scroll view with height=fill_parent. The child is a LinearLayout with height=fill_parent. I then have a TableLayout and two Buttons as children of the LinearLayout. I want the buttons to have layout_gravity=bottom but the LinearLayout does not appear to be filling the height of the parent. Does anyone know why this might be? Thanks, John -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Dynamic ImageButtons
So in short you need just 6 buttons (with images) that you can dynamically change their action? ImageView android:layout_width=wrap_content android:layout_height=wrap_content android:id=@+id/img_01 android:src=@drawable/img_01/ ImageView img_01 = (ImageView)findViewById(R.id.img_01); img_01.setClickable(true); img_01.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View arg0) { switch(action){ case 0: //do action 1 break; case 1: //do action 2 break; } }); I may have completely misunderstood, and if so i apologize, but this is what i got from what you wrote. On Jan 21, 5:13 pm, Ubiracy Santos ubiracy@gmail.com wrote: Can anyone give me an idea of how to create dynamic buttons? For example ascreen that has 6 buttons with different actions. I own a web service that returns me an xml file that says where it goes when we touch the button. One of the buttons can start another one can open a website listing for example. Any idea is welcome ;) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: ScrollView (fill_parent)
As in my method worked? Or you are still experiencing a problem? On Jan 22, 4:08 am, John j...@julientech.com wrote: This does appear to be the behavior. From: android-developers@googlegroups.com [mailto:android-developers@googlegroups.com] On Behalf Of TreKing Sent: Sunday, January 22, 2012 2:41 AM To: android-developers@googlegroups.com Subject: Re: [android-developers] ScrollView (fill_parent) On Sun, Jan 22, 2012 at 12:55 AM, John j...@julientech.com wrote: the LinearLayout does not appear to be filling the height of the parent. Does anyone know why this might be? I think ... if the parent is a ScrollView, it will only fill up as much as is needed. If it's more than is available, then it scrolls. --- - - 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 athttp://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Database Access from Android Application
John, The web script does not allow for open queries, it takes in the users username, password, and device id, and authenticates them with the server, before it then takes and executes a built in query on the script, using more POST data. If i store each persons information into different Tables, then the only thing that people can mess with is the information for which they have a password to modify. This is what i am currently using with PHP, and i see your point about embedding the SQL information in the app. On Jan 22, 7:15 am, Mark Murphy mmur...@commonsware.com wrote: On Sun, Jan 22, 2012 at 3:51 AM, Matt Clark mrclark32...@gmail.com wrote: Is there some kind of SQL library that i could just use insted of sending HTTP requests parsed by PHP files? That is not a good idea, for security reasons. That would mean that your database is open for the script kiddies of the world to attack, and that your database credentials are embedded in an APK for anyone to extract. -- Mark Murphy (a Commons Guy)http://commonsware.com|http://github.com/commonsguyhttp://commonsware.com/blog|http://twitter.com/commonsguy Warescription: Three Android Books, Plus Updates, One Low Price! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Dynamic ImageButtons
What i am currently doing with my app, is using a PHP script on my server, that access an SQL Server to retrieve spectific information ,ad nthe it is returned to the device, allowing me to change global setting, such as allowing the app to run without a valid license, etc. You could do something like the following, if you want to use SQL, i do not have much experience parsing XML. //Inside of your OnClickListener //Send HTTP Request With POST Data String response = //HTTP Response - Find Script On Line if(response.equals(action1)){ //do action 1 }else if(response.equals(action2)){ //do action 2 }else{ //do default } etc... On Jan 22, 9:19 am, Ubiracy Santos ubiracy@gmail.com wrote: Thanks for the tip! These actions come from the database.Could easily read the number of rows in the table and make a repetition of the buttons? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Dynamic Layout In Array
I am making an application that takes data from a database and outputs it on the screen in various ways, one of the ways is that i need to take from a long list of strings, and put them into a homemade list, ie: TextView[] teamNumbers; TextView[] teamNames; TextView[] teamFavorites; RelativeLayout rellayout = (RelativeLayout)findViewById(R.id.rellayout); String[] arrayOfItems = {Number|Name|Favorite,Number|Name| Favorite,Number|Name|Favorite}; for(int x = 1; x arrayOfItems.length; x++){ String[] teamData = arrayOfItems[x].split(|); //[0]:Number $ [1]:Name $ [2]:Favorite teamNumbers[x] = new TextView(getApplicationContext()); //Error | Error | Error | Error | Error teamNumbers[x].setText(teamData[0]); rellayout.addView(teamNumbers[x]; } So it will take an array, split it and then give me a list of results, however, in creating of the layout, i am getting an error when creating a new TextView in an array. I need to be able to set up a list so that on click it will start and intent passing it a single variable. If anyone has a simpler way fo doing that, or a solution as to how to make this work, it would be greatly appreciated. Thanks. ~Matt -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Debugging native code using eclipse apart from Sequoyah/ndk guide
What do you mean by 'native code' as in the OS itself? Or your application? If for your application code, on the left of the code. right click and click add breakpoint where you wish to start the debugging. When you deploy your code to your device, click the button to the left of the RUN button, which is DEBUG. This will deploy your code and attach a debugger to it. When the project comes to the point where it hits a breakpoint, Eclipse will open you debugging perspective, (Top right of the IDE to manually switch perspective). This is where you will be able to step through yuor code as it runs. The step buttons wil be in the window in the top left of the prespective. If you are looking to debug to OS, the best thing i can tell you is to watch the LogCat. On Jan 23, 12:29 am, srinivasan shanmugam srinivasan@gmail.com wrote: Dear All, I want to debug my native code by keeping breakpoints in my java code where am calling my native code by keeping breakpoints in my native code defination. Could any body pls share any appropriate documents with all the necessary steps in how to debug native code by keeping breakpoints in either windows/linux PC because i tried the below links which was provided in the internet this did not work for me http://tegradeveloper.nvidia.com/tegra/forum/android-debugging-eclips...http://developer.download.nvidia.com/tegra/files/tegra-oprofile-20100... http://mhandroid.wordpress.com/2011/01/23/using-eclipse-for-android-c... http://eclipse.org/sequoyah/documentation/native_debug.php Kindly do the needful as soon as possible, Awaiting for your replies, Advanced thanks, Srinivasan S -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] if() Statement Not Working Correctly...
I am currently writing an application to easily retrieve the bus schedule for my school. I have a series of intents and content views that get information from the user such as Bus From Bus To Day The variables are passed to a final intent, where depending on what the user has selected it will choose the correct contentview to show the user the schedule. The problem that i am having is that i am getting a string of say 'equine' and checking it in an if statement to see if the sting is indeed 'equine'. The program is skipping right over it as if the statement was false, even while debugging. The segment in question is below. locationFrom = getIntent().getExtras().getString(From); locationTo = getIntent().getExtras().getString(To); locationDay = getIntent().getExtras().getString(Day); if (locationFrom == equine) { if (locationTo == equine) { //None } else if (locationTo == gaebe) { if (locationDay == monday || locationDay == tuesday || locationDay == wednesday || locationDay == thursday) { setContentView(R.layout.equine_gaebe_week); } else if (locationDay == friday) { setContentView(R.layout.equine_gaebe_friday); } else if (locationDay == saturday) { setContentView(R.layout.equine_gaebe_saturday); } else if (locationDay == sunday) { setContentView(R.layout.equine_gaebe_sunday); } } }else{ Log.e(ERROR!, locationFrom); } When looking in the LogCat i get: 12-15 23:10:15.034: ERROR/ERROR!(11489): equine This is frustrating me as I have no idea what the problem is Any and all help is greatly appreciated... ~Matt -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: if() Statement Not Working Correctly...
Wow... I feel pretty stupid right now... Thanks haha... Long Night xD On Dec 15, 11:20 pm, Kristopher Micinski krismicin...@gmail.com wrote: Pick up a Java book... :-)... you can't compare strings with == in java... use .equals()... kris On Thu, Dec 15, 2011 at 11:17 PM, Matt Clark mrclark32...@gmail.com wrote: I am currently writing an application to easily retrieve the bus schedule for my school. I have a series of intents and content views that get information from the user such as Bus From Bus To Day The variables are passed to a final intent, where depending on what the user has selected it will choose the correct contentview to show the user the schedule. The problem that i am having is that i am getting a string of say 'equine' and checking it in an if statement to see if the sting is indeed 'equine'. The program is skipping right over it as if the statement was false, even while debugging. The segment in question is below. locationFrom = getIntent().getExtras().getString(From); locationTo = getIntent().getExtras().getString(To); locationDay = getIntent().getExtras().getString(Day); if (locationFrom == equine) { if (locationTo == equine) { //None } else if (locationTo == gaebe) { if (locationDay == monday || locationDay == tuesday || locationDay == wednesday || locationDay == thursday) { setContentView(R.layout.equine_gaebe_week); } else if (locationDay == friday) { setContentView(R.layout.equine_gaebe_friday); } else if (locationDay == saturday) { setContentView(R.layout.equine_gaebe_saturday); } else if (locationDay == sunday) { setContentView(R.layout.equine_gaebe_sunday); } } }else{ Log.e(ERROR!, locationFrom); } When looking in the LogCat i get: 12-15 23:10:15.034: ERROR/ERROR!(11489): equine This is frustrating me as I have no idea what the problem is Any and all help is greatly appreciated... ~Matt -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] getString in a class with no context - Runtime Error Resource Not Found
I am making a multi-langual app that calls on a LanguagePack class to get all of the strings from the resources, which picks what it needs depending on the selected language, i have the LanguagePack class in a seperate librarise folder, and the problem that i am having is that i can not use this.getString(Rid) to get the string. I have tried using final Resources r = Resources.getSystem(); r.getString(Rid); but with this i am getting the error: 12-03 13:12:33.206: ERROR/Error(17072): android.content.res.Resources $NotFoundException: String resource ID #0x7f040017 The resource exists, the program compiles and deploys, and i have tried cleaning the project multiple time... Any and all help would be greatly appreciated as i am at a stand still rith my app right now.. Thanks ~Matt -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: getString in a class with no context - Runtime Error Resource Not Found
So what else do i need to use? That was just an example i found on referencing strings outside the main class. On Dec 3, 1:17 pm, Kostya Vasilyev kmans...@gmail.com wrote: Why getSystem? You strings are in the language pack, not in the Andorid framework. 3 декабря 2011 г. 22:13 пользователь Matt Clark mrclark32...@gmail.comнаписал: I am making a multi-langual app that calls on a LanguagePack class to get all of the strings from the resources, which picks what it needs depending on the selected language, i have the LanguagePack class in a seperate librarise folder, and the problem that i am having is that i can not use this.getString(Rid) to get the string. I have tried using final Resources r = Resources.getSystem(); r.getString(Rid); but with this i am getting the error: 12-03 13:12:33.206: ERROR/Error(17072): android.content.res.Resources $NotFoundException: String resource ID #0x7f040017 The resource exists, the program compiles and deploys, and i have tried cleaning the project multiple time... Any and all help would be greatly appreciated as i am at a stand still rith my app right now.. Thanks ~Matt -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: getString in a class with no context - Runtime Error Resource Not Found
I have no idea how to set that up, I found an example that would use: Context r = Context.createPackageContext(tinyClark.android.libraries.LanguagePack,Context.CONTEXT_IGNORE_SECURITY); But i get an error that tinyClark.android.libraries.LanguagePack cannot be resolved to a variable, and when i try to fix it it creates a new class in tinyClark.android.* -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: getString in a class with no context - Runtime Error Resource Not Found
Still getting the error: Cannot make a static reference to the non-static method createPackageContext(String, int) from the type Context On Dec 3, 1:52 pm, Kostya Vasilyev kmans...@gmail.com wrote: createPackageContext takes a String as the first parameter, so it shoud be createPackageContext(your.package.name.here...). Note the double quotes. Don't think you need the ignore security flag in this case, just to load the resources. -- Kostya 3 декабря 2011 г. 22:45 пользователь Matt Clark mrclark32...@gmail.comнаписал: I have no idea how to set that up, I found an example that would use: Context r = Context.createPackageContext(tinyClark.android.libraries.LanguagePack,Conte xt.CONTEXT_IGNORE_SECURITY); But i get an error that tinyClark.android.libraries.LanguagePack cannot be resolved to a variable, and when i try to fix it it creates a new class in tinyClark.android.* -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: getString in a class with no context - Runtime Error Resource Not Found
public String getString(int Rid, Context passedContext){ Context masterContext = passedContext; return (String)masterContext.getResources().getText(Rid); } Woo, finally got it! Thanks for all the help! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: setOnClickListener Problems Crashing Application
Ahhh Clean worked wonderfully. Thanks so much! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] setOnClickListener Problems Crashing Application
I have an application that once a user enters a username and password, they press a button which authenticates them with the system. I have used buttons before without problem... But for some reason i am now getting problems... I have this code in for a while and it has been working no problem.. but just now it began causing the program to crash... I did not change anything, and any help is greatly appreciated.. login_btn_submit = (Button) findViewById(R.id.login_btn_submit); login_txt_username = (EditText) findViewById(R.id.login_txt_username); login_txt_password = (EditText) findViewById(R.id.login_txt_password); login_btn_submit.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if(isUser(login_txt_username.getText().toString(),login_txt_password.getText().toString())) { Toast.makeText(getApplicationContext(), User is User, Toast.LENGTH_SHORT).show(); Settings_Edit.putString(Username,login_txt_username.getText().toString()); Settings_Edit.putString(Password,login_txt_password.getText().toString()); Settings_Edit.commit(); setInterface(main); }else{ Toast.makeText(getApplicationContext(), User is NOT User, Toast.LENGTH_SHORT).show(); } } }); when i remove that section of code, the program functions properly (no button) but with the code existing, it just crashes ever time. The code was working fine in an emulator, as soon as i tried to deploy it to my phone it began erroring on bot, with no change to the code... Any and all help is greatly appreciated... ~tinyClark -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: setOnClickListener Problems Crashing Application
10-21 20:48:34.710: DEBUG/AndroidRuntime(11060): AndroidRuntime START com.android.internal.os.RuntimeInit 10-21 20:48:34.710: DEBUG/AndroidRuntime(11060): CheckJNI is OFF 10-21 20:48:34.720: DEBUG/dalvikvm(11060): creating instr width table 10-21 20:48:34.910: DEBUG/AndroidRuntime(11060): Calling main entry com.android.commands.pm.Pm 10-21 20:48:34.920: DEBUG/AndroidRuntime(11060): Shutting down VM 10-21 20:48:34.930: DEBUG/dalvikvm(11060): GC_CONCURRENT freed 103K, 69% free 326K/1024K, external 0K/0K, paused 1ms+1ms 10-21 20:48:34.930: INFO/AndroidRuntime(11060): NOTE: attach of thread 'Binder Thread #3' failed 10-21 20:48:34.930: DEBUG/dalvikvm(11060): Debugger has detached; object registry had 1 entries 10-21 20:48:35.070: DEBUG/AndroidRuntime(11070): AndroidRuntime START com.android.internal.os.RuntimeInit 10-21 20:48:35.070: DEBUG/AndroidRuntime(11070): CheckJNI is OFF 10-21 20:48:35.070: DEBUG/dalvikvm(11070): creating instr width table 10-21 20:48:35.270: DEBUG/AndroidRuntime(11070): Calling main entry com.android.commands.am.Am 10-21 20:48:35.280: INFO/ActivityManager(1378): Force stopping package tinyclark.robotics uid=10128 10-21 20:48:35.290: INFO/Process(1378): Sending signal. PID: 11037 SIG: 9 10-21 20:48:35.300: VERBOSE/HtcAppUsageStats(1378): handleMessage msg=1 10-21 20:48:35.300: INFO/ActivityManager(1378): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x1000 cmp=tinyclark.robotics/.Master } from pid 11070 10-21 20:48:35.310: INFO/[POST_RESELECT](9321): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection $START@40138948,-1,0,-1,0) 10-21 20:48:35.310: INFO/[POST_RESELECT](9321): [spanChange] (o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection $END@40139640,-1,0,-1,0) 10-21 20:48:35.310: DEBUG/Background traffic light(9321): traffic light: GREEN, mBackgroundTrafficLight = true 10-21 20:48:35.320: VERBOSE/HtcAppUsageStats(1378): (launch app, package): (Scouting, tinyclark.robotics) 10-21 20:48:35.330: VERBOSE/AgentService_J(1456): Action[8462]:com.htc.android.iqagent.action.ui15 10-21 20:48:35.330: INFO/HTC_SUBMITTER_C(1456): (0) submitUI15:1543594732,0 10-21 20:48:35.330: VERBOSE/AgentService_J(1456): (0)ui15_dwAppID: 1543594732,ui15_shStatus:0 10-21 20:48:35.330: VERBOSE/AgentService_J(1456): Action[8463]:com.htc.android.iqagent.action.ui19 10-21 20:48:35.330: INFO/HTC_SUBMITTER_C(1456): (0) submitUI19:-1725705692,0 10-21 20:48:35.330: VERBOSE/AgentService_J(1456): (0)ui19_dwAppID:-1725705692,ui19_ucFocusEvent:0 10-21 20:48:35.330: DEBUG/AndroidRuntime(11070): Shutting down VM 10-21 20:48:35.340: DEBUG/dalvikvm(11070): GC_CONCURRENT freed 104K, 66% free 355K/1024K, external 0K/0K, paused 1ms+0ms 10-21 20:48:35.340: INFO/AndroidRuntime(11070): NOTE: attach of thread 'Binder Thread #3' failed 10-21 20:48:35.350: VERBOSE/AgentService_J(1456): Action[8464]:com.htc.android.iqagent.action.ui19 10-21 20:48:35.350: INFO/HTC_SUBMITTER_C(1456): (0) submitUI19:-1725705692,0 10-21 20:48:35.350: VERBOSE/AgentService_J(1456): (0)ui19_dwAppID:-1725705692,ui19_ucFocusEvent:0 10-21 20:48:35.360: DEBUG/jdwp(11070): Got wake-up signal, bailing out of select 10-21 20:48:35.360: DEBUG/dalvikvm(11070): Debugger has detached; object registry had 1 entries 10-21 20:48:35.380: INFO/ActivityManager(1378): Start proc tinyclark.robotics for activity tinyclark.robotics/.Master: pid=11079 uid=10128 gids={3003} 10-21 20:48:35.380: VERBOSE/AgentService_J(1456): Action[8465]:com.htc.android.iqagent.action.ui13 10-21 20:48:35.390: INFO/HTC_SUBMITTER_C(1456): (0) submitUI13:1543594732,22,tinyclark.robotics 10-21 20:48:35.390: VERBOSE/AgentService_J(1456): (0)ui13_dwAppID: 1543594732,ui13_ucAppType:22,ui13_szAppName:tinyclark.robotics 10-21 20:48:35.410: DEBUG/SensorService(1378): enable: connection.get() = 0x385f30, (2.3.3-1) 10-21 20:48:35.410: DEBUG/SensorService(1378): enable: get sensor name = BMA150 3-axis Accelerometer 10-21 20:48:35.410: DEBUG/SensorService(1378): SensorDevice::activate: handle = 0x0, enabled = 0x1 10-21 20:48:35.410: DEBUG/Sensors(1378): Enable akm: en = 1 10-21 20:48:35.420: DEBUG/SensorService(1378): noteStartSensor: uid = 0x3e8, handle = 0x0 10-21 20:48:35.420: DEBUG/SensorService(1378): pid=1378, uid=1000 10-21 20:48:35.420: DEBUG/SensorService(1378): Active sensors: 10-21 20:48:35.420: DEBUG/SensorService(1378): BMA150 3-axis Accelerometer (handle=0x, connections=1) 10-21 20:48:35.420: DEBUG/SensorService(1378): CM3602 Light sensor (handle=0x0004, connections=1) 10-21 20:48:35.440: DEBUG/AK8975(1262): Compass Start 10-21 20:48:35.460: WARN/dalvikvm(9321): disableGcForExternalAlloc: false 10-21 20:48:35.480: WARN/ActivityThread(11079): Application tinyclark.robotics is waiting for the debugger on port 8100... 10-21 20:48:35.490: INFO/System.out(11079): Sending WAIT chunk 10-21 20:48:35.490: INFO/dalvikvm(11079): Debugger is active 10-21 20:48:35.691: INFO/System.out(11079): Debugger
[android-developers] Re: setOnClickListener Problems Crashing Application
10-21 20:52:07.157: ERROR/AndroidRuntime(11123): FATAL EXCEPTION: main 10-21 20:52:07.157: ERROR/AndroidRuntime(11123): java.lang.RuntimeException: Unable to start activity ComponentInfo{tinyclark.robotics/tinyclark.robotics.Master}: java.lang.NullPointerException 10-21 20:52:07.157: ERROR/AndroidRuntime(11123): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 1831) 10-21 20:52:07.157: ERROR/AndroidRuntime(11123): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 1852) 10-21 20:52:07.157: ERROR/AndroidRuntime(11123): at android.app.ActivityThread.access$1500(ActivityThread.java:132) 10-21 20:52:07.157: ERROR/AndroidRuntime(11123): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1038) 10-21 20:52:07.157: ERROR/AndroidRuntime(11123): at android.os.Handler.dispatchMessage(Handler.java:99) 10-21 20:52:07.157: ERROR/AndroidRuntime(11123): at android.os.Looper.loop(Looper.java:143) 10-21 20:52:07.157: ERROR/AndroidRuntime(11123): at android.app.ActivityThread.main(ActivityThread.java:4306) 10-21 20:52:07.157: ERROR/AndroidRuntime(11123): at java.lang.reflect.Method.invokeNative(Native Method) 10-21 20:52:07.157: ERROR/AndroidRuntime(11123): at java.lang.reflect.Method.invoke(Method.java:507) 10-21 20:52:07.157: ERROR/AndroidRuntime(11123): at com.android.internal.os.ZygoteInit $MethodAndArgsCaller.run(ZygoteInit.java:839) 10-21 20:52:07.157: ERROR/AndroidRuntime(11123): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597) 10-21 20:52:07.157: ERROR/AndroidRuntime(11123): at dalvik.system.NativeStart.main(Native Method) 10-21 20:52:07.157: ERROR/AndroidRuntime(11123): Caused by: java.lang.NullPointerException 10-21 20:52:07.157: ERROR/AndroidRuntime(11123): at tinyclark.robotics.Master.setListeners(Master.java:103) 10-21 20:52:07.157: ERROR/AndroidRuntime(11123): at tinyclark.robotics.Master.setInterface(Master.java:83) 10-21 20:52:07.157: ERROR/AndroidRuntime(11123): at tinyclark.robotics.Master.initUser(Master.java:71) 10-21 20:52:07.157: ERROR/AndroidRuntime(11123): at tinyclark.robotics.Master.onCreate(Master.java:53) 10-21 20:52:07.157: ERROR/AndroidRuntime(11123): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java: 1093) 10-21 20:52:07.157: ERROR/AndroidRuntime(11123): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java: 1795) 10-21 20:52:07.157: ERROR/AndroidRuntime(11123): ... 11 more LogCat Error^ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: setOnClickListener Problems Crashing Application
103: login_btn_submit.setOnClickListener(new View.OnClickListener() { -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: setOnClickListener Problems Crashing Application
http://tinyclark.com/master.java.txt Full Source ^ On Oct 21, 10:07 pm, Matt Clark mrclark32...@gmail.com wrote: 103: login_btn_submit.setOnClickListener(new View.OnClickListener() { -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Clickable ImageView
I have an application which implements a clickable image view, however, when i add the following code: team_background = (ImageView) findViewById(R.id.home_background); team_background.setClickable(true); team_background.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub } }); xml ImageView android:id=@+id/team_background android:layout_width=fill_parent android:layout_height=fill_parent/ The program crashes. Only on the setOnClickListener, which works fine for my text views and buttons etc... Can someone help to identify the problem here? Thanks ~Matt -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: recommended icon size.
The phone will only load that icon on an HDPI device. In your Res: folder there are 3 folders. drawable-ldpi drawable-mdpi drawable-hdpi, each with their own icon.png file. This is where the icons will be taken from depending on the screen resolution. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Development phones
If you will just be developing on them market apps, i would recommend buying one off of ebay with a bad esn, or if you want it for a phone as well go from your carrier, you will spend less. The only difference in these phones is that they are not assigned to any specific carrier. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] VideoView only works on some devices
I am developing an application which implements a videoview on one of the pages. I have the video load automatically onCreate, and it imediatly begins to play. On my HTC Evo Shift, and Archos 101 Tablet the video loads with no problems, but after sending the app to others for beta testing, Some phones pop up with a message saying that the video could not be played. The devices are the Motorola Atrix, and Droid Eris that the video does not play on. The video format is .mp4 (H.264) can someone please help to explain this 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] Call Function When Intent Closed
I have a program where the background has a video in it, when i click on an icon it open a new intent, but when i hit the back button to close the intent the video does not resume playing. Is there a listener to set up to see when the intent closes, where it can then restart the videoview? Thanks Matt -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Home screen's Icon
Your post is not very clear, what would you like to do? Change the programs icon? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Tricky layout
If you use FrameLayout instead of LinearLayout or RelativeLayout you can use [android:layout_x=xx:px][android:layout_y=xx:px] to move your stuff around, you will also be able to layer things based on the order in the XML. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Cheap Bluetooth devices sought
wow... i may have to pick myself up a few of those xD if you are doing high density data transfer may i also suggest WiFi? http://www.sparkfun.com/products/10004 I have this and it works great. It is a bit more, but it works great, and i am sure that you can get other similar devices for less. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Test Project Question
Try this and let me know how it works. This is the method that i use: final Button button = (Button) findViewById(R.id.textbutton); button.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { //Put your button press code here. } }); -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Multiple Activity Problems
what do you mean missing break in switch? I launch one, press back, and then go into the next. I also tred using: final TextView lbl_teamhometext = (TextView) findViewById(R.id.lbl_teamhometext); lbl_teamhometext.setText(R.string.info_firsthome); and: final TextView lbl_infoabout = (TextView) findViewById(R.id.lbl_infoabout); lbl_infoabout.setText(R.string.info_about); Now the about screen works fine, but when i click on the link to open the Team228.class, it crashes on lbl_teamhometext.set.. no idea why... it is the exact same code for each. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Multiple Activity Problems
lbl_team228.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { Master.this.startActivity(new Intent(Master.this, Team228.class)); } }); lbl_about.setOnClickListener(new View.OnClickListener() { public void onClick(View v) { Master.this.startActivity(new Intent(Master.this, AppAbout.class)); } }); These are my 2 Listeners, called in the main activity one after the other. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Beginner Having Problems
wow.. thanks. dont know what i was missing but it works now. I just used: import android.view.*; ~Matt -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Android Beginner Having Problems
I tried using the MenuInflation off of the android developers site: @Override public boolean onCreateOptionsMenu(Menu menu) { MenuInflater inflater = getMenuInflater(); inflater.inflate(R.menu.game_menu, menu); return true; } with an xml in the res/meno directory by the name of game_menu. when I try to compile this, i get an error saying that the symbol 'menu' on line inflater.inflate(R.menu.game_menu, menu); can not be found. I have all of my imports set, the code shows no errors, just will not compile. Any and all help is greatly appreciated. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en