Re: [android-developers] Re: USB Extension Cables Breaks USB Driver/ADB Composite Device

2012-08-30 Thread Ralph Brickley
I think you nailed it. I bought a nice powered hub and had the same
problem. The hub does get me closer but still had to use stock cable.

I have a nice Scoshe USB 6' cable but obviously it's not nice enough
On Aug 29, 2012 4:48 PM, Lew lewbl...@gmail.com wrote:

 Not all USB cables are equal. Make sure your extender cable is at least
 USB-2 and is of good quality.

 I use an extender cable on my home system and I've successfully connected
 four
 different Android phones and a Motorola tablet to my computer through it.

 I've also used various flavors of extenders, e.g., through my computer
 monitor, at
 various job sites and had no difficulty connecting Android devices to the
 computer.

 So the problem is with your cable or other situation unique to you.

 --
 Lew

 On Wednesday, August 29, 2012 4:05:35 PM UTC-7, TopSoft wrote:

 Thanks for the insights. I'll try a powered USB hub and see if that
 helps.

 On Wednesday, August 29, 2012 2:40:09 PM UTC-7, bob wrote:

 Maybe buy a longer microUSB cable?



 On Wednesday, August 29, 2012 1:18:12 PM UTC-5, TopSoft wrote:

 Hello

 I'm getting into Android development - coming along well. I have a
 single problem at this point - any USB extension cable I use causes my
 machine not to recognize my devices. Namely a Samsung Galaxy Tab 10.1 Wi-Fi
 or my Samsung Galaxy SII phone. If I plug in directly with samsungs
 pathetically short cable it works. Any USB extender I use causes it to
 either show as an unknown device or it doesn't show at all.

 I have updated the USB drivers to the latest from Samsung and Google.
 Any ideas from other developers? If I use stock cable I can hardly use my
 device for testing.

 Thanks for any tips  tricks.

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

2012-08-30 Thread Arpit parikh


Guys,
Is it possible to connect JDBC connectivity through android emulator?I have 
been tried a lot but could get success.
I have been tried following code :
package com.da;

import java.sql.*;

import android.app.Activity;
import android.os.Bundle;

import android.widget.TextView;

public class DatabaseActivity extends Activity {

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
TextView tv = new TextView(this);
tv.setText(\”orcale Connect Example.\”);
setContentView(tv);

try {

Class.forName(\”com.mysql.jdbc.Driver\”);
Connection con =(Connection) 
DriverManager.getConnection(\”jdbc:mysql://127.0.0.1:3306/co\”, \”root\”, 
\”arpit\”);
Statement st=(Statement) con.createStatement();
st.executeUpdate(\”insert into new_table values(3,5);\”);
tv.setText(\”Connected to the database \”);
} catch (Exception e) {
tv.setText(\”NOT CONNECTED\”);
}
}

}

But it goes into exception every time.Please help me  guide me for this 
issue…!!!

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

[android-developers] how to show the database(ListView) from another activity

2012-08-30 Thread MY Anggara
hi guys, i'm just a newbie in android world.
i got a problem about to show my database as a ListView from another 
activity.

1. i have ActivityA that i use to insert a value.
and in this activity i use to send data to ActivityB.

2. i have ActivityB as a ListView that show a database of input data from 
ActivityB

but i have a problem how to show the database in ListView.
i'll attach the code, and i hope there's/re help for me.
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//this is ActivityA
package com.anggara.latih_howmuch2;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
 
public class add_income extends Activity {
// Initializing variables
EditText inputAmount;
EditText inputDesc;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
 
inputAmount = (EditText) findViewById(R.id.amount);
inputDesc = (EditText) findViewById(R.id.desc);
Button btnAddIncome = (Button) findViewById(R.id.btnAddIncome);
 
//Listening to button event
btnAddIncome.setOnClickListener(new View.OnClickListener() {
 
public void onClick(View arg0) {
//Starting a new Intent
Intent addIncome = new Intent(getApplicationContext(), 
CashScreen.class);
 
//Sending data to another Activity
addIncome.putExtra(amount, inputAmount.getText().toString());
addIncome.putExtra(desc, inputDesc.getText().toString());
 
Log.e(n, inputAmount.getText()+.+ inputDesc.getText());
 
startActivity(addIncome);
 
}
});
}
}//this is ActivityB
package com.anggara.latih_howmuch2;

import android.app.Activity;
import android.content.Intent;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListAdapter;
import android.widget.ListView;
import android.widget.AdapterView.OnItemClickListener;
import android.widget.SimpleCursorAdapter;

public class CashScreen extends Activity {
mySqlHelper dbHelper;
private EditText ed_amount;
private EditText ed_desc;
protected Cursor cursor;
protected ListAdapter adapter;
protected ListView numberList;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.screen2);

//TextView txtAmount = (TextView) findViewById(R.id.txtAmount);
//TextView txtDesc = (TextView) findViewById(R.id.txtDesc);
Button btnClose = (Button) findViewById(R.id.btnClose);

Intent i = getIntent();
// Receiving the Data
String amount = i.getStringExtra(amount);
String desc = i.getStringExtra(desc);
Log.e(Second Screen, amount + . + desc);

//this.ed_amount = (EditText) this.findViewById(R.id.amount);
  //  this.ed_desc = (EditText) this.findViewById(R.id.desc);
this.numberList = (ListView) this.findViewById(R.id.ListView01);
dbHelper = new mySqlHelper(this);
numberList.setSelected(true);
numberList.setOnItemClickListener(new OnItemClickListener()
{
public void onItemClick(AdapterView? arg0, View arg1, int 
arg2, long arg3) {
SQLiteDatabase db = dbHelper.getReadableDatabase();
cursor = db.rawQuery(SELECT * FROM data, null);
cursor.moveToPosition(arg2);
amount.setText(cursor.getString(1));
desc.setText(cursor.getString(2));
int id = cursor.getInt(0);
}});
view();
btnClose.setOnClickListener(new View.OnClickListener() {
 
public void onClick(View arg0) {
//Closing SecondScreen Activity
finish();
}
});
}
private void addData(String amount, String desc){
SQLiteDatabase db = dbHelper.getWritableDatabase();
try{db.execSQL(insert into + mySqlHelper.TABLE + values(null, 
'+amount+','+desc+'));
}
catch(Exception e)

[android-developers] Locking Android O.S. on Tablet

2012-08-30 Thread Ayse Karahasan
I have a question.

We developed an android application for its working on Tablet.
The user could not use any other application and services on the Tablet 
than this application.

I need lock all Android O.S. spesifications plus bottom navigations etc.

Any application or solution ?

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

2012-08-30 Thread Ana
Hi all,
 i want to develop one app using web services.but i am stuck on How to 
get api's of any entity.
For simplicity i will briefly explain my idea .suppose i want to tell user 
that ,which is the nearest domino's pizza center for you using location.but 
problem is how to get domino's center in any city.


I had a very raw idea.do know how to get response to guid user.


Please Do help
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] ActionBar on 2.3 API

2012-08-30 Thread Copa
Hi,

I'm developing an app to 2.3 API level, and I want to implement an 
ActionBar (with dropdown list) on it, like is present on patterns for 
Android 4.0. But this is just possible on API =4.0. It is possible create 
this ActionBar in an application with API 2.3 using some library for that 
or something like that? For this new app, I want cover all of the patterns 
established for new app's.

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

[android-developers] Android NDK superuser permissions

2012-08-30 Thread Alvin Schurman
Can someone tell me how to run a native c program on the android as root?
 Giving the java wrapper superuser permissions seems to still result in a
permission denied error in the c program.

Thanks,
A

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

[android-developers] Database of Android Games/Apps

2012-08-30 Thread Corey Eadie
I was wondering if anyone knows of a way to download and maintain a 
database of Android games and apps.  Does Google offer any sort of API's to 
access the information similar to what Apple offers with their App Store? 
 If not, does anyone know of any services that would be able to provide a 
list like that?

Thank you in advance for any help anyone can provide.

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

[android-developers] Re: Google analytics crash

2012-08-30 Thread David Bradley
I hit the same exception. From reading about SQLite it appears to be 
creating separate database connections from two different threads can lead 
to this. I'm not sure if that's the case, but from the previous poster 
talking about posting the events at a later time I could see that might be.

While catching the exception at least prevents the app from crashing, it 
means that some small percentage of events may go unreported which is not 
all that great either.

Unfortunately I think the fix probably has to be done within the Google 
Analystics sdk itself.

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

2012-08-30 Thread Nitin choudhary
Thanks, its help me a lot.

Nitin Choudhary

On Monday, April 2, 2012 9:24:47 PM UTC+5:30, Perry168 wrote:

 hi, 

 I used following method to create a canvas. 

 temp = Bitmap.createBitmap(thisWidth, thisHeight, Config.ARGB_); 
 Canvas thisCanvas = new Canvas(temp); 

 I don't know why the canvas has a black background. How to create a 
 Transparent background for use? 

 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] Positive reviews being sold in spam email

2012-08-30 Thread Rich Woods
Hello Android developer community,

I've just received an email from a company that I won't name here that is 
offering 
positive Play store reviews for sale.  This service perverts the review 
system on the Play store and I'd like to report the business to Google. 
 What would be the best way to report this?

Rich Woods
Exobyte games

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Uploading large size files to server using HttpUrlConnection in Android

2012-08-30 Thread Raj
Hi:

If we use HttpUrlConnection for uploading large MB files (20 MB) with PUT 
method, getting out of memory error. We have used the method 
setFixedLengthOnStream() to over come from Out of Memory error. However the 
response from server is coming as 411 (CONTENT_LENGTH NOT FOUND), though we 
have explicitly set this

If we use POST, we need server side script (PHP) to handle this which we 
are trying to avoid

Regards
Raj

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

2012-08-30 Thread Wei Hao
I installed win8 yesterday, and of course I setup android sdk immediately. 
But it cannot run. After double-click it SDK.exe or AVD.exe, it activates a 
cmd window and disappear right away. That is all. it was not running.T_T . 
who knows how to solve this issue?

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

[android-developers] Insert an Image from the gallery on a button in Android

2012-08-30 Thread noobDevv


Im trying to do this:

protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);

if (requestCode == 1  resultCode == RESULT_OK  null != data) {
Uri selectedImage = data.getData();
String[] filePathColumn = { MediaStore.Images.Media.DATA };

Cursor cursor = getContentResolver().query(selectedImage,
filePathColumn, null, null, null);
cursor.moveToFirst();

int columnIndex = cursor.getColumnIndex(filePathColumn[0]);
String picturePath = cursor.getString(columnIndex);
cursor.close();
Bitmap bmp = BitmapFactory.decodeFile(picturePath);
b[1].setCompoundDrawablesWithIntrinsicBounds(null, new 
BitmapDrawable(bmp), null, null);
}

But it wont set the image, no matter what. I have tried several different 
methods too, like using an imagebutton instead of a button and using:

imageButton.setImageBitmap(bmp)

The gallery opens fine and and the callback comes to onActivityResult(...) 
but the image wont appear on the button, I have an array of buttons.

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

[android-developers] How to support vietnamese language when upload android app

2012-08-30 Thread thegioisach
I'm vietnamese
I'm using vietnamese in app. When i upload my app to google play, i don't 
see vietnamese in list of language. So how can i upload my app with 
vietnamese.
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] Concurrent 3G and WiFi : Socket creation problem

2012-08-30 Thread glex
I am aware that concurrent usage of WiFi and 3G/4G is not supported on 
Android devices right now. I am working on a research project which tries 
to analyse the pros and cons for the same.

I used the approach used by Android WiFi tether to reload the WiFi driver 
and configure the routing table and appropriate interfaces. I summarized my 
work in the 
followinglinkhttps://sites.google.com/site/lotuseaterarpit/news/3g4gwififorandroidconcurrently.
 
I tested my setup using the *ping -I eth0/rmnet0 web server. * Till 
this phase everything is running smoothly. 

