[android-developers] How to format a String in an email so Outlook will print the line breaks?
I'm trying to send an email in Java but when I read the body of the email in Outlook, it's gotten rid of all my linebreaks. I'm putting \n at the ends of the lines but is there something special I need to do other than that? 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] phone contact time modified
hello is there a way to know the date of last modify to the phone contact without use sync adapter -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: setPreviewCallbackWithBuffer issue
Try setting the preview callback to NULL before calling takePicture(). I think it is a bug in the Android Framework. On Saturday, April 9, 2011 4:22:42 PM UTC+9, chen ji wrote: Hi All, I use Android 2.3 on NeuseOne. Now, I use setPreviewCallbackWithBuffer to get preview callback and it works well. But if I call takepicture, it will halt and I can not get jpegcallback. But if I use setPreviewCallback, all things works well. But as you know, its memroy is inefficient. I just want to know what is the special thing before I call takepicture when i use setPreviewCallbackWithBuffer . BTW, my set preview call back code is just below: Size size = p.getPreviewSize(); callbackBuffer1 = new byte[ size.width * size.height * 3 / 2 + 1]; callbackBuffer2 = new byte[size.width * size.height * 3 / 2 + 1]; ; mCamera.setPreviewCallbackWithBuffer(mPreviewCallback); // if I use mCamera.setPreviewCallback(mPreviewCallback); it works well mCamera.addCallbackBuffer(callbackBuffer1); mCamera.addCallbackBuffer(callbackBuffer2); Thanks, Ji -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 old maps at the background while loading the new maps
Currenty, I have mapview and mapcontroller to show the map. And it works fine and showing correct location as well. But the problem is, while loading new maps at the background old map is visible. I want to get rid of this old map showing to the user and display simply a blank view. And after loading, new map should be shown. Any ideas ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: How to format a String in an email so Outlook will print the line breaks?
Did you try \r\n already? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 how to send the hex code out?
Dear All : I want to send out the hex code like 0xfa through the serial port. How do I send the 0x code in the program? Thanks in advanced. BR, Mark -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Paid Apps: Legal Stuff and Taxes
I'd also recommend contacting your local tax office for advice. I recently contacted HMRC (UK body responsible for tax) on a similar matter and they were a great (well, not _great_, but somewhat useful) help for clearing up some of the details that are not clear from their site. You should still contact someone qualified regarding this, but I can feed back what I was told from a UK perspective. Technically, as soon as you have an app available for sale on a market you are trading and so much register as self employed. You do not need to register a business, but instead can register as a sole trader. This has implications for liability so is worth checking out the best option with an accountant | lawyer. The immediate impact of registering as self-employed is that you will have to start filling out a tax return so that income tax can be collected and you should also start paying NI contributions. The latter can be avoided for low volume sales by applying for a small earnings exemption on Class 2 NI. On Monday, March 5, 2012 11:55:32 PM UTC, Mark Murphy (a Commons Guy) wrote: This list is for developing applications with the Android SDK. Please contact qualified legal counsel for legal advice, for whatever country you happen to reside in. On Mon, Mar 5, 2012 at 6:48 PM, bigluc wrote: Can someone explain to me the nessasary things I need to sell and app? Besides an app and a dev account, do I need a buissness? Also do I need to file taxes? -- 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
[android-developers] using custom views in xml layouts
Hi All, i am working with custom views using in xml layouts Following is my custom view code: public class CustomTextView extends View { private int m_nColor; private Typeface m_tTypeface; private int m_nSize; private int m_nRotationAngle, m_nRotationW, m_nRotationH; private String m_szText; public CustomTextView(Context context) { super(context); // set default parameters Log.d(dghgfhf, dfghgfh); m_nColor = Color.WHITE; m_nSize = 14; m_nRotationAngle = 0; m_nRotationW = 0; m_nRotationH = 0; m_tTypeface = Typeface.create(arial, Typeface.NORMAL); } public CustomTextView(Context context, AttributeSet attrs) { super(context, attrs); } public void SetColor(int newcolor) { m_nColor = newcolor; this.invalidate(); } public void SetTextSize(int newsize) { m_nSize = newsize; this.invalidate(); } // style: normal-0,bold-1,italic-2,bold-italic-3, public void SetFont(String newfontface, int style) { m_tTypeface = Typeface.create(newfontface, style); this.invalidate(); } public void SetRotation(int newangle, int neww, int newh) { m_nRotationAngle = newangle; m_nRotationW = neww; m_nRotationH = newh; this.invalidate(); } public void SetText(String newtext) { m_szText = newtext; this.invalidate(); } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); Paint paint = new Paint(); paint.setTypeface(m_tTypeface); paint.setStyle(Paint.Style.FILL); paint.setColor(m_nColor); // paint.setShadowLayer(1, 0, 1, Color.parseColor(#00)); paint.setTextSize(m_nSize); canvas.rotate(m_nRotationAngle, m_nRotationW, m_nRotationH); canvas.drawText(m_szText, 0, 0, paint); } } Following is my layout: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; xmlns:GUI= http://schemas.android.com/apk/res/net.pocketmagic.customangletext; android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=vertical view android:id=@+id/yourID android:layout_width=wrap_content android:layout_height=wrap_content android:layout_margin=10dp class=net.pocketmagic.customangletext.CustomTextView / /LinearLayout i am getting null pointer exception i am unable find where i am going wrong please help me Thanks Naveen. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 how to send the hex code out?
0xfa? If you tell me how you send out the f and the a then I tell you how to do that with the 0 and the x. ;-). -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 format a String in an email so Outlook will print the line breaks?
I had tried the following already \r\n\r\n , \r\r , \n\n , \r\n , \n\r. but could not get the mail in proper format On Mar 6, 1:32 pm, Remote Red rremm...@gmail.com wrote: Did you try \r\n already? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 load a bitmap texture in a thread on a polygon class?
i'm developing a simple OpenGL ES 1.1 app for android. I have a GLSurfaceView class that uses a square class that represent's a square polygon wich is rotating and must change his texture when the user press a button. I need to load the bitmap texture on a thread because i dont want to stop the rotation of the polygon. I'm having problems with this, the texture is not changing, instead of that i'm getting white textures. THis is the code of my square polygon, with the thread on the end of the code. The method loadBitmap() is the method that changes the texture and launches the thread. public class Square { //Buffer de vertices public FloatBuffer vertexBuffer; //Buffer de coordenadas de texturas private FloatBuffer textureBuffer; //Puntero de texturas private int[] textures = new int[3]; //El item a representar public Bitmap bitmap; //image with POT dimensions //size of the polygon: public float w; public float h; //size of the texture private float textureX; private float textureY; //Definición de vertices public float vertices[] = new float[12]; private float vertices_transformed[] = new float[12]; //Coordenadas (u, v) de las texturas private float texture[]; // Image ratio float ratio; Context context; boolean textureChanged=false; int newTexture=-1; public int nextPOT; private boolean loadingTexture=false; //true si está cargando la textura int bitmapW; int bitmapH; loadBitmapThread lbt; int textureName = -1; //Inicializamos los buffers public Square(Bitmap image, Context context) { initSquare(image); ByteBuffer byteBuf = ByteBuffer.allocateDirect(vertices.length * 4); byteBuf.order(ByteOrder.nativeOrder()); vertexBuffer = byteBuf.asFloatBuffer(); vertexBuffer.put(vertices); vertexBuffer.position(0); byteBuf = ByteBuffer.allocateDirect(texture.length * 4); byteBuf.order(ByteOrder.nativeOrder()); textureBuffer = byteBuf.asFloatBuffer(); textureBuffer.put(texture); textureBuffer.position(0); //setPosition(0,0); ratio = (float)image.getWidth() / image.getHeight(); image.recycle(); } public void initSquare(Bitmap image) { //inicializo los arrays de texturas y vertices con las proporciones correctas de la imagen y creo la variable bitmap con potencia de 2. bitmapW=image.getWidth(); bitmapH=image.getHeight(); w=1.00f; h=(float)bitmapH/bitmapW; float vertices2[] = { -w, -h, 0.0f, //Bottom Left w, -h, 0.0f,//Bottom Right -w, h, 0.0f,//Top Left w, h, 0.0f //Top Right }; vertices=vertices2; //calculamos la siguiente potencia de 2 del lado mas largo del bitmap, alto o ancho. if (bitmapWbitmapH) nextPOT=getNextPOT(bitmapW); else nextPOT=getNextPOT(bitmapH); //creamos un nuevo bitmap cuadrado con dimensiones potencia de 2, y dentro de el metemos la imagen //bitmap = Bitmap.createBitmap(nextPOT, nextPOT, Bitmap.Config.ARGB_); //crea un bitmap transparente gracias al ARGB_ bitmap = Bitmap.createBitmap(nextPOT, nextPOT, Bitmap.Config.RGB_565); //crea un bitmap transparente gracias al ARGB_ Canvas comboImage = new Canvas(bitmap); comboImage.drawBitmap(image, 0, 0, null); comboImage.save(); //calculamos las coordenadas de la textura dentro del bitmap que es potencia de 2 textureX = (float)bitmapW / nextPOT; textureY = (float)bitmapH / nextPOT; //creamos el array de la textura, pasándole las coordenadas ya obtenidos float texture2[] ={ 0.0f,textureY, textureX, textureY, 0.0f, 0.0f, textureX,0.0f }; System.out.println(bw:+bitmapW+ nextPOT:+nextPOT+ texX:+textureX); texture=texture2; } //Funcion de dibujado public void draw(GL10 gl) { if (loadingTexture==false){ GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bitmap, 0); mCropWorkspace[0] = 0; mCropWorkspace[1] = bitmap.getHeight(); mCropWorkspace[2] = bitmap.getWidth(); mCropWorkspace[3] = -bitmap.getHeight(); //bitmap.recycle(); ((GL11) gl).glTexParameteriv(GL10.GL_TEXTURE_2D, GL11Ext.GL_TEXTURE_CROP_RECT_OES, mCropWorkspace, 0); //textures[0]=textureName; newTexture=textureName; gl.glFrontFace(GL10.GL_CCW); //gl.glEnable(GL10.GL_BLEND); //Bind our only previously generated texture in this case if (textureChanged==false) gl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]); else //textureChanged==true gl.glBindTexture(GL10.GL_TEXTURE_2D, newTexture); //Point to our vertex buffer gl.glVertexPointer(3, GL10.GL_FLOAT, 0, vertexBuffer); gl.glTexCoordPointer(2, GL10.GL_FLOAT, 0, textureBuffer); //Enable vertex buffer gl.glEnableClientState(GL10.GL_VERTEX_ARRAY); gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY); //Set The Color To Blue //gl.glColor4f(0.5f, 0.5f, 1.0f,
[android-developers] Re: How to format a String in an email so Outlook will print the line breaks?
So if you read that mail with a real mail reader -like Thunderbird- all is ok? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] convert into decibels
I recorded audio and Im getting PCM samples as 1024 0.. .. 375649803 and so on. What does this mean?I thought PCM samples will be in 1's and 0's. Can you please explain this Also I need to know how to convert these samples into decibels. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Mockito for Android
I just did a build of mockito 1.9.1 it has the support for android using dexmaker..the zip and jar links are on my blog post: http://fredgrott.posterous.com/mockito-for-android Make sure to thank the Mockito and dalvik projects for their hard work on 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] how to load images from web quickly in gridview
I have a gridview in which i load the images from web.The size of each image is large(less than 0.5MB).I need to load that images as quickly as possible. Can any one help? Thsnks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Android how to send the hex code out?
Google hex notation and hexadecimal. On Mar 6, 2012 12:34 AM, mark2011 androidmark2...@gmail.com wrote: Dear All : I want to send out the hex code like 0xfa through the serial port. How do I send the 0x code in the program? Thanks in advanced. BR, Mark -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] using custom views in xml layouts
Not specific enough. Have you stepped through this code in debug to see what line is giving you the problem? On Mar 6, 2012 1:07 AM, chowdary nani naveenneeli...@gmail.com wrote: Hi All, i am working with custom views using in xml layouts Following is my custom view code: public class CustomTextView extends View { private int m_nColor; private Typeface m_tTypeface; private int m_nSize; private int m_nRotationAngle, m_nRotationW, m_nRotationH; private String m_szText; public CustomTextView(Context context) { super(context); // set default parameters Log.d(dghgfhf, dfghgfh); m_nColor = Color.WHITE; m_nSize = 14; m_nRotationAngle = 0; m_nRotationW = 0; m_nRotationH = 0; m_tTypeface = Typeface.create(arial, Typeface.NORMAL); } public CustomTextView(Context context, AttributeSet attrs) { super(context, attrs); } public void SetColor(int newcolor) { m_nColor = newcolor; this.invalidate(); } public void SetTextSize(int newsize) { m_nSize = newsize; this.invalidate(); } // style: normal-0,bold-1,italic-2,bold-italic-3, public void SetFont(String newfontface, int style) { m_tTypeface = Typeface.create(newfontface, style); this.invalidate(); } public void SetRotation(int newangle, int neww, int newh) { m_nRotationAngle = newangle; m_nRotationW = neww; m_nRotationH = newh; this.invalidate(); } public void SetText(String newtext) { m_szText = newtext; this.invalidate(); } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); Paint paint = new Paint(); paint.setTypeface(m_tTypeface); paint.setStyle(Paint.Style.FILL); paint.setColor(m_nColor); // paint.setShadowLayer(1, 0, 1, Color.parseColor(#00)); paint.setTextSize(m_nSize); canvas.rotate(m_nRotationAngle, m_nRotationW, m_nRotationH); canvas.drawText(m_szText, 0, 0, paint); } } Following is my layout: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; xmlns:GUI= http://schemas.android.com/apk/res/net.pocketmagic.customangletext; android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=vertical view android:id=@+id/yourID android:layout_width=wrap_content android:layout_height=wrap_content android:layout_margin=10dp class=net.pocketmagic.customangletext.CustomTextView / /LinearLayout i am getting null pointer exception i am unable find where i am going wrong please help me Thanks Naveen. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: how to load images from web quickly in gridview
I had already used lazylist for this but cannot find the solution. On Mar 6, 3:52 pm, ravi . ravikanth...@gmail.com wrote: I have a gridview in which i load the images from web.The size of each image is large(less than 0.5MB).I need to load that images as quickly as possible. Can any one help? Thsnks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 show a single country map rather then whole world map
The Google Maps API uses map tiles., It has absolutely no idea about country borders. On Tuesday, March 6, 2012 1:15:08 AM UTC-5, Harpreet Singh wrote: Hi Friends, I am using Google Map Api, it showing the whole world map. I need to display map of individual country e.g. just of Australia. Is it possible that only map of Australia is shown and rest neighboring countries will not be displayed. Please help. Thanks in advance, Harpreet. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Clearing old maps at the background while loading the new maps
You have no influence on the internal cache of the Maps API. On Tuesday, March 6, 2012 3:29:03 AM UTC-5, Shajahan wrote: Currenty, I have mapview and mapcontroller to show the map. And it works fine and showing correct location as well. But the problem is, while loading new maps at the background old map is visible. I want to get rid of this old map showing to the user and display simply a blank view. And after loading, new map should be shown. Any ideas ? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Android Http
everyone, i use the http to download the html file,and then use the loadDataWithBaseURL,which is a method of Webview, to open the html file. but i have met a problem,that is: i can login successfully, but when access another page int the same way, it download the login page. how can i maintain the session? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 display a text above Coverflow
The label of the activity can be used instead using a seperate text view. Regards, Sha On Mon, Mar 5, 2012 at 12:04 PM, ravi . ravikanth...@gmail.com wrote: I need to display a textview on the top of the coverflow of each item when i scroll http://4.bp.blogspot.com/_UW2f-eaiXZs/S4lCNH-wpyI/AJE/0Ce8jGe8fSA/s1600-h/coverflowv2.png can any one 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 connect mysql to android
you should not use setContentView() in the oncreate() method of ListActivity .How do you want to display the data. Kind Regards, Ch.B.Sagar. On Tue, Mar 6, 2012 at 3:54 PM, ramalakshmi krishna.veni...@gmail.comwrote: for this i create a php file and convert the output in json format.. my php file is ?php $con = mysql_connect('localhost:3306','root',''); if (!$con) { die('Reloading the page,please wait ' . mysql_error()); header(Location: rates.php); } mysql_select_db('local',$con); $sql = mysql_query(SELECT id,Symbol,Bid,Ask FROM rates); while($row = mysql_fetch_assoc($sql)) { $output[]=$row; } print(json_encode($output)); mysql_close(); ? the output of the file is [{id:3,Symbol:Platinum,Bid:1635,Ask:1646},{id:1,Symbol:Gold,Bid:1715,Ask:1721},{id:2,Symbol:Silver,Bid:33,Ask:34},{id:4,Symbol:Crude,Bid:100,Ask:101}] my android code is public class PhpmysqlActivity extends ListActivity { JSONArray jArray; String result = null; InputStream is = null; StringBuilder sb=null; /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); ArrayListNameValuePair nameValuePairs = new ArrayListNameValuePair(); //http post try{ HttpClient httpclient = new DefaultHttpClient(); HttpPost httppost = new HttpPost( http://localhost:8000/rates.php;); httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs)); HttpResponse response = httpclient.execute(httppost); HttpEntity entity = response.getEntity(); is = entity.getContent(); }catch(Exception e){ Log.e(log_tag, Error in http connection + e.toString()); } //convert response to string try{ BufferedReader reader = new BufferedReader(new InputStreamReader(is,iso-8859-1),8); sb = new StringBuilder(); sb.append(reader.readLine() + \n); String line=0; while ((line = reader.readLine()) != null) { sb.append(line + \n); } is.close(); result=sb.toString(); }catch(Exception e){ Log.e(log_tag, Error converting result +e.toString()); } // int _id; // String _simbl; try{ jArray = new JSONArray(result); JSONObject json_data=null; for(int i=0;ijArray.length();i++){ json_data = jArray.getJSONObject(i); /* _id=json_data.getInt(id); _simbl=json_data.getString(Symbol); */ Log.i(log_tag,id:+json_data.getInt(id)+ ,Symbol:+ json_data.getString(Symbol)+ ,Ask:+ json_data.getInt(Ask)); } } catch(JSONException e1){ Toast.makeText(getBaseContext(), No entity Found ,Toast.LENGTH_LONG).show(); } catch (ParseException e1) { e1.printStackTrace(); } } } but i cant get any result the errors are : thread exiting with uncaught exception (group=0x409c01f8) : FATAL EXCEPTION: main Unable to start activity ComponentInfo{ram.phpmysql/ram.phpmysql.PhpmysqlActivity}: java.lang.RuntimeException: Your content must have a ListView whose id attribute is 'android.R.id.list' at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981) at android.app.ActivityThread.access$600(ActivityThread.java:123) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4424) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) at dalvik.system.NativeStart.main(Native Method) Your content must have a ListView whose id attribute is 'android.R.id.list' at android.app.ListActivity.onContentChanged(ListActivity.java:243) at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:254) at android.app.Activity.setContentView(Activity.java:1835) at ram.phpmysql.PhpmysqlActivity.onCreate(PhpmysqlActivity.java:37) at android.app.Activity.performCreate(Activity.java:4465) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049) at
[android-developers] How to progressively make invisible a polygon?
I need to make progressively invisible a polygon with OpenGL ES 1.1. I'm developing for Android, but i think that other platforms will do the same code with some minor changes. How i can do that? i can't find any info on google or stackoverflow. Any help and tutorials will be apreciated. 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 : Selecting spinner
Hi members, This is how my string.xml looks like , string-array name=state_array item/item itemTamilnadu/item itemAndhraPradesh/item itemKarnataka/item itemMaharashtra/item itemGujarat/item /string-array string name=planet_promptCity/string string-array name=planets_array item--Select City--/item itemChennai/item itemTrichy/item itemHyderabad/item itemHyderabad/item itemBangalore/item itemBangalore/item itemMumbai/item itemMumbai/item itemAhamedabad/item /string-array from this what i need is i m declaring two spinners,On selecting value from Ist spinner i need to display corresponding values in IInd spinner For ex : If i m selecting itemTamilnadu/item from my Ist spinner i need to display only itemChennai/item and itemTrichy/item in my IInd spinner How can i do this inside onItemSelected and I need some solutions regarding this. - Vivek -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 extract only number
str=txt.getText().toString(); int space1=str.indexOf( ); if ( space1 0 ) s=str.substring(0, space1); else s= str; -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Is it possible to record from the internal mic as well as an external at the same time?
I was looking at the API and was wondering if that was supported. Also is their a documented formula to convert the in coming level to DBs? I see a ton of Audio level apps so I know it is possible. My real goal is the compair the sound levels from the internal mic verses the external. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: WebView Java script function
Amit, But i think, if android API provides this infromation, it will be reliable information as android known which url it is currently loading. This is incorrect, *webkit* knows what url is authoritatively being loaded (not necessarily Android). The webkit/JS container bridge is synchronous while the communication between webkit and the various android callbacks are asynchronous for the most part. (i.e. In general, Moktarul's solution is correct if you want the currently loaded url (top level) from JavaScript). On Tuesday, March 6, 2012 1:13:02 AM UTC-5, Amit wrote: I think you code snippet has currentUrl() as JS exposed function. Is there anyway to get urk infromation from android API. Android.currentUrl(url), caller can pass anystring. It is not necessary to be same url as it being loaded from. But i think, if android API provides this infromation, it will be reliable information as android known which url it is currently loading. On Tuesday, 6 March 2012 10:39:42 UTC+5:30, moktarul anam wrote: Hi Amit. in html header script function onload(){ var url = window.loacation; alert(url); Android.currentUrl(url); } /script body onload=onload() Moktarul On Monday, 5 March 2012 18:03:30 UTC+5:30, Amit wrote: Hi, I am exposing java script function from my webview. This Java script function is called by webcore thread on-page-loading inside webview. Is there any way to retrieve current loaded url inside called Java script function? Thanks, On Monday, 5 March 2012 18:03:30 UTC+5:30, Amit wrote: Hi, I am exposing java script function from my webview. This Java script function is called by webcore thread on-page-loading inside webview. Is there any way to retrieve current loaded url inside called Java script function? Thanks, On Tuesday, March 6, 2012 1:13:02 AM UTC-5, Amit wrote: I think you code snippet has currentUrl() as JS exposed function. Is there anyway to get urk infromation from android API. Android.currentUrl(url), caller can pass anystring. It is not necessary to be same url as it being loaded from. But i think, if android API provides this infromation, it will be reliable information as android known which url it is currently loading. On Tuesday, 6 March 2012 10:39:42 UTC+5:30, moktarul anam wrote: Hi Amit. in html header script function onload(){ var url = window.loacation; alert(url); Android.currentUrl(url); } /script body onload=onload() Moktarul On Monday, 5 March 2012 18:03:30 UTC+5:30, Amit wrote: Hi, I am exposing java script function from my webview. This Java script function is called by webcore thread on-page-loading inside webview. Is there any way to retrieve current loaded url inside called Java script function? Thanks, On Monday, 5 March 2012 18:03:30 UTC+5:30, Amit wrote: Hi, I am exposing java script function from my webview. This Java script function is called by webcore thread on-page-loading inside webview. Is there any way to retrieve current loaded url inside called Java script function? Thanks, On Tuesday, March 6, 2012 1:13:02 AM UTC-5, Amit wrote: I think you code snippet has currentUrl() as JS exposed function. Is there anyway to get urk infromation from android API. Android.currentUrl(url), caller can pass anystring. It is not necessary to be same url as it being loaded from. But i think, if android API provides this infromation, it will be reliable information as android known which url it is currently loading. On Tuesday, 6 March 2012 10:39:42 UTC+5:30, moktarul anam wrote: Hi Amit. in html header script function onload(){ var url = window.loacation; alert(url); Android.currentUrl(url); } /script body onload=onload() Moktarul On Monday, 5 March 2012 18:03:30 UTC+5:30, Amit wrote: Hi, I am exposing java script function from my webview. This Java script function is called by webcore thread on-page-loading inside webview. Is there any way to retrieve current loaded url inside called Java script function? Thanks, On Monday, 5 March 2012 18:03:30 UTC+5:30, Amit wrote: Hi, I am exposing java script function from my webview. This Java script function is called by webcore thread on-page-loading inside webview. Is there any way to retrieve current loaded url inside called Java script function? 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] How to read @array from android:tag?
Hi, I have a reference to a string array inside the tag attribute. How can I read it in order to get hands on the array? My layout with the tag attribute: Button android:id=@+id/btn ... android:tag=@array/colors / My arrays.xml: string-array name=colors itemred/item itemyellow/item itemgreen/item /string-array This way I fetch the tag (unfortunately as Object): Button btn = (Button) findViewById(R.id.btn); Object tag = btn.getTag(); Log.d(COLORS, tag: + tag.toString()); The log output is: 03-06 13:34:12.765: DEBUG/COLORS(2957): tag: @2131099648 As I take a closer look in my R.java: public static final int colors=0x7f06; This hexadecimal value is exactly 2131099648. So somehow there must be a way the get this Object and get the ressource identifier as an int. Instead of String[] colors = getResources().getStringArray(R.array.colors); I want to do something like this String[] colors = getResources().getStringArray((int)tag); Thank you for helping me on this, Marco -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 read @array from android:tag?
On Tue, Mar 6, 2012 at 7:55 AM, Marco Alexander Schmitz marco.alexander.schm...@googlemail.com wrote: I have a reference to a string array inside the tag attribute. How can I read it in order to get hands on the array? I am not aware that android:tag can hold array resources. My layout with the tag attribute: Button android:id=@+id/btn ... android:tag=@array/colors / My arrays.xml: string-array name=colors itemred/item itemyellow/item itemgreen/item /string-array This way I fetch the tag (unfortunately as Object): Button btn = (Button) findViewById(R.id.btn); Object tag = btn.getTag(); Log.d(COLORS, tag: + tag.toString()); The log output is: 03-06 13:34:12.765: DEBUG/COLORS(2957): tag: @2131099648 As I take a closer look in my R.java: public static final int colors=0x7f06; This hexadecimal value is exactly 2131099648. So somehow there must be a way the get this Object and get the ressource identifier as an int. Instead of String[] colors = getResources().getStringArray(R.array.colors); I want to do something like this String[] colors = getResources().getStringArray((int)tag); And when you executed this, what happened? If tag==R.array.colors, by definition, you should get the same results. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in DC: http://marakana.com/training/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
Re: [android-developers] Call Back
This is not possible, unless perhaps the device is in speakerphone mode. Android applications have no access to the in-call audio stream. On Tue, Mar 6, 2012 at 12:11 AM, Jagruti Sangani jagruti.sang...@inextrix.com wrote: hello, I want to record the voice and store in one file on device.When the perticular phone number will call and if it is call received by other party then instead of talking i want to play that recorded file.So please can anybody know how to play that file when call recived. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Training in DC: http://marakana.com/training/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] How to send thw hexstring
Dear All : I want to send out the hex code(0xfa,). I had prepared the hexstring to send. But it will change into string when I received it from another terminal. 1 byte will be changed into 2 bytes. Is there any mechod to keep it in hex(just 1 byte)? Thanks in advanced. Br, Mark -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Problem using IBinder accross two services
Hi again, in case of anybody being interested I may post the solution. Alberto. On Thursday, March 1, 2012 8:19:28 PM UTC-3, Alberto Andreotti wrote: Hi, I'm doing something really simple. I have two services A, and B. Both started with startService. The steps are as follows, 1)First service A calls startService to create service B. 2)Then service B calls bindService to bind to service A. 3)Once service B is bound to A, it calls a method in A through a IBinder interface that looks like registerCallback(interfaceB). 4)Then service A receives the registerCallback call through IBinder. The method is executed. So far so good. The problem is that interfaceB is always null no matter what I do. I have defined the aidl for InterfaceB as with typical Activity/ Service communication. But no matter what I do, I always get a null reference. Any idea on what could be wrong?. Alberto. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 how to send the hex code out?
Dear Todd : Thanks for your kindly hint. Could you give me a more detail? Thanks. BR, Mark On 3月6日, 下午6時57分, Todd Grigsby tgrigsby...@gmail.com wrote: Google hex notation and hexadecimal. On Mar 6, 2012 12:34 AM, mark2011 androidmark2...@gmail.com wrote: Dear All : I want to send out the hex code like 0xfa through the serial port. How do I send the 0x code in the program? Thanks in advanced. BR, Mark -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en- 隱藏被引用文字 - - 顯示被引用文字 - -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] How to read @array from android:tag?
Well, I found this (rather unholy) solution: String strTag = (String) tag; String[] colors = getResources().getStringArray(Integer.parseInt(strTag.substring(1))); I take the tag, cast it into String, so I get @2131099648, then I throw away the @, cast it into Integer, use this Integer as ressource identifier... -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Can the DevicePolicyManager resetPassword() be used WITHOUT enabling the screen lock?
It seems that when resetPassword() is called, the screen lock is ALWAYS enabled, even though it may be delayed for a short time. Does anybody know if Is it possible to call this method WITHOUT enabling the screen lock? Terry -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 use CALLER_IS_SYNCADAPTER
I need to be notified by a change to a contact and each change on a contact results in setting the dirty flag to 1. After a sync adapter with CALLER_IS_SYNCADAPTER should have a dirty flag of 0 and i dont use sync adapter in my application so is there to away to use it with no sync adapter or another way to change this flag any help please thx for answer -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] reading pdf
after struggling through in-app pdf reading effort which did not give much result, i am inclined towards using http://stackoverflow.com/questions/2784847/how-do-i-determine-if-android-can-handle-pdf this solution. my 2 questions are 1. how can i read project-embedded files ? 2. what is the maximum size apk ? if a large file is there, it gives me error cannot install apk, not engsough space 3. can i join 2 apks and distribute as a single apk ? regards jags -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: reading pdf
thanks IV, but itextpdf does not extract image On Mar 3, 9:13 am, Indicator Veritatis mej1...@yahoo.com wrote: Please do not post essentially the same question under slightly different titles. It tends to attract trolls. As for how to read a PDF file, please see the answer I gave in the other thread on that. Use the same tutorial, but look further down: you are looking at the part where he is teaching how to write files, look where he teaches how to read them. On Wednesday, February 29, 2012 5:14:24 AM UTC-8, Jags wrote: hi all, i am trying to read a pdf file in my android app. i realised, unlike safari in iphone android webview does not render pdf file as a local url . hence i am exploring itextpdf. i followed following tutorial http://www.vogella.de/articles/JavaPDF/article.html#installation while reading file, the author is trying to create a file using PDFWriter. he also uses writer to get a page as in Image. My question is, is it essential to use a writer ? cant we use only reader to extract entire page as an image ? what i plan here, is get all pages as an image and put them in a scroll view. thanks in advance jags -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Json parsing problem using gson
Hi friends, I am using GSON to parse the json, when some user logs in, it parses properly but when someother user logs in it throws NumberFormatException. I checked the JSON response also, its a valid JSON How to debug this app. -- Regards, Vani Reddy -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Json parsing problem using gson
Hi, i think your parsing integer value may be null ,check it. On Tue, Mar 6, 2012 at 7:39 PM, vani reddy vani.reddy.bl...@gmail.comwrote: Hi friends, I am using GSON to parse the json, when some user logs in, it parses properly but when someother user logs in it throws NumberFormatException. I checked the JSON response also, its a valid JSON How to debug this app. -- Regards, Vani Reddy -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- - Thanks Regards, T.M.S.VIJAYKUMARR BloG:http://iamvijayakumar.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
Re: [android-developers] Json parsing problem using gson
code ??? 2012/3/6 T.M.S.VIJAYKUMARR iamvijayaku...@gmail.com Hi, i think your parsing integer value may be null ,check it. On Tue, Mar 6, 2012 at 7:39 PM, vani reddy vani.reddy.bl...@gmail.comwrote: Hi friends, I am using GSON to parse the json, when some user logs in, it parses properly but when someother user logs in it throws NumberFormatException. I checked the JSON response also, its a valid JSON How to debug this app. -- Regards, Vani Reddy -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- - Thanks Regards, T.M.S.VIJAYKUMARR BloG:http://iamvijayakumar.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 -- - Marcelo Henrique - Se não puder se destacar pelo talento, vença pelo esforço. (Dave Weinbaum) -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] native-activity
I'm trying to run the native-activity example that comes with the NDK, and I got this error: E/AndroidRuntime(10708): FATAL EXCEPTION: main E/AndroidRuntime(10708): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.native_activity/android.app.NativeActivity}: java.lang.ClassNotFoundException: android.app.NativeActivity in loader dalvik.system.PathClassLoader[.] E/AndroidRuntime(10708): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585) E/AndroidRuntime(10708): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) E/AndroidRuntime(10708): at android.app.ActivityThread.access$2300(ActivityThread.java:125) E/AndroidRuntime(10708): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) E/AndroidRuntime(10708): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime(10708): at android.os.Looper.loop(Looper.java:123) E/AndroidRuntime(10708): at android.app.ActivityThread.main(ActivityThread.java:4627) E/AndroidRuntime(10708): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime(10708): at java.lang.reflect.Method.invoke(Method.java:521) E/AndroidRuntime(10708): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) E/AndroidRuntime(10708): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) E/AndroidRuntime(10708): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime(10708): Caused by: java.lang.ClassNotFoundException: android.app.NativeActivity in loader dalvik.system.PathClassLoader[.] E/AndroidRuntime(10708): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243) E/AndroidRuntime(10708): at java.lang.ClassLoader.loadClass(ClassLoader.java:573) E/AndroidRuntime(10708): at java.lang.ClassLoader.loadClass(ClassLoader.java:532) E/AndroidRuntime(10708): at android.app.Instrumentation.newActivity(Instrumentation.java:1021) E/AndroidRuntime(10708): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577) E/AndroidRuntime(10708): ... 11 more W/ActivityManager( 1330): Force finishing activity com.example.native_activity/android.app.NativeActivity Does anyone know what causes this? 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] native-activity
Are you sure that you are running this on an API Level 9+ device? On Tue, Mar 6, 2012 at 9:46 AM, bob b...@coolfone.comze.com wrote: I'm trying to run the native-activity example that comes with the NDK, and I got this error: E/AndroidRuntime(10708): FATAL EXCEPTION: main E/AndroidRuntime(10708): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.native_activity/android.app.NativeActivity}: java.lang.ClassNotFoundException: android.app.NativeActivity in loader dalvik.system.PathClassLoader[.] E/AndroidRuntime(10708): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2585) E/AndroidRuntime(10708): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) E/AndroidRuntime(10708): at android.app.ActivityThread.access$2300(ActivityThread.java:125) E/AndroidRuntime(10708): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) E/AndroidRuntime(10708): at android.os.Handler.dispatchMessage(Handler.java:99) E/AndroidRuntime(10708): at android.os.Looper.loop(Looper.java:123) E/AndroidRuntime(10708): at android.app.ActivityThread.main(ActivityThread.java:4627) E/AndroidRuntime(10708): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime(10708): at java.lang.reflect.Method.invoke(Method.java:521) E/AndroidRuntime(10708): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) E/AndroidRuntime(10708): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) E/AndroidRuntime(10708): at dalvik.system.NativeStart.main(Native Method) E/AndroidRuntime(10708): Caused by: java.lang.ClassNotFoundException: android.app.NativeActivity in loader dalvik.system.PathClassLoader[.] E/AndroidRuntime(10708): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243) E/AndroidRuntime(10708): at java.lang.ClassLoader.loadClass(ClassLoader.java:573) E/AndroidRuntime(10708): at java.lang.ClassLoader.loadClass(ClassLoader.java:532) E/AndroidRuntime(10708): at android.app.Instrumentation.newActivity(Instrumentation.java:1021) E/AndroidRuntime(10708): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577) E/AndroidRuntime(10708): ... 11 more W/ActivityManager( 1330): Force finishing activity com.example.native_activity/android.app.NativeActivity Does anyone know what causes this? 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 -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/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] question about fragment's
Hello, i built up all contents in a app with fragments, followed the tutorial of the example with the article click listener to replace the fragment through another one. To explain i try to implement a wizard with multiple steps to finish it. By invoking transaction.replace(R.id.wizard_content, new FishCreate()); the fragment return value from onCreateView will be attached to the existing views. What i have to do that the inflated content from the previous fragment is really overwritten? Thanks Daniel -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 use custom listview in ViewPagerIndicator ?
Hi i'm trying to use custom listview in viewpagerIndicator of jake wharton but i can't figure out how to do it and i feel like i miss understanding some thing is it right that i use only one activity for every page or for 3 pages i use on activity ? 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] Map Marker Overlay - URGENT
On Mon, Mar 5, 2012 at 10:25 PM, Krishna Kumaar Natarajan nikrish...@gmail.com wrote: Should HelloItemizedOverlay.java and GoogleMapActivity.java be in same package ? Sure, why not? Even after doing that, my application is force closing :( Debug your app. There is a whole section on this topic in the documentation. Posting Tip: Adding URGENT in all caps as part of your title is obnoxious and will likely lead to you getting ignored instead of getting more help. Particularly when there is absolutely nothing urgent about what you just posted. - 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
Re: [android-developers] need help on adding custom view to XML file
On Tue, Mar 6, 2012 at 12:09 AM, chowdary nani naveenneeli...@gmail.comwrote: I am working on adding custom view to xml file following is my code when i am executing my code i am getting null pointer exception Debug your app, then fix whatever is causing your exception. At the very least, post a stacktrace so we have some idea of what you're talking about. - 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
Re: [android-developers] How to use custom listview in ViewPagerIndicator ?
I'm making custom listview for rss feed so i want to know how to implement custom listview in ViewPagerIndicator as i don't make it extend activity i searched for that but didn't find something useful On Tue, Mar 6, 2012 at 5:22 PM, AndroidGirl8 walaamahmou...@gmail.comwrote: Hi i'm trying to use custom listview in viewpagerIndicator of jake wharton but i can't figure out how to do it and i feel like i miss understanding some thing is it right that i use only one activity for every page or for 3 pages i use on activity ? Thanks -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] EditText not Accepting Soft Keyboard Input from Supporting Activity
Hi guys, My default activity is a game so I didn't include Soft Keyboard dialog in this activity. One feature of my app is to email game results to friends in a supporting activity. This activity has several EditText widgets but it gets stuck in the first email/textedit widget. The widget appears in focus and the Soft Keyboard appears but the widget doesn't accept input and the keyboard acts like it's in slow motion. Here's my layout: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/ android android:layout_width=fill_parent android:layout_height=fill_parent android:gravity=center_horizontal android:orientation=vertical TextView android:id=@+id/textView1 android:layout_width=214dp android:layout_height=wrap_content android:layout_gravity=center_horizontal android:text=Large Text android:textAppearance=?android:attr/textAppearanceLarge android:textSize=24dp android:textStyle=bold / LinearLayout android:id=@+id/emailLayout android:layout_width=fill_parent android:layout_height=wrap_content TextView android:id=@+id/textView2 android:layout_width=wrap_content android:layout_height=wrap_content android:gravity=right android:layout_weight=20 android:text=Email Address: android:textAppearance=?android:attr/ textAppearanceMedium / EditText android:id=@+id/emailText android:layout_width=wrap_content android:layout_height=wrap_content android:layout_weight=80 android:windowSoftInputMode=stateVisible android:inputType=textEmailAddress android:singleLine=true /EditText /LinearLayout LinearLayout android:id=@+id/subjectLayout android:layout_width=fill_parent android:layout_height=wrap_content TextView android:id=@+id/textView3 android:layout_width=wrap_content android:layout_height=wrap_content android:gravity=right android:layout_weight=20 android:text=Subject: android:textAppearance=?android:attr/ textAppearanceMedium / EditText android:id=@+id/subjectText android:layout_width=wrap_content android:layout_height=wrap_content android:windowSoftInputMode=stateVisible android:layout_weight=80 android:inputType=textEmailAddress|textEmailSubject android:singleLine=true / /LinearLayout EditText android:id=@+id/mainText android:layout_width=match_parent android:layout_height=wrap_content android:layout_weight=0.31 / LinearLayout android:id=@+id/buttonLayout android:layout_width=match_parent android:layout_height=wrap_content android:gravity=center Button android:id=@+id/sendButton android:layout_width=wrap_content android:layout_height=wrap_content android:text=Send / Button android:id=@+id/clearButton android:layout_width=wrap_content android:layout_height=wrap_content android:text=Clear / /LinearLayout /LinearLayout Any ideas? Thanks. Chris -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Database Problem
http://www.catb.org/~esr/faqs/smart-questions.html - 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
Re: [android-developers] page navigation
On Tue, Mar 6, 2012 at 1:33 AM, rajesh rogueraje...@gmail.com wrote: Can any one help me to do the page navigation step by step?. http://www.catb.org/~esr/faqs/smart-questions.html - 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
Re: [android-developers] how to load images from web quickly in gridview
On Tue, Mar 6, 2012 at 4:52 AM, ravi . ravikanth...@gmail.com wrote: Can any one help? Check the Android Developer blog. I believe there was a post on this exact topic. - 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
[android-developers] how dose face lock works?
hi,all I have got android 4.0 has face lock, when I search the android code, I just have found the code of face lock in application layer, but I did not get any code in frameworks or others paths, and it needs com.android.facelock. Then I ask engineer in QCOM, They said it't part of GMS which should contact Google, so I want to know, how should I do if I want to implement Face Lock? Any of your reply will be 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] wonder of face lock: The code is open and complete?
hi,all I have got android 4.0 has face lock, when I search the android code, I just have found the code of face lock in application layer, but I did not get any code in frameworks or others paths, and it needs com.android.facelock. Then I ask engineer in QCOM, They said it't part of GMS which should contact Google, so I want to know, how should I do if I want to implement Face Lock? Any of your reply will be 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: How many people are using ActionBarSherlock?
From my estimation there are *at least* 100-250 small applications published to Market that are using it. Of course, I only know about the ones people tell me about and can estimate from things like the activity on the Google group. There are a couple of (arguably) big names that also use it with multi-million install user bases such a FriendCaster and FolderOrganizer which have been using it for a while. GitHub recently started releasing Android applications and they have chosen to use it. I'm also aware of a few upcoming applications from seriously big companies that will be using the forthcoming version 4.0. On Sunday, March 4, 2012 8:13:05 PM UTC-8, Mark Phillips wrote: I am curious as to how many folks on the list are using ActionBarSherlock versus rolling their own or some other library for pre 3.0 applications? Thanks, Mark -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: Run Multiple Apks in Single Process
On Tuesday, March 6, 2012 12:00:57 AM UTC-5, moktarul anam wrote: * * *in android each application runs in separate process. for data sharing u look in to service and contentProvider * The question was probably supposed to be about how to make two apk's share the same userid, something which is supported (if they have the same signature) and allows them to share files, etc. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: How To: Run Multiple Apks in Single Process
According to the dev guide sharing the same user id also allows two applications to run in the same process: http://developer.android.com/guide/topics/manifest/manifest-element.html#uid * The name of a Linux user ID that will be shared with other applications. By default, Android assigns each application its own unique user ID. However, if this attribute is set to the same value for two or more applications, they will all share the same ID — provided that they are also signed by the same certificate. Application with the same user ID can access each other's data and, if desired, run in the same process.* Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Tue, Mar 6, 2012 at 9:40 AM, Chris Stratton cs07...@gmail.com wrote: On Tuesday, March 6, 2012 12:00:57 AM UTC-5, moktarul anam wrote: * * *in android each application runs in separate process. for data sharing u look in to service and contentProvider * The question was probably supposed to be about how to make two apk's share the same userid, something which is supported (if they have the same signature) and allows them to share files, etc. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Synchronize data on cloud?
Are you synhronizing local data / cache data on your Android device? 1. Define how often you want to run synchronization. E.g. Once a day? Every five minutes? The period will depend on the domain you are working I guess. 2. Use AlarmManager http://developer.android.com/reference/android/app/AlarmManager.html to trigger every synchronization. Hope it helps. - Ali Chousein http://www.codeproject.com/KB/android/PayGol-Android.aspx http://weatherbuddy.blogspot.com | http://twitter.com/weather_buddy http://geo-filtered-assistant.blogspot.com https://marketplace.cisco.com/apphq/products/994 On Mar 4, 2:51 pm, sanarmal armalsan...@gmail.com wrote: Hey, i am creating one application which is use for synchronize the contact,image,video on cloud. but i didn't find any information. pls provide me some tutorial or code. 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] Re: Twitter Error
1. Wrong forum. 2. Anyway, look at the following error lines: com.experion.minigolf.utils.MGOAuthRequestTokenTask(2366): oauth.signpost.exception.OAuthNotAuthorizedException: Authorization failed (server replied with a 401). This can happen if the consumer key was not correct or the signatures did not match. It tells you what it could have gone wrong. Study the documentation of Twitter API or the signpost library to find out how to perform authorization correctly. I've never integrated Twitter but it's so popular that if you search the Internet I'm almost sure that you'll find integration examples. - Ali Chousein http://www.codeproject.com/KB/android/PayGol-Android.aspx http://weatherbuddy.blogspot.com | http://twitter.com/weather_buddy http://geo-filtered-assistant.blogspot.com https://marketplace.cisco.com/apphq/products/994 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Please comment on my app's design...
I'm new to Android development and I'm uncertain of the design I've planned for my app... I want to have an appWidget, a service, and a normal app with a few activities and fragments, all of which depend on a single instance of state logic. The service exists to receive screen state broadcasts even when the app isn't running (receivers for screen state must be in code - they can't be in the app's manifest), and to assist the appWidget. The service can be started from the app, from the appWidget, or by the system at startup. At system startup it might exit immediately depending on user preferences. I note that it is possible to have direct memory communication between these components, but I guess this isn't recommended. For example, even if my app verifies that the service is running it won't know whether it is running in the same or in a different process. Here's an example of interactions between the components. When the screen is turned on, the service starts by turning on the device's wifi adapter. If the appWidget is visible it will need to reflect this (it has a status display). If the user now launches the app it must know about and show the progress of the actions started by the service. So, the components must be fairly independent (any or all could be running), but tightly coupled around a single instance of state logic which I have decided to put into my Application derived class. I'm putting it the state logic in my Application class both because this seems to be the 'normal' thing to do, and because it has its most complicated interactions with the activities (versus the appWidget or service). I considered putting the main state logic into the service, but I think this would result in complicated interactions between the activities and the service. As well, I want to keep the service as small as possible in case the user chooses to have it running all the time. If the service or appWidget become active they will broadcast custom intents to signal the application (and launch it if necessary). The tricky part is that I need to ensure that the Application remains in memory until it has completed the action requested by the service or appWidget. It will probably take 10-30 seconds for the Application to process a request - mostly waiting on intents or on network communications. It is my understanding that an application with no activities is a prime candidate to be killed by the system, so I will bind it to the service to keep it from being killed. When it finishes the requested processing it will unbind so the system can kill it. I might need to look into some other tricks to ensure that the app doesn't get killed while processing requests. Does this design make sense? Thanks for any suggestions. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 Gmail Authentication failed
Send 5 email repeatedly from the code Probably you are classified as a potential spammer. It's not surprise that Google doesn't allow you send e-mails frequently. - Ali Chousein http://www.codeproject.com/KB/android/PayGol-Android.aspx http://weatherbuddy.blogspot.com | http://twitter.com/weather_buddy http://geo-filtered-assistant.blogspot.com https://marketplace.cisco.com/apphq/products/994 On Mar 5, 10:11 am, Save My Life! alertsavemyl...@gmail.com wrote: Dear Sir, I am using http://stackoverflow.com/questions/2020088/sending-email-in-android-u... For Sending an Email. I am doing 1. Static Entry of Username password in side the code. 2. Send 5 email repeatedly from the code Problem : 1. After Sending Some Email I am getting : Authentication failed. 2. When i log in to the Email,its giving to enter captcha. What would be the solution.please 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] In-app-billing experience vs PayPal?
Hi, I've got a multiplayer game where users can play up to 5 games at a time for free. I'd like to offer the option to pay $N to play up to 10 games at a time. This seems likes a perfect use-case for paypal, but it sounds like the marketplace terms forbid this. The 30% cut that marketplace would take for this seems a little unfair because the additional load would be placed on my game servers, not on google. There also seem to be some disturbing unsolved bugs with the in-app billing system: http://code.google.com/p/marketbilling/issues/detail?id=14 So there are companies like Papaya and other music distributors that let you buy content through their apps, are they also sharing up the 30% via google's in-app billing? Just curious before I dive into anything, the in-app billing doesn't look very straightforward at a glance and time is limited as always.. 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] Please comment on my app's design...
On Tue, Mar 6, 2012 at 12:35 PM, Tom t...@malcolmson.ca wrote: The service exists to receive screen state broadcasts even when the app isn't running (receivers for screen state must be in code - they can't be in the app's manifest) Everlasting services, like you are trying to achieve, are an anti-pattern in Android. While you are correct that it is technically required to achieve your ends, IMHO that means your ends are flawed. What is magic about the screen being on or off? Android and/or the user will nuke your service eventually; depending on everlasting services is risky. At system startup it might exit immediately depending on user preferences. Consider disabling your BOOT_COMPLETED BroadcastReceiver if you will not be using it, via PackageManager and setComponentEnabledSetting(). This will speed up the boot process by not calling your logic if you do not intend to do anything. For example, even if my app verifies that the service is running it won't know whether it is running in the same or in a different process. They better be in the same process. Using multiple processes simultaneously is another anti-pattern, except in fairly specific situations, and you have to go out of your way to cause them to be separate processes. I'm putting it the state logic in my Application class both because this seems to be the 'normal' thing to do That's highly debatable. A custom Application is frequently indistinguishable from a simple singleton, and there can only be one Application class. If the service or appWidget become active they will broadcast custom intents to signal the application (and launch it if necessary). The tricky part is that I need to ensure that the Application remains in memory until it has completed the action requested by the service or appWidget. It will probably take 10-30 seconds for the Application to process a request - mostly waiting on intents or on network communications. Any logic you want to run should be in the service. The service is the marker to say yo, I'm doing something here. As a marker, it works for a while, but not indefinitely. It is my understanding that an application with no activities is a prime candidate to be killed by the system Correct. so I will bind it to the service to keep it from being killed. When it finishes the requested processing it will unbind so the system can kill it. It would be simpler for the logic that you want to have running in the background simply be in the service. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/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
Re: [android-developers] need help on adding custom view to XML file
Are you SURE that the CustomView class is in this package: net.pocketmagic.customangletext? Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Tue, Mar 6, 2012 at 8:33 AM, TreKing treking...@gmail.com wrote: On Tue, Mar 6, 2012 at 12:09 AM, chowdary nani naveenneeli...@gmail.comwrote: I am working on adding custom view to xml file following is my code when i am executing my code i am getting null pointer exception Debug your app, then fix whatever is causing your exception. At the very least, post a stacktrace so we have some idea of what you're talking about. - 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] rss Feed
hello everyone, how do i receive feeds from different websites and display in my application actually it has several options as technology , sports . it has sub division in it... 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] rss Feed
hello everyone, how do i receive feeds from different websites and display in my application actually it has several options as technology , sports . it has sub division in it... 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] Looking for LocationManager use for cycling app
I am writing an app that will will follow a route on the map, very similar to a car navigation (except that it is following a specific route, not simply trying to get to a location). What I am interested in is what would you recommend regarding which provider to use, and what criteria to use when listening for location changes. Overall what I need to do is the following: 1. Announce when I am off course by about 100 meters 2. Announce when I am approaching a turn by about 100-200 meters 3. go to the next waypoint when I arrive at a turn (about 50 meters) 4. cyclists ride about 10-30 MPH 5. Rides generally last 3-8 hours (so think battery power). Right now I am doing this: locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); Criteria criteria = new Criteria(); criteria.setAccuracy(Criteria.ACCURACY_COARSE); criteria.setPowerRequirement(Criteria.POWER_LOW); provider = locationManager.getBestProvider(criteria, false); locationManager.requestLocationUpdates( provider, MINIMUM_TIME_BETWEEN_UPDATES, MINIMUM_DISTANCE_CHANGE_FOR_UPDATES, this ); Where min time is 5000 and min distance is 10 Any other recommendations? Like should I just always pick GPS for provider? Or other strategies? Thanks in advance! -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] rss Feed
http://catb.org/esr/faqs/smart-questions.html Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware 2012/3/6 νιяιη¢нソ joinvir...@gmail.com hello everyone, how do i receive feeds from different websites and display in my application actually it has several options as technology , sports . it has sub division in it... 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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 permission denial when installed in wrong order
Hi, I have two apps, one contains an exported provider that the second app uses to look up values. I recently decided it'd be a good idea to add read and write permissions to the provider, but now I've run into an issue. If I install the app reading from the provider first it'll crash with a permission denial. If I install the provider first, everything works fine. I'm guessing behind the scenes when the app is installed it checks if certain permissions exist and gets rid of them if they don't. So when I install my reading app without the provider present it removes the read/write permissions I've defined and causes problems when it later tries to access the provider after its been installed. While specifying and order for install isn't the worst thing ever I'm wondering if there is a workaround for this The app with the provider was designed to be used by a suite of different apps so I can't just combine the two Thanks in advance, Jason Prenger -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Android permission denial when installed in wrong order
On Tue, Mar 6, 2012 at 1:20 PM, Jason Prenger jasonmpren...@gmail.com wrote: I have two apps, one contains an exported provider that the second app uses to look up values. I recently decided it'd be a good idea to add read and write permissions to the provider, but now I've run into an issue. If I install the app reading from the provider first it'll crash with a permission denial. If I install the provider first, everything works fine. Yup, this is a known limitation of custom preferences. While specifying and order for install isn't the worst thing ever I'm wondering if there is a workaround for this Somebody recently mentioned having the same permission element in both apps, though I haven't tried it and I forget if that was a solution or a failed solution. :-) If that works, to keep things a teensy bit more DRY, you could have an Android library project for your string resources for the permission. While I haven't created a resource-only library project, in principle it should work. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/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
Re: [android-developers] how to connect mysql to android
* you should not use setContentView() in the oncreate() method of ListActivity* Umm... no, you are wrong. That is where you should call that method. What does your R.layout.main file look like? As the exception says, it needs to contain a listview with the following id: android.R.id.list Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Tue, Mar 6, 2012 at 4:55 AM, Chalavadi Sagar sagarchalav...@gmail.comwrote: you should not use setContentView() in the oncreate() method of ListActivity -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] SD card database
Is it possible to use SQLiteOpenHelper to create a database on the SD card? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Please comment on my app's design...
On Tuesday, March 6, 2012 12:48:04 PM UTC-5, Mark Murphy (a Commons Guy) wrote: On Tue, Mar 6, 2012 at 12:35 PM, Tom wrote: The service exists to receive screen state broadcasts even when the app isn't running (receivers for screen state must be in code - they can't be in the app's manifest) Everlasting services, like you are trying to achieve, are an anti-pattern in Android. While you are correct that it is technically required to achieve your ends, IMHO that means your ends are flawed. What is magic about the screen being on or off? Android and/or the user will nuke your service eventually; depending on everlasting services is risky. When the screen is turned on the device needs a network connection. If the device doesn't have a connection then my app remotely sets up tethering. I acknowledge your concerns but I thought this could be a useful feature, so I figured I might allow this as an option (off, by default) at some point in the app's future. What really bothered me was the idea that providing this feature would require me to list the BOOT_COMPLETED broadcast receiver in my manifest even when the option was not enabled. I really needed a solution for that before I could add this option - so thank you for telling me how to resolve that problem (via setComponentEnabledSetting). At system startup it might exit immediately depending on user preferences. Consider disabling your BOOT_COMPLETED BroadcastReceiver if you will not be using it, via PackageManager and setComponentEnabledSetting(). This will speed up the boot process by not calling your logic if you do not intend to do anything. For example, even if my app verifies that the service is running it won't know whether it is running in the same or in a different process. They better be in the same process. Using multiple processes simultaneously is another anti-pattern, except in fairly specific situations, and you have to go out of your way to cause them to be separate processes. I wouldn't use multiple processes on purpose - I thought that I had no control over that and it would happen if the service was started independently of the app. From what you are saying I take it that I was wrong: if my service is already running when the user launches my app the system will launch the app into the same process as the service. I'm putting it the state logic in my Application class both because this seems to be the 'normal' thing to do That's highly debatable. A custom Application is frequently indistinguishable from a simple singleton, and there can only be one Application class. I mean that my state logic would be in an Application derived class, declared in my manifest, as described in this popular post on SO: http://stackoverflow.com/questions/708012/android-how-to-declare-global-variables If the service or appWidget become active they will broadcast custom intents to signal the application (and launch it if necessary). The tricky part is that I need to ensure that the Application remains in memory until it has completed the action requested by the service or appWidget. It will probably take 10-30 seconds for the Application to process a request - mostly waiting on intents or on network communications. Any logic you want to run should be in the service. The service is the marker to say yo, I'm doing something here. As a marker, it works for a while, but not indefinitely. It is my understanding that an application with no activities is a prime candidate to be killed by the system Correct. so I will bind it to the service to keep it from being killed. When it finishes the requested processing it will unbind so the system can kill it. It would be simpler for the logic that you want to have running in the background simply be in the service. Okay, I guess that is what I wanted to know. I've started the app with everything in the Application derived class and that has worked well with the activities and fragments that I've created so far, but I was worried that the need to execute my logic independent of the app's user interface might dictate a different design. I'm glad I asked before going much further. Thank's for your advice Mark - much appreciated. Tom -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/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
Re: [android-developers] How to progressively make invisible a polygon?
This isn't an android question... Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Tue, Mar 6, 2012 at 4:55 AM, saex elpablos...@gmail.com wrote: I need to make progressively invisible a polygon with OpenGL ES 1.1. I'm developing for Android, but i think that other platforms will do the same code with some minor changes. How i can do that? i can't find any info on google or stackoverflow. Any help and tutorials will be apreciated. 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 -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Please comment on my app's design...
On Tue, Mar 6, 2012 at 1:46 PM, Tom t...@malcolmson.ca wrote: I wouldn't use multiple processes on purpose - I thought that I had no control over that and it would happen if the service was started independently of the app. From what you are saying I take it that I was wrong: if my service is already running when the user launches my app the system will launch the app into the same process as the service. Correct. Normally, there will be either zero or one process for your app. If there is a process for your app, and something else happens related to your app (e.g., SCREEN_OFF broadcast), the component to handle it will go into your running process. That's highly debatable. A custom Application is frequently indistinguishable from a simple singleton, and there can only be one Application class. I mean that my state logic would be in an Application derived class, declared in my manifest, as described in this popular post on SO: http://stackoverflow.com/questions/708012/android-how-to-declare-global-variables Oh, I understood that completely. Again, your statement that this seems to be the 'normal' thing to do is highly debatable. It's not that you *can't* do it, it's that you don't gain a lot while losing some amount of flexibility. In truth, the flexibility tends to be more of an issue with library projects than normal app projects. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/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] Activity calling is missing
Please look at this link and provide solution. http://stackoverflow.com/questions/9588740/activity-calling-is-missing -- Regards Kumar Raja M.Tech(SIT) IIT Kharagpur, 10it60...@iitkgp.ac.in -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] using custom views in xml layouts
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/LabelView.html http://developer.android.com/resources/samples/ApiDemos/res/layout/custom_view_1.html The first link is a sample of a custom class and the second is a sample of how to use that custom class in XML. The question I asked in your other (almost duplicate) post still stands though... Are you SURE that the CustomView class is in the net.pocketmagic. customangletext package? Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Tue, Mar 6, 2012 at 4:01 AM, Todd Grigsby tgrigsby...@gmail.com wrote: Not specific enough. Have you stepped through this code in debug to see what line is giving you the problem? On Mar 6, 2012 1:07 AM, chowdary nani naveenneeli...@gmail.com wrote: Hi All, i am working with custom views using in xml layouts Following is my custom view code: public class CustomTextView extends View { private int m_nColor; private Typeface m_tTypeface; private int m_nSize; private int m_nRotationAngle, m_nRotationW, m_nRotationH; private String m_szText; public CustomTextView(Context context) { super(context); // set default parameters Log.d(dghgfhf, dfghgfh); m_nColor = Color.WHITE; m_nSize = 14; m_nRotationAngle = 0; m_nRotationW = 0; m_nRotationH = 0; m_tTypeface = Typeface.create(arial, Typeface.NORMAL); } public CustomTextView(Context context, AttributeSet attrs) { super(context, attrs); } public void SetColor(int newcolor) { m_nColor = newcolor; this.invalidate(); } public void SetTextSize(int newsize) { m_nSize = newsize; this.invalidate(); } // style: normal-0,bold-1,italic-2,bold-italic-3, public void SetFont(String newfontface, int style) { m_tTypeface = Typeface.create(newfontface, style); this.invalidate(); } public void SetRotation(int newangle, int neww, int newh) { m_nRotationAngle = newangle; m_nRotationW = neww; m_nRotationH = newh; this.invalidate(); } public void SetText(String newtext) { m_szText = newtext; this.invalidate(); } @Override protected void onDraw(Canvas canvas) { super.onDraw(canvas); Paint paint = new Paint(); paint.setTypeface(m_tTypeface); paint.setStyle(Paint.Style.FILL); paint.setColor(m_nColor); // paint.setShadowLayer(1, 0, 1, Color.parseColor(#00)); paint.setTextSize(m_nSize); canvas.rotate(m_nRotationAngle, m_nRotationW, m_nRotationH); canvas.drawText(m_szText, 0, 0, paint); } } Following is my layout: ?xml version=1.0 encoding=utf-8? LinearLayout xmlns:android=http://schemas.android.com/apk/res/android; xmlns:GUI= http://schemas.android.com/apk/res/net.pocketmagic.customangletext; android:layout_width=fill_parent android:layout_height=fill_parent android:orientation=vertical view android:id=@+id/yourID android:layout_width=wrap_content android:layout_height=wrap_content android:layout_margin=10dp class=net.pocketmagic.customangletext.CustomTextView / /LinearLayout i am getting null pointer exception i am unable find where i am going wrong please help me Thanks Naveen. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Using setContentView(viewList) in current Activity
setContentView() should be called in onCreate()... Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Mon, Mar 5, 2012 at 10:38 PM, Temp Test temptes...@gmail.com wrote: Hi Shani, From the exception it looks like you are trying to set the same list view object more than once. Verify when it happens. may be in onresume when you come back. On Tue, Mar 6, 2012 at 10:50 AM, moktarul anam mokta...@gmail.com wrote: Hi Shani, its not clear. In setContentview u can add only layout name. setContentView(R.layout.main); moktarul On Thursday, 1 March 2012 22:46:51 UTC+5:30, Shani wrote: Hi, i'm new to android and trying to dispatch a ViewList from a current Activity. (Android 2.2) . I'm getting this exception java.lang.**IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first. e.g. Like the search contacts dispatch a new window with the multiple possibilities and then go back to the 1'st Activity Does anyone know how you do it ? Appreciate quick response. Shani -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Please comment on my app's design...
On Tuesday, March 6, 2012 1:50:42 PM UTC-5, Mark Murphy (a Commons Guy) wrote: Oh, I understood that completely. Again, your statement that this seems to be the 'normal' thing to do is highly debatable. It's not that you *can't* do it, it's that you don't gain a lot while losing some amount of flexibility. In truth, the flexibility tends to be more of an issue with library projects than normal app projects. I assume you mean this (losing some amount of flexibility) in comparison to putting that logic into the service. Tom -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/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: How many people are using ActionBarSherlock?
I use it. It's great - thanks Jake. Nick On Mar 6, 11:40 am, Jake Wharton jakewhar...@gmail.com wrote: From my estimation there are *at least* 100-250 small applications published to Market that are using it. Of course, I only know about the ones people tell me about and can estimate from things like the activity on the Google group. There are a couple of (arguably) big names that also use it with multi-million install user bases such a FriendCaster and FolderOrganizer which have been using it for a while. GitHub recently started releasing Android applications and they have chosen to use it. I'm also aware of a few upcoming applications from seriously big companies that will be using the forthcoming version 4.0. On Sunday, March 4, 2012 8:13:05 PM UTC-8, Mark Phillips wrote: I am curious as to how many folks on the list are using ActionBarSherlock versus rolling their own or some other library for pre 3.0 applications? Thanks, Mark -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Google Map Marker Overalys - Beginner
Hi All, I followed the steps mentioned in the link below. http://developer.android.com/resources/tutorials/views/hello-mapview.html At the end I am getting Force Close error :( can anyone share steps for the basic marker creation ? -- Regards, Krishna Kumaar N.I. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Please comment on my app's design...
On Tue, Mar 6, 2012 at 2:01 PM, Tom t...@malcolmson.ca wrote: On Tuesday, March 6, 2012 1:50:42 PM UTC-5, Mark Murphy (a Commons Guy) wrote: Oh, I understood that completely. Again, your statement that this seems to be the 'normal' thing to do is highly debatable. It's not that you *can't* do it, it's that you don't gain a lot while losing some amount of flexibility. In truth, the flexibility tends to be more of an issue with library projects than normal app projects. I assume you mean this (losing some amount of flexibility) in comparison to putting that logic into the service. Actually, at that point in the reply, I meant in comparison to a simple singleton: A custom Application is frequently indistinguishable from a simple singleton, and there can only be one Application class. All else being equal, given a choice between there can only be one and you can have as many as you need, choose the latter, because there may be some reason later on where you have no choice but to employ the there can only be one solution for some other problem. At the end of the day, an Application or a singleton is simply a hunk of heap space. A service has a bit of magic: it waves a flag in front of Android, saying Yoo, hoo! Mr. OS! We're doing something here, and we'd prefer it if you didn't nuke our process! M'kay?. That flag-waving works for a bit, though not indefinitely. Random hunks of heap space wave no such flags. Hence, if you have a process you would like to have hang around for a few minutes, you need a service in there someplace. And, of course, both an Application *and* a singleton suffer from the same problem: they are prone to causing memory leaks, which could eventually lead to an OutOfMemoryError, if you run out of heap space. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/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
Re: [android-developers] Google Map Marker Overalys - Beginner
On Tue, Mar 6, 2012 at 2:09 PM, Krishna Kumaar Natarajan nikrish...@gmail.com wrote: I followed the steps mentioned in the link below. http://developer.android.com/resources/tutorials/views/hello-mapview.html At the end I am getting Force Close error :( Use adb logcat, DDMS, or the LogCat view in Eclipse to examine LogCat and look at the stack trace associated with your error. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/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
Re: [android-developers] Please comment on my app's design...
Yikes, I'm quite surprised to see that my Google e-mail (which is my personal e-mail) gets published when someone hits reply to my post. Doesn't look like there is any way around this (other then switching to a different google account). Also, I just searched for Google Groups Help Groups to get some advice on this and found that those have all been shut down. I'm rather puzzled by both of these moves - hope Groups isn't one of the services that Google plans to shut down. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Android Http
Learn a little PHP and use the start_session() functionality On Tue, Mar 6, 2012 at 10:35 PM, lycoris zgh...@gmail.com wrote: everyone, i use the http to download the html file,and then use the loadDataWithBaseURL,which is a method of Webview, to open the html file. but i have met a problem,that is: i can login successfully, but when access another page int the same way, it download the login page. how can i maintain the session? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Android permission denial when installed in wrong order
Mark, I figured this was the case but wasn't sure if there was a nice workaround for it. I'll probably end up just specifying the install order for now and try some of your suggestions later. Thanks again for the response, Jason Prenger On Tuesday, March 6, 2012 11:26:27 AM UTC-7, Mark Murphy (a Commons Guy) wrote: On Tue, Mar 6, 2012 at 1:20 PM, Jason Prenger jasonmpren...@gmail.com wrote: I have two apps, one contains an exported provider that the second app uses to look up values. I recently decided it'd be a good idea to add read and write permissions to the provider, but now I've run into an issue. If I install the app reading from the provider first it'll crash with a permission denial. If I install the provider first, everything works fine. Yup, this is a known limitation of custom preferences. While specifying and order for install isn't the worst thing ever I'm wondering if there is a workaround for this Somebody recently mentioned having the same permission element in both apps, though I haven't tried it and I forget if that was a solution or a failed solution. :-) If that works, to keep things a teensy bit more DRY, you could have an Android library project for your string resources for the permission. While I haven't created a resource-only library project, in principle it should work. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/android/ On Tuesday, March 6, 2012 11:26:27 AM UTC-7, Mark Murphy (a Commons Guy) wrote: On Tue, Mar 6, 2012 at 1:20 PM, Jason Prenger jasonmpren...@gmail.com wrote: I have two apps, one contains an exported provider that the second app uses to look up values. I recently decided it'd be a good idea to add read and write permissions to the provider, but now I've run into an issue. If I install the app reading from the provider first it'll crash with a permission denial. If I install the provider first, everything works fine. Yup, this is a known limitation of custom preferences. While specifying and order for install isn't the worst thing ever I'm wondering if there is a workaround for this Somebody recently mentioned having the same permission element in both apps, though I haven't tried it and I forget if that was a solution or a failed solution. :-) If that works, to keep things a teensy bit more DRY, you could have an Android library project for your string resources for the permission. While I haven't created a resource-only library project, in principle it should work. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/android/ On Tuesday, March 6, 2012 11:26:27 AM UTC-7, Mark Murphy (a Commons Guy) wrote: On Tue, Mar 6, 2012 at 1:20 PM, Jason Prenger jasonmpren...@gmail.com wrote: I have two apps, one contains an exported provider that the second app uses to look up values. I recently decided it'd be a good idea to add read and write permissions to the provider, but now I've run into an issue. If I install the app reading from the provider first it'll crash with a permission denial. If I install the provider first, everything works fine. Yup, this is a known limitation of custom preferences. While specifying and order for install isn't the worst thing ever I'm wondering if there is a workaround for this Somebody recently mentioned having the same permission element in both apps, though I haven't tried it and I forget if that was a solution or a failed solution. :-) If that works, to keep things a teensy bit more DRY, you could have an Android library project for your string resources for the permission. While I haven't created a resource-only library project, in principle it should work. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/android/ On Tuesday, March 6, 2012 11:26:27 AM UTC-7, Mark Murphy (a Commons Guy) wrote: On Tue, Mar 6, 2012 at 1:20 PM, Jason Prenger jasonmpren...@gmail.com wrote: I have two apps, one contains an exported provider that the second app uses to look up values. I recently decided it'd be a good idea to add read and write permissions to the provider, but now I've run into an issue. If I install the app reading from the provider first it'll crash with a permission denial. If I install the provider first, everything works fine. Yup, this is a known limitation of custom preferences. While specifying and order for install isn't the worst thing ever I'm wondering if there is a workaround for this Somebody recently
[android-developers] How to get all sms messages on phone
Hi, I need to show all the messages on a phone in a listView. But I don't know where to start from. SmsManager class does not have anything like that. Any guidance please. A few keywords, to look for in the api, would be nice. Hope to hear from you soon. Regards, Farhan -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Can I get a Global Service in android?
You are not going to fully get what you want... If each developer includes it in their apk files then they will run as part of that process. What you have to do to get the effect you want is to distribute your service as a completely separate app. Create providers (if necessary) and publish intents so that developers know how to target your app with an intent... This would allow them to use your service. Of course, the downside is that the developers would have to check that your app exists on the device, and if it does not, provide a link to download your app from the market so they can install it. Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Wed, Feb 29, 2012 at 11:29 PM, simon.zhu@hotmail.com simon.zhu@hotmail.com wrote: These days I get a task. I need to do a plugin jar insert into other apps. In this jar, I design a download service to run download task. I soon find that if two different apps include my jar, then there would be two different service run in the two different app-process.(one app- process match one service as a pair, and there are two pairs) This is not I want, I just want a common service run in background and the two apps can share it. That is, I want to know if I can get a global service run in background, and applications that include my plugin jar can start that service and run download task. Is there any solution to my design? or how can I optimize my design. 3ks~ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Move horizontalscrollView of Android from left to right
You are only displaying one image at a time? If so, why are you using a HorizontalScrollView instead of a ViewFlipper? Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Fri, Mar 2, 2012 at 3:13 AM, Deepika NS nsd...@gmail.com wrote: I'm using horizontalscrollView along with the animation to move set of images as a slideshow. I'm able to move the images from right to left using the following code : public void getScrollMaxAmount(){ int actualWidth = (horizontalOuterLayout.getMeasuredWidth()-512); //int actualWidth = (horizontalOuterLayout.getScrollX()-512); scrollMax = actualWidth; } public void startAutoScrolling(){ if (scrollTimer == null) { scrollTimer = new Timer(); final Runnable Timer_Tick = new Runnable() { public void run() { moveScrollView(); } }; if(scrollerSchedule != null){ scrollerSchedule.cancel(); scrollerSchedule = null; } scrollerSchedule = new TimerTask(){ @Override public void run(){ runOnUiThread(Timer_Tick); } }; scrollTimer.schedule(scrollerSchedule, 30, 30); } } public void moveScrollView(){ //scrollPos = (int) (horizontalScrollview.getScrollX() + 1.0); scrollPos = (int) (horizontalOuterLayout.getMeasuredWidth() - 1.0); if(scrollPos = scrollMax){ scrollPos = 0; } /*if(scrollPos = scrollMax){ scrollPos = 0; }*/ horizontalScrollview.scrollTo(scrollPos, 0); //horizontalScrollview.scrollTo(0,scrollPos); } I now want to move the images from right to left as a slideshow. I'm unable to find the right formula/logic. Kindly assist me. :( -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Get a Code
http://catb.org/esr/faqs/smart-questions.html Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Sun, Mar 4, 2012 at 10:05 AM, Siddharth Chopra siddharth5...@gmail.comwrote: hii, get a code that to draw circle with ontouchlistener and it should increase its size on MotionEvent.Action_Move and finally circle should get display on MotionEvent.Action_Up on the canvas by clicking on Menu which is having text as Draw Circle that will open menu item in android to draw circle on the canvas. Regards, Siddharth Chopra -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Problem with SAX parser on large XML files?
I have been debugging this for a while now, and I can only reproduce it when I run in the Android environment (emulator or device), but not reproducible in plain old java. The behavior is that I am just PART of a fragment instead of the entire element. For example Longitude-71.41000482232/Longitude What I actually get is just 1000482232. My characters function is the basic: public void characters(char[] ch, int start, int length) throws SAXException { tempVal = new String(ch,start,length); } No errors or exceptions or warning or anything... It is as if it is doing buffering since it appear to give me fragments after parsing some 2-4k lines of XML. Any ideas?? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Subversion plug-in
Does anyone know what Subversion plug-in most Android developers use for Eclipse? I'm looking for something with minimal hassle. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] Please comment on my app's design...
On Tuesday, March 6, 2012 2:10:46 PM UTC-5, Mark Murphy (a Commons Guy) wrote: On Tue, Mar 6, 2012 at 2:01 PM, Tom On Tuesday, March 6, 2012 1:50:42 PM UTC-5, Mark Murphy (a Commons Guy) wrote: Oh, I understood that completely. Again, your statement that this seems to be the 'normal' thing to do is highly debatable. It's not that you *can't* do it, it's that you don't gain a lot while losing some amount of flexibility. In truth, the flexibility tends to be more of an issue with library projects than normal app projects. I assume you mean this (losing some amount of flexibility) in comparison to putting that logic into the service. Actually, at that point in the reply, I meant in comparison to a simple singleton: A custom Application is frequently indistinguishable from a simple singleton, and there can only be one Application class. All else being equal, given a choice between there can only be one and you can have as many as you need, choose the latter, because there may be some reason later on where you have no choice but to employ the there can only be one solution for some other problem. At the end of the day, an Application or a singleton is simply a hunk of heap space. A service has a bit of magic: it waves a flag in front of Android, saying Yoo, hoo! Mr. OS! We're doing something here, and we'd prefer it if you didn't nuke our process! M'kay?. That flag-waving works for a bit, though not indefinitely. Random hunks of heap space wave no such flags. Hence, if you have a process you would like to have hang around for a few minutes, you need a service in there someplace. And, of course, both an Application *and* a singleton suffer from the same problem: they are prone to causing memory leaks, which could eventually lead to an OutOfMemoryError, if you run out of heap space. Okay, I think I will use a singleton, which will be managed by the service. The service itself will be minimal - in case I introduce the option for it to be running all the time - but will instantiate the singleton as necessary. The app and the appWidget will communicate with the service via intents and bindings. Thanks again, Tom -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/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: Problem with SAX parser on large XML files?
SAX parsers, such as you appear to be using, do not guarantee to give all the character data for a given element in a single callback to 'characters()'. Your logic that assumes otherwise is fatally flawed. You're not guaranteed to have processed the whole element until 'endElement()', of course. -- Lew On Tuesday, March 6, 2012 1:09:57 PM UTC-8, RedBullet wrote: I have been debugging this for a while now, and I can only reproduce it when I run in the Android environment (emulator or device), but not reproducible in plain old java. The behavior is that I am just PART of a fragment instead of the entire element. For example Longitude-71.41000482232/Longitude What I actually get is just 1000482232. My characters function is the basic: public void characters(char[] ch, int start, int length) throws SAXException { tempVal = new String(ch,start,length); } No errors or exceptions or warning or anything... It is as if it is doing buffering since it appear to give me fragments after parsing some 2-4k lines of XML. Any ideas?? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Problem with SAX parser on large XML files?
I am talking about what I see when endELement event occurs. I end up with tempVal containing a partial element. Is there some example I can see that does a proper job? Virtually every example I have seen seems to be making the same assumption I am... On Tuesday, March 6, 2012 4:20:10 PM UTC-5, Lew wrote: SAX parsers, such as you appear to be using, do not guarantee to give all the character data for a given element in a single callback to 'characters()'. Your logic that assumes otherwise is fatally flawed. You're not guaranteed to have processed the whole element until 'endElement()', of course. -- Lew On Tuesday, March 6, 2012 1:09:57 PM UTC-8, RedBullet wrote: I have been debugging this for a while now, and I can only reproduce it when I run in the Android environment (emulator or device), but not reproducible in plain old java. The behavior is that I am just PART of a fragment instead of the entire element. For example Longitude-71.41000482232/Longitude What I actually get is just 1000482232. My characters function is the basic: public void characters(char[] ch, int start, int length) throws SAXException { tempVal = new String(ch,start,length); } No errors or exceptions or warning or anything... It is as if it is doing buffering since it appear to give me fragments after parsing some 2-4k lines of XML. Any ideas?? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Subversion plug-in
subclipse On Tuesday, March 6, 2012 4:15:18 PM UTC-5, bob wrote: Does anyone know what Subversion plug-in most Android developers use for Eclipse? I'm looking for something with minimal hassle. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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] glesv2debugger
Hi, Can you anyone tried to setup glesv2debugger in ICS? I have issues when try to build as Eclipse pulgin Regards, Chandra -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, 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: SD card database
yes. but not everything that is possible is also desirable. On Tuesday, March 6, 2012 1:39:30 PM UTC-5, bob wrote: Is it possible to use SQLiteOpenHelper to create a database on the SD card? -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Problem with SAX parser on large XML files?
On Tue, Mar 6, 2012 at 4:52 PM, RedBullet scottedchap...@gmail.com wrote: I am talking about what I see when endELement event occurs. I end up with tempVal containing a partial element. Correct. That is because your implementation is buggy. You may be called with characters() several times for an element's text node(s), and you are only holding onto the last value. Use StringBuilder or something to concatenate your results. Is there some example I can see that does a proper job? Virtually every example I have seen seems to be making the same assumption I am... http://stackoverflow.com/questions/4567636/java-sax-parser-split-calls-to-characters http://stackoverflow.com/questions/4511955/sax-parser-issue http://stackoverflow.com/questions/3201918/sax-parsing-in-android http://stackoverflow.com/questions/8635414/sax-parser-returns-first-character-of-the-title -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/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