[android-developers] How to fly to a location in Google Earth from your android app in 2016

2016-03-28 Thread a a
Hi,

did you ever implement the code below to work for you in 2016 to let you fly to 
a location in Google Earth from yur Android app ?

I am looking for demo Google Earth Fly app for Android like below.


darius
--
How to fly to a location in Google Earth from your android app
15.11.2010StevePotell
There are not any current published API's for Google Earth Android 
version.  The current version does handle search intents.  You can 
launch Google Earth in Android and fly to a location with the 
following intent:  Please keep in mind Google could change this at any 
time and the following code might not work. 

// the new intent we will launch 
Intent myIntent = new Intent(); 

// send the intent directly to the google earth activity that can 
handle search 
myIntent.setClassName("com.google.earth", 
"com.google.earth.EarthActivity"); 

// we are doing a search query 
myIntent.setAction(Intent.ACTION_SEARCH); 

// change this address to any address you want to fly to 
myIntent.putExtra(SearchManager.QUERY, "2900 Frenchmen Street, New 
Orleans, LA"); 

// always trap for ActivityNotFound in case Google earth is not on the 
device 
try { 
    // launch google earth and fly to location 
    this.startActivity(myScanIntent); 
} 
catch (ActivityNotFoundException e) { 
    showGoogleEarthDialog(); 
} 

... 

// if the user does not have google earth prompt to download it 
private void showGoogleEarthDialog() { 

AlertDialog.Builder downloadDialog = new AlertDialog.Builder(this); 
downloadDialog.setTitle("Install Google Earth?"); 
downloadDialog.setMessage("This application requires Google Earth. 
Would you like to install it?"); 
downloadDialog.setPositiveButton("Yes", new 
DialogInterface.OnClickListener() { 
    public void onClick(DialogInterface dialogInterface, int i) { 
        Uri uri = Uri.parse("market://search? 
q=pname:com.google.earth"); 
        Intent intent = new Intent(Intent.ACTION_VIEW, uri); 
        MainActivity.this.startActivity(intent); 
    } 
}); 
downloadDialog.setNegativeButton("No", new 
DialogInterface.OnClickListener() { 
      public void onClick(DialogInterface dialogInterface, int i) {} 
}); 
downloadDialog.show(); 

} 

Happy coding

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/2b06cc10-a508-48de-aa86-44286b4e6d5f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] How to fly to a location in Google Earth from your android app

2016-03-28 Thread a a
Hi Steve,

did your code work for you at a later time or today ?

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/f17f4dfd-553f-4ffe-a1d4-72271f60d3d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] [android-developer] Anyone who can help me to register GM developer account?

2012-03-15 Thread a a
Dear All,

   Who can help me to register GM develper account?

I can spend the $25 for you ( Or more...)

Please contanct 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]what can i do for account suspension?

2012-02-12 Thread a a
Account suspension
Grounds for suspension

To ensure a positive user experience of all our users, Google Payments
specialists will periodically review merchant accounts. If your account is
found to be in violation of our Terms of
Service
 and 
Policies,
you will be notified via email of any changes you need to make for your
account to remain in good standing.

Failure to make the requested changes to your account or provide documents
necessary to verify your account or within the stipulated time period may
result in the suspension of your Google Payments account.

What happens when you've been suspended

*Account access*
You will still have access to view all details in your account, including
orders details and your identification information. Please review the email
from our specialists detailing the steps required to restore your account.

*No future transactions accepted*
You will not be able to process any future transactions. However, you may
continue to charge and ship any orders you received prior to the suspension
of your account.

*Limited future payouts*
You may still receive payouts for any outstanding orders. Once you have
been paid out for all your remaining orders, you will not receive any
future payouts.

Terms of service

Per Google Checkout's Terms of Service (U.s. Section 2.3), GPC has the
right (i) to change, suspend or discontinue the Service, in whole or in
part, as necessary to perform maintenance or updates to the Service and
(ii) to impose limits on certain features or restrict access to parts or
all of the Service without notice and without liability. GPC may decline to
process any Payment Transaction in connection with, among other reasons,
fraud prevention activities, applicable law, or GPC policies.



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

2012-02-06 Thread a a
Dear All,

Google help say the payment will between 0.5 and 1.0, but i received
2.22HKD today, it is more then 1.0, so what can i do ?

What can i enter the number? 2.22 HKD or I should changed to USD first?

Anyone can help me?

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

Re: [android-developers] How can i get the payment from amazon earning

2012-02-02 Thread a a
i don't know how can i contaction Amazon

2012/1/12 TreKing 

> On Wed, Jan 11, 2012 at 10:58 PM, a a  wrote:
>
>> How can i get the payment from amazon earning
>
>
> Have you considered contacting Amazon ?
>
> .
> ...
> .
>
> *shakes head*
>
>
> -
> TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago
> transit tracking app for Android-powered devices
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

[android-developers] How can i get the payment from amazon earning

2012-01-11 Thread a a
As title

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

2011-10-31 Thread a a
I envoke the drawBitmapMesh in "onDraw"

@Override
protected void onDraw(Canvas canvas) {
if(!mSave) {
Log.e("test",
"ss");
canvas.save();
mSave = true;
}
mCanvas = canvas;
canvas.drawColor(0xFFCC);
canvas.concat(mMatrix);
canvas.drawBitmapMesh(mBitmap, WIDTH, HEIGHT, mVerts, 0,null,
0, null);
if(mRestore) {
Log.e("test",
"rrr");
canvas.restore(); // it can't restore the bitmap.
mRestore = false;
}
}

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

2011-10-31 Thread a a
Hi androids,

I use a following code

canvas.drawBitmapMesh(mBitmap, WIDTH, HEIGHT, mVerts, 0,null, 0, null);

to changed a bitmap, how can i recover the bitmap?

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] google checkout

2011-10-30 Thread a a
Is there anyone came from American? How log number with your bank card?

Why is thre only 9 number i can input at "google checkout"?

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

[android-developers] google api demo question about drawBitmapMesh algorithm

2011-10-29 Thread a a
Hi all,

I'm not good at mathematics algorithm, so i can't undanstand the following
code

private void warp(float cx, float cy) {
final float K = 1;  // why it is 1 ??
float[] src = mOrig;
float[] dst = mVerts;
for (int i = 0; i < COUNT*2; i += 2) {
float x = src[i+0];
float y = src[i+1];
float dx = cx - x;
float dy = cy - y;
float dd = dx*dx + dy*dy;
float d = FloatMath.sqrt(dd);
float pull = K / (dd + 0.01f);

pull /= (d + 0.01f); // so it is pull = d * K /
(dd),what is it meaning ?

// let me take a example, there have a triangle, a, b, c

// pull is c/sqrt(a*a + b*b)  then * 1? what is the
result meaning?? maybe the c/sqrt(a*a + b*) is 1 or less 1 or more then 1.
can anyone tell me why  it * 1?
// and what it meaning about the result  d * K / (dd), ?


android.util.Log.d("skia", "index " + i + " dist=" + d + "
pull=" + pull);
if (pull >= 1) {
dst[i+0] = cx;
dst[i+1] = cy;
} else {
dst[i+0] = x + dx * pull;
dst[i+1] = y + dy * pull;
}
}
}

best regards, 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] use buy my app at google market caused error.

2011-10-22 Thread a a
Hi,

Is there anyone can tell me why my app at google market cause following
error after user brought it.

"Cancellation requested from phone"?

The failed rate is very height, about 50%.


Thank you very 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]write data to server

2011-09-23 Thread a a
Hi developers,

I want to send the the "id", "name", "score" to my server ( write the
records to server in a file named "ranking", path is http://
***.***.***.***/man/ranking,

I am sure the file exist, i have created it before, then i use the following
code to write, but it can't write into successful, Can anyone tell me why?

code:
private boolean updateRecord(String uid, String name, int score) {
HttpURLConnection conn = null;
try {
URL url = new URL("http://***.***.***.***/man/ranking";);
conn = (HttpURLConnection) url.openConnection();
conn.setDoOutput(true);
conn.setRequestMethod("POST");
DataOutputStream dos = new
DataOutputStream(conn.getOutputStream());
dos.writeUTF("UPDATE");
dos.writeUTF(uid);
dos.writeUTF(name);
dos.writeUTF(String.valueOf(score));
dos.flush();
dos.close();
DataInputStream dis = new
DataInputStream(conn.getInputStream());
String resultInfo = dis.readUTF();
if (resultInfo != null && !"ERROR".equals(resultInfo)) {
return true;
}
dis.close();
} catch (Exception e) {
Log.e("", "", e);
} finally {
if (conn != null)
conn.disconnect();
}
return false;
}
--
Error log following

09-23 12:01:42.041: INFO/AndroidRuntime(453): NOTE: attach of thread 'Binder
Thread #3' failed
09-23 12:01:42.561: ERROR/(431): java.io.FileNotFoundException: http://
***.***.***.***/man/ranking
09-23 12:01:42.561: ERROR/(431): at
org.apache.harmony.luni.internal.net.www.protocol.http.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:521)
09-23 12:01:42.561: ERROR/(431): at
a.test.conn.AtestActivity.updateRecord(AtestActivity.java:36)
09-23 12:01:42.561: ERROR/(431): at
a.test.conn.AtestActivity.onCreate(AtestActivity.java:18)
09-23 12:01:42.561: ERROR/(431): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
09-23 12:01:42.561: ERROR/(431): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
09-23 12:01:42.561: ERROR/(431): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
09-23 12:01:42.561: ERROR/(431): at
android.app.ActivityThread.access$1500(ActivityThread.java:117)
09-23 12:01:42.561: ERROR/(431): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
09-23 12:01:42.561: ERROR/(431): at
android.os.Handler.dispatchMessage(Handler.java:99)
09-23 12:01:42.561: ERROR/(431): at
android.os.Looper.loop(Looper.java:123)
09-23 12:01:42.561: ERROR/(431): at
android.app.ActivityThread.main(ActivityThread.java:3683)
09-23 12:01:42.561: ERROR/(431): at
java.lang.reflect.Method.invokeNative(Native Method)
09-23 12:01:42.561: ERROR/(431): at
java.lang.reflect.Method.invoke(Method.java:507)
09-23 12:01:42.561: ERROR/(431): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
09-23 12:01:42.561: ERROR/(431): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
09-23 12:01:42.561: ERROR/(431): at
dalvik.system.NativeStart.main(Native Method)

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

2011-08-25 Thread a a
HI String,

add the following red attribute


http://schemas.android.com/apk/res/android";
   android:minWidth="294dip"
   android:minHeight="220dip"
   android:initialLayout="@layout/abc_layout"
   android:updatePeriodMillis="8640"
   *android:resizeMode="horizontal|vertical"*
   />

2011/6/24 Kostya Vasilyev :
> This seems to be a design constrant, with the idea of keeping
> AppWidgetProvider processes in memory as little as possible.
>
> I can see this being useful for regular widget rendering, but loading the
> process for the one current widget the user is interacting with doesn't
seem
> too bad.
> Besides, this constraint is already violated by the new scrollable widgets
> in 3.0, which rely on an application-side service for providing list
items.
>
> Home screen widgets were introduced in 1.5, two years ago. Have the
devices
> not improved since then?
>
> -- Kostya
> 2011/6/24 String 
>>
>> On Thursday, June 23, 2011 4:45:40 PM UTC+1, TreKing wrote:
>>>
>>> On Thu, Jun 23, 2011 at 3:44 AM, String 
>>> wrote:

 "1* Would be 5* if the widgets were expandable, rather than cluttering
 up my widget picker with 8 different sizes."
>>>
>>> Can't you disable Widgets such that they don't show up in the Widget
>>> Picker?
>>
>> Not directly, though there are ways... But if I can't do a resizable
>> widget, I'll still need the 4 discrete sizes, so I'm not sure that helps.
>> 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

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Do you want your large Android project builds to complete faster?

2011-08-06 Thread a a
you can enlarge eclipse heap

2011/8/6 Doug :
> If so, please consider starring and commenting on the following bug
> report to give it attention:
>
> http://code.google.com/p/android/issues/detail?id=16263
>
> Doug
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: HttpURLConnection gives UnknownHostException

2011-06-26 Thread a a
2011/1/13 Brill Pappin :
> It's a problem with your Wifi or carrier.
>
> The error is a standard one and not specific to phones or Android.
>
> It means that when your network stack got the domain name and tried to
> convert it to a network address, it was unable to reach a DNS server
you are right!!!
but i have another question, how can i set the timeout for the "unable
to reach a DNS server"?? i use following code, but it can't work well,
it still wait long long times of 3 secs

int timeoutConnection = 3000;//mill-sec

HttpConnectionParams.setConnectionTimeout(httpParameters,
timeoutConnection);

> that knew what the domain address was.
>
> For example, if you used the hosts IP address, you would *never* get
> this error unless the address didn't exist (and even then i think its
> a different exception).
>
> - Brill Pappin
>
> On Jan 12, 2:32 pm, Ankur Avlani  wrote:
>> Hi All,
>>
>> I am developing an application on Android.  I have seen that at times when I
>> try to connect using HttpURLConnection, for getting an Image or anydata, I
>> get the following error:
>>
>> 01-12 11:24:05.073: WARN/System.err(16780): java.net.UnknownHostException:
>> Host is unresolved:www.XXX.com:80.
>>
>> Note: I get this error on my Motorolla Droid and not in emulator.
>>
>> Any ideas?
>>
>> Thanks,
>> Ankur
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: What longest leng for String in andorid?

2011-06-26 Thread a a
following is my code, like

HttpGet httpReq = new HttpGet(uri);

HttpParams httpParameters = new BasicHttpParams();
// Set the timeout in milliseconds until a connection is
established.
int timeoutConnection = 3000;
HttpConnectionParams.setConnectionTimeout(httpParameters,
timeoutConnection);
// Set the default socket timeout (SO_TIMEOUT)
// in milliseconds which is the timeout for waiting for data.
int timeoutSocket = 3000;
HttpConnectionParams.setSoTimeout(httpParameters, timeoutSocket);
DefaultHttpClient httpClient = new
DefaultHttpClient(httpParameters);
HttpResponse httpRes = httpClient.execute(httpReq);