As a next step I tried to establish a socket connection using the two 
interfaces. Everything works fine as I use 3G interface, but when I try 
using the WiFi (eth0), socket connection is not successful. Though I can 
see that bind operation is successful. 

The code I used for this socket establishment is:

*NetworkInterface nif = NetworkInterface.getByName(eth0);*
* Log.d(TAG,Interface detected S);*
* EnumerationInetAddress nifAddresses = nif.getInetAddresses();*
* Log.d(TAG,Interface IP Address Retrieved S: );*
* Socket socket = new Socket();*
* try{*
* socket.bind(new InetSocketAddress(nifAddresses.nextElement(),1027));*
* Log.d(TAG,Socket Bind S);*
* socket.connect(new 
InetSocketAddress(InetAddress.getByName(152.14.93.160),80));*
* Log.d(TAG,Socket Creation Success);*
* socket.close();*
* Log.d(TAG,Socket Closed S);*
* } catch (Exception e1){*
* socket.close();*
* Log.d(TAG,Socket Bind Error);*
* e1.printStackTrace();*
* }*
* *
* *
* } catch (Exception e1) {*
* *
* // TODO Auto-generated catch block*
* Log.d(TAG,Socket Creation Error);*
* e1.printStackTrace();*
* }*
*
*
*
*
Also from the logcat the exception I see for the same is:

*W/System.err(10996): java.net.SocketTimeoutException: Connection timed out*
*W/System.err(10996):  at 
org.apache.harmony.luni.platform.OSNetworkSystem.connect(Native Method)*
*W/System.err(10996):  at 
dalvik.system.BlockGuard$WrappedNetworkSystem.connect(BlockGuard.java:357)*
*W/System.err(10996):  at 
org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:207)
*
*W/System.err(10996):  at 
org.apache.harmony.luni.net.PlainSocketImpl.connect(PlainSocketImpl.java:440)
*
*W/System.err(10996):  at java.net.Socket.connect(Socket.java:1013)*
*W/System.err(10996):  at java.net.Socket.connect(Socket.java:956)*
*W/System.err(10996):  at 
com.example.pdwn.TService.onCreate(TService.java:98)*
*W/System.err(10996):  at 
android.app.ActivityThread.handleCreateService(ActivityThread.java:2223)*
*W/System.err(10996):  at 
android.app.ActivityThread.access$2500(ActivityThread.java:132)*
*W/System.err(10996):  at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1102)*
*W/System.err(10996):  at 
android.os.Handler.dispatchMessage(Handler.java:99)*
*W/System.err(10996):  at android.os.Looper.loop(Looper.java:150)*
*W/System.err(10996):  at 
android.app.ActivityThread.main(ActivityThread.java:4293)*
*W/System.err(10996):  at java.lang.reflect.Method.invokeNative(Native 
Method)*
*W/System.err(10996):  at java.lang.reflect.Method.invoke(Method.java:507)*
*W/System.err(10996):  at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:849)
*
*W/System.err(10996):  at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:607)*
*W/System.err(10996):  at dalvik.system.NativeStart.main(Native Method)*

 I am not sure why, the connect function is timing out. Specially given 
that ping operation is successful. Any help will be greatly appreciated.

Thanks,
Arpit.

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

2012-08-30 Thread Chandra Sekhar Nayak
I hope the below link will help you.

http://androidattop.blogspot.com/

On Tuesday, 15 September 2009 12:11:35 UTC+5:30, chan wrote:

 can you give some sample codes for merge several images into a one 
 single image.. 
 Thank you 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] Android 4.1.1 errors

2012-08-30 Thread Mihai
Hi, i have google nexus s and one month ago the system update available 
pops up to upgrade my icecraem sandwich to jelly bean. First i was so 
enthusiastic 
because whats new its better BUT it wasnt. Since then my phone is so slow 
and it barely respond to some commands for the first time...even more, when 
i am speaking on the phone after 1 or 2 minutes the system will reboot and 
its very annoyng because i cant have a decent conversation. 
Is there any app wich can show me a crash report to see why my system 
reboots? maybe its the battery
Can i downgrade to icecream sandwich again? without deleting any apps or 
pics or contacts? (without fabric restore)
Is there any updates to fix this problems or if there will be ones?
 
Thank you,
Mihai

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

2012-08-30 Thread Mun won Choi
Hi All.

I want to add virtual device on emulator. so I have built SDK on platform 
source.
And I am searching about goldfish in googling
But I don't know how to approach it.

Please help me anyone, anything.

Thanks,
MW

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

2012-08-30 Thread Girafe
Hi Everybody!

I have a little (or big?) problem. I would like to develop application on 
Samsung Galaxy Mini 2. But the ADB driver isn't work. My Op system is 
Windows Xp.

Eclipse and Emulator and anything else are running fine, so The only 
problem with ADB driver.

Which ADB driver can be proper for this phone?

Thank your helping.

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

2012-08-30 Thread Stephen Shaw
On Wed, Aug 29, 2012 at 9:47 AM, TreKing treking...@gmail.com wrote:
 On Wed, Aug 29, 2012 at 3:00 AM, Filipe filipe.ma...@gmail.com wrote:

 I would really prefer to access the MyActivityB class public variables.


 If you explain why you want to do things this way, someone can probably
 suggest a better alternative.


I'd say generally speaking, if what you are trying to do seems like
its being forced you are probably doing it wrong.  Usually there is a
much better approach that should be taken.

Cheers,
Stephen Shaw

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 get event by broadcast receiver when application installed first time?

2012-08-30 Thread assaf passal

On Thursday, June 16, 2011 9:04:39 AM UTC+3, Hitendrasinh Gohil wrote:

 Hi, 

 I m just trying to get event through broadcast receiver when 
 application installed firsttime. 

 Here is my broadcastreceiver class. 
 public class LaunchReceiver extends BroadcastReceiver 
 { 
 public static final String TAG=LaunchReceiver; 

 @Override 
 public void onReceive(Context context, Intent intent) 
 { 
 Log.i(TAG,..OnReceive.); 
  
 if(intent.getAction().equals(android.intent.action.PACKAGE_INSTALL)) 
 { 
 
 Log.i(TAG,..OnReceive.); 

 } 
 } 

 } 

 Here is my manifest. 
 ?xml version=1.0 encoding=utf-8? 
 manifest xmlns:android=http://schemas.android.com/apk/res/android; 
   package=com.android.back 
   android:versionCode=1 
   android:versionName=1.0 
 application android:icon=@drawable/icon android:label=@string/ 
 app_name 
 service android:name=BackgroundService 
 android:enabled=true/ 
 service 
 receiver android:name=.LaunchReceiver 
 intent-filter 
 action android:name=android.intent.action.PACKAGE_INSTALL/ 
 action 
 action android:name=android.intent.action.CALL/action 
 action 
 android:name=android.intent.action.PACKAGE_ADDED/action 
 /intent-filter 
 /receiver 

 /application 
 uses-sdk android:minSdkVersion=4 / 

 /manifest 

 I m not getting broadcast on any events. 

 can anybody tell me what is the problem with this code? 


 Edit your manifest to add scheme
receiver android:name=.LaunchReceiver 
intent-filter 
action android:name=android.intent.action.PACKAGE_INSTALL/ 
action 
action android:name=android.intent.action.CALL/action 
action 
android:name=android.intent.action.PACKAGE_ADDED/action 

*data android:scheme=package /*
/intent-filter 
/receiver  
 

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

2012-08-30 Thread Raghav Sood
Use ActionBarSherlock.

Raghav Sood
Sent from my Nexus 7
On Aug 30, 2012 12:02 PM, Copa david.fortun...@present-technologies.com
wrote:

 Hi,

 I'm developing an app to 2.3 API level, and I want to implement an
 ActionBar (with dropdown list) on it, like is present on patterns for
 Android 4.0. But this is just possible on API =4.0. It is possible create
 this ActionBar in an application with API 2.3 using some library for that
 or something like that? For this new app, I want cover all of the patterns
 established for new app's.

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

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Not able to download Google play services in extras folder

2012-08-30 Thread Nikolay Elenkov
On Thu, Aug 30, 2012 at 2:53 PM, ANKUR GOEL ankur1...@gmail.com wrote:
 Hi all ,

 i just updated the extras folder with Google play services ..but it says not
 able to download folder .

 Can anybody help is something wrong with server .

The download URL return 404, so apparently it's not there yet.

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

2012-08-30 Thread Ali Chousein
Have you checked Google Places API? 
https://developers.google.com/places/documentation/

-
Ali Chousein
https://play.google.com/store/apps/details?id=com.apps.besocial
https://play.google.com/store/apps/details?id=com.apps.weather_buddy

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

2012-08-30 Thread Haris

Hai all I am trying with blue-tooth chat example for api-10, in my micromax 
pfhone..

When I scanning for devices it showing the list  for both secure and non 
secure.
But When I try to connect it showing unable to connect...

And UUID s are

private static final UUID MY_UUID_SECURE = 
UUID.fromString(fa87c0d0-afac-11de-8a39-0800200c9a66);
private static final UUID MY_UUID_INSECURE 
=UUID.fromString(8ce255c0-200a-11e0-ac64-0800200c9a66);

I tried 
thishttp://stackoverflow.com/questions/3397071/service-discovery-failed-exception-using-bluetooth-on-androidlink
 also...But no change.

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] how to show the database(ListView) from another activity

2012-08-30 Thread Jason Sesso
Did you bundle the data from A to send it to  B?

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

2012-08-30 Thread ravi saini
hii please send the complete code of action bar to me also

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

2012-08-30 Thread Kevin Gaudin
Yes, it does.

This is an open source library, so you can have a look at the source code. 
There is even a search engine:
https://code.google.com/p/acra/source/search?q=setDefaultUncaughtExceptionHandlerorigq=setDefaultUncaughtExceptionHandlerbtnG=Search+Trunk

If you need help regarding ACRA, there is an acra-discuss group.
https://groups.google.com/forum/?fromgroups=#!forum/acra-discuss

Kevin
ACRA main dev.


On Tuesday, August 28, 2012 10:46:36 PM UTC+2, bob wrote:

 Can someone help me understand how ACRA works?

 Does ACRA.init() call this function?

 public static void 
 setDefaultUncaughtExceptionHandler(Thread.UncaughtExceptionHandler eh)



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

2012-08-30 Thread Calin Perebiceanu
Here you go :  
http://developer.android.com/guide/topics/data/data-storage.html#db 

On Thursday, 30 August 2012 07:50:23 UTC+3, Sadhna Upadhyay wrote:

 how to make connectoin with data




 On Thu, Aug 30, 2012 at 9:32 AM, ravi saini ravisa...@gmail.comjavascript:
  wrote:

 first make the connection with database i.e sqlite so first create the 
 connection and after execute query to get the data and put it in cursor and 
 from cursor you can get the data

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




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

[android-developers] 【android-developers】AndroidManifest.xml receiver android:icon

2012-08-30 Thread 安藤玲生
hello. im japanese programmer.


There was the question and it mailed.

Manifest file In the inside of the receivertag android:icon Although I
think it possible to set up, is a setup possible when making what kind
of application?
the widget using [ as long as various sites were seen ]
AppWidgetProvider -- the time of creating an application -- inside of
the receivertag An android:icon setup is carried out and it is
carrying out [ it is sufficient and ].
Is there any class or such application which can perform an android:icon
setup except AppWidgetProvider?

I need your help well above.

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

2012-08-30 Thread Gianluca Cacace
Is there any library or Android Widget to have this behaviour when I click 
on an ImageView? See image attached:

https://lh3.googleusercontent.com/-CRmHY6sx-FE/UD8079LIWTI/CIs/m7MKPdoS1yM/s1600/device-2012-08-30-113019.png

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

2012-08-30 Thread Simon Giddings
I need to create individual language versions of my application - due to 
resource size.

How can I specify the language of the application ?

I could not see how to do this within the manifest.
Is it only possible when creating the product in Google Play ?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: tileMode = repeat with stretching the image in order to get an exact number of repetitions.

2012-08-30 Thread Pau Rodríguez Coloma

Thanks MagouyaWare for your help, but there are a problem with this 
solution. First, there are a known issue with dashed lines in ICS 
(http://code.google.com/p/android/issues/detail?id=29944) that makes it 
always drawn as a solid line.

On the other hand, if I use this shape, at the end I've the same problem, 
the last line can be cropped.

I think the best solution may be the Roman Guy's solution, but I need some 
help for implement this. Please, if anyone can provide me some example code 
I'll appreciate it so much.





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

[android-developers] How to generate random numbers between 1 to 8?

2012-08-30 Thread thejaswi s
In my application I want to generate random number between 1 to 8 and there
should not be 5,6 and 7. i.e. random numbers must be (1, 2, 3, 4, 8).
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] Loading Gallery widget with 1000 images

2012-08-30 Thread Ragunath CR
No
We need to request each image one by one..

Regards
Ragunath

On Wednesday, 29 August 2012 23:59:05 UTC+5:30, MagouyaWare wrote:

 So I am planning to download only first 50 images from the server and 
 display in the gallery. Once it is done, the next 50 images has to be 
 downloaded and added in the gallery and so on...


 Ok...

 I am not able to implement this


 Why not?
  

 can any one provide some ideas to implement it?


 Does the server provide functionality to be able to request a certain 
 number of images at a time?

 Thanks,
 Justin Anderson
 MagouyaWare Developer
 http://sites.google.com/site/magouyaware


 On Tue, Aug 28, 2012 at 7:13 AM, Ragunath CR ragun...@gmail.comjavascript:
  wrote:

 So I am planning to download only first 50 images from the server and 
 display in the gallery. Once it is done, the next 50 images has to be 
 downloaded and added in the gallery and so on...




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

2012-08-30 Thread Kostya Vasilyev
That looks like possibly a ListPopupWindow (3.0 and higher) with a custom
background derived from the framework's popup menu background.

http://developer.android.com/reference/android/widget/ListPopupWindow.html

The item may be TextViews with a compound drawable on the left.

-- K

2012/8/30 Gianluca Cacace gianluca.cac...@gmail.com

 Is there any library or Android Widget to have this behaviour when I click
 on an ImageView? See image attached:


 https://lh3.googleusercontent.com/-CRmHY6sx-FE/UD8079LIWTI/CIs/m7MKPdoS1yM/s1600/device-2012-08-30-113019.png

  --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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: tileMode = repeat with stretching the image in order to get an exact number of repetitions.

2012-08-30 Thread Kostya Vasilyev
If you wanted to pursue view resizing, I'd subclass some type of view and
override onMeasure(), which would take the image size into account.

An alternative is to create your own Drawable subclass that has the
behavior you desire: repeating a bitmap as many times as would fit,
stretching or leaving margins on the sides (this is up to you).

-- K

2012/8/30 Pau Rodríguez Coloma paro...@gmail.com


 Thanks MagouyaWare for your help, but there are a problem with this
 solution. First, there are a known issue with dashed lines in ICS (
 http://code.google.com/p/android/issues/detail?id=29944) that makes it
 always drawn as a solid line.

 On the other hand, if I use this shape, at the end I've the same problem,
 the last line can be cropped.

 I think the best solution may be the Roman Guy's solution, but I need some
 help for implement this. Please, if anyone can provide me some example code
 I'll appreciate it so much.



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


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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-developers】Part2 AndroidManifest.xml receiver android:icon

2012-08-30 Thread 安藤玲生
Hello.

I am a Japanese programmer.

It worries about being written to url of the following, and the same thing.

http://stackoverflow.com/questions/6747986/icon-for-running-service

help me.

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 show Google map preview in application?

2012-08-30 Thread AJ
Hi All

I want to show Google map preview in my application. The idea is like that 
as following

Address 1 - Google map preview 1
Address 2 - Google map preview 2
:
:
:
Address n -- Google map preview n


Any help or suggestion are welcome.


Thanks
Ajeet Singh

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

2012-08-30 Thread Ana Rita Brito Oliveira
Something that I repared.. my onPostExecute returns when I finish my
app.. it is normal???


2012/8/30 Ana Rita Brito Oliveira oliveiranar...@gmail.com:
 Yes.. I made it.. I made one demoProject with this  AsyncTask  and it
 worked.. :S And I copied the code into my project


 2012/8/30 Kostya Vasilyev kmans...@gmail.com

 If you're talking about BatteryStatsImpl, that's not your app, it's just
 something else in the log, which you can ignore.

 Re: original issue -- have you considered creating a very simple
 AsyncTask, making sure it works as it should, then building from that?

 -- K

 2012/8/30 Ana Rita Brito Oliveira oliveiranar...@gmail.com

 I have put that code in my call but now I'm getting some  awkward
 errors... I'm searching for that byt if someone knows the reason, can share?


 This is my log output:

 08-30 08:47:19.775: D/parametros a enviar(716): g;a...@eu.com
 08-30 08:47:19.775: D/Entrar(716): no serviço
 08-30 08:47:19.784: D/Chegada(716): foi ao serviço
 08-30 08:47:19.834: D/URL serviço HttpGet(716):
 http://192.168.56.1:8080/pt.Agile21.Acerola.WebService/rest/acerola?id=g;a...@eu.com
 08-30 08:47:20.495: D/RESPOSTA do web service(716): ana;a...@eu.com;pass;0
 08-30 08:47:20.495: D/RESPOSTA do web service(716): ana;a...@eu.com;pass;0
 08-30 08:47:24.104: A/BatteryStatsImpl(91): problem reading network stats
 08-30 08:47:24.104: A/BatteryStatsImpl(91):
 java.lang.IllegalStateException: problem parsing idx 1
 08-30 08:47:24.104: A/BatteryStatsImpl(91): at
 com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:300)
 08-30 08:47:24.104: A/BatteryStatsImpl(91): at
 com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:250)
 08-30 08:47:24.104: A/BatteryStatsImpl(91): at
 com.android.internal.os.BatteryStatsImpl.getNetworkStatsDetailGroupedByUid(BatteryStatsImpl.java:5734)
 08-30 08:47:24.104: A/BatteryStatsImpl(91): at
 com.android.internal.os.BatteryStatsImpl.access$100(BatteryStatsImpl.java:76)
 08-30 08:47:24.104: A/BatteryStatsImpl(91): at
 com.android.internal.os.BatteryStatsImpl$Uid.computeCurrentTcpBytesReceived(BatteryStatsImpl.java:2457)
 08-30 08:47:24.104: A/BatteryStatsImpl(91): at
 com.android.internal.os.BatteryStatsImpl$Uid.getTcpBytesReceived(BatteryStatsImpl.java:2446)
 08-30 08:47:24.104: A/BatteryStatsImpl(91): at
 com.android.internal.os.BatteryStatsImpl.writeSummaryToParcel(BatteryStatsImpl.java:5437)
 08-30 08:47:24.104: A/BatteryStatsImpl(91): at
 com.android.internal.os.BatteryStatsImpl.writeLocked(BatteryStatsImpl.java:4836)
 08-30 08:47:24.104: A/BatteryStatsImpl(91): at
 com.android.internal.os.BatteryStatsImpl.writeAsyncLocked(BatteryStatsImpl.java:4818)
 08-30 08:47:24.104: A/BatteryStatsImpl(91): at
 com.android.server.am.ActivityManagerService.updateCpuStatsNow(ActivityManagerService.java:1652)
 08-30 08:47:24.104: A/BatteryStatsImpl(91): at
 com.android.server.am.ActivityManagerService$3.run(ActivityManagerService.java:1534)
 08-30 08:47:24.104: A/BatteryStatsImpl(91): Caused by:
 java.io.FileNotFoundException: /proc/net/xt_qtaguid/stats: open failed:
 ENOENT (No such file or directory)
 08-30 08:47:24.104: A/BatteryStatsImpl(91): at
 libcore.io.IoBridge.open(IoBridge.java:406)
 08-30 08:47:24.104: A/BatteryStatsImpl(91): at
 java.io.FileInputStream.init(FileInputStream.java:78)
 08-30 08:47:24.104: A/BatteryStatsImpl(91): at
 com.android.internal.net.NetworkStatsFactory.readNetworkStatsDetail(NetworkStatsFactory.java:269)
 08-30 08:47:24.104: A/BatteryStatsImpl(91): ... 10 more
 08-30 08:47:24.104: A/BatteryStatsImpl(91): Caused by:
 libcore.io.ErrnoException: open failed: ENOENT (No such file or directory)
 08-30 08:47:24.104: A/BatteryStatsImpl(91): at
 libcore.io.Posix.open(Native Method)
 08-30 08:47:24.104: A/BatteryStatsImpl(91): at
 libcore.io.BlockGuardOs.open(BlockGuardOs.java:110)
 08-30 08:47:24.104: A/BatteryStatsImpl(91): at
 libcore.io.IoBridge.open(IoBridge.java:390)
 08-30 08:47:24.104: A/BatteryStatsImpl(91): ... 12 more
 08-30 08:49:15.104: I/EventLogService(209): Aggregate from 1346314754837
 (log), 1346314754837 (data)
 08-30 08:50:13.584: W/ThrottleService(91): unable to find stats for iface
 rmnet0



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




 --
 Com os melhores cumprimentos,
 Ana Rita Brito Oliveira




-- 
Com os melhores cumprimentos,
Ana Rita Brito Oliveira

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com

[android-developers]

2012-08-30 Thread Sadhna Upadhyay
Hi everybody,


   how to apply condition that edit text either can take numeric or
alphanumeric or only string

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 generate random numbers between 1 to 8?

2012-08-30 Thread Parthi K
in java support random method call random object .

On Thu, Aug 30, 2012 at 3:43 PM, thejaswi s thejasw...@gmail.com wrote:

 In my application I want to generate random number between 1 to 8 and
 there should not be 5,6 and 7. i.e. random numbers must be (1, 2, 3, 4, 8).
 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

Re: [android-developers]

2012-08-30 Thread Parthi K
use android:type numeric

On Thu, Aug 30, 2012 at 4:59 PM, Sadhna Upadhyay
sadhna.braah...@gmail.comwrote:

 Hi everybody,


how to apply condition that edit text either can take numeric or
 alphanumeric or only string

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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 generate random numbers between 1 to 8?

2012-08-30 Thread thejaswi s
ya, thanks. I got.


On Thu, Aug 30, 2012 at 5:05 PM, Parthi K parthisof...@gmail.com wrote:

 in java support random method call random object .

 On Thu, Aug 30, 2012 at 3:43 PM, thejaswi s thejasw...@gmail.com wrote:

 In my application I want to generate random number between 1 to 8 and
 there should not be 5,6 and 7. i.e. random numbers must be (1, 2, 3, 4, 8).
 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

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

2012-08-30 Thread Parthi K
hi dude r u using any button activity just call button activity inside
map activity method once user clicked the button it will show the exact
location  address...

On Thu, Aug 30, 2012 at 4:44 PM, AJ ajeet.invinci...@gmail.com wrote:

 Hi All

 I want to show Google map preview in my application. The idea is like that
 as following

 Address 1 - Google map preview 1
 Address 2 - Google map preview 2
 :
 :
 :
 Address n -- Google map preview n


 Any help or suggestion are welcome.


 Thanks
 Ajeet Singh

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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] Best practice in handling huge overlay items on Android Maps

2012-08-30 Thread Ichsan
Dear All,

I have a situation where I need to tell users where the nearby ATMs are 
located. The problem is if the bank has 1 ATMs.

When I use Maps for web programmings, I usually only load ATMs on visible 
area. When user do panning or zooming out, I request back-end server to 
provide more ATMs and redraw all overlay items. But I don't think we can 
use this technique on mobile device.

If I use technique from 
https://developers.google.com/maps/documentation/android/hello-mapview, I 
get a performance hit. 

What is the best way to handle this? We know that there are some concerns:
1. Loading all ATMs will eat memory a lot.
2. Loading ATMs on visible area may eat a lot of data connection as users 
do panning. (I don't know either how to get the visible coordinate border)

I've done some experiments. Loading 1000 overlay items (ATMs) (1000 x 
itemizedOverlay.addOverlayItem(anAtm);  and 1 x populate()) has consumed 5 
seconds.

Is there any best practice in doing this? I really hope Google would give 
developers the best practice.

I've also posted this question here 
http://stackoverflow.com/questions/12196158/best-practice-in-handling-huge-overlay-items-on-android-maps

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] JDBC Connectivity through Android

2012-08-30 Thread Parthi K
Hi arpita ,
  I think you r working web services huh good  if you r using web services
already application running in database right
now your android application will interact with database mean using JDBC
connection   , android not support oracle or sql database so u want use
middle ware application
 your front end application  Middle ware server --- Back end
application;
  it will work like dis ...



On Wed, Aug 29, 2012 at 8:41 PM, Arpit parikh arpithpar...@gmail.comwrote:

 Guys,
 Is it possible to connect JDBC connectivity through android emulator?I
 have been tried a lot but could get success.
 I have been tried following code :
 package com.da;

 import java.sql.*;

 import android.app.Activity;
 import android.os.Bundle;

 import android.widget.TextView;

 public class DatabaseActivity extends Activity {

 /** Called when the activity is first created. */
 @Override
 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.main);
 TextView tv = new TextView(this);
 tv.setText(\”orcale Connect Example.\”);
 setContentView(tv);

 try {

 Class.forName(\”com.mysql.jdbc.Driver\”);
 Connection con =(Connection) DriverManager.getConnection(\”jdbc:mysql://
 127.0.0.1:3306/co\ http://127.0.0.1:3306/co%5C”, \”root\”, \”arpit\”);
 Statement st=(Statement) con.createStatement();
 st.executeUpdate(\”insert into new_table values(3,5);\”);
 tv.setText(\”Connected to the database \”);
 } catch (Exception e) {
 tv.setText(\”NOT CONNECTED\”);
 }
 }

 }

 But it goes into exception every time.Please help me  guide me for this
 issue…!!!

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

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Best practice in handling huge overlay items on Android Maps