if(httpRes.getStatusLine().getStatusCode() == 200) {
String strRet =
EntityUtils.toString(httpRes.getEntity()); //
StringIndexOutOfBoundsException

...
..


2011/6/26 a a :
> I tested at morning, it will  cause
>
> java.lang.StringIndexOutOfBoundsException
>
> if the http response is too long, so what i can get all from http response?
>
> 2011/6/26 NaveenShrivastva :
>> Please use
>>
>>  String reversePalindrome =  new String(server response);
>>
>>
>>
>>
>> On Sun, Jun 26, 2011 at 1:19 PM, JAlexoid (Aleksandr Panzin)
>>  wrote:
>>>
>>> If the response is not Text/HTML/JSON/XML/(other text based) then use
>>> a byte array.
>>>
>>> On Jun 26, 4:12 am, a a  wrote:
>>> > HI, all:
>>> >
>>> >    I want to get the content to sting Variable from uri var
>>> > HttpResponse.
>>> >
>>> > Is there any litimation for the long of sting variable ? may be the
>>> > http response will very very long sting variable is correct to
>>> > hold all ?
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> android-developers+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/android-developers?hl=en
>>
>>
>> --
>> Naveen Shrivastava
>> BCA+MCA(LAST SEM)+O/A/B Level(DOEACC SOCITY IT GOVT INDIA)
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, 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: What longest leng for String in andorid?

2011-06-26 Thread a a
I tested at morning, it will  cause

java.lang.StringIndexOutOfBoundsException

if the http response is too long, so what i can get all from http response?

2011/6/26 NaveenShrivastva :
> Please use
>
>  String reversePalindrome =  new String(server response);
>
>
>
>
> On Sun, Jun 26, 2011 at 1:19 PM, JAlexoid (Aleksandr Panzin)
>  wrote:
>>
>> If the response is not Text/HTML/JSON/XML/(other text based) then use
>> a byte array.
>>
>> On Jun 26, 4:12 am, a a  wrote:
>> > HI, all:
>> >
>> >    I want to get the content to sting Variable from uri var
>> > HttpResponse.
>> >
>> > Is there any litimation for the long of sting variable ? may be the
>> > http response will very very long sting variable is correct to
>> > hold all ?
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
> --
> Naveen Shrivastava
> BCA+MCA(LAST SEM)+O/A/B Level(DOEACC SOCITY IT GOVT INDIA)
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] What longest leng for String in andorid?

2011-06-25 Thread a a
HI, all:

   I want to get the content to sting Variable from uri var HttpResponse.

Is there any litimation for the long of sting variable ? may be the
http response will very very long sting variable is correct to
hold all ?

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

2011-05-19 Thread a a
Hi, all

getwindowmanager. ... getWindowManager(). Get the screen size in
Android. Android screen size is different for different phone models.
...

getWindowManager function is in Activity, How can i get the screen
size in the Service??

Best regards

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

2011-05-16 Thread a a
this xml is listview's item view,

listview  created by java code set with Adapter


2011/5/17 Justin Anderson :
> I don't see a listview in your xml
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
> On Sun, May 15, 2011 at 9:31 PM, a a  wrote:
>>
>> http://schemas.android.com/apk/res/android";
>>    android:layout_width="match_parent"
>>    android:layout_height="wrap_content"
>>    android:minHeight="?android:attr/listPreferredItemHeight"
>>    android:orientation="horizontal"
>>    android:paddingRight="6dip"
>>    android:paddingLeft="6dip"
>>    android:paddingTop="5dip"
>>    android:paddingBottom="5dip"
>>    android:gravity="center_vertical" >
>>
>>    >        android:layout_width="@android:dimen/app_icon_size"
>>        android:layout_height="@android:dimen/app_icon_size"
>>        android:layout_marginLeft="5dip"
>>        android:layout_marginRight="11dip"
>>        android:layout_gravity="center_vertical"
>>        android:scaleType="fitCenter"/>
>>
>>    >        android:layout_weight="0.7"
>>        android:clickable="true"
>>        android:layout_height="wrap_content">
>>        >            android:layout_height="wrap_content"
>>            android:layout_width="wrap_content"
>>            android:textAppearance="?android:attr/textAppearanceMedium"
>>            android:textStyle="bold"
>>            android:singleLine="true"
>>            android:ellipsize="marquee"
>>            android:layout_alignParentLeft="true"
>>            android:layout_marginBottom="2dip" />
>>
>>        >            android:layout_marginTop="-4dip"
>>            android:layout_gravity="center_vertical"
>>            android:layout_width="wrap_content"
>>            android:layout_height="wrap_content"
>>            android:layout_below="@id/app_name"
>>            android:textAppearance="?android:attr/textAppearanceSmall" />
>>    
>>        >            android:focusable="false"
>>            android:focusableInTouchMode="false"
>>            android:layout_width="46dp"
>>            android:layout_height="46dp"
>>            android:layout_alignParentRight="true"
>>            android:layout_marginTop="7dp"
>>            android:layout_marginRight="0dp"
>>            />
>> 
>>
>> 2011/5/16 a a :
>> > Dear All,
>> >
>> > Why the following function can't work when i click the listview item?
>> >
>> >    @Override
>> >    protected void onListItemClick(ListView l, View v, int position, long
>> > id)
>> >    {
>> >        Log.d("aaa", "onListItemClick" + position);
>> >    }
>> >
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, 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] ListView item click can't work

2011-05-15 Thread a a
http://schemas.android.com/apk/res/android";
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:orientation="horizontal"
android:paddingRight="6dip"
android:paddingLeft="6dip"
android:paddingTop="5dip"
android:paddingBottom="5dip"
android:gravity="center_vertical" >











2011/5/16 a a :
> Dear All,
>
> Why the following function can't work when i click the listview item?
>
>    @Override
>    protected void onListItemClick(ListView l, View v, int position, long id)
>    {
>        Log.d("aaa", "onListItemClick" + position);
>    }
>

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

2011-05-15 Thread a a
Dear All,

Why the following function can't work when i click the listview item?

@Override
protected void onListItemClick(ListView l, View v, int position, long id)
{
Log.d("aaa", "onListItemClick" + position);
}

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] why i always got the app name is null

2011-05-12 Thread a a
ApplicationInfo appInfo = mAppList.get(position);
Log.d(TAG, "package name =" + appInfo.packageName + " name
= " + appInfo.name);

the appInfo.name always null, but packageName is correct.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 can i set tab background as a picture?

2011-05-08 Thread a a
There have also some document about the method,

---
public TabHost.TabSpec setIndicator (CharSequence label)

Since: API Level 1
Specify a label as the tab indicator.
public TabHost.TabSpec setIndicator (View view)

Since: API Level 4
Specify a view as the tab indicator.
public TabHost.TabSpec setIndicator (CharSequence label, Drawable icon)
---

It seams only set it will view(which is the second function), but

i don't how can i set it with view(that might be contain a tab's
background), Can any one

tell me where can i got it? doc or code or examples, many thanks.



2011/5/8 a a :
> Dear devs,
>
> following is google sdk samples for "tab" example,
>
>    tabHost.addTab(tabHost.newTabSpec("tab1")
>                .setIndicator("tab1",
> getResources().getDrawable(R.drawable.star_big_on))
>                .setContent(this));
>
> It set a tab's icon and text, but, my question is HOW can i set a
> tab's background as a bitmap(picture) ?
>
> 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 can i set tab background as a picture?

2011-05-08 Thread a a
Dear devs,

following is google sdk samples for "tab" example,

tabHost.addTab(tabHost.newTabSpec("tab1")
.setIndicator("tab1",
getResources().getDrawable(R.drawable.star_big_on))
.setContent(this));

It set a tab's icon and text, but, my question is HOW can i set a
tab's background as a bitmap(picture) ?

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] [android-developer] exception catch sequence

2011-05-05 Thread a a
Dear all devs,

try{
File newfile = new File(prefix);
FileInputStream fileInput = new FileInputStream(newfile);
BufferedInputStream buf = new BufferedInputStream(fileInput);
final DataInputStream dataInput = new DataInputStream(buf);
..
.
} catch(Exception e) {
// I don't know which should i close.

// Can anybody tell me which should i close??
//newfile.close()  ?
//fileInput.close() ?
//buf.close() ?
// dataInput.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] java.io.EOFException

2011-05-04 Thread a a
my write code
public static void writeFBTagToCache(long crc64) {
try {


ArrayList tags = mItem.getTags();

if(tags == null || tags.size() <= 0) {
Log.d(TAG, "tags is null + " + mItem.mGuid);
return;
}

int size = tags.size();
File tempFile = null;
final String tempFilePath = FB_TAG_CACHE;
String prefix = crc64 + "";
tempFile = File.createTempFile(prefix, ".cache", new
File(tempFilePath));
final FileOutputStream fileOutput = new FileOutputStream(tempFile);
final BufferedOutputStream bufferedOutput = new
BufferedOutputStream(fileOutput, 1024);
final DataOutputStream dataOutput = new
DataOutputStream(bufferedOutput);

try {
for(int i = 0; i < size; i++) {
tagStruct tag = tags.get(i);
dataOutput.writeInt(size);
dataOutput.writeFloat(tag.mXcoord);
dataOutput.writeFloat(tag.mYcoord);
Utils.writeUTF(dataOutput, tag.mTag);
}

if(dataOutput != null) {
dataOutput.close();
bufferedOutput.close();
fileOutput.close();
}
} catch (Exception e) {
// Was unable to perform the operation, we delete the temp file
Log.e(TAG, "Unable to write the index file " + crc64);
tempFile.delete();
}
}catch(IOException e) {
e.printStackTrace();
}
}

-
my read code
public static ArrayList createFBTagFromCache(long crc64) {
Log.e("harvey", "create facebook tag from cache");
try {
File tempFile = null;
final String tempFilePath = FB_TAG_CACHE;
String prefix = crc64 + "";
tempFile = File.createTempFile(prefix, ".cache", new
File(tempFilePath));

FileInputStream fileInput = new FileInputStream(tempFile);
BufferedInputStream buf = new BufferedInputStream(fileInput);
final DataInputStream dataInput = new DataInputStream(buf);

try {
int size = dataInput.readInt();
ArrayList tags = new ArrayList(size);
for(int i = 0; i < size; i++) {
tagStruct tag = new tagStruct();
if(i!=0) {
int laji = dataInput.readInt();
}
tag.mXcoord = dataInput.readFloat();
tag.mYcoord = dataInput.readFloat();
tag.mTag = dataInput.readUTF();
tags.add(tag);
}
dataInput.close();
return tags;
} catch (Exception e) {
dataInput.close();
return null;
}
} catch (IOException e) {
e.printStackTrace();
return null;
}
}
-
Exceptoin cause following:

05-05 13:32:50.058: WARN/System.err(5268): java.io.EOFException
05-05 13:32:50.058: WARN/System.err(5268): at
java.io.DataInputStream.readInt(DataInputStream.java:287)
05-05 13:32:50.058: WARN/System.err(5268): at
com.cooliris.media.UriTexture.createFrTagFromCache(UriTexture.java:455)
05-05 13:32:50.058: WARN/System.err(5268): at
com.cooliris.media.UriTexture.createFromUri(UriTexture.java:185)
05-05 13:32:50.058: WARN/System.err(5268): at
com.cooliris.media.UriTexture.load(UriTexture.java:362)
05-05 13:32:50.058: WARN/System.err(5268): at
com.cooliris.media.RenderView.loadTextureAsync(RenderView.java:308)
05-05 13:32:50.058: WARN/System.err(5268): at
com.cooliris.media.RenderView.access$6(RenderView.java:306)
05-05 13:32:50.058: WARN/System.err(5268): at
com.cooliris.media.RenderView$TextureLoadThread.load(RenderView.java:1176)
05-05 13:32:50.058: WARN/System.err(5268): at
com.cooliris.media.RenderView$TextureLoadThread.run(RenderView.java:1160)
05-05 13:32:50.259: WARN/System.err(5268): java.io.EOFException
05-05 13:32:50.259: WARN/System.err(5268): at
java.io.DataInputStream.readInt(DataInputStream.java:287)
05-05 13:32:50.259: WARN/System.err(5268): at
com.cooliris.media.UriTexture.createFrTagFromCache(UriTexture.java:455)
05-05 13:32:50.259: WARN/System.err(5268): at
com.cooliris.media.UriTexture.getTag(UriTexture.java:689)
05-05 13:32:50.259: WARN/System.err(5268): at
com.cooliris.media.RenderView.drawTag(RenderView.java:251)
05-05 13:32:50.259: WARN/System.err(5268): at
com.cooliris.media.RenderView.uploadTexture(RenderView.java:613)
05-05 13:32:50.259: WARN/System.err(5268): at
com.cooliris.media.RenderView.processTextu

Re: [android-developers] Proguard and onClick attribute

2011-05-01 Thread a a
2011/5/2 Ted Hopp :
> For every new project, I always have to add the following lines to
> proguard.cfg:
>
>    -keepclassmembers class * extends android.app.Activity {
>       public void *(android.view.View);
>    }
>
> Otherwise the onClick methods disappear when I publish the app. Is

why?

> there a way for us to change the default proguard.cfg file that's
> created with a new project?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Books

2011-05-01 Thread a a
in fact, i have never writed with java. (i writed c/c++ before)

but i can still good at android ^_^

2011/4/30 Marcin Orlowski :
> On 30 April 2011 13:34, Knutsford Software 
> wrote:
>>
>> What books do you recommend for learning how to develop android apps -
>> I don't want to relearn Java but I gather you can write them in PHP
>
> I'd strongly suggest you learn Java.
>
> Regards,
> Marcin Orlowski
>
> Tray Agenda - keep you daily schedule handy...
> Date In Tray - current date at glance...
> WebnetMobile on Facebook and Twitter
>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

2011-05-01 Thread a a
Dear all,

>From the google SDK document, it have three screen types, which are
landscape, portrait, square.

public static final int ORIENTATION_LANDSCAPE
Since: API Level 1
Constant Value: 2 (0x0002)
public static final int ORIENTATION_PORTRAIT
Since: API Level 1
Constant Value: 1 (0x0001)
public static final int ORIENTATION_SQUARE


I can't imagine why square exist in the world? I never seen the phone
is a square screen, which height equal weight.

Can we necessary always to judge is it a square? If it exist, how can
we judge it's a landscape or portrait?

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

2011-04-30 Thread a a
thank you, i have solve it

2011/4/30 Kostya Vasilyev :
>
> http://developer.android.com/reference/android/graphics/Paint.html
>
> Take a pick:
>
> - getTextSize()
> - getTextBounds()
> - ascent() / descent()
> - getFontMetrics()
>
> -- Kostya
>
> 30.04.2011 17:55, a a пишет:
>>
>> get the text rect, then return the rect height, this is text height.
>>
>> 2011/4/30 a a:
>>>
>>> wrong answer, sorry...
>>>
>>> 2011/4/30 Marcin Orlowski:
>>>>
>>>> On 30 April 2011 12:49, a a  wrote:
>>>>>
>>>>> paint.measureText("text")  return the width, how can i get the height
>>>>> of the "text"?
>>>>
>>>> value you used in setTextSize() * screendensity factor shall mostly give
>>>> what you want.
>>>>
>>>> Regards,
>>>> Marcin Orlowski
>>>>
>>>> Tray Agenda - keep you daily schedule handy...
>>>> Date In Tray - current date at glance...
>>>> WebnetMobile on Facebook and Twitter
>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Android Developers" group.
>>>> To post to this group, send email to android-developers@googlegroups.com
>>>> To unsubscribe from this group, send email to
>>>> android-developers+unsubscr...@googlegroups.com
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/android-developers?hl=en
>
>
> --
> Kostya Vasilyev -- http://kmansoft.wordpress.com
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

2011-04-30 Thread a a
get the text rect, then return the rect height, this is text height.

2011/4/30 a a :
> wrong answer, sorry...
>
> 2011/4/30 Marcin Orlowski :
>> On 30 April 2011 12:49, a a  wrote:
>>>
>>> paint.measureText("text")  return the width, how can i get the height
>>> of the "text"?
>>
>> value you used in setTextSize() * screendensity factor shall mostly give
>> what you want.
>>
>> Regards,
>> Marcin Orlowski
>>
>> Tray Agenda - keep you daily schedule handy...
>> Date In Tray - current date at glance...
>> WebnetMobile on Facebook and Twitter
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>

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

2011-04-30 Thread a a
wrong answer, sorry...

2011/4/30 Marcin Orlowski :
> On 30 April 2011 12:49, a a  wrote:
>>
>> paint.measureText("text")  return the width, how can i get the height
>> of the "text"?
>
> value you used in setTextSize() * screendensity factor shall mostly give
> what you want.
>
> Regards,
> Marcin Orlowski
>
> Tray Agenda - keep you daily schedule handy...
> Date In Tray - current date at glance...
> WebnetMobile on Facebook and Twitter
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

2011-04-30 Thread a a
paint.measureText("text")  return the width, how can i get the height
of the "text"?

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

2011-04-30 Thread a a
I'm modifying the app Gallery3D on android. Meet an issue about thread.

There have a DataSouce class which child class object hold the datasouce.

MediaFeed is implement the Runnable, and also have a datasouce object.

Now, a create a new thread in the datasouce which i wan't to get other
data like "comment", "tag", "note".

But when datasouce thread is stopped by MediaFeed, my new thead in the
datasouce also be stopped.

So, How can my new thread is not stopped either? Can my new thead in
the datasouce escape the thead group?

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: why can't draw text with OpenGL!!!

2011-04-28 Thread a a
2011/4/28 a a :
> Nothing can see with following code which come from
> http://stackoverflow.com/questions/1339136/draw-text-in-opengl-es-android
(at 16th floor)
>
>    public void drawTag() {
>        Bitmap bg = Bitmap.createBitmap(256, 256, Bitmap.Config.ARGB_);
>        bg.eraseColor(0);
>
>        Canvas canvas = new Canvas(bg);
>
>        Drawable drawable =
> mRootLayer.getContext().getResources().getDrawable(R.drawable.default_background);
>        drawable.setBounds(0,0,256,256);
>        drawable.draw(canvas);
>
>     // Draw the text
>        Paint textPaint = new Paint();
>        textPaint.setTextSize(32);
>        textPaint.setAntiAlias(true);
>        textPaint.setARGB(0xff, 0x00, 0x00, 0x00);
>        // draw the text centered
>        canvas.drawText("Hello World", 16,112, textPaint);
>
>        int[] textures = new int[1];
>        GL11 gl = mGL;
>        //Generate one texture pointer...
>        gl.glGenTextures(1, textures, 0);
>        //...and bind it to our array
>        gl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]);
>
>        //Create Nearest Filtered Texture
>        gl.glTexParameterf(GL10.GL_TEXTURE_2D,
> GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_NEAREST);
>        gl.glTexParameterf(GL10.GL_TEXTURE_2D,
> GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR);
>
>        //Different possible texture parameters, e.g. GL10.GL_CLAMP_TO_EDGE
>        gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S,
> GL10.GL_REPEAT);
>        gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T,
> GL10.GL_REPEAT);
>
>        //Use the Android GLUtils to specify a two-dimensional texture
> image from our bitmap
>        GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bg, 0);
>
>        //Clean up
>        bg.recycle();
> }
>

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] why can't draw text with OpenGL!!!