2012-08-30 Thread Parthi K
Hi dude  y wasting time that s bankers work just give Google api it will
find near ATM  r particullar atm wil find

On Thu, Aug 30, 2012 at 5:16 PM, Ichsan ich...@gmail.com wrote:

 Dear All,

 I have a situation where I need to tell users where the nearby ATMs are
 located. The problem is if the bank has 1 ATMs.

 When I use Maps for web programmings, I usually only load ATMs on visible
 area. When user do panning or zooming out, I request back-end server to
 provide more ATMs and redraw all overlay items. But I don't think we can
 use this technique on mobile device.

 If I use technique from
 https://developers.google.com/maps/documentation/android/hello-mapview, I
 get a performance hit.

 What is the best way to handle this? We know that there are some concerns:
 1. Loading all ATMs will eat memory a lot.
 2. Loading ATMs on visible area may eat a lot of data connection as users
 do panning. (I don't know either how to get the visible coordinate border)

 I've done some experiments. Loading 1000 overlay items (ATMs) (1000 x
 itemizedOverlay.addOverlayItem(anAtm);  and 1 x populate()) has consumed 5
 seconds.

 Is there any best practice in doing this? I really hope Google would give
 developers the best practice.

 I've also posted this question here
 http://stackoverflow.com/questions/12196158/best-practice-in-handling-huge-overlay-items-on-android-maps

 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

Re: [android-developers] Hi all

2012-08-30 Thread Parthi K
hi dude i got output thanks to reply