2011-04-28 Thread a a
Nothing can see with following code which come from
http://stackoverflow.com/questions/1339136/draw-text-in-opengl-es-android

public void drawTag() {
Bitmap bg = Bitmap.createBitmap(256, 256, Bitmap.Config.ARGB_);
bg.eraseColor(0);

Canvas canvas = new Canvas(bg);

Drawable drawable =
mRootLayer.getContext().getResources().getDrawable(R.drawable.default_background);
drawable.setBounds(0,0,256,256);
drawable.draw(canvas);

 // Draw the text
Paint textPaint = new Paint();
textPaint.setTextSize(32);
textPaint.setAntiAlias(true);
textPaint.setARGB(0xff, 0x00, 0x00, 0x00);
// draw the text centered
canvas.drawText("Hello World", 16,112, textPaint);

int[] textures = new int[1];
GL11 gl = mGL;
//Generate one texture pointer...
gl.glGenTextures(1, textures, 0);
//...and bind it to our array
gl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]);

//Create Nearest Filtered Texture
gl.glTexParameterf(GL10.GL_TEXTURE_2D,
GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_NEAREST);
gl.glTexParameterf(GL10.GL_TEXTURE_2D,
GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR);

//Different possible texture parameters, e.g. GL10.GL_CLAMP_TO_EDGE
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S,
GL10.GL_REPEAT);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T,
GL10.GL_REPEAT);

//Use the Android GLUtils to specify a two-dimensional texture
image from our bitmap
GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, bg, 0);

//Clean up
bg.recycle();
}

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

2011-04-27 Thread a a
Another question, Is it possible that new(create) several canvas on
the screen at one time?

2011/4/28 Romain Guy :
> You cannot draw outside of a bitmap and see it... since it's outside. You
> can apply a transform on the Canvas to bring the text back in View (for
> instance, do translate(-120, 0) then drawText(120, 0) will be like drawing
> text at 0,0).
>
> On Wed, Apr 27, 2011 at 10:00 PM, a a  wrote:
>>
>> Yes, it can see nothing. I wan't to draw the text outside and can see it.
>>
>> 2011/4/28 Romain Guy :
>> > You can draw outside, but nothing will happen.
>> >
>> > On Wed, Apr 27, 2011 at 9:52 PM, a a  wrote:
>> >>
>> >> Dear All,
>> >>
>> >> The Canvas class holds the "draw" calls. To draw something, you need 4
>> >> basic components: A Bitmap to hold the pixels, a Canvas to host the
>> >> draw calls (writing into the bitmap), a drawing primitive (e.g. Rect,
>> >> Path, text, Bitmap), and a paint (to describe the colors and styles
>> >> for the drawing).
>> >>
>> >> Above is google SDK document.
>> >> --
>> >>
>> >> I have a question, I have a small bitmap (50 * 60), init the canvas
>> >> with this bitmap. Can we only draw text on this scope(50*60)?
>> >>
>> >> How can we draw outside this bitmap(50*60) ?
>> >>
>> >> I try the canvas.clipRect(0, 0, 512, 512); and want to draw at (100,
>> >> 150), but it can't work.
>> >>
>> >> --
>> >> You received this message because you are subscribed to the Google
>> >> Groups "Android Developers" group.
>> >> To post to this group, send email to
>> >> android-developers@googlegroups.com
>> >> To unsubscribe from this group, send email to
>> >> android-developers+unsubscr...@googlegroups.com
>> >> For more options, visit this group at
>> >> http://groups.google.com/group/android-developers?hl=en
>> >
>> >
>> >
>> > --
>> > Romain Guy
>> > Android framework engineer
>> > romain...@android.com
>> >
>> > Note: please don't send private questions to me, as I don't have time to
>> > provide private support.  All such questions should be posted on public
>> > forums, where I and others can see and answer them
>> >
>> > --
>> > You received this message because you are subscribed to the Google
>> > Groups "Android Developers" group.
>> > To post to this group, send email to android-developers@googlegroups.com
>> > To unsubscribe from this group, 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
>
>
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support.  All such questions should be posted on public
> forums, where I and others can see and answer them
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Canvas draw outside the bitmap.

2011-04-27 Thread a a
Yes, it can see nothing. I wan't to draw the text outside and can see it.

2011/4/28 Romain Guy :
> You can draw outside, but nothing will happen.
>
> On Wed, Apr 27, 2011 at 9:52 PM, a a  wrote:
>>
>> Dear All,
>>
>> The Canvas class holds the "draw" calls. To draw something, you need 4
>> basic components: A Bitmap to hold the pixels, a Canvas to host the
>> draw calls (writing into the bitmap), a drawing primitive (e.g. Rect,
>> Path, text, Bitmap), and a paint (to describe the colors and styles
>> for the drawing).
>>
>> Above is google SDK document.
>> --
>>
>> I have a question, I have a small bitmap (50 * 60), init the canvas
>> with this bitmap. Can we only draw text on this scope(50*60)?
>>
>> How can we draw outside this bitmap(50*60) ?
>>
>> I try the canvas.clipRect(0, 0, 512, 512); and want to draw at (100,
>> 150), but it can't work.
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>
> --
> Romain Guy
> Android framework engineer
> romain...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support.  All such questions should be posted on public
> forums, where I and others can see and answer them
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Canvas draw outside the bitmap.

2011-04-27 Thread a a
Dear All,

The Canvas class holds the "draw" calls. To draw something, you need 4
basic components: A Bitmap to hold the pixels, a Canvas to host the
draw calls (writing into the bitmap), a drawing primitive (e.g. Rect,
Path, text, Bitmap), and a paint (to describe the colors and styles
for the drawing).

Above is google SDK document.
--

I have a question, I have a small bitmap (50 * 60), init the canvas
with this bitmap. Can we only draw text on this scope(50*60)?

How can we draw outside this bitmap(50*60) ?

I try the canvas.clipRect(0, 0, 512, 512); and want to draw at (100,
150), but it can't work.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 can i user SVN to check in my code to google server?

2011-04-27 Thread a a
Cannot complete the install because one or more required items could
not be found.
  Software being installed: Subversive SVN Integration for the Mylyn
Project (Optional) (Incubation) 0.7.9.I20110318-1700
(org.eclipse.team.svn.mylyn.feature.group 0.7.9.I20110318-1700)
  Missing requirement: Subversive Integration for the Mylyn Project
(Incubation) 0.7.9.I20110318-1700 (org.eclipse.team.svn.mylyn
0.7.9.I20110318-1700) requires 'bundle org.eclipse.mylyn.team.ui
3.0.0' but it could not be found
  Cannot satisfy dependency:
From: Subversive SVN Integration for the Mylyn Project (Optional)
(Incubation) 0.7.9.I20110318-1700
(org.eclipse.team.svn.mylyn.feature.group 0.7.9.I20110318-1700)
To: org.eclipse.team.svn.mylyn [0.7.9.I20110318-1700]



2011/4/27 J Handal :
>  Hi aa,
>
> http://blog.search-computing.net/2010/04/using-a-svn-repository-with-eclipse/
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Error when launching a ringtone.

2011-04-27 Thread a a
android.content.res.Resources$NotFoundException: File res/raw/ringtone
from drawable resource ID #0x7f05

file res/raw/ringtone is not exist?

2011/4/27 Alaeddine Ghribi :
> Hi,
> I have an AlertDialog that when it shows it launches a ringtone,
> however i have always an exception, here is what i did:
> ad.show();
>        try {
>                MediaPlayer mt = MediaPlayer.create(context,R.raw.ringtone);
>            mt.setVolume(5,5);
>          mt.start();
>          mt.setLooping(true);
>                }
>                catch(Exception e)
>                {
>                        Log.d("erreur sonnerie","erreur",e);
>                }
>
> After showing the AlertDialog(ad.show() ) the ringtone is normally
> launched.
>
> Here is the Log:
>
> 04-27 00:55:07.658: DEBUG/erreur sonnerie(893): erreur
> 04-27 00:55:07.658: DEBUG/erreur sonnerie(893):
> android.content.res.Resources$NotFoundException: File res/raw/ringtone
> from drawable resource ID #0x7f05
> 04-27 00:55:07.658: DEBUG/erreur sonnerie(893):     at
> android.content.res.Resources.openRawResourceFd(Resources.java:860)
> 04-27 00:55:07.658: DEBUG/erreur sonnerie(893):     at
> android.media.MediaPlayer.create(MediaPlayer.java:662)
> 04-27 00:55:07.658: DEBUG/erreur sonnerie(893):     at
> com.sip_communicator.Dialog.répondre(Dialog.java:101)
> 04-27 00:55:07.658: DEBUG/erreur sonnerie(893):     at
> com.sip_communicator.IncomingCallReceiver.onReceive(IncomingCallReceiver.java:
> 28)
> 04-27 00:55:07.658: DEBUG/erreur sonnerie(893):     at
> android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:709)
> 04-27 00:55:07.658: DEBUG/erreur sonnerie(893):     at
> android.os.Handler.handleCallback(Handler.java:587)
> 04-27 00:55:07.658: DEBUG/erreur sonnerie(893):     at
> android.os.Handler.dispatchMessage(Handler.java:92)
> 04-27 00:55:07.658: DEBUG/erreur sonnerie(893):     at
> android.os.Looper.loop(Looper.java:123)
> 04-27 00:55:07.658: DEBUG/erreur sonnerie(893):     at
> android.app.ActivityThread.main(ActivityThread.java:3683)
> 04-27 00:55:07.658: DEBUG/erreur sonnerie(893):     at
> java.lang.reflect.Method.invokeNative(Native Method)
> 04-27 00:55:07.658: DEBUG/erreur sonnerie(893):     at
> java.lang.reflect.Method.invoke(Method.java:507)
> 04-27 00:55:07.658: DEBUG/erreur sonnerie(893):     at
> com.android.internal.os.ZygoteInit
> $MethodAndArgsCaller.run(ZygoteInit.java:839)
> 04-27 00:55:07.658: DEBUG/erreur sonnerie(893):     at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
> 04-27 00:55:07.658: DEBUG/erreur sonnerie(893):     at
> dalvik.system.NativeStart.main(Native Method)
> 04-27 00:55:07.658: DEBUG/erreur sonnerie(893): Caused by:
> java.io.FileNotFoundException: This file can not be opened as a file
> descriptor; it is probably compressed
> 04-27 00:55:07.658: DEBUG/erreur sonnerie(893):     at
> android.content.res.AssetManager.openNonAssetFdNative(Native Method)
> 04-27 00:55:07.658: DEBUG/erreur sonnerie(893):     at
> android.content.res.AssetManager.openNonAssetFd(AssetManager.java:427)
> 04-27 00:55:07.658: DEBUG/erreur sonnerie(893):     at
> android.content.res.Resources.openRawResourceFd(Resources.java:857)
>
>
> The ringtone is .ogg file .
> What could me the problem ?
>
> Thank you very 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] How can i user SVN to check in my code to google server?