On Tue, Aug 28, 2012 at 1:13 AM, bob b...@coolfone.comze.com wrote:

 We don't use JSON for UI.  We use XML.



 On Monday, August 27, 2012 7:54:27 AM UTC-5, parthi wrote:

 Is it possible to design in json UI ..Mr
  Mark Murphy

 On Mon, Aug 27, 2012 at 6:21 PM, Parthi K parthi...@gmail.com wrote:

  Hi
  Mark Murphy

 I know basically its for webservices

  dont know that much could u help me...

 On Mon, Aug 27, 2012 at 6:12 PM, Mark Murphy mmu...@commonsware.comwrote:

 On Mon, Aug 27, 2012 at 8:40 AM, parthi parthi...@gmail.com wrote:
 How can i design using json UI in android

 I would recommend that you start by providing an explanation of what
 you think a json UI is.

 --
 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/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-d...@**googlegroups.com

 To unsubscribe from this group, send email to
 android-developers+**unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/**group/android-developers?hl=enhttp://groups.google.com/group/android-developers?hl=en



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

2012-08-30 Thread AJ
Thanks for reply. Let me explain again. Looks it is not understandable.

Address1, 2, are the text address and the Google preview 1 is the preview 
shown for the particular address when my activity launched.



Thanks
Ajeet


On Thursday, 30 August 2012 17:11:34 UTC+5:30, parthi wrote:

 hi dude r u using any button activity just call button activity inside 
 map activity method once user clicked the button it will show the exact 
 location  address...

 On Thu, Aug 30, 2012 at 4:44 PM, AJ ajeet.in...@gmail.com 
 javascript:wrote:

 Hi All

 I want to show Google map preview in my application. The idea is like 
 that as following

 Address 1 - Google map preview 1
 Address 2 - Google map preview 2
 :
 :
 :
 Address n -- Google map preview n


 Any help or suggestion are welcome.


 Thanks
 Ajeet Singh

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




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

Re: [android-developers] Android devices and use of MM/INCH

2012-08-30 Thread Thesalan
You're right...

This is the config of DisplayMetrics of One X:
xdpi = 240
widthPixels = 480

We can deduce that the screen have a width of 2 inches... but in real - 
2,25 inches

So, is there a solution to determine this automatically? Or is it 
impossible to have real mesure on all devices?


Le mardi 28 août 2012 16:06:06 UTC+2, Latimerius a écrit :

 On Tue, Aug 28, 2012 at 3:07 PM, Thesalan thes...@gmail.com javascript: 
 wrote: 
  For a project, I have to use real size, like millimeters and inches. But 
 on 
  some devices, these values are false! 
  
  I have tested on some devices, and it appears that on HTC One X and HTC 
  Wildfire, 10mm = 11/12mm... But on Nexus One, Nexus S, Galaxy S2 these 
 sizes 
  are right! 
  
  To do this, I use this code : 
  
  float pxCm = TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_MM, 10, 
  
  r.getDisplayMetrics()); 
  
  
  Someone have already encounter this problem? If yes, how have you bypass 
  this? 

 One thing I noticed is that devices can lie about their DPI.   For 
 instance, LG P500 states it has a 160 dpi screen but if you measure 
 the screen and do the maths, it's actually 180 dpi.  Correspondingly, 
 if you compute your pixel sizes based on the 160 dpi figure to get a 
 specified physical size (in mm), it will come out smaller. 

 I'd compute the actual DPI One X and Wildfire have and compare that to 
 figures in DisplayMetrics. 


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

2012-08-30 Thread Fred Niggle
Save your time and energy: ignore them.

On 29 August 2012 14:46, Rich Woods richwo...@gmail.com wrote:

 Hello Android developer community,

 I've just received an email from a company that I won't name here that is 
 offering
 positive Play store reviews for sale.  This service perverts the review
 system on the Play store and I'd like to report the business to Google.
  What would be the best way to report this?

 Rich Woods
 Exobyte games

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




-- 
Ubuntu Speech 
inputhttps://play.google.com/store/apps/details?id=com.nds.ubuntuspeechinputis
now available on Google Play, along with Magnetic
Door Alarm 
apphttps://play.google.com/store/apps/details?id=com.nds.magneticdooralarm
.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 Fu: TwitterCreeper (Requirements Doc Released)

2012-08-30 Thread Bill Mote
Just because you missed last night's coding challenge doesn't mean you 
still can't have fun with it!

The full requirements presentation can be found here:

https://docs.google.com/presentation/d/15z-_tq3tRnXLlIqcZR6DXQvIkWcWONH6hBuKjcwnQl4/edit#slide=id.p

The next coding challenge is scheduled for the 5th Wednesday in October 
which also happens to be Halloween!  We'll have to see if we can come up 
with something spooky :)

Bill

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 devices and use of MM/INCH

2012-08-30 Thread Latimerius
On Thu, Aug 30, 2012 at 2:37 PM, Thesalan thesa...@gmail.com wrote:
 You're right...

 This is the config of DisplayMetrics of One X:
 xdpi = 240
 widthPixels = 480

 We can deduce that the screen have a width of 2 inches... but in real -
 2,25 inches

That's your explanation then - if the screen is physically bigger by
12.5% than it should, everything on the screen will come out bigger by
the same amount.  So your desired 10 mm becomes 12.5 mm.

 So, is there a solution to determine this automatically? Or is it impossible
 to have real mesure on all devices?

Unfortunately, I'm aware of no work-arounds.  Perhaps somebody else is...

I think the cause might be that manufacturers don't bother to fill in
actual densities for their screens.  240 dpi is used to represent the
hdpi range, 160 dpi (wrongly reported by my LG) is the typical density
for mdpi.  I believe they are used as defaults and never changed to
match the actual screen.

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

2012-08-30 Thread aek

 Hi guys,

 Thank you for your reply,

 I tried this, unfortunately It doesnt solve the prob. The prob. I guess is 
in the function 
String url = Images.Media.insertImage(getContentResolver(), bm, null, null);

 which returns a null value for url ?! why  I dont know ?

 I checked the values of the variables byte array data and bitmap   bm. 
It looks like they are not null and they are pointing to 
  memory @'s. 

 any idea ?

 thank you,

 aek


On Wednesday, August 29, 2012 10:31:17 PM UTC+1, bob wrote:

 Maybe this will help? 

   uses-permission android:name=android.permission.*
 WRITE_EXTERNAL_STORAGE*/



 On Wednesday, August 29, 2012 3:03:15 PM UTC-5, aek wrote:


  Thank you,

  Yes indeed it was a pb of permission. Now I saw some light. However 
 still I have a pb that concerns the saving 
  (The picture can not be saved).

  In the procedure done () { },  

  the variable url = null and I dont know why 
 Images.Media.insertImage(getContentResolver(), bm, null, null); is returning
  a null value, although I pressed on the button and the camera seems, it 
 worked normally (it made the normal sound of taking
 a picture).
 

 thank you very much guys



 On Wednesday, August 29, 2012 8:48:18 AM UTC+1, cpares wrote:

 Hello!

 Have you requested for permission to use the camera in the manifest? 
 Something like this:
 uses-permission android:name=android.permission.CAMERA /
 (and maybe uses-permission android:name=android.permission.AUTOFOCUS 
 / too?)

 Good luck!

 On Wednesday, August 29, 2012 3:53:52 AM UTC+2, aek wrote:


 Hi guys,

 I am trying to learn android hardware programming. an example of camera 
 programming, I took from a book, which is as listed bellow.
 However unfortunately I am geting an error. a process stops 
 unexpectdly. the pb I guess as per to what is shown by the log cat, is 
 due 
 to 
 a pb of connecting to the camera service. guys I need your help,


 thank you!

 - program
 package com.example.chapter7_hardware;

 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
 import android.graphics.PixelFormat;
 import android.hardware.Camera;
 import android.hardware.Camera.PictureCallback;
 import android.hardware.Camera.ShutterCallback;
 import android.os.Bundle;
 import android.provider.MediaStore.Images;
 import android.app.Activity;
 import android.content.Intent;
 import android.util.Log;
 import android.view.LayoutInflater;
 import android.view.Menu;
 import android.view.MenuItem;
 import android.view.SurfaceHolder;
 import android.view.SurfaceView;
 import android.view.View;
 import android.view.View.OnClickListener;
 import android.view.ViewGroup.LayoutParams;
 import android.view.Window;
 import android.view.WindowManager;
 import android.widget.Button;
 import android.widget.Toast;
 import android.support.v4.app.NavUtils;

 public class CameraApplication extends Activity implements 
 SurfaceHolder.Callback{

 private static final String TAG = cookbook.hardware;
 private LayoutInflater mInflater = null;
 Camera mCamera;
 byte[] tempdata;
 boolean mPreviewRunning = false;
 private SurfaceHolder mSurfaceHolder;
 private SurfaceView mSurfaceView;
 Button takepicture;
 
 
 
 @Override
 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 //
 
 getWindow().setFormat(PixelFormat.TRANSLUCENT);
 requestWindowFeature(Window.FEATURE_NO_TITLE);
 
 getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, 
 WindowManager.LayoutParams.FLAG_FULLSCREEN);
 
 setContentView(R.layout.activity_camera_application);
 
  mSurfaceView = (SurfaceView) findViewById(R.id.surface);
  mSurfaceHolder = mSurfaceView.getHolder();
  mSurfaceHolder.addCallback(this);
  
 mSurfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
  
  mInflater = LayoutInflater.from(this);
  
  View overView = mInflater.inflate(R.layout.cameraoverlay, 
 null);
  this.addContentView(overView, new 
 LayoutParams(LayoutParams.FILL_PARENT,
  
 LayoutParams.FILL_PARENT));
 
  takepicture = (Button) findViewById(R.id.button1);
  
  takepicture.setOnClickListener(new View.OnClickListener() {
 
 @Override
 public void onClick(View v) {
 // TODO Auto-generated method stub
 
 mCamera.takePicture(mShutterCallback, mPictureCallback, 
 mjpeg);
 
 }
 });
 
 }
 
 ShutterCallback mShutterCallback = new ShutterCallback(){
 @Override
 public void onShutter(){}
 };
 
 
 PictureCallback mPictureCallback = new PictureCallback(){
 @Override
 public void 

Re: [android-developers] How to generate random numbers between 1 to 8?

2012-08-30 Thread Justin Anderson
Note that this is not an Android specific question...  Please only ask
questions that relate directly to Android SDK development.

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Thu, Aug 30, 2012 at 5:37 AM, thejaswi s thejasw...@gmail.com wrote:

 ya, thanks. I got.



 On Thu, Aug 30, 2012 at 5:05 PM, Parthi K parthisof...@gmail.com wrote:

 in java support random method call random object .

 On Thu, Aug 30, 2012 at 3:43 PM, thejaswi s thejasw...@gmail.com wrote:

 In my application I want to generate random number between 1 to 8 and
 there should not be 5,6 and 7. i.e. random numbers must be (1, 2, 3, 4, 8).
 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


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

2012-08-30 Thread Justin Anderson

 No
 We need to request each image one by one..

Then why are you not able to do it?  What have you tried so far?

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Thu, Aug 30, 2012 at 4:26 AM, Ragunath CR ragunath...@gmail.com wrote:

 No
 We need to request each image one by one..


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

2012-08-30 Thread Justin Anderson
Umm... this question is not very clear.

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Thu, Aug 30, 2012 at 3:26 AM, 安藤玲生 ando.reo...@gmail.com wrote:

 hello. im japanese programmer.


 There was the question and it mailed.

 Manifest file In the inside of the receivertag android:icon Although I
 think it possible to set up, is a setup possible when making what kind
 of application?
 the widget using [ as long as various sites were seen ]
 AppWidgetProvider -- the time of creating an application -- inside of
 the receivertag An android:icon setup is carried out and it is
 carrying out [ it is sufficient and ].
 Is there any class or such application which can perform an android:icon
 setup except AppWidgetProvider?

 I need your help well above.

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

2012-08-30 Thread Bryan
I've been trying to resolve a bluetooth connection problem between my app 
and service running on my laptop. I've paired my phone, a Nexus S 4G 
running AOSP 4.1.1, with my laptop through the System Settings. In my app, 
I'm unable to connect to my service over this pairing. However, if I go 
back into System Settings, Bluetooth Settings Activity, and select my 
laptop, the Bluetooth Settings Activity lists the laptop as selected and 
the Notification Bar icon for Bluetooth changes from grey to blue. Now, my 
app can connect just fine. If I disconnect from my laptop through the 
Bluetooth Settings Activity, my app can no longer connect. My understanding 
was that I only needed to be paired/bonded with a device to make a 
bluetooth connection. Why do I have to explicitly connect through the 
System/Bluetooth Settings before being able to connect in my app? I've 
tried both secure and insecure RfcommSocketToServiceRecord calls.

Any help is greatly appreciated! Thank you!

My source code is here:

https://github.com/piusvelte/RemoteAuthClient

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 to allow user to draw a region on Google map

2012-08-30 Thread dica
Thanks Mark.  Do you happen to know of any tutorials where I can see this 
in action?


On Tuesday, August 28, 2012 12:51:48 PM UTC-4, Mark Murphy (a Commons Guy) 
wrote:

 On Tue, Aug 28, 2012 at 12:37 PM, dica steven...@gmail.com javascript: 
 wrote: 
  I'd like to allow a user to draw a region on top of a Google map and get 
 the 
  GPS coordinates of the drawn region.  Can somebody advise how this is 
 done? 

 On the second part, the Projection object can convert between pixel 
 coordinates and microdegrees. 

 On the first part, you will need to intercept touch events and draw on 
 an Overlay, I guess. 

 -- 
 Mark Murphy (a Commons Guy) 
 http://commonsware.com | http://github.com/commonsguy 
 http://commonsware.com/blog | http://twitter.com/commonsguy 

 _The Busy Coder's Guide to Android Development_ Version 4.1 Available! 


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

Re: [android-developers] Bluetooth connection problem

2012-08-30 Thread rauf qureshi
//demo3.idhasoft.us/iloyal/api/iloyal/customer.php/customer.login

//I have develop following code can any body tell me solution of following
errors

import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.HttpTransportSE;

import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.IBinder;

public class RegistrationService extends Service{
 String SOAP_ACTION=
http://demo3.idhasoft.us/iloyal/api/iloyal/customer.php/customer.addIloyalCustomer
;
String SOAP_METHOD=customer.addIloyalCustomer;
String NAME_SPACE=http://demo3.idhasoft.us/iloyal/api/iloyal/customer.php;;
String url=http://demo3.idhasoft.us/iloyal/api/iloyal/customer.php/?wsdl;;

@Override
public IBinder onBind(Intent intent)
{
//TODO Auto-generated method stub
return null;
}

@Override
public void onStart(Intent intent, int startId)
{
//TODO Auto-generated method stub
super.onStart(intent, startId);
try{
 SoapObject result=(SoapObject)getWeather();
 System.out.println(+result.toString());
}catch(Exception e)
{
System.out.println(exception in soap   +e);
}
 stopService(intent);
}
public SoapObject getWeather() throws Exception
{
SoapObject request = new SoapObject(NAME_SPACE, SOAP_METHOD);
//request.addProperty(PlaceName, city);
request.addProperty(firstname, rauf);
request.addProperty(lastname, qureshi);
request.addProperty(email, rauf.qure...@gmail.com);
request.addProperty(password, 12345);
request.addProperty(mobile, 8286459963);
request.addProperty(DOB, 15/04/88);
request.addProperty(zipcode, 400092);

SoapSerializationEnvelope envelope = new
SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
// It seems that it is a .NET Web service because it doesn't work
without next line
envelope.dotNet = true;

HttpTransportSE transport = new HttpTransportSE(url);
System.out.println(service me conncetion checking se pahle aaya);

//ConnectivityManager cm = (ConnectivityManager)
getSystemService(Context.CONNECTIVITY_SERVICE);
//NetworkInfo netInfo = cm.getActiveNetworkInfo();
//
//if (netInfo != null  netInfo.isConnectedOrConnecting())
//{
//   System.out.println(connected+netInfo.getExtraInfo());
//}
//else
//{
//System.out.println(not connceted);
//}
System.out.println(request   +request);
System.out.println(1=);
transport.call(SOAP_ACTION, envelope);
System.out.println(2=);
return (SoapObject) envelope.getResponse();
}
@Override
public void onDestroy() {
// TODO Auto-generated method stub
super.onDestroy();
 }

}



org.xmlpull.v1.XmlPullParserException: expected: START_TAG {
http://schemas.xmlsoap.org/soap/envelope/}Envelope (position:START_TAG
definitions name='wsLogin' targetNamespace='
http://painel01.allinmail.com.br/wsAllin/login.php'@2:403 in
java.io.InputStreamReader@4375ba18)


i am getting above problem can any body tell me solution of above problem.

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

Re: [android-developers] Android NDK superuser permissions

2012-08-30 Thread Justin Anderson
NDK questions belong on the NDK Developers Group...

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Wed, Aug 29, 2012 at 8:02 PM, Alvin Schurman alvin.schur...@gmail.comwrote:

 Can someone tell me how to run a native c program on the android as root?
  Giving the java wrapper superuser permissions seems to still result in a
 permission denied error in the c program.

 Thanks,
 A

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

2012-08-30 Thread Justin Anderson
Write your own custom firmware...

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Wed, Aug 29, 2012 at 11:41 AM, Ayse Karahasan a...@moventis.com.trwrote:

 I have a question.

 We developed an android application for its working on Tablet.
 The user could not use any other application and services on the Tablet
 than this application.

 I need lock all Android O.S. spesifications plus bottom navigations etc.

 Any application or solution ?

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

2012-08-30 Thread Justin Anderson

 then try to solve his query instead creating nonsenses here!!


First, I am not creating nonsense here... Your answer had nothing to do
with his question.  He wants to do dynamically show and hide his icon
somehow...

Second, I asked him to clarify his question because it didn't really make
all that much sense.  Once he provides the clarification I will try to
answer his question.  I don't attempt to answer poorly asked questions that
aren't clear... because I'll likely end up answering the wrong question.

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Wed, Aug 29, 2012 at 11:54 PM, Asheesh Arya asheesharya...@gmail.comwrote:

 then try to solve his query instead creating nonsenses here!!


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

Re: [android-developers] Bluetooth connection problem

2012-08-30 Thread Bryan
rauf,

I think you replied to the wrong topic, could you please delete your post?

Thank you,
Bryan

On Thursday, August 30, 2012 10:15:58 AM UTC-4, rauf qureshi wrote:



 //demo3.idhasoft.us/iloyal/api/iloyal/customer.php/customer.login

 //I have develop following code can any body tell me solution of following 
 errors

 import org.ksoap2.SoapEnvelope;
 import org.ksoap2.serialization.SoapObject;
 import org.ksoap2.serialization.SoapSerializationEnvelope;
 import org.ksoap2.transport.HttpTransportSE;

 import android.app.Service;
 import android.content.Context;
 import android.content.Intent;
 import android.net.ConnectivityManager;
 import android.net.NetworkInfo;
 import android.os.IBinder;

 public class RegistrationService extends Service{
  String SOAP_ACTION=
 http://demo3.idhasoft.us/iloyal/api/iloyal/customer.php/customer.addIloyalCustomer
 ;
  String SOAP_METHOD=customer.addIloyalCustomer;
 String NAME_SPACE=http://demo3.idhasoft.us/iloyal/api/iloyal/customer.php
 ;
  String url=http://demo3.idhasoft.us/iloyal/api/iloyal/customer.php/?wsdl
 ;

 @Override
 public IBinder onBind(Intent intent) 
  {
 //TODO Auto-generated method stub
  return null;
 }

  @Override
 public void onStart(Intent intent, int startId) 
  {
 //TODO Auto-generated method stub
 super.onStart(intent, startId);
  try{
  SoapObject result=(SoapObject)getWeather();
  System.out.println(+result.toString());
  }catch(Exception e)
 {
 System.out.println(exception in soap   +e);
  }
  stopService(intent);
  }
 public SoapObject getWeather() throws Exception 
  {
 SoapObject request = new SoapObject(NAME_SPACE, SOAP_METHOD);
 //request.addProperty(PlaceName, city);
 request.addProperty(firstname, rauf);
 request.addProperty(lastname, qureshi);
 request.addProperty(email, rauf.q...@gmail.com javascript:);
 request.addProperty(password, 12345);
 request.addProperty(mobile, 8286459963);
 request.addProperty(DOB, 15/04/88);
 request.addProperty(zipcode, 400092);
 
 SoapSerializationEnvelope envelope = new 
 SoapSerializationEnvelope(SoapEnvelope.VER11);
 envelope.setOutputSoapObject(request);
 // It seems that it is a .NET Web service because it doesn't work 
 without next line
 envelope.dotNet = true;
 
 HttpTransportSE transport = new HttpTransportSE(url);
 System.out.println(service me conncetion checking se pahle aaya);
 
 //ConnectivityManager cm = (ConnectivityManager) 
 getSystemService(Context.CONNECTIVITY_SERVICE);
 //NetworkInfo netInfo = cm.getActiveNetworkInfo();
 //
 //if (netInfo != null  netInfo.isConnectedOrConnecting()) 
 //{
 //   System.out.println(connected+netInfo.getExtraInfo());
 //}
 //else
 //{
 //System.out.println(not connceted);
 //}
 System.out.println(request   +request);
 System.out.println(1=);
 transport.call(SOAP_ACTION, envelope);
 System.out.println(2=);
 return (SoapObject) envelope.getResponse();
 }
  @Override
 public void onDestroy() {
  // TODO Auto-generated method stub
 super.onDestroy();
  }
   
 }



 org.xmlpull.v1.XmlPullParserException: expected: START_TAG {
 http://schemas.xmlsoap.org/soap/envelope/}Envelope (position:START_TAG 
 definitions name='wsLogin' targetNamespace='
 http://painel01.allinmail.com.br/wsAllin/login.php'@2:403 in 
 java.io.InputStreamReader@4375ba18)


 i am getting above problem can any body tell me solution of above problem.


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

Re: [android-developers] How to show scrollbar for a customizing view which is not drawn whole content

2012-08-30 Thread Justin Anderson

 Now, I need show a scrollbar for this view. As I know, any view can
 support scrollbar. However, you must draw whole content of the view in
 onDraw() and use scrollTo() to scroll the view. Any idea?


Sure... draw the whole content of the view in onDraw() and use
scrollTo() to scroll the view.


Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Wed, Aug 29, 2012 at 8:53 PM, xeagle xeagle...@gmail.com wrote:

 I implement a customizing view and draw the content of view in onDraw().
 I draw only one page of content in onDraw().

 Now, I need show a scrollbar for this view. As I know, any view can
 support scrollbar. However, you must draw whole content of the view in
 onDraw() and use scrollTo() to scroll the view. Any idea?

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

2012-08-30 Thread Bryan
In case it's helpful, here's the relevant code:

https://github.com/piusvelte/RemoteAuthClient/blob/master/src/com/piusvelte/remoteauthclient/RemoteAuthClientService.java

public ConnectThread(String address, String state) {
mAddress = address;
mState = state;
BluetoothDevice device = 
mBtAdapter.getRemoteDevice(mAddress);
BluetoothSocket tmp = null;
try {
//  tmp = 
device.createInsecureRfcommSocketToServiceRecord(sRemoteAuthServerUUID);
tmp = 
device.createRfcommSocketToServiceRecord(sRemoteAuthServerUUID);
} catch (IOException e) {
Log.e(TAG, e.getMessage());
}
mSocket = tmp;
}

public void run() {
if (mSocket == null) {
mMessage = failed to get a socket;
mHandler.post(mRunnable);
} else {
if (!mSocket.isConnected()) {
if (mBtAdapter.isDiscovering())
mBtAdapter.cancelDiscovery();
try {
mSocket.connect();
} catch (IOException e) {
mMessage = failed to connect;
mHandler.post(mRunnable);
shutdown();
return;
}
}
// Get the BluetoothSocket input and output 
streams
try {
mInStream = mSocket.getInputStream();
mOutStream = mSocket.getOutputStream();
} catch (IOException e) {
mMessage = failed to get streams;
mHandler.post(mRunnable);
shutdown();
return;
}
byte[] buffer = new byte[1024];
int readBytes = -1;
try {
readBytes = mInStream.read(buffer);
} catch (IOException e1) {
mMessage = failed to read input 
stream;
mHandler.post(mRunnable);
}
if (readBytes != -1) {
// construct a string from the valid 
bytes in the buffer
String message = new String(buffer, 0, 
readBytes);
// listen for challenge, then process a 
response
if ((message.length()  10)  
(message.substring(0, 9).equals(challenge)))
mChallenge = 
message.substring(10);
write(mState);
}
}
shutdown();
}


On Thursday, August 30, 2012 9:46:23 AM UTC-4, Bryan wrote:

 I've been trying to resolve a bluetooth connection problem between my app 
 and service running on my laptop. I've paired my phone, a Nexus S 4G 
 running AOSP 4.1.1, with my laptop through the System Settings. In my app, 
 I'm unable to connect to my service over this pairing. However, if I go 
 back into System Settings, Bluetooth Settings Activity, and select my 
 laptop, the Bluetooth Settings Activity lists the laptop as selected and 
 the Notification Bar icon for Bluetooth changes from grey to blue. Now, my 
 app can connect just fine. If I disconnect from my laptop through the 
 Bluetooth Settings Activity, my app can no longer connect. My understanding 
 was that I only needed to be paired/bonded with a device to make a 
 bluetooth connection. Why do I have to explicitly connect through the 
 System/Bluetooth Settings before being able to connect in my app? I've 
 tried both secure and insecure RfcommSocketToServiceRecord calls.

 Any help is greatly appreciated! Thank you!

 My source code is here:

 https://github.com/piusvelte/RemoteAuthClient


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com

Re: [android-developers] Re: Merging Bundles

2012-08-30 Thread Justin Anderson

 Looked at the source, it overwrites


That would be another way of finding the answer... In either case you could
have discovered the answer for yourself faster than posting on here and
waiting for an answer.  Just saying... :-)

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Wed, Aug 29, 2012 at 5:47 PM, Kevin khant...@hotmail.com wrote:

 Looked at the source, it overwrites.


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 generate random numbers between 1 to 8?

2012-08-30 Thread bob
 

Random r = new Random();

int randnum = r.nextInt(5)+1;

if (randnum==5) randnum=8;

On Thursday, August 30, 2012 5:16:02 AM UTC-5, thejaswi s wrote:

 In my application I want to generate random number between 1 to 8 and 
 there should not be 5,6 and 7. i.e. random numbers must be (1, 2, 3, 4, 8). 
 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] Getting the google voice synthesizer

2012-08-30 Thread nikulau


 well, the google system that you use in the voice.search I think it's 
 pretty important to know it


thanks for your 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

Re: [android-developers] Getting the google voice synthesizer

2012-08-30 Thread nikulau
I need it to send a binary signal by a usb wire plugged to the mobile, I 
think that this work isn't really difficult, but I need the app to edit it 
a little, just read the order and pass to binary code.

I thank your time

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

2012-08-30 Thread Andrea Pietroni
if you're not going to support versions before Gingerbread, try switching to 
HttpURLConnection, see this:
http://android-developers.blogspot.it/2011/09/androids-http-clients.html

I'm not experienced with networking, but does HttpClient need to be closed some 
way? could that be the problem?

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


[android-developers] Re: Bleutooth chat Api 10 not working

2012-08-30 Thread bob
 

Are you attempting to connect to another device running the Bluetooth Chat 
example?


If so, what type of device is it?



On Thursday, August 30, 2012 2:37:20 AM UTC-5, Haris wrote:


 Hai all I am trying with blue-tooth chat example for api-10, in my 
 micromax pfhone..

 When I scanning for devices it showing the list  for both secure and non 
 secure.
 But When I try to connect it showing unable to connect...

 And UUID s are

 private static final UUID MY_UUID_SECURE = 
 UUID.fromString(fa87c0d0-afac-11de-8a39-0800200c9a66);
 private static final UUID MY_UUID_INSECURE 
 =UUID.fromString(8ce255c0-200a-11e0-ac64-0800200c9a66);

 I tried 
 thishttp://stackoverflow.com/questions/3397071/service-discovery-failed-exception-using-bluetooth-on-androidlink
  also...But no change.

 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] Re: Locking Android O.S. on Tablet

2012-08-30 Thread bob
 

Maybe house the tablet in a frame that blocks access to the buttons?



On Wednesday, August 29, 2012 12:41:19 PM UTC-5, Ayse Karahasan wrote:

 I have a question.

 We developed an android application for its working on Tablet.
 The user could not use any other application and services on the Tablet 
 than this application.

 I need lock all Android O.S. spesifications plus bottom navigations etc.

 Any application or solution ?


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

2012-08-30 Thread Andrea Pietroni
also, try AndroidHttpClient.newInstance() instead of a plain DefaultHttpClient 
(this try could be easier to do before HttpURLConection).

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

2012-08-30 Thread Ana Rita Brito Oliveira
I will see de documentation that you give me.. and no.. we the
HttpClient dosen't have any colse method. :S

2012/8/30 Andrea Pietroni andrea.pietr...@gmail.com:
 if you're not going to support versions before Gingerbread, try switching to 
 HttpURLConnection, see this:
 http://android-developers.blogspot.it/2011/09/androids-http-clients.html

 I'm not experienced with networking, but does HttpClient need to be closed 
 some way? could that be the problem?

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



-- 
Com os melhores cumprimentos,
Ana Rita Brito Oliveira

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

2012-08-30 Thread Ana Rita Brito Oliveira
the URL Connection has the same problem.. I will try this,,

2012/8/30 Andrea Pietroni andrea.pietr...@gmail.com:
 also, try AndroidHttpClient.newInstance() instead of a plain 
 DefaultHttpClient (this try could be easier to do before HttpURLConection).

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



-- 
Com os melhores cumprimentos,
Ana Rita Brito Oliveira

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

2012-08-30 Thread lselwd
After a buyer buy an App from PLAY, how much time has to try it and 
refunded if do not want it  uninstall it?

May have differ google account for Play a/c and Merchant a/c linked 
together? Name/email required be the same?

May install official signed (ready submit to PLAY) APK App file, to my 
phone or, needed debug signed to install in my phone? 

Just to test *my submission to Play*, I must download from a phone from 
play or exist other way? apk should reviewed prior get available?

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

Re: [android-developers] Hi all

2012-08-30 Thread Michael Leung
maybe reading this :
http://www.vogella.com/articles/AndroidJSON/article.html
Moreover, I changed to JSON for UI sometime, I am more prefer to use JSON.
I found JSON is saving a lot of size in data transfer.