2011-04-27 Thread a a
I mean under

code.google.com/p/my code project

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


[android-developers] Can't share via gallery to gmail

2011-04-25 Thread a a
Form ddms, it shows the size is 0, but uri is not null, why??

03-01 16:02:53.759: INFO/ActivityManager(202): Starting: Intent {
act=android.intent.action.SEND typ=image/jpeg flg=0x200
cmp=com.google.android.gm/.ComposeActivity (has extras) } from pid
7714
03-01 16:02:53.819: INFO/Gmail(7714): > Attachment uri:
http://a6.sphotos.ak.fbcdn.net/hphotos-ak-ash2/74526_162310987141008_10863236505_292436_5733933_n.jpg
03-01 16:02:53.819: INFO/Gmail(7714): >   type: image/jpeg
03-01 16:02:53.819: INFO/Gmail(7714): >   name:
74526_162310987141008_10863236505_292436_5733933_n.jpg
03-01 16:02:53.819: INFO/Gmail(7714): >   size: 0

Following is Gallery code



mimeType = "image/jpeg";
intent.setType(mimeType);
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
intent.setAction(Intent.ACTION_SEND);
intent.putExtra(Intent.EXTRA_STREAM, uris.get(0));


startResolvedActivity(intent, info);

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


[android-developers] How can i stop to envoke onDrawFrame

2011-04-20 Thread a a
Dear all,

Below function will envoked by android once again and again.
public void onDrawFrame(GL10 gl1);

How can i stop it?


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] [Android Developers] How stlove permission denial

2011-04-19 Thread a a
But i really need send the BOOT_COMPLETED broadcast from my application.

There is my project
When photo boot, my service will run immediately. so i declare the
 in AndroidManifest.xml







But that service should not work when the user are not reboot his/her
photo at the first time he/she install the apk. So i want to send the
boot_completed boardcast to the backgroudReceiver manually on the
activity once the user open my app, not need to reboot  phone. Do you
understand me well ?


2011/4/19 Mark Murphy :
> To solve this, don't try to send a BOOT_COMPLETED broadcast from an
> SDK application.
>
> On Tue, Apr 19, 2011 at 11:22 AM, a a  wrote:
>> 04-19 23:12:09.814: ERROR/AndroidRuntime(2260): Caused by:
>> java.lang.SecurityException: Permission Denial: not allowed to send
>> broadcast android.intent.action.BOOT_COMPLETED from pid=2260,
>> uid=10060
>> 04-19 23:12:09.814: ERROR/AndroidRuntime(2260):     at
>> android.os.Parcel.readException(Parcel.java:1260)
>> 04-19 23:12:09.814: ERROR/AndroidRuntime(2260):     at
>> android.os.Parcel.readException(Parcel.java:1248)
>> 04-19 23:12:09.814: ERROR/AndroidRuntime(2260):     at
>> android.app.ActivityManagerProxy.broadcastIntent(ActivityManagerNative.java:1495)
>> 04-19 23:12:09.814: ERROR/AndroidRuntime(2260):     at
>> android.app.ContextImpl.sendBroadcast(ContextImpl.java:651)
>> 04-19 23:12:09.814: ERROR/AndroidRuntime(2260):     at
>> android.content.ContextWrapper.sendBroadcast(ContextWrapper.java:271)
>> 04-19 23:12:09.814: ERROR/AndroidRuntime(2260):     at
>> com.android.clocklive.SettingActivity.recoverActivity(SettingActivity.java:228)
>> 04-19 23:12:09.814: ERROR/AndroidRuntime(2260):     at
>> com.android.clocklive.SettingActivity.onResume(SettingActivity.java:95)
>> 04-19 23:12:09.814: ERROR/AndroidRuntime(2260):     at
>> android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1149)
>> 04-19 23:12:09.814: ERROR/AndroidRuntime(2260):     at
>> android.app.Activity.performResume(Activity.java:4390)
>> 04-19 23:12:09.814: ERROR/AndroidRuntime(2260):     at
>> android.app.ActivityThread.performResumeActivity(ActivityThread.java:3118)
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://github.com/commonsguy
> http://commonsware.com/blog | http://twitter.com/commonsguy
>
> Android 3.0 Programming Books: http://commonsware.com/books
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

2011-04-19 Thread a a
04-19 23:12:09.814: ERROR/AndroidRuntime(2260): Caused by:
java.lang.SecurityException: Permission Denial: not allowed to send
broadcast android.intent.action.BOOT_COMPLETED from pid=2260,
uid=10060
04-19 23:12:09.814: ERROR/AndroidRuntime(2260): at
android.os.Parcel.readException(Parcel.java:1260)
04-19 23:12:09.814: ERROR/AndroidRuntime(2260): at
android.os.Parcel.readException(Parcel.java:1248)
04-19 23:12:09.814: ERROR/AndroidRuntime(2260): at
android.app.ActivityManagerProxy.broadcastIntent(ActivityManagerNative.java:1495)
04-19 23:12:09.814: ERROR/AndroidRuntime(2260): at
android.app.ContextImpl.sendBroadcast(ContextImpl.java:651)
04-19 23:12:09.814: ERROR/AndroidRuntime(2260): at
android.content.ContextWrapper.sendBroadcast(ContextWrapper.java:271)
04-19 23:12:09.814: ERROR/AndroidRuntime(2260): at
com.android.clocklive.SettingActivity.recoverActivity(SettingActivity.java:228)
04-19 23:12:09.814: ERROR/AndroidRuntime(2260): at
com.android.clocklive.SettingActivity.onResume(SettingActivity.java:95)
04-19 23:12:09.814: ERROR/AndroidRuntime(2260): at
android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1149)
04-19 23:12:09.814: ERROR/AndroidRuntime(2260): at
android.app.Activity.performResume(Activity.java:4390)
04-19 23:12:09.814: ERROR/AndroidRuntime(2260): at
android.app.ActivityThread.performResumeActivity(ActivityThread.java:3118)

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

2011-04-18 Thread a a
2011/4/19 kumar Gaurav :
> i'm using following code in manifest for getting permission for
> changing wallpaper
> 
> http://schemas.android.com/apk/res/android";
>      package="com.and.third"
>      android:versionCode="1"
>      android:versionName="1.0">
>    
>     uses-permission>
>     android:name="android.permission.SET_WALLPAPER" >
>
>
>    

add below permission to try again.

android:permission="android.permission.BIND_WALLPAPER"

>                          android:label="@string/app_name"
>                  >
>            
>                
>                 android:name="android.intent.category.LAUNCHER" />
>            
>        
>
>    
> 
> but still it throws an exception. please help me with what else m
> required to do.
> thank you
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

2011-04-18 Thread a a
2011/4/19 Dianne Hackborn :
> This is not part of the SDK because it is not a supported API, and thus not
> an appropriate question for this list.

I don't think so, If is not part of the SDK, thus not an appropriate
question for this list?
We can ask anything question about android here.

> An app using this is going to break across various platform versions as the
> internal impl changes.


> This particular IPC call has been behind a permission that apps can't get
> for a long time.

I don't think so. Because we need to change the BacklightBrightness in
the future or forever in our app, not only the system.

>
> On Sun, Aug 22, 2010 at 12:27 AM, apilink  wrote:
>>
>> Hi experts, anybody knows how can I get in my sdk the package
>> "IPowerManager" instead of "PowerManager". I am trying to change the
>> screen birghtness programatically.
>>
>> Thaks in advance
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>
> --
> Dianne Hackborn
> Android framework engineer
> hack...@android.com
>
> Note: please don't send private questions to me, as I don't have time to
> provide private support, and so won't reply to such e-mails.  All such
> questions should be posted on public forums, where I and others can see and
> answer them.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Is it permission denial error in com.android.providers.settings?

2011-04-18 Thread a a
Below permission has add in my AndroidManifest.xml



Bug still cause WRITE_SECURE_SETTINGS exception, why?

Log error following:

03-04 09:53:57.589: ERROR/DatabaseUtils(202): Writing exception to parcel
03-04 09:53:57.589: ERROR/DatabaseUtils(202):
java.lang.SecurityException: Permission denial: writing to secure
settings requires android.permission.WRITE_SECURE_SETTINGS
03-04 09:53:57.589: ERROR/DatabaseUtils(202): at
com.android.providers.settings.SettingsProvider.checkWritePermissions(SettingsProvider.java:211)
03-04 09:53:57.589: ERROR/DatabaseUtils(202): at
com.android.providers.settings.SettingsProvider.insert(SettingsProvider.java:552)
03-04 09:53:57.589: ERROR/DatabaseUtils(202): at
android.content.ContentProvider$Transport.insert(ContentProvider.java:198)
03-04 09:53:57.589: ERROR/DatabaseUtils(202): at
android.content.ContentProviderNative.onTransact(ContentProviderNative.java:146)
03-04 09:53:57.589: ERROR/DatabaseUtils(202): at
android.os.Binder.execTransact(Binder.java:320)
03-04 09:53:57.589: ERROR/DatabaseUtils(202): at
dalvik.system.NativeStart.run(Native Method)
03-04 09:53:57.589: WARN/dalvikvm(8976): threadid=1: thread exiting
with uncaught exception (group=0x40015560)
03-04 09:53:57.589: ERROR/AndroidRuntime(8976): FATAL EXCEPTION: main
03-04 09:53:57.589: ERROR/AndroidRuntime(8976):
java.lang.SecurityException: Permission denial: writing to secure
settings requires android.permission.WRITE_SECURE_SETTINGS
03-04 09:53:57.589: ERROR/AndroidRuntime(8976): at
android.os.Parcel.readException(Parcel.java:1322)
03-04 09:53:57.589: ERROR/AndroidRuntime(8976): at
android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:160)
03-04 09:53:57.589: ERROR/AndroidRuntime(8976): at
android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:114)
03-04 09:53:57.589: ERROR/AndroidRuntime(8976): at
android.content.ContentProviderProxy.insert(ContentProviderNative.java:408)
03-04 09:53:57.589: ERROR/AndroidRuntime(8976): at
android.content.ContentResolver.insert(ContentResolver.java:604)
03-04 09:53:57.589: ERROR/AndroidRuntime(8976): at
android.provider.Settings$NameValueTable.putString(Settings.java:575)
03-04 09:53:57.589: ERROR/AndroidRuntime(8976): at
android.provider.Settings$Secure.putString(Settings.java:2199)
03-04 09:53:57.589: ERROR/AndroidRuntime(8976): at
android.provider.Settings$Secure.setLocationProviderEnabled(Settings.java:3657)

(below is my code to envoke  com.android.providers.settings)
Settings.Secure.setLocationProviderEnabled(context.getContentResolver(),LocationManager.GPS_PROVIDER,
on);

03-04 09:53:57.589: ERROR/AndroidRuntime(8976): at
com.android.clocklive.DeviceControlAdapter.enableGPS(DeviceControlAdapter.java:89)
03-04 09:53:57.589: ERROR/AndroidRuntime(8976): at
com.android.clocklive.ClickButtonHandler.onClick(ClickButtonHandler.java:48)


03-04 09:53:57.589: ERROR/AndroidRuntime(8976): at
android.view.View.performClick(View.java:2485)
03-04 09:53:57.589: ERROR/AndroidRuntime(8976): at
android.widget.CompoundButton.performClick(CompoundButton.java:99)
03-04 09:53:57.589: ERROR/AndroidRuntime(8976): at
android.view.View$PerformClick.run(View.java:9081)
03-04 09:53:57.589: ERROR/AndroidRuntime(8976): at
android.os.Handler.handleCallback(Handler.java:603)
03-04 09:53:57.589: ERROR/AndroidRuntime(8976): at
android.os.Handler.dispatchMessage(Handler.java:92)
03-04 09:53:57.589: ERROR/AndroidRuntime(8976): at
android.os.Looper.loop(Looper.java:123)
03-04 09:53:57.589: ERROR/AndroidRuntime(8976): at
android.app.ActivityThread.main(ActivityThread.java:3701)
03-04 09:53:57.589: ERROR/AndroidRuntime(8976): at
java.lang.reflect.Method.invokeNative(Native Method)
03-04 09:53:57.589: ERROR/AndroidRuntime(8976): at
java.lang.reflect.Method.invoke(Method.java:507)
03-04 09:53:57.589: ERROR/AndroidRuntime(8976): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:875)
03-04 09:53:57.589: ERROR/AndroidRuntime(8976): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:633)
03-04 09:53:57.589: ERROR/AndroidRuntime(8976): at
dalvik.system.NativeStart.main(Native Method)

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

2011-04-18 Thread a a
In order to see an icon in the live wallpaper menu, you need to set
the android:thumbnail attribute for the applications  tag.
This will normally be found in the XML file corresponding to the class
that extends WallpaperService.

Looking at the CubeLiveWallpaper sample application provided with the
SDK, we see this tag to be located in cube1.xml and cube2.xml. A
modified version below displays the icon thumb.png located in
res/drawable and provides a description defined in strings.xml

http://schemas.android.com/apk/res/android";
android:thumbnail="@drawable/thumb"
android:description="@string/description"

android:settingsActivity="com.example.android.livecubes.cube2.CubeWallpaper2Settings"
/>

2011/1/15 John Lussmyer :
> So, anyone have any ideas why my icon doesn't show up in the list of Live
> Wallpapers (just the generic icon shows), but DOES show up in the Wallpaper
> menu, Configure entry after installing the wallpaper?
>
> On Thu, Jan 6, 2011 at 1:18 PM, John Lussmyer 
> wrote:
>>
>> Okay, I didn't have the icon specified there.
>> I've added it.
>> Uninstalled from the emulator, and re-installed.
>> The icon still doesn't show up in the Live Wallpapers menu, and no errors
>> are displayed in logcat.
>> (Sure wish my AT&T 2.1 phone supported Live Wallpapers!)
>>
>> On Thu, Jan 6, 2011 at 12:26 PM, Josh  wrote:
>>>
>>> You generally have a file like /res/xml/MyWallpaper.xml with a
>>>  tag as the root.  This is where you define the settings
>>> activity and thumbnail icon, which is generally the same as your app
>>> icon, but can be different.  See
>>>
>>> http://developer.android.com/resources/samples/CubeLiveWallpaper/res/xml/cube2.html
>>>
>>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