On Thu, Aug 30, 2012 at 10:08 PM, Parthi K parthisof...@gmail.com wrote:

 hi dude i got output thanks to reply


 On Tue, Aug 28, 2012 at 1:13 AM, bob b...@coolfone.comze.com wrote:

 We don't use JSON for UI.  We use XML.



 On Monday, August 27, 2012 7:54:27 AM UTC-5, parthi wrote:

 Is it possible to design in json UI ..Mr
  Mark Murphy

 On Mon, Aug 27, 2012 at 6:21 PM, Parthi K parthi...@gmail.com wrote:

  Hi
  Mark Murphy

 I know basically its for webservices

  dont know that much could u help me...

 On Mon, Aug 27, 2012 at 6:12 PM, Mark Murphy mmu...@commonsware.comwrote:

 On Mon, Aug 27, 2012 at 8:40 AM, parthi parthi...@gmail.com wrote:
 How can i design using json UI in android

 I would recommend that you start by providing an explanation of what
 you think a json UI is.

 --
 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/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-d...@**googlegroups.com

 To unsubscribe from this group, send email to
 android-developers+**unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/**group/android-developers?hl=enhttp://groups.google.com/group/android-developers?hl=en



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




-- 
Regards,
Michael Leung
http://www.itblogs.info - My IT Blog
http://diary.skynovel.info - My Blog
http://www.michaelleung.info - My Homepage

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

2012-08-30 Thread Kristopher Micinski
I hate to tell you this, but your english is poor enough to be incomprehensible.

Google play cannot test your app on every device automatically,
because of a number of reasons, instead you should test on your own
before deployement.

And yes, users can get a refund after a certain amount of time and
uninstall the app.

Please rephrase your question in proper english, perhaps by asking a
friend to translate,

kris

On Thu, Aug 30, 2012 at 11:59 AM, lselwd webmas...@poliscarhire.com wrote:
 After a buyer buy an App from PLAY, how much time has to try it and refunded
 if do not want it  uninstall it?

 May have differ google account for Play a/c and Merchant a/c linked
 together? Name/email required be the same?

 May install official signed (ready submit to PLAY) APK App file, to my phone
 or, needed debug signed to install in my phone?

 Just to test my submission to Play, I must download from a phone from play
 or exist other way? apk should reviewed prior get available?

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

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

2012-08-30 Thread SUDAM swain
Hi All,
  I have to http url connection from android 4.0.4 android os.
Before I was connect to http url by a different thread in 3.0 samsung
galaxy. It was working fine. But after update Os to 4.0.4 this connection
is not working. So I used  AsyncTask  for url connection .Still not
working. connection is happening but I can not bring data, at the time of
bring data or cheching responce code giving Nullpointer exception. Can any
body help me for this solution.

-- 


Thanks and Regards
Sudam Swain

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

2012-08-30 Thread Justin Anderson

 Still not working. connection is happening but I can not bring data, at
 the time of bring data or cheching responce code giving Nullpointer
 exception. Can any body help me for this solution.


Probably not without the relevant code...

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Thu, Aug 30, 2012 at 11:28 AM, SUDAM swain sudam.swa...@gmail.comwrote:

 Nullpointer

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

2012-08-30 Thread oriolmesia
Hi guys, I have an issue with the final tweak of my new app.

Now that I'm nearly to finish I'm looking to improve my interface. What I 
want it's just to see how my buttons change when someone pressed on them, 
only for the amount of time that the button remain pressed.

The buttons on my app are image buttons with some text situated on them.


The only way to do that it's to change the button image or the text over 
the button? What kind of event I need to use, onClick method here it's 
useless?



Thank you for your help,



Oriol

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

2012-08-30 Thread Justin Anderson
Use a statelist drawable, also known as a selector:
http://developer.android.com/guide/topics/resources/drawable-resource.html#StateList

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Thu, Aug 30, 2012 at 11:47 AM, oriolmesia mesia@gmail.com wrote:

 Hi guys, I have an issue with the final tweak of my new app.

 Now that I'm nearly to finish I'm looking to improve my interface. What I
 want it's just to see how my buttons change when someone pressed on them,
 only for the amount of time that the button remain pressed.

 The buttons on my app are image buttons with some text situated on them.


 The only way to do that it's to change the button image or the text over
 the button? What kind of event I need to use, onClick method here it's
 useless?



 Thank you for your help,



 Oriol

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

2012-08-30 Thread Liem.T Vo
Please refer at url 
http://developer.android.com/guide/topics/ui/controls/button.html:


I copied from that location for you:

Custom background

If you want to truly redefine the appearance of your button, you can 
specify a custom background. Instead of supplying a simple bitmap or 
color, however, your background should be a state list resource that 
changes appearance depending on the button's current state.


You can define the state list in an XML file that defines three 
different images or colors to use for the different button states.


To create a state list drawable for your button background:

Create three bitmaps for the button background that represent the 
default, pressed, and focused button states.
To ensure that your images fit buttons of various sizes, create the 
bitmaps as Nine-patch bitmaps.
Place the bitmaps into the res/drawable/ directory of your project. Be 
sure each bitmap is named properly to reflect the button state that they 
each represent, such as button_default.9.png, button_pressed.9.png, and 
button_focused.9.png.
Create a new XML file in the res/drawable/ directory (name it something 
like button_custom.xml). Insert the following XML:

?xml version=1.0 encoding=utf-8?
selector xmlns:android=http://schemas.android.com/apk/res/android;
item android:drawable=@drawable/button_pressed
  android:state_pressed=true /
item android:drawable=@drawable/button_focused
  android:state_focused=true /
item android:drawable=@drawable/button_default /
/selector
This defines a single drawable resource, which will change its image 
based on the current state of the button.
The first item defines the bitmap to use when the button is pressed 
(activated).
The second item defines the bitmap to use when the button is focused 
(when the button is highlighted using the trackball or directional pad).
The third item defines the bitmap to use when the button is in the 
default state (it's neither pressed nor focused).
Note: The order of the item elements is important. When this drawable 
is referenced, the item elements are traversed in-order to determine 
which one is appropriate for the current button state. Because the 
default bitmap is last, it is only applied when the conditions 
android:state_pressed and android:state_focused have both evaluated as 
false.
This XML file now represents a single drawable resource and when 
referenced by a Button for its background, the image displayed will 
change based on these three states.


Best regards,
Liem.V
On 8/31/12 12:47 AM, oriolmesia wrote:

Hi guys, I have an issue with the final tweak of my new app.

Now that I'm nearly to finish I'm looking to improve my interface. 
What I want it's just to see how my buttons change when someone 
pressed on them, only for the amount of time that the 
button remain pressed.


The buttons on my app are image buttons with some text situated on them.


The only way to do that it's to change the button image or the text 
over the button? What kind of event I need to use, onClick method here 
it's useless?




Thank you for your help,



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

2012-08-30 Thread TreKing
On Thu, Aug 30, 2012 at 4:45 AM, Simon Giddings mr.s.giddi...@gmail.comwrote:

 I need to create individual language versions of my application - due to
 resource size.


How much text do you have that translations provide a resource size concern?

How can I specify the language of the application ?


You don't. An application doesn't have a language. It just has
translations, if provided, that are used based on the user's device
settings. If you want a French-only version of the app, then provide text
that is only in French.

-
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 support vietnamese language when upload android app

2012-08-30 Thread TreKing
On Wed, Aug 29, 2012 at 12:50 PM, thegioisach
kienchochethah...@gmail.comwrote:

 So how can i upload my app with vietnamese.


Use Viatnamese for the text throughout the app. Then upload the app to
Google Play. That's it.

The language selection in the Developer Console is for localizing the
market description and other text that appears with your app listing in
Google Play. It does not effect the app itself.

-
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] Database of Android Games/Apps

2012-08-30 Thread TreKing
On Wed, Aug 29, 2012 at 6:57 PM, Corey Eadie coreyea...@gmail.com wrote:

 Does Google offer any sort of API's to access the information similar to
 what Apple offers with their App Store?


No.


 If not, does anyone know of any services that would be able to provide a
 list like that?


No idea if it's still alive, but there was this:
http://code.google.com/p/android-market-api/

-
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 do I append an Xml File?

2012-08-30 Thread Guilherme Bernardi
Hi.

I'm trying to append an Xml Data File.

The structure of Xml is:

?xml version='1.0' encoding='UTF-8' standalone='yes' ?
clientes

cliente4

Empresa1/Empresa

Codigo5/Codigo

Nomegsdf/Nome

Enderecoags/Endereco

Bairrogasd/Bairro

/cliente4

/clientes

I need to add another record. I got it, but the new record was inserted 
like this:

?xml version='1.0' encoding='UTF-8' standalone='yes' ?
clientes

cliente4

Empresa1/Empresa

Codigo5/Codigo

Nomegsdf/Nome

Enderecoags/Endereco

Bairrogasd/Bairro

/cliente4

/clientes*
cliente6TESTEtestando/TESTE/cliente6cliente6TESTEtestando/TESTE/cliente6cliente6TESTEtestando/TESTE/cliente6
*
*
*
How can I get the position of /cliente4 and append the new record or can 
I delete the EndTag /clientes and add the new record and set the EndTag 
again?

To appending the file I'm using:

OutputStream is = openFileOutput(cliente.xml, MODE_APPEND);

XmlSerializer serializer = Xml.newSerializer();
serializer.setOutput(is, UTF-8);
serializer.startTag(null, cliente6);
serializer.startTag(null, TESTE);
 serializer.text(testando);
 serializer.endTag(null, TESTE);
serializer.endTag(null,cliente6);
serializer.endDocument();
serializer.flush();
is.close();

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 do I append an Xml File?

2012-08-30 Thread Jacky Alciné
Why not use a DOM parser?

On Thu, Aug 30, 2012 at 3:42 PM, Guilherme Bernardi 
gui.bernard...@gmail.com wrote:

 Hi.

 I'm trying to append an Xml Data File.

 The structure of Xml is:

 ?xml version='1.0' encoding='UTF-8' standalone='yes' ?
 clientes

 cliente4

 Empresa1/Empresa

 Codigo5/Codigo

 Nomegsdf/Nome

 Enderecoags/Endereco

 Bairrogasd/Bairro

 /cliente4

 /clientes

 I need to add another record. I got it, but the new record was inserted
 like this:

 ?xml version='1.0' encoding='UTF-8' standalone='yes' ?
 clientes

 cliente4

 Empresa1/Empresa

 Codigo5/Codigo

 Nomegsdf/Nome

 Enderecoags/Endereco

 Bairrogasd/Bairro

 /cliente4

 /clientes*
 cliente6TESTEtestando/TESTE/cliente6cliente6TESTEtestando/TESTE/cliente6cliente6TESTEtestando/TESTE/cliente6
 *
 *
 *
 How can I get the position of /cliente4 and append the new record or can
 I delete the EndTag /clientes and add the new record and set the EndTag
 again?

 To appending the file I'm using:

 OutputStream is = openFileOutput(cliente.xml, MODE_APPEND);

 XmlSerializer serializer = Xml.newSerializer();
 serializer.setOutput(is, UTF-8);
 serializer.startTag(null, cliente6);
 serializer.startTag(null, TESTE);
  serializer.text(testando);
  serializer.endTag(null, TESTE);
 serializer.endTag(null,cliente6);
 serializer.endDocument();
 serializer.flush();
 is.close();

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




-- 
Jacky Alcine
Blog http://blog.jalcine.me | Launchpadhttps://launchpad.net/~jackyalcine

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 do I append an Xml File?

2012-08-30 Thread Guilherme Bernardi
Well...

I can use DOM parser, but by DOM parser I can get the nodes? remove nodes? 
and append the records?

Em quinta-feira, 30 de agosto de 2012 17h03min10s UTC-3, Jacky Alciné 
escreveu:

 Why not use a DOM parser?

 On Thu, Aug 30, 2012 at 3:42 PM, Guilherme Bernardi 
 gui.ber...@gmail.comjavascript:
  wrote:

 Hi.

 I'm trying to append an Xml Data File.

 The structure of Xml is:

 ?xml version='1.0' encoding='UTF-8' standalone='yes' ?
 clientes

 cliente4

 Empresa1/Empresa

 Codigo5/Codigo

 Nomegsdf/Nome

 Enderecoags/Endereco

 Bairrogasd/Bairro

 /cliente4

 /clientes

 I need to add another record. I got it, but the new record was inserted 
 like this:

 ?xml version='1.0' encoding='UTF-8' standalone='yes' ?
 clientes

 cliente4

 Empresa1/Empresa

 Codigo5/Codigo

 Nomegsdf/Nome

 Enderecoags/Endereco

 Bairrogasd/Bairro

 /cliente4

 /clientes*
 cliente6TESTEtestando/TESTE/cliente6cliente6TESTEtestando/TESTE/cliente6cliente6TESTEtestando/TESTE/cliente6
 *
 *
 *
 How can I get the position of /cliente4 and append the new record or 
 can I delete the EndTag /clientes and add the new record and set the 
 EndTag again?

 To appending the file I'm using:

 OutputStream is = openFileOutput(cliente.xml, MODE_APPEND);

 XmlSerializer serializer = Xml.newSerializer();
 serializer.setOutput(is, UTF-8);
 serializer.startTag(null, cliente6);
 serializer.startTag(null, TESTE);
  serializer.text(testando);
  serializer.endTag(null, TESTE);
 serializer.endTag(null,cliente6);
 serializer.endDocument();
 serializer.flush();
 is.close();

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




 -- 
 Jacky Alcine
 Blog http://blog.jalcine.me | Launchpadhttps://launchpad.net/~jackyalcine



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 do I append an Xml File?

2012-08-30 Thread TreKing
On Thu, Aug 30, 2012 at 3:24 PM, Guilherme Bernardi 
gui.bernard...@gmail.com wrote:

 I can use DOM parser, but by DOM parser I can get the nodes? remove nodes?
 and append the records?


Yes, yes, and yes, in that order.

-
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 do I append an Xml File?

2012-08-30 Thread Larry Meadors
You can even spew it all out as text when you're done.

On Thu, Aug 30, 2012 at 2:29 PM, TreKing treking...@gmail.com wrote:
 On Thu, Aug 30, 2012 at 3:24 PM, Guilherme Bernardi
 gui.bernard...@gmail.com wrote:

 I can use DOM parser, but by DOM parser I can get the nodes? remove nodes?
 and append the records?


 Yes, yes, and yes, in that order.

 -
 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] Re: How do I append an Xml File?

2012-08-30 Thread Guilherme Bernardi
Ok, I'll start... and post the results.

Thank you.

Em quinta-feira, 30 de agosto de 2012 16h42min36s UTC-3, Guilherme Bernardi 
escreveu:

 Hi.

 I'm trying to append an Xml Data File.

 The structure of Xml is:

 ?xml version='1.0' encoding='UTF-8' standalone='yes' ?
 clientes

 cliente4

 Empresa1/Empresa

 Codigo5/Codigo

 Nomegsdf/Nome

 Enderecoags/Endereco

 Bairrogasd/Bairro

 /cliente4

 /clientes

 I need to add another record. I got it, but the new record was inserted 
 like this:

 ?xml version='1.0' encoding='UTF-8' standalone='yes' ?
 clientes

 cliente4

 Empresa1/Empresa

 Codigo5/Codigo

 Nomegsdf/Nome

 Enderecoags/Endereco

 Bairrogasd/Bairro

 /cliente4

 /clientes*
 cliente6TESTEtestando/TESTE/cliente6cliente6TESTEtestando/TESTE/cliente6cliente6TESTEtestando/TESTE/cliente6
 *
 *
 *
 How can I get the position of /cliente4 and append the new record or can 
 I delete the EndTag /clientes and add the new record and set the EndTag 
 again?

 To appending the file I'm using:

 OutputStream is = openFileOutput(cliente.xml, MODE_APPEND);

 XmlSerializer serializer = Xml.newSerializer();
 serializer.setOutput(is, UTF-8);
 serializer.startTag(null, cliente6);
 serializer.startTag(null, TESTE);
  serializer.text(testando);
  serializer.endTag(null, TESTE);
 serializer.endTag(null,cliente6);
 serializer.endDocument();
 serializer.flush();
 is.close();


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

2012-08-30 Thread joebowbeer
There seems to be a major issue affecting programmatic users of the speech 
recognition service on Jelly Bean handsets:

http://code.google.com/p/android/issues/detail?id=36679

In particular, users of the RecognitionListener are not receiving results.

If anyone is interested, please star this issue.  And if anyone has a 
workaround (other than changing the language from en-US to en-GB), please 
comment.

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] Messenger from Remote Service Causing Memory Leak

2012-08-30 Thread Dave Smith


I have an application that communicates with a Service in a remote process 
using the Messengerinterface. Here is the basic architecture of how things 
are set up:

   - The application generates several Operation objects that require 
   access to the service.
   - Each Operation contains a Handler wrapped in a Messenger used as a 
   callback receive the response data back from the Service
   - When the operation executes, it wraps its Messenger into an Intent and 
   calls startService() to pass the message to the remote service
   - The remote service does some work based on the parameters of the Intent 
and 
   then returns the response by sending a Message to the Messenger for that 
   operation.

Here is the basic code present in the operation:

public class SessionOperation {

/* ... */