2011-04-18 Thread a a
private void setBrightness(int brightness) {
try {
IPowerManager power = IPowerManager.Stub.asInterface(
ServiceManager.getService("power"));
if (power != null) {
power.setBacklightBrightness(brightness);
}
} catch (RemoteException doe) {

}
}

2010/8/22 apilink :
> Hi experts, anybody knows how can I get in my sdk the package
> "IPowerManager" instead of "PowerManager". I am trying to change the
> screen birghtness programatically.
>
> Thaks in advance
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


[android-developers] How declare in AndroidManifest when one application have two packages

2011-04-18 Thread a a
Dear all,

I have two packages "com.android.one" and "com.android.two". the first
package have on activity, and package two have an activity name for
activityA

AndroidManifest.xml following
http://schemas.android.com/apk/res/android";
package="com.android.one">
..
..


.
.


My code following

ComponentName componentName = new ComponentName("com.android.two",
"com.android.two.activityA");

Intent intent=new Intent();
intent.setComponent(componentName);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);


Error log following

03-03 20:10:17.217: ERROR/HelloYoumi(16917): Unable to find explicit
activity class {com.android.two/com.android.two.activityA}; have you
declared this activity in your AndroidManifest.xml?
03-03 20:10:17.217: INFO/ActivityManager(202): Starting: Intent {
flg=0x1000 cmp=com.android.two/.activityA } from pid 16917

So, it seams error declared in AndroidManifest.xml, How can i declare
in AndroidManifest.xml?

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


[android-developers] Re: Strange for drawable and gen R

2011-04-17 Thread a a
So i delete the gen folder manually, when eclipse yield the gen, it
still have scrollBg and catBg id.

it is very very strange for me, it make me subversion for my android
knowledge system, very need your help.

Thanks very much.

2011/4/18 a a :
> Dear all,
>
>    There have no scrollBg and catBg bitmap in drawable or drawable-***
>
> But, there have scrollBg and catBg id in gen.R.drawable and the
> following xml is ok.   why??
>
>
> http://schemas.android.com/apk/res/android";
>    android:orientation="vertical"
>    android:layout_width="fill_parent"
>    android:layout_height="fill_parent"
>    android:background="@drawable/scrollBg">
>            android:layout_height="wrap_content"
>        android:stretchColumns="1">
>        
>                            android:layout_height="25dp"
>                android:paddingLeft="8dp"
>                android:textColor="@drawable/catWord"
>                android:gravity="center_vertical"
>                android:textSize="16sp"
>                android:layout_span="3"
>                android:text="@string/wireless">
>        
>        
>

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

2011-04-17 Thread a a
Dear all,

There have no scrollBg and catBg bitmap in drawable or drawable-***

But, there have scrollBg and catBg id in gen.R.drawable and the
following xml is ok.   why??


http://schemas.android.com/apk/res/android";
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/scrollBg">






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


Re: [android-developers] Re: How launch activity from live wallpaper

2011-04-15 Thread a a
my god, you are vy gd

After i added Adview.jar, it can work now, thank you very
much!1

2011/4/16 Kevin TeslaCoil Software :
>> java.lang.RuntimeException: Unable to start activity
>> ComponentInfo{com.example.android.livecubes/com.example.android.livecubes.c 
>> ube1.XmlSample}:
>> android.view.InflateException: Binary XML file line #11: Error
>> inflating class net.youmi.android.AdView
>
> Your activity is starting, but the activity is crashing because your
> XML references net.youmi.android.AdView and that class isn't found.
> Most likely your forgot to include the youmi AdView jar. Test first
> without ads and then add them when you have it working.
>
> -Kevin
>
>
> On Apr 15, 10:27 pm, a a  wrote:
>> Dear all,
>>
>>     There have a apk which have published on google market named
>> "Launcher Wall", it can launch activity from it's live wallpaper.
>>
>> So, i can launch my activity from my live wallpaper also, right? But
>> following exception caused when tap the live wallpaper to launch.
>>
>> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800): FATAL EXCEPTION: main
>> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):
>> java.lang.RuntimeException: Unable to start activity
>> ComponentInfo{com.example.android.livecubes/com.example.android.livecubes.c 
>> ube1.XmlSample}:
>> android.view.InflateException: Binary XML file line #11: Error
>> inflating class net.youmi.android.AdView
>> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
>> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1665)
>> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
>> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1681)
>> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
>> android.app.ActivityThread.access$1500(ActivityThread.java:118)
>> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
>> android.app.ActivityThread$H.handleMessage(ActivityThread.java:933)
>> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
>> android.os.Handler.dispatchMessage(Handler.java:99)
>> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
>> android.os.Looper.loop(Looper.java:123)
>> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
>> android.app.ActivityThread.main(ActivityThread.java:3701)
>> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
>> java.lang.reflect.Method.invokeNative(Native Method)
>> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
>> java.lang.reflect.Method.invoke(Method.java:507)
>> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
>> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java: 
>> 875)
>> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
>> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:633)
>> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
>> dalvik.system.NativeStart.main(Native Method)
>> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800): Caused by:
>> android.view.InflateException: Binary XML file line #11: Error
>> inflating class net.youmi.android.AdView
>> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
>> android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:581)
>> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
>> android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
>> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
>> android.view.LayoutInflater.inflate(LayoutInflater.java:408)
>> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
>> android.view.LayoutInflater.inflate(LayoutInflater.java:320)
>> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
>> android.view.LayoutInflater.inflate(LayoutInflater.java:276)
>> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
>> com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.jav 
>> a:207)
>> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
>> android.app.Activity.setContentView(Activity.java:1657)
>> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
>> com.example.android.livecubes.cube1.XmlSample.onCreate(XmlSample.java:14)
>> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
>> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
>> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
>> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1613)
>> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     ... 11 more
>> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800): Caused by:
>> ja

[android-developers] Re: How launch activity from live wallpaper

2011-04-15 Thread a a
2011/4/16 a a :
> Dear all,
>
>    There have a apk which have published on google market named
> "Launcher Wall", it can launch activity from it's live wallpaper.
>
> So, i can launch my activity from my live wallpaper also, right? But
> following exception caused when tap the live wallpaper to launch.
>
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800): FATAL EXCEPTION: main
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):
> java.lang.RuntimeException: Unable to start activity
> ComponentInfo{com.example.android.livecubes/com.example.android.livecubes.cube1.XmlSample}:
> android.view.InflateException: Binary XML file line #11: Error
> inflating class net.youmi.android.AdView
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1665)
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1681)
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
> android.app.ActivityThread.access$1500(ActivityThread.java:118)
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:933)
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
> android.os.Handler.dispatchMessage(Handler.java:99)
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
> android.os.Looper.loop(Looper.java:123)
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
> android.app.ActivityThread.main(ActivityThread.java:3701)
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
> java.lang.reflect.Method.invokeNative(Native Method)
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
> java.lang.reflect.Method.invoke(Method.java:507)
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:875)
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:633)
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
> dalvik.system.NativeStart.main(Native Method)
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800): Caused by:
> android.view.InflateException: Binary XML file line #11: Error
> inflating class net.youmi.android.AdView
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
> android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:581)
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
> android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
> android.view.LayoutInflater.inflate(LayoutInflater.java:408)
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
> android.view.LayoutInflater.inflate(LayoutInflater.java:320)
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
> android.view.LayoutInflater.inflate(LayoutInflater.java:276)
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
> com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
> android.app.Activity.setContentView(Activity.java:1657)
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
> com.example.android.livecubes.cube1.XmlSample.onCreate(XmlSample.java:14)
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1613)
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     ... 11 more
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800): Caused by:
> java.lang.ClassNotFoundException: net.youmi.android.AdView in loader
> dalvik.system.PathClassLoader[/data/app/com.example.android.livecubes-2.apk]
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
> dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
> java.lang.ClassLoader.loadClass(ClassLoader.java:551)
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
> java.lang.ClassLoader.loadClass(ClassLoader.java:511)
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
> android.view.LayoutInflater.createView(LayoutInflater.java:471)
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     at
> android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
> 03-01 09:45:12.005: ERROR/AndroidRuntime(4800):     ... 20 more
> 03-01 09:45:12.015: WARN/ActivityManager(203):   Force finishing
> activity com.example.android.livecubes/.cube1.XmlSample
> 03-01 09:45:12.025: WARN/ActivityManager(203):   Force finishing
> activity com.android.wallpaper.livepick

[android-developers] How launch activity from live wallpaper

2011-04-15 Thread a a
Dear all,

There have a apk which have published on google market named
"Launcher Wall", it can launch activity from it's live wallpaper.

So, i can launch my activity from my live wallpaper also, right? But
following exception caused when tap the live wallpaper to launch.

03-01 09:45:12.005: ERROR/AndroidRuntime(4800): FATAL EXCEPTION: main
03-01 09:45:12.005: ERROR/AndroidRuntime(4800):
java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.example.android.livecubes/com.example.android.livecubes.cube1.XmlSample}:
android.view.InflateException: Binary XML file line #11: Error
inflating class net.youmi.android.AdView
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1665)
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1681)
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): at
android.app.ActivityThread.access$1500(ActivityThread.java:118)
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:933)
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): at
android.os.Handler.dispatchMessage(Handler.java:99)
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): at
android.os.Looper.loop(Looper.java:123)
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): at
android.app.ActivityThread.main(ActivityThread.java:3701)
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): at
java.lang.reflect.Method.invokeNative(Native Method)
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): at
java.lang.reflect.Method.invoke(Method.java:507)
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:875)
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:633)
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): at
dalvik.system.NativeStart.main(Native Method)
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): Caused by:
android.view.InflateException: Binary XML file line #11: Error
inflating class net.youmi.android.AdView
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): at
android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:581)
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): at
android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): at
android.view.LayoutInflater.inflate(LayoutInflater.java:408)
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): at
android.view.LayoutInflater.inflate(LayoutInflater.java:320)
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): at
android.view.LayoutInflater.inflate(LayoutInflater.java:276)
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): at
com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): at
android.app.Activity.setContentView(Activity.java:1657)
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): at
com.example.android.livecubes.cube1.XmlSample.onCreate(XmlSample.java:14)
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1613)
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): ... 11 more
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): Caused by:
java.lang.ClassNotFoundException: net.youmi.android.AdView in loader
dalvik.system.PathClassLoader[/data/app/com.example.android.livecubes-2.apk]
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): at
dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): at
java.lang.ClassLoader.loadClass(ClassLoader.java:551)
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): at
java.lang.ClassLoader.loadClass(ClassLoader.java:511)
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): at
android.view.LayoutInflater.createView(LayoutInflater.java:471)
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): at
android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
03-01 09:45:12.005: ERROR/AndroidRuntime(4800): ... 20 more
03-01 09:45:12.015: WARN/ActivityManager(203):   Force finishing
activity com.example.android.livecubes/.cube1.XmlSample
03-01 09:45:12.025: WARN/ActivityManager(203):   Force finishing
activity com.android.wallpaper.livepicker/.LiveWallpaperPreview
03-01 09:45:12.526: WARN/ActivityManager(203): Activity pause timeout
for HistoryRecord{408cd598
com.example.android.livecubes/.cube1.XmlSample}
03-01 09:45:22.606: WARN/ActivityManager(203): Activity destroy
timeout for HistoryRecord{408cd598
com.example.android.livecubes/.cube1.XmlSample}
03-01 09:45:32.615: WARN/ActivityManager(203): Timeout executing
service: ServiceRecord{408fdfc8
com.example.android.livec

Re: [android-developers] LatinIME code missing dictionaries

2011-04-13 Thread a a
You should make it by yourself, thanks.

2011/4/12 Pradeep :
> Hi,
>
> Why are the dictionaries for different languages not part of LatinIME
> source code ? The apk supports prediction for some languages but
> dictionaries for these languages are not part of LatinIME source code.
> Where can I get them ?
>
> Regards,
> Pradeep
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: How to eliminate paint sawtooth

2011-04-08 Thread a a
2011/4/8 a a :
> I draw a 30 degree line with paint,  but it seams not smoothness. How
> can i eliminate the sawtooth?
>
> my code below:
>
>
>
>            mPaint.setColor(Color.WHITE);
>            mPaint.setAntiAlias(true);
>            mPaint.setStrokeCap(Paint.Cap.ROUND);
>            mPaint.setStyle(Paint.Style.STROKE);
>            Canvas.drawLine(x1, y1, x2, y2, mPaint);
>

That's ok.

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


[android-developers] How to eliminate paint sawtooth

2011-04-07 Thread a a
I draw a 30 degree line with paint,  but it seams not smoothness. How
can i eliminate the sawtooth?

my code below:



mPaint.setColor(Color.WHITE);
mPaint.setAntiAlias(true);
mPaint.setStrokeCap(Paint.Cap.ROUND);
mPaint.setStyle(Paint.Style.STROKE);
Canvas.drawLine(x1, y1, x2, y2, mPaint);

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

2011-04-05 Thread a a
After two days thinking your explanation, i have understand very well
now, thanks very much!

There are two point with my acquaintance:
1. "--x" at the first, it advoid next "power of two" is double with
the "power of two", like 1000(dec is 8), it will became 16.

2. "i<<=1" (doing i++ in the for loop), it is very very profound and
effective. I coat almost 2 hours about this.



2011/4/2 Hari Edo :
>
> On Apr 1, 11:16 pm, a a  wrote:
>> But i can't understand the following algorithm
>>
>> function nextHighestPowerOfTwo(x) {
>>     --x;
>>     for (var i = 1; i < 32; i <<= 1) {
>>         x = x | x >> i;
>>     }
>>     return x + 1;
>>
>> }
>
> On the first loop, take the value and "smear" its bits
> once rightward:
>
>  x was:        10010111
>  x >> 1:       01001011
>  x | x >> 1:   11010001
>
> On the second loop, you could "smear" the bits once
> rightward again (doing i++ in the for loop), but that
> would be a waste of time since there can be no more
> single 1 bits.  All the runs of 1 bits are now fatter.
> So on the second loop, smear the bits TWICE rightward,
> by doing (i <<= 1) in the for loop instead.
>
>  x was:        11010001
>  x >> 2:       00110100
>  x | x >> 2:   1101
>
> On the third loop, smear the bits FOUR rightward,
> since any 1 bit is now fatter.
>
>  x was:        1101
>  x >> 4:       
>  x | x >> 4:   
>
> We're done in this example, but the loop here
> also tries to smear by 8 and smear by 16.
>
> We then add 1, to roll over to the next power of
> two.
>
>  x was:        
>  next power:   0001
>
> However, because you don't want to have the
> nextHighestPowerOfTwo(2048) to return 4096,
> the function starts with x-1 instead of x.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

2011-04-02 Thread a a
my god, this question is too simple...

http://develop.android.com

2011/4/2 单单 :
> Hi All,
>
> Could anyone tell me that where the source code of ADT (Android
> Development Tools) plugin is. Thanks in advance!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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


[android-developers] touch screen with two finger gesture to magnify or shrink

2011-04-01 Thread a a
I think most of people have played the "angry birds". It can magnify
or shrink background when you move your two finger.

I want to get the two start point like a(x1, y1) and b(x2, y2), and
the two last point c(x3, y3) and d(x4, y4)

if ( (x1 - x2) < (x3 - x4) || (y1 - y2) < (y3 - y4)) {
  // shrink
} else {
  // magnify
}

the I tested following code:
public void onTouchEvent(MotionEvent event) {
if (event.getAction() == MotionEvent.ACTION_MOVE) {
mTouchX = event.getX();
mTouchY = event.getY();
Log.d("harvey", "move(x, y) = " + " ( " + mTouchX + "
,  " + mTouchY + " )");
} else if (event.getAction() == MotionEvent.ACTION_DOWN) {
Log.d("harvey", "down(x1, y1) = " + "(" + event.getX()
+ ", " + event.getY() + ")");
} else if(event.getAction() == MotionEvent.ACTION_UP) {
Log.d("harvey", "up(x1, y1) = " + "(" + event.getX() +
", " + event.getY() + ")");
}
super.onTouchEvent(event);
}

Form the log, it seams that can only get one finger's position, but
not the two finger at the same time.


Would you provider any idea how to implement this?

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


Re: [android-developers] openGL texture render size

2011-04-01 Thread a a
But i can't understand the following algorithm


function nextHighestPowerOfTwo(x) {
--x;
for (var i = 1; i < 32; i <<= 1) {
x = x | x >> i;
}
return x + 1;
}


2011/4/2 a a :
> My god, the following algorithm is very very brilliant from your
> provider url code.
>
>
> function isPowerOfTwo(x) {
>    return (x & (x - 1)) == 0;
> }
>
> 2011/4/2 Dan Roberts :
>> http://www.khronos.org/webgl/wiki/WebGL_and_OpenGL_Differences
>>
>>> While OpenGL 2.0 and later for the desktop offer full support for
>>> non-power-of-two (NPOT) textures, OpenGL ES 2.0 and WebGL have only limited
>>> NPOT support.
>>
>> Chances are you're using OpenGL ES 1.1 anyways, unless the highest profile
>> is automagically selected for you when creating a context (I have no idea).
>> But if OpenGL ES 2.0 has only limited support, it seems likely NPOT is
>> almost entirely missing in 1.1 Someone more knowledgeable can correct me,
>> but this is likely at least close. Just use power of two sized textures, you
>> can pre-scale them is need be.
>>
>> Cheers,
>> Dan
>>
>> On Apr 1, 2011 6:24 PM, "a a"  wrote:
>>> Why should bitmap with 2, 4, 8, 16, 32, 64, 128.otherwise, it
>>> will be white board?
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-developers@googlegroups.com
>>> To unsubscribe from this group, 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] openGL texture render size

2011-04-01 Thread a a
My god, the following algorithm is very very brilliant from your
provider url code.


function isPowerOfTwo(x) {
return (x & (x - 1)) == 0;
}

2011/4/2 Dan Roberts :
> http://www.khronos.org/webgl/wiki/WebGL_and_OpenGL_Differences
>
>> While OpenGL 2.0 and later for the desktop offer full support for
>> non-power-of-two (NPOT) textures, OpenGL ES 2.0 and WebGL have only limited
>> NPOT support.
>
> Chances are you're using OpenGL ES 1.1 anyways, unless the highest profile
> is automagically selected for you when creating a context (I have no idea).
> But if OpenGL ES 2.0 has only limited support, it seems likely NPOT is
> almost entirely missing in 1.1 Someone more knowledgeable can correct me,
> but this is likely at least close. Just use power of two sized textures, you
> can pre-scale them is need be.
>
> Cheers,
> Dan
>
> On Apr 1, 2011 6:24 PM, "a a"  wrote:
>> Why should bitmap with 2, 4, 8, 16, 32, 64, 128.otherwise, it
>> will be white board?
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, 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


[android-developers] openGL texture render size

2011-04-01 Thread a a
Why should bitmap with 2, 4, 8, 16, 32, 64, 128.otherwise, it
will be white board?

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

2011-03-30 Thread a a
the name of the vertical text is "texture" is it?

2011/3/31 lbendlin :
> Why not just rotate the canvas for that view?
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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 implement live wallpaper?

2011-03-30 Thread a a
very very thanks, you are kinder then marcin orlowski, ^ __ ^

2011/3/30 String :
> On Wednesday, March 30, 2011 10:55:19 AM UTC+1, harvey wrote:
>>
>> i am so sorry about disturb you, because i am a beginner android, sorry.
>
> Especially if you're a beginner, you should be reading the docs before
> posting wide-open questions here. For example:
> http://developer.android.com/resources/articles/live-wallpapers.html
> 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 implement live wallpaper?

2011-03-30 Thread a a
i am so sorry about disturb you, because i am a beginner android, sorry.

2011/3/30 Marcin Orlowski :
> On 30 March 2011 11:43, a a  wrote:
>>
>> the live wallpaper in the desktop is an activity or a picture?
>> If it is a activity, how can i set the activity on the desktop?
>> else if it is a picture, how can i let the picture with animation?
>
> Why do not you try to spend at least a single minute doing your homework
> right? Do googling on subject, do RTFM, do a peek in SDK's samples folder
> *before* you start to ask answered questions...
>
>
> Marcin Orlowski
>
> Tray Agenda - keep you daily schedule handy...
> WebnetMobile on Facebook and Twitter
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

2011-03-30 Thread a a
the live wallpaper in the desktop is an activity or a picture?

If it is a activity, how can i set the activity on the desktop?

else if it is a picture, how can i let the picture with animation?

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

2011-03-24 Thread a a
I want to draw a text and rect like following:

1.a, b, c, d are vertex, actually, there is not exist the four vertex.
here is just for mark the rectangle.
2. "ac", "bd", "cd" are rectangle's border (noncontinuous line is
solid border, like "ac" and "bd" and "cd" is a solid border,)
3. it only know the a,b,c,d's coord, but don't know the "e" and "f"
a_b
| |
| |
e_f
|  name   |
c--d

Firstly, i draw a big rectangle var canvas.drawRect() which marked
with "a-b-c-d" vectex.
Secondly, i draw the tag "name" var canvas.drawText()

my  question is how can i draw a solid border up the "name" which
marked with "ef" border ? i think i should get the tag "name" height
then calculate with "c" or "d".

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Why can't draw a picture on canvas

2011-03-22 Thread a a
2011/3/22 Nicholas Johnson :
> It appears, by your code, that you are drawing on the bitmap through the
> canvas. However, I'm guessing your real question is: why is my bitmap not
> being displayed on the screen? Well, that's because your bitmap or canvas is
> not associated at all with any buffers which finally get displayed on your
> device.
> Here are 2 options for you:
> 1) If you're just trying to display a picture to the screen that doesn't
> change, then just put an ImageView in your view hierarchy and define the
> "android:src="R.drawable.bg"".
> 2) If you're end goal is to do custom drawing onto the screen, then you're
> going to have to create a custom view and override the onDraw method, which
> gives you the Canvas object which is "linked" to the display.
> Remember, a Canvas is just a tool for drawing onto a bitmap. It
> has, inherently, nothing to do with drawing something to the screen.
> Nick

yes, a rewrite my test code following your 2th point. It can draw a bitmap now.
It should "linked" to the gaven canvas.

public class testCanvas extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
try{
super.onCreate(savedInstanceState);
myView myview = new myView(this);
setContentView(myview);
//setContentView(R.layout.main);


}catch(Exception e) {
e.printStackTrace();
}
}

private  class myView extends View {
public myView(Context context) {
super(context);
}

@Override
protected void onDraw(Canvas canvas) {

Drawable draw = getResources().getDrawable(R.drawable.bg);
Bitmap bitmap =
BitmapFactory.decodeResource(this.getResources(), R.drawable.bg);
Paint paint = new Paint();
paint.setColor(Color.BLUE);
canvas.drawColor(Color.WHITE);
//canvas.setBitmap(bitmap);
canvas.drawBitmap(bitmap, 50, 60, paint);
canvas.drawText("harvey", 160, 240, paint);
}
}
}

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

2011-03-22 Thread a a
ture], 
> atlas.heightFP[texture],
> atlas, texture, ColorBytes.COMPONENT_MAX);
>        }
>
>        public void quad(final int left, final int bottom, final Atlas atlas,
> final int texture, boolean flipHorizontal) {
>                final int textureWFP = atlas.widthFP[texture];
>                final int adjustedLeft = flipHorizontal ? left + textureWFP : 
> left;
>                final int wFP = flipHorizontal ? -textureWFP : textureWFP;
>                quad(adjustedLeft, bottom, wFP, atlas.heightFP[texture], atlas,
> texture, ColorBytes.COMPONENT_MAX);
>        }
>
>        public void quad(final int leftFP, final int bottomFP, final int wFP,
> final int hFP, final Atlas atlas, final int texture, final byte alpha)
> {
>
>                ensureCapacity(VERTS_PER_QUAD);
>
>                int dimsOffset = vertCount * DIMS_PER_VERT;
>
>                final int leftRoundedFP = mRoundVertexPositions ? 
> FP.round(leftFP) :
> leftFP;
>                final int bottomAdjustedFP = mVerticalOffset + bottomFP;
>                final int bottomAdjustedRoundedFP = mRoundVertexPositions ?
> FP.round(bottomAdjustedFP) : bottomAdjustedFP;
>
>                final int rightFP = leftRoundedFP + wFP;
>                final int topAdjustedFP = bottomAdjustedRoundedFP + hFP;
>                final int zFP = 0;
>
>                //Top left.
>                dimsOffset = addVertexDims(dimsOffset, topAdjustedFP, 
> leftRoundedFP,
> zFP);
>
>                //Bottom left.
>                dimsOffset = addVertexDims(dimsOffset, bottomAdjustedRoundedFP,
> leftRoundedFP, zFP);
>
>                //Top right.
>                dimsOffset = addVertexDims(dimsOffset, topAdjustedFP, rightFP, 
> zFP);
>
>                //Bottom right.
>                dimsOffset = addVertexDims(dimsOffset, bottomAdjustedRoundedFP,
> rightFP, zFP);
>
>                int colorsOffset = vertCount * BYTES_PER_COLOR;
>                for( int i = 0; i < VERTS_PER_QUAD; i++ ) {
>                        mColors[colorsOffset++] = ColorBytes.COMPONENT_MAX;
>                        mColors[colorsOffset++] = ColorBytes.COMPONENT_MAX;
>                        mColors[colorsOffset++] = ColorBytes.COMPONENT_MAX;
>                        mColors[colorsOffset++] = alpha;
>                }
>
>                final int texCoordsOffset = vertCount * TEX_COORDS_PER_VERT;
>                System.arraycopy(atlas.coords, texture*TEX_COORDS_PER_QUAD,
>                        texCoords, texCoordsOffset, TEX_COORDS_PER_QUAD);
>
>                vertCount += VERTS_PER_QUAD;
>        }
>
> I posted a simplified version of the class they are in here:
> https://github.com/lnanek/SpriteMethodTest2/blob/master/src/com/android/spritemethodtest/opengl/batched/DrawData.java
>
> The Text and Atlas classes were removed for the simplified version,
> but are used in the character drawing version. They just hold data
> about what characters for a particular font are available, and what
> images are inside a particular texture atlas. My texture atlases are
> generated by a script that glues all the separate images into big ones
> and also generates the Atlas subclasses with where they are in the big
> images (denoted by constants in the subclasses that say where in the
> data arrays in the superclass the data for them is). Anyway, they look
> like this:
>
> public class Text {
>
>        private static final int EXTRA_LINE_SPACING = 2;
>
>        public int mFirstTexture;
>
>        public char mFirst;
>
>        public int mCount;
>
>        public int mWidthFP;
>
>        public int mHeightFP;
>
>        public Atlas mAtlas;
>
>        public Text(Atlas atlas, int firstTexture, char firstChar, int count)
> {
>                mAtlas = atlas;
>                mFirstTexture = firstTexture;
>                mWidthFP = atlas.widthFP[firstTexture];
>                mHeightFP = atlas.heightFP[firstTexture] + EXTRA_LINE_SPACING;
>                mFirst = firstChar;
>                mCount = count;
>        }
>
>        public int texture(char c) {
>                return mFirstTexture + ( c - mFirst );
>        }
>
> }
>
> public abstract class Atlas {
>        public int resourceID;
>        public int[] coords;
>        public int[] widthFP;
>        public int[] heightFP;
>        public int[] width;
>        public int[] height;
>
>        public int textureID;
>
>        public Atlas(int resourceID, int[] coords, int[] widthFP, int[]
> heightFP, int[] width, int[] height) {
>                this.resourceID = resourceID;
>                this.coords = coords;
>                this.widthFP = widthFP;
>        

Re: [android-developers] write tag with opengl on android

2011-03-22 Thread a a
Following is my test code, but it can't drawable.


public class testCanvas extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

Canvas canvas = new Canvas();
Drawable draw = getResources().getDrawable(R.drawable.bg);

Bitmap bitmap = Bitmap.createBitmap(draw.getIntrinsicWidth(),
draw.getIntrinsicWidth(),
Bitmap.Config.RGB_565);
Paint paint = new Paint();
paint.setColor(30);
canvas.setBitmap(bitmap);
canvas.drawBitmap(bitmap, bitmap.getHeight(), bitmap.getWidth(), paint);
}

2011/3/21 Marcin Orlowski :
> On 21 March 2011 09:48, a a  wrote:
>>
>>   How can i write a tag like string "Dog" on the picture.
>
> Use Canvas to paint on your bitmap.
> http://developer.android.com/reference/android/graphics/Canvas.html
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Why can't draw a picture on canvas

2011-03-22 Thread a a
Following is my test code

public class testCanvas extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

Canvas canvas = new Canvas();
Drawable draw = getResources().getDrawable(R.drawable.bg);

Bitmap bitmap = Bitmap.createBitmap(draw.getIntrinsicWidth(),
draw.getIntrinsicWidth(),
Bitmap.Config.RGB_565);
Paint paint = new Paint();
paint.setColor(30);
canvas.setBitmap(bitmap);
canvas.drawBitmap(bitmap, bitmap.getHeight(), bitmap.getWidth(), paint);
}

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