public void runOperation() {
Intent serviceIntent = new Intent(SERVICE_ACTION);
/* Add some other extras specific to each operation */
serviceIntent.putExtra(Intent.EXTRA_EMAIL, replyMessenger);

context.startService(serviceIntent);
}

private Handler mAckHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
//Process the service's response
}
};
protected Messenger replyMessenger = new Messenger(mAckHandler);
}

And a basic snippet of how the service is structured:

public class WorkService extends Service {
private ServiceHandler mServiceHandler;

private final class ServiceHandler extends Handler {
public ServiceHandler(Looper looper) {
super(looper);
}

@Override
public void handleMessage(Message msg) {
onHandleIntent((Intent)msg.obj);
}
}

@Override
public int onStartCommand(Intent intent, int flags, int startId) {
//If intent has a message, queue it up
Message msg = mServiceHandler.obtainMessage();
msg.obj = intent;
mServiceHandler.sendMessage(msg);

return START_STICKY;
}

private void onHandleIntent(Intent intent) {
Messenger replyTarget = intent.getParcelableExtra(Intent.EXTRA_EMAIL);

/* Do some work */

Message delivery = Message.obtain(...);
replyTarget.send(delivery);
}
}

This all works fantastically well. I can send tons of operations from 
several different applications to the same service and they all process and 
send their response to just the right place. However...

I noticed that if the application ran long enough and with enough activity 
it would crash with anOutOfMemoryError. Upon looking at the HPROF data in 
MAT, I noticed that all these operations where staying in memory, and they 
were held hostage from the Garbage Collector because of theMessenger. 
Apparently, the Messenger instance is creating a long-term native 
connection to Binder that counts as a GC Root, which is keeping each 
Operation object in memory indefinitely.

[image: MAT Trace Example]

Does anyone know if there is a way to clear or disable the Messenger when 
the Operation is over so it doesn't create this memory leak?

Is there perhaps a better way to implement the IPC to the Servicein the 
same fashion, so that multiple disparate objects can make a request and get 
a result asynchronously?  I'm not convinced that just switching to using a 
bound service implementation will solve this issue as I would will need the 
Messenger to process the callback.

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

2012-08-30 Thread Mark Murphy
On Thu, Aug 30, 2012 at 5:42 PM, Dave Smith dasmith1...@gmail.com wrote:
 Does anyone know if there is a way to clear or disable the Messenger when
 the Operation is over so it doesn't create this memory leak?

Whatever you do, don't shoot it.

:-)

More seriously, I haven't a clue -- I haven't used Messenger much
across processes.

 Is there perhaps a better way to implement the IPC to the Servicein the
 same fashion, so that multiple disparate objects can make a request and get
 a result asynchronously?

Package a PendingIntent as an extra and have the service send() it.
The client can then choose whether to use a broadcast Intent or
createPendingResult() on an Activity, depending on which makes more
sense. In theory, the security characteristics of a PendingIntent
should allow the BroadcastReceiver to not be exported (if it's defined
in the manifest), though I haven't tried this.

 I'm not convinced that just switching to using a
 bound service implementation will solve this issue as I would will need the
 Messenger to process the callback.

Well, you'd need *something* to process the callback. That could be a
local broadcast via LocalBroadcastManager, using the Handler more
directly (instead of by way of a Messenger), etc.

--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 4.1 Available!

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


[android-developers] Using SyncAdapter without creating an account

2012-08-30 Thread Flávio Faria


My app allows people to use and manage their data regardless they're logged 
in. Though, as I uniquely identify each device, I want to sync data from my 
anonymous users (not logged ones) as well. So, I was wondering if it is a 
good practice to create an anonymous account in this case, since 
SyncAdapters only work with accounts.

Should I create an account for my anonymous users or should I sync their 
data with threads/AsyncTasks/Loaders? In particular, is there any way to 
make 
ContentResolver.requestSync()http://developer.android.com/reference/android/content/ContentResolver.html#requestSync%28android.accounts.Account,%20java.lang.String,%20android.os.Bundle%29
 work 
without the need of an account?

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

2012-08-30 Thread Dianne Hackborn
It is true that sending a messenger across processes will require holding a
GREF on it for the other process to communicate with it. Barring bugs
(which have happened but I am not sure if in any released platform
versions), the GREF will be released when the other process itself no
longer holds a reference on this.  When we are talking about things in
Dalvik no longer holds a reference generally means the other side has
garbage collected the Java proxy object.

What this means is that when you throw a Messenger (or any IBinder object)
across to another process, the Dalvik VM in your own process can no longer
manage the memory of that object itself and is dependent on all remote
objects releasing it until it can be released locally.  And this will
include all objects that the IBinder has any references to as well.

A common pattern to deal with this is to use a WeakReference in your
IBinder/Messenger that holds the references to the rest of your objects
that it will access.  This allows your local garbage collector to clean up
all of those other objects (which may be quite heavy, holding big things
like bitmaps and such) even though a remote process still has a reference
on your IBinder.  Of course if you do this, there needs to be something
else holding a reference on these other objects until they are no longer
needed, or else the garbage collector could clean them up *before* they are
no longer needed.

Something else I would recommend is to not do a design where you
instantiate Messenger objects for each IPC you do.  Create one Messenger
that you pass in to each IPC call.  Otherwise you can generate a lot of
remoted objects that are being kept around due to other processes
continuing to hold references because the other side is not aggressively
garbage collecting since all the objects it is creating due to these calls
are small.

On Thu, Aug 30, 2012 at 2:42 PM, Dave Smith dasmith1...@gmail.com wrote:

 I have an application that communicates with a Service in a remote
 process using the Messengerinterface. Here is the basic architecture of
 how things are set up:

- The application generates several Operation objects that require
access to the service.
- Each Operation contains a Handler wrapped in a Messenger used as a
callback receive the response data back from the Service
- When the operation executes, it wraps its Messenger into an Intent and
calls startService() to pass the message to the remote service
- The remote service does some work based on the parameters of the
Intent and then returns the response by sending a Message to the
Messenger for that operation.

 Here is the basic code present in the operation:

 public class SessionOperation {

 /* ... */

 public void runOperation() {
 Intent serviceIntent = new Intent(SERVICE_ACTION);

 /* Add some other extras specific to each operation */
 serviceIntent.putExtra(Intent.EXTRA_EMAIL, replyMessenger);

 context.startService(serviceIntent);
 }

 private Handler mAckHandler = new Handler() {

 @Override
 public void handleMessage(Message msg) {

 //Process the service's response
 }
 };
 protected Messenger replyMessenger = new Messenger(mAckHandler);
 }

 And a basic snippet of how the service is structured:

 public class WorkService extends Service {

 private ServiceHandler mServiceHandler;

 private final class ServiceHandler extends Handler {

 public ServiceHandler(Looper looper) {
 super(looper);

 }

 @Override
 public void handleMessage(Message msg) {

 onHandleIntent((Intent)msg.obj);
 }
 }

 @Override
 public int onStartCommand(Intent intent, int flags, int startId) {

 //If intent has a message, queue it up
 Message msg = mServiceHandler.obtainMessage();

 msg.obj = intent;
 mServiceHandler.sendMessage(msg);

 return START_STICKY;
 }

 private void onHandleIntent(Intent intent) {

 Messenger replyTarget = intent.getParcelableExtra(Intent.EXTRA_EMAIL);

 /* Do some work */

 Message delivery = Message.obtain(...);

 replyTarget.send(delivery);
 }
 }

 This all works fantastically well. I can send tons of operations from
 several different applications to the same service and they all process and
 send their response to just the right place. However...

 I noticed that if the application ran long enough and with enough activity
 it would crash with anOutOfMemoryError. Upon looking at the HPROF data in
 MAT, I noticed that all these operations where staying in memory, and they
 were held hostage from the Garbage Collector because of theMessenger.
 Apparently, the Messenger instance is creating a long-term native
 connection to Binder that counts as a GC Root, which is keeping each
 Operation object in memory indefinitely.

 [image: MAT Trace 

  1   2   >