2011-03-21 Thread a a
may be we can ask this hero which is better, the game engine or
openGL? anyone know what's his facebook account?

2011/3/22 a a :
> a ha, i know this guy, he is the author with "replica island", he is a
> hero for many developer.
>
> This code write by openGL, not use game engine which provided by Riyad kalla.
>
>
> 2011/3/22 Miguel Morales :
>> Good place to start: http://www.youtube.com/watch?v=U4Bk5rmIpic
>>
>> On Mon, Mar 21, 2011 at 6:16 PM, a a  wrote:
>>>
>>> so, do you think your provider below url is a "bare bones" ?
>>>
>>> http://code.google.com/p/libgdx/
>>>
>>> 2011/3/21 Riyad Kalla :
>>> > Any game engine you look at will have a considerable code base... that
>>> > is like asking "I would like to do a GUI" and someone suggesting Swing
>>> > or SWT to you and you saying "My god the API is huge!"
>>> >
>>> > Yes... they are... they cover a lot. Everything from 3D/2D
>>> > abstractions to file I/O.
>>> >
>>> > libgdx has a good number of games in the market place, you can check
>>> > the "Showcase" forum for examples of Apps people are working on.
>>> >
>>> > AndEngine is another one and if you don't mind paying a licensing fee,
>>> > Unity I believe has a preview Android version, but it's not cheap.
>>> >
>>> > Alternatively, you can just hand-roll something yourself ontop of
>>> > Canvas and learn all the ins and outs first THEN find the game engine
>>> > that solves your biggest headaches for you, that way you don't waste
>>> > your time learning an engine that isn't making your life easier.
>>> >
>>> > If you are just learning, I always think learning the "bare bones"
>>> > approach to things first before learning a framework is best so you
>>> > understand who-does-what.
>>> >
>>> > Just my 2 cents.
>>> >
>>> > On Mar 21, 2:10 am, a a  wrote:
>>> >> 2011/3/2 Riyad :> In addition to TreKing's reply, you
>>> >> will want to decide if you are
>>> >> > going to hand draw this stuff or use OpenGL, I'm going to assume you
>>> >> > will be using OpenGL if you want lots of layers and spirtes moving
>>> >> > performantly across each other and possibly add some effects.
>>> >>
>>> >> > So the next part of your question is "how do I get started with
>>> >> > OpenGL" -- I'd suggest searching around for it, and you will probably
>>> >> > want to start with a good game engine that'll make your life easier;
>>> >> > some framework that makes loading images, animating them, etc. etc.
>>> >> > easier.
>>> >>
>>> >> > For that, I'd look at libgdx as a jumping off point.
>>> >> >http://code.google.com/p/libgdx/
>>> >>
>>> >> My god, this code is too large, as a new member game developer, it is
>>> >> very hard to understand.
>>> >>
>>> >>
>>> >>
>>> >>
>>> >>
>>> >>
>>> >>
>>> >> > The forums for the engine are fantastic:
>>> >> >http://www.badlogicgames.com/forum/
>>> >>
>>> >> > and the wiki is chalk full of information:
>>> >> >http://www.badlogicgames.com/wiki/index.php/Main_Page
>>> >>
>>> >> > If you have done Java 2D in depth before, a lot of that knowledge
>>> >> > gets
>>> >> > you off the ground pretty quick (as far as being familiar with how
>>> >> > graphic basics work, painting, etc.) if you have done very little
>>> >> > Java
>>> >> > and no Java 2D, you'll want to grab a good OpenGL ES book and start
>>> >> > from scratch. Just get familiar with things.
>>> >>
>>> >> > and after you get through the first few tutorials, write the next
>>> >> > Gears of War for Android, shoot for the moon!
>>> >>
>>> >> > On Feb 25, 9:43 pm, CONORxx  wrote:
>>> >> >> Is it possible to create a 2d, touch based game for android devices
>>> >> >> using Eclips and xml. And where about do new comers go to learn to
>>> >> >> write the xml code for android a

Re: [android-developers] Re: 2d game development

2011-03-21 Thread a a
a ha, i know this guy, he is the author with "replica island", he is a
hero for many developer.

This code write by openGL, not use game engine which provided by Riyad kalla.


2011/3/22 Miguel Morales :
> Good place to start: http://www.youtube.com/watch?v=U4Bk5rmIpic
>
> On Mon, Mar 21, 2011 at 6:16 PM, a a  wrote:
>>
>> so, do you think your provider below url is a "bare bones" ?
>>
>> http://code.google.com/p/libgdx/
>>
>> 2011/3/21 Riyad Kalla :
>> > Any game engine you look at will have a considerable code base... that
>> > is like asking "I would like to do a GUI" and someone suggesting Swing
>> > or SWT to you and you saying "My god the API is huge!"
>> >
>> > Yes... they are... they cover a lot. Everything from 3D/2D
>> > abstractions to file I/O.
>> >
>> > libgdx has a good number of games in the market place, you can check
>> > the "Showcase" forum for examples of Apps people are working on.
>> >
>> > AndEngine is another one and if you don't mind paying a licensing fee,
>> > Unity I believe has a preview Android version, but it's not cheap.
>> >
>> > Alternatively, you can just hand-roll something yourself ontop of
>> > Canvas and learn all the ins and outs first THEN find the game engine
>> > that solves your biggest headaches for you, that way you don't waste
>> > your time learning an engine that isn't making your life easier.
>> >
>> > If you are just learning, I always think learning the "bare bones"
>> > approach to things first before learning a framework is best so you
>> > understand who-does-what.
>> >
>> > Just my 2 cents.
>> >
>> > On Mar 21, 2:10 am, a a  wrote:
>> >> 2011/3/2 Riyad :> In addition to TreKing's reply, you
>> >> will want to decide if you are
>> >> > going to hand draw this stuff or use OpenGL, I'm going to assume you
>> >> > will be using OpenGL if you want lots of layers and spirtes moving
>> >> > performantly across each other and possibly add some effects.
>> >>
>> >> > So the next part of your question is "how do I get started with
>> >> > OpenGL" -- I'd suggest searching around for it, and you will probably
>> >> > want to start with a good game engine that'll make your life easier;
>> >> > some framework that makes loading images, animating them, etc. etc.
>> >> > easier.
>> >>
>> >> > For that, I'd look at libgdx as a jumping off point.
>> >> >http://code.google.com/p/libgdx/
>> >>
>> >> My god, this code is too large, as a new member game developer, it is
>> >> very hard to understand.
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> > The forums for the engine are fantastic:
>> >> >http://www.badlogicgames.com/forum/
>> >>
>> >> > and the wiki is chalk full of information:
>> >> >http://www.badlogicgames.com/wiki/index.php/Main_Page
>> >>
>> >> > If you have done Java 2D in depth before, a lot of that knowledge
>> >> > gets
>> >> > you off the ground pretty quick (as far as being familiar with how
>> >> > graphic basics work, painting, etc.) if you have done very little
>> >> > Java
>> >> > and no Java 2D, you'll want to grab a good OpenGL ES book and start
>> >> > from scratch. Just get familiar with things.
>> >>
>> >> > and after you get through the first few tutorials, write the next
>> >> > Gears of War for Android, shoot for the moon!
>> >>
>> >> > On Feb 25, 9:43 pm, CONORxx  wrote:
>> >> >> Is it possible to create a 2d, touch based game for android devices
>> >> >> using Eclips and xml. And where about do new comers go to learn to
>> >> >> write the xml code for android apps and 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
&g

Re: [android-developers] Re: 2d game development

2011-03-21 Thread a a
so, do you think your provider below url is a "bare bones" ?

http://code.google.com/p/libgdx/

2011/3/21 Riyad Kalla :
> Any game engine you look at will have a considerable code base... that
> is like asking "I would like to do a GUI" and someone suggesting Swing
> or SWT to you and you saying "My god the API is huge!"
>
> Yes... they are... they cover a lot. Everything from 3D/2D
> abstractions to file I/O.
>
> libgdx has a good number of games in the market place, you can check
> the "Showcase" forum for examples of Apps people are working on.
>
> AndEngine is another one and if you don't mind paying a licensing fee,
> Unity I believe has a preview Android version, but it's not cheap.
>
> Alternatively, you can just hand-roll something yourself ontop of
> Canvas and learn all the ins and outs first THEN find the game engine
> that solves your biggest headaches for you, that way you don't waste
> your time learning an engine that isn't making your life easier.
>
> If you are just learning, I always think learning the "bare bones"
> approach to things first before learning a framework is best so you
> understand who-does-what.
>
> Just my 2 cents.
>
> On Mar 21, 2:10 am, a a  wrote:
>> 2011/3/2 Riyad :> In addition to TreKing's reply, you will 
>> want to decide if you are
>> > going to hand draw this stuff or use OpenGL, I'm going to assume you
>> > will be using OpenGL if you want lots of layers and spirtes moving
>> > performantly across each other and possibly add some effects.
>>
>> > So the next part of your question is "how do I get started with
>> > OpenGL" -- I'd suggest searching around for it, and you will probably
>> > want to start with a good game engine that'll make your life easier;
>> > some framework that makes loading images, animating them, etc. etc.
>> > easier.
>>
>> > For that, I'd look at libgdx as a jumping off point.
>> >http://code.google.com/p/libgdx/
>>
>> My god, this code is too large, as a new member game developer, it is
>> very hard to understand.
>>
>>
>>
>>
>>
>>
>>
>> > The forums for the engine are fantastic:
>> >http://www.badlogicgames.com/forum/
>>
>> > and the wiki is chalk full of information:
>> >http://www.badlogicgames.com/wiki/index.php/Main_Page
>>
>> > If you have done Java 2D in depth before, a lot of that knowledge gets
>> > you off the ground pretty quick (as far as being familiar with how
>> > graphic basics work, painting, etc.) if you have done very little Java
>> > and no Java 2D, you'll want to grab a good OpenGL ES book and start
>> > from scratch. Just get familiar with things.
>>
>> > and after you get through the first few tutorials, write the next
>> > Gears of War for Android, shoot for the moon!
>>
>> > On Feb 25, 9:43 pm, CONORxx  wrote:
>> >> Is it possible to create a 2d, touch based game for android devices
>> >> using Eclips and xml. And where about do new comers go to learn to
>> >> write the xml code for android apps and 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
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: 2d game development

2011-03-21 Thread a a
2011/3/2 Riyad :
> In addition to TreKing's reply, you will want to decide if you are
> going to hand draw this stuff or use OpenGL, I'm going to assume you
> will be using OpenGL if you want lots of layers and spirtes moving
> performantly across each other and possibly add some effects.
>
> So the next part of your question is "how do I get started with
> OpenGL" -- I'd suggest searching around for it, and you will probably
> want to start with a good game engine that'll make your life easier;
> some framework that makes loading images, animating them, etc. etc.
> easier.
>
> For that, I'd look at libgdx as a jumping off point.
> http://code.google.com/p/libgdx/
>
My god, this code is too large, as a new member game developer, it is
very hard to understand.

> The forums for the engine are fantastic:
> http://www.badlogicgames.com/forum/
>
> and the wiki is chalk full of information:
> http://www.badlogicgames.com/wiki/index.php/Main_Page
>
>
> If you have done Java 2D in depth before, a lot of that knowledge gets
> you off the ground pretty quick (as far as being familiar with how
> graphic basics work, painting, etc.) if you have done very little Java
> and no Java 2D, you'll want to grab a good OpenGL ES book and start
> from scratch. Just get familiar with things.
>
> and after you get through the first few tutorials, write the next
> Gears of War for Android, shoot for the moon!
>
> On Feb 25, 9:43 pm, CONORxx  wrote:
>> Is it possible to create a 2d, touch based game for android devices
>> using Eclips and xml. And where about do new comers go to learn to
>> write the xml code for android apps and 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

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

2011-03-21 Thread a a
Hi all,

  How can i write a tag like string "Dog" on the picture. Can anyone
paste his/her code on 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] why can't catch the SocketTimeoutException

2011-03-17 Thread a a
2011/3/17 Kostya Vasilyev :
> 17.03.2011 12:38, a a пишет:
>>
>> O, yes, as like Kostya Vasilyev discribe, it's right now, thank you very
>> much!!
>>
> Ok.
>>
>> Another question,
>>
>> why you so quickly find out the xml.java source code? I'm very curious
>> about it.
>
> I have Android framework sources installed inside Eclipse:
>
> http://kmansoft.wordpress.com/2011/01/15/android-helios-update-2/
>
> http://kmansoft.wordpress.com/category/tools/
>


ahaha, it's very good. I have found the xml.jave when press ctrl+click
mouse too.

many thanks for your help!

> -- Kostya
>
>> I use eclipse, and press left ctrl and move the mouse on Xml.parse()
>> function, then click down,
>>
>> it tell me "source not found".
>>
>
>
> --
> Kostya Vasilyev -- http://kmansoft.wordpress.com
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

2011-03-17 Thread a a
O, yes, as like Kostya Vasilyev discribe, it's right now, thank you very much!!


Another question,

why you so quickly find out the xml.java source code? I'm very curious about it.

I use eclipse, and press left ctrl and move the mouse on Xml.parse()
function, then click down,

it tell me "source not found".



2011/3/17 Kostya Vasilyev :
> What?
>
> Looking at the messages you posted:
>
> 01:00:50 E/AndroidRuntime(935): FATAL EXCEPTION: SyncAdapterThread-1
>
> java.lang.AssertionError: java.net.SocketTimeoutException
>
> at android.util.Xml.parse(Xml.java:89)
>
> Looking at the source, Xml.java:
>
>     public static void parse(InputStream in, Encoding encoding,
>     ContentHandler contentHandler) throws IOException, SAXException
> {
>     try {
>     XMLReader reader = new ExpatReader();
>     reader.setContentHandler(contentHandler);
>     InputSource source = new InputSource(in);
>     source.setEncoding(encoding.expatName);
>     reader.parse(source);
>     } catch (IOException e) {
>     throw new AssertionError(e);
>     }
>     }
>
>
> Let me guess, you haven't actually tried typing three lines of code to try
> and catch AssertionError?
>
> -- Kostya
>
> 17.03.2011 11:23, a a пишет:
>
> no, it's not re-thrown, just can't catch the SockectTimeoutException.
>
> 2011/3/17 Kostya Vasilyev :
>
> Ah (typing from the phone).
>
> Try catching AssertionError - looks that's how it gets re-thrown.
>
> 17.03.2011 8:57 пользователь "a 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
>
>
> --
> Kostya Vasilyev -- http://kmansoft.wordpress.com
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

2011-03-17 Thread a a
o, yes, it seams caused by not catch AssertionError

2011/3/17 Kostya Vasilyev :
> Ah (typing from the phone).
>
> Try catching AssertionError - looks that's how it gets re-thrown.
>
> 17.03.2011 8:57 пользователь "a 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] why can't catch the SocketTimeoutException

2011-03-17 Thread a a
This bug came from gallery on android.




2011/3/17 a a :
> no, it's not re-thrown, just can't catch the SockectTimeoutException.
>
> 2011/3/17 Kostya Vasilyev :
>> Ah (typing from the phone).
>>
>> Try catching AssertionError - looks that's how it gets re-thrown.
>>
>> 17.03.2011 8:57 пользователь "a 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] why can't catch the SocketTimeoutException

2011-03-17 Thread a a
no, it's not re-thrown, just can't catch the SockectTimeoutException.

2011/3/17 Kostya Vasilyev :
> Ah (typing from the phone).
>
> Try catching AssertionError - looks that's how it gets re-thrown.
>
> 17.03.2011 8:57 пользователь "a 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] why can't catch the SocketTimeoutException

2011-03-16 Thread a a
BUT SocketException is not the super-class for SocketTimeoutException,

if not match the first clause(SocketException), it will match the
sencond clause(SocketTimeoutException), isn't it?

2011/3/17 Kostya Vasilyev :
> Move the catch for SocketTimeoutException up, before the catch for
> SocketException. The rule is, first match, not necessarily best match.
>
> 17.03.2011 6:39 пользователь "a a"  написал:
>> Key code below:
>>
>> try {
>> Xml.parse(operation.outBody,
>> Xml.Encoding.UTF_8, parser); // Line 89
>> } catch (SocketException e) {
>> Log.e(TAG, "getAlbumPhotos: " + e);
>> ++syncResult.stats.numIoExceptions;
>> e.printStackTrace();
>> return RESULT_ERROR;
>> } catch (SocketTimeoutException e) { // why
>> SocketTimeoutException can't be catched there?
>> Log.e(TAG, "getAlbumPhots: " + e);
>> ++syncResult.stats.numIoExceptions;
>> e.printStackTrace();
>> return RESULT_ERROR;
>> }
>>
>>
>>
>> 01:00:50 E/AndroidRuntime(935): FATAL EXCEPTION: SyncAdapterThread-1
>>
>> java.lang.AssertionError: java.net.SocketTimeoutException
>>
>> at android.util.Xml.parse(Xml.java:89)
>>
>> at com.cooliris.picasa.PicasaApi.getAlbumPhotos(PicasaApi.java:293)
>>
>> at
>> com.cooliris.picasa.PicasaContentProvider.syncAlbumPhotos(PicasaContentProvider.java:400)
>>
>> at
>> com.cooliris.picasa.PicasaContentProvider.syncUserPhotos(PicasaContentProvider.java:362)
>>
>> at
>> com.cooliris.picasa.PicasaContentProvider.syncUsersAndAlbums(PicasaContentProvider.java:185)
>>
>> at
>> com.cooliris.picasa.PicasaService.performSyncImpl(PicasaService.java:177)
>>
>> at com.cooliris.picasa.PicasaService.performSync(PicasaService.java:113)
>>
>> at
>> com.cooliris.picasa.PicasaSyncAdapter.onPerformSync(PicasaSyncAdapter.java:74)
>>
>> at
>> android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:164)
>>
>> Caused by: java.net.SocketTimeoutException
>>
>> at
>> org.apache.harmony.luni.net.PlainSocketImpl.read(PlainSocketImpl.java:461)
>>
>> at
>> org.apache.harmony.luni.net.SocketInputStream.read(SocketInputStream.java:85)
>>
>> at
>> org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:103)
>>
>> at
>> org.apache.http.impl.io.AbstractSessionInputBuffer.read(AbstractSessionInputBuffer.java:134)
>>
>> at
>> org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:161)
>>
>> at
>> org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:175)
>>
>> at
>> org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:178)
>>
>> at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:225)
>>
>> at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:178)
>>
>> at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:174)
>>
>> at java.io.FilterInputStream.read(FilterInputStream.java:133)
>>
>> at org.apache.harmony.xml.ExpatParser.parseFragment(ExpatParser.java:516)
>>
>> at org.apache.harmony.xml.ExpatParser.parseDocument(ExpatParser.java:479)
>>
>> at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:318)
>>
>> at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:275)
>>
>> at android.util.Xml.parse(Xml.java:87)
>>
>> ... 8 more
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, 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


[android-developers] why can't catch the SocketTimeoutException

2011-03-16 Thread a a
Key code below:

try {
Xml.parse(operation.outBody,
Xml.Encoding.UTF_8, parser); //  Line 89
} catch (SocketException e) {
Log.e(TAG, "getAlbumPhotos: " + e);
++syncResult.stats.numIoExceptions;
e.printStackTrace();
return RESULT_ERROR;
} catch (SocketTimeoutException e) {  // why
SocketTimeoutException can't be catched there?
Log.e(TAG, "getAlbumPhots: " + e);
++syncResult.stats.numIoExceptions;
e.printStackTrace();
return RESULT_ERROR;
   }



01:00:50 E/AndroidRuntime(935): FATAL EXCEPTION: SyncAdapterThread-1

java.lang.AssertionError: java.net.SocketTimeoutException

at android.util.Xml.parse(Xml.java:89)

at com.cooliris.picasa.PicasaApi.getAlbumPhotos(PicasaApi.java:293)

at 
com.cooliris.picasa.PicasaContentProvider.syncAlbumPhotos(PicasaContentProvider.java:400)

at 
com.cooliris.picasa.PicasaContentProvider.syncUserPhotos(PicasaContentProvider.java:362)

at 
com.cooliris.picasa.PicasaContentProvider.syncUsersAndAlbums(PicasaContentProvider.java:185)

at 
com.cooliris.picasa.PicasaService.performSyncImpl(PicasaService.java:177)

at com.cooliris.picasa.PicasaService.performSync(PicasaService.java:113)

at 
com.cooliris.picasa.PicasaSyncAdapter.onPerformSync(PicasaSyncAdapter.java:74)

at 
android.content.AbstractThreadedSyncAdapter$SyncThread.run(AbstractThreadedSyncAdapter.java:164)

Caused by: java.net.SocketTimeoutException

at 
org.apache.harmony.luni.net.PlainSocketImpl.read(PlainSocketImpl.java:461)

at 
org.apache.harmony.luni.net.SocketInputStream.read(SocketInputStream.java:85)

at 
org.apache.http.impl.io.AbstractSessionInputBuffer.fillBuffer(AbstractSessionInputBuffer.java:103)

at 
org.apache.http.impl.io.AbstractSessionInputBuffer.read(AbstractSessionInputBuffer.java:134)

at 
org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:161)

at 
org.apache.http.impl.io.ChunkedInputStream.read(ChunkedInputStream.java:175)

at 
org.apache.http.conn.EofSensorInputStream.read(EofSensorInputStream.java:178)

at java.util.zip.InflaterInputStream.fill(InflaterInputStream.java:225)

at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:178)

at java.util.zip.GZIPInputStream.read(GZIPInputStream.java:174)

at java.io.FilterInputStream.read(FilterInputStream.java:133)

at 
org.apache.harmony.xml.ExpatParser.parseFragment(ExpatParser.java:516)

at 
org.apache.harmony.xml.ExpatParser.parseDocument(ExpatParser.java:479)

at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:318)

at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:275)

at android.util.Xml.parse(Xml.java:87)

... 8 more

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

2011-03-10 Thread a a
HI guys,

 would you share with me where can i get some android game souce code
like "angrybirds"...?

 i want to develop the game, but i don't know how start?

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


Re: [android-developers] Can we create UI without using any XML file?

2011-03-07 Thread a a
ofcause u can

2011/3/8 cindy :
> Hi all,
>
> In Android, can we create UI without using any XML file ? How?
>
> Thanks!
>
> April
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] How to delete a sms

2011-03-07 Thread a a
I want to write a program to delete a sms, what can i do?

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


Re: [android-developers] Re: How to install package without asking user just like market app?

2011-03-03 Thread a a
2010/8/13 Alex Xin :
> Sorry for my poor English. I'm from China, speaking English is always

不要丢中国人的脸,好不好。如果你觉得自己英文不好,就先翻译好了,再发上去。
你这样给人的感觉就是因为我来自中国,所以英文不好。

> a difficult task for me.
> I mean, if I try to use Intent to install a package, an install activity
> will activate and ask user if it could install that app, but market will ask
> user only once, no that install activity shown up. Can I implement a same
> feature?
> Thanks and BRs,
> Alex
> On Fri, Aug 13, 2010 at 9:25 AM, Indicator Veritatis 
> wrote:
>>
>> That is possible, but the OP really needs to state more clearly what
>> problem he is trying to solve. Until he does, responding to him is a
>> waste of time and bandwidth.
>>
>> On Aug 12, 11:29 am, TreKing  wrote:
>> > On Thu, Aug 12, 2010 at 9:04 AM, Alex Xin  wrote:
>> > > How to install package without asking user just like market app?
>> >
>> > You can't. Well, maybe if you build your own firmware.
>> >
>> > On Thu, Aug 12, 2010 at 12:13 PM, Frank Weiss  wrote:
>> > > Where do you see Market app installing packages without asking user?
>> >
>> > I'm assuming he means how the Market App auto-updates itself.
>> >
>> >
>> > -
>> > 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

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Any chance to deactivate the lock pattern in Froyo from code?

2010-07-01 Thread a a
Hello ,do u think your country will win at fifa?

On Jun 23, 2010 8:47 AM, "LeveloKment"  wrote:

Come on.
No information? No opinion? No advice how to address this issue to the
Android development team?

Thanks from Germany
Lars



On 16 Jun., 08:16, LeveloKment  wrote:
> just a small "bump" ... with ...

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: RE: [android-developers] Re: How global is the app market?

2010-06-11 Thread a a
杨键,别当卖国贼

On Jun 11, 2010 1:15 PM, "�罱�"  wrote:

To: Brad Gies
I am sorry , I just means "安卓市��" is not the official market of China.
It is faster that reply from your letter than search the original letter
from hundreds of developers group letters.

Good luck everyone.Hope your apps sell well!


-Original Message-
From: android-developers@googlegroups.com [mailto:android-develop...@goo...

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

2010-05-16 Thread a a
Application

On May 8, 2010 12:18 PM, "Danny!"  wrote:

Android Engineer - Sunnyvale, CA

 Architect, design and develop application software for Android
devices.
- Work on our device management core product and applications.
- Develop commercial grade software, which can be ported to several
different development environments, running on top of different mobile
operating systems (iPhone, Windows Mobile, RIM OS, Symbian).

What you need:
- 5+ years of software development for Mobile devices
- Solid C/C++ and Java programming skills.
- Thorough understanding of JNI and Java C/C++ interfacing.
- Experience working in the mobile handset space, with proficiency in
application development for Android.
- Deep understanding and experience in developing multi-threaded
applications.
- Experience with TCP/IP, SSL/TLS, WAP and SMS.
- Experience with XML, WBXML, and HTTP protocols
- Good written and verbal communication skills; ability to write
design and test specifications
- BSCS/EE degree or equivalent. MS or PhD preferred.

To be considered for this position - please forward a copy of your
detailed, chronological resume (in MS Word or .RTF format) to:
dan...@andiamo-group.com

---
Daniel Parrillo, Sr. Technical Recruiter

Andiamo! Group
Sales and IT Placement
44 Montgomery Street
Suite 1250
San Francisco, CA 94104
415.374.8001 Phone
dan...@andiamo-group.com
http://www.Andiamo-Group.com
LinkedIn profile: http://www.linkedin.com/in/strategi

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

2010-04-20 Thread a a
Dear Stone,

http://android-sky.googlecode.com/svn/trunk/Sky/

2010/4/20 droidin.net :
> Hi guys,
>
> Can anyone help me find source code for Android's Weather and News app
> (Genie Widget). It doesn't look like it can be found at 
> http://android.git.kernel.org/
> and Google's Code Search does not return any results ether
>
> Thanks,
>
> Bo Stone
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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 play three images as an animation on Widget?

2010-04-20 Thread a a
Yes, I think there should be a solution too,
may be the Gallery can help.

Best regards
Harvey

2010/4/20 Mark Murphy :
> D.Y wrote:
>> I don't want add an animation control on the widget, I just want to show
>> three images in turn on the ImageView of Widget.
>>
>> I think there should be a solution.
>
> Then update the app widget using AppWidgetManager and a RemoteViews
> three times, with whatever delay you want between them, setting the
> proper image each time.
>
> --
> Mark Murphy (a Commons Guy)
> http://commonsware.com | http://twitter.com/commonsguy
>
> _Android Programming Tutorials_ Version 2.0 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


Re: [android-developers] Re: Game develop like "Air Attack" touching screen event

2010-04-19 Thread a a
It still can't work.

It says "Set whether this view can receive focus while in touch mode.
Setting this to true will also ensure that this view is focusable."

I think my view is not "in touch mode", so how to set my view with
touch mode? is it right?



2010/4/19 Robert Green :
> No,
>
> Don't override it in your view.  Call it from your view in the
> constructor.  setFocusableInTouchMode(true) is what you want to call.
>
> On Apr 19, 1:40 am, a a  wrote:
>> I add
>>
>>                 android:focusableInTouchMode="true"
>> in my xml
>>
>> and try to override the
>>
>>         @Override
>>         public void setFocusableInTouchMode(boolean focusableInTouchMode) {
>>
>>                 Log.d("harvey", "setFocusableInTouchMode");
>>         }
>> But still can work when touch the screen, what' wrong?
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group 
>> athttp://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Game develop like "Air Attack" touching screen event

2010-04-18 Thread a a
I add

android:focusableInTouchMode="true"
in my xml

and try to override the

@Override
public void setFocusableInTouchMode(boolean focusableInTouchMode) {

Log.d("harvey", "setFocusableInTouchMode");
}
But still can work when touch the screen, what' wrong?

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


  1   2   >