[android-developers] See end user reviews without a G1?

2008-11-29 Thread Jompe71

I really would like to see the app reviews to be able to upgrade and
improve the application. Is it possible without a G1 phone?

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



[android-developers] Re: Need Help animating Text

2008-11-29 Thread AndroidGeek

Hi Matt,

You mean you want a ticker something like ticker used in stock
exchanges (One directional).
Or a ticker which scrolls left or right when the text ends both end
respectively

I am a J2ME professional and I have the logic how to achieve it in a
canvas where I have all the information and access to the screen
objects.

I am new to Android but sure will try this out soon and let you know
the output ;)


On Nov 28, 10:28 am, Dejecting [EMAIL PROTECTED] wrote:
 Hi All,

 I'm trying to animate some text and have it scroll across the
 screen but I can't seem to figure out how to do it and would like some
 help if anyone is able to assist.  Basically I just want to have text
 that the user entered at another place in the app scroll across the
 screen and when done scrolling it repeats and scrolls again.  I'll
 also need to be able to change the font and background colors as well
 as size and if possible scroll speed.

 Thanks ahead of time for the help.

 - Matt

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



[android-developers] APN Setting about MMS

2008-11-29 Thread JasonCheng

Can anyone help me?
I always can't send MMS , already try A week for setting this.

[APN]

APN: Internet
MMSC: http://mms
MMSProxy: 10.1.1.2
MMSPort: 9201
MCC: 466
MNC: 97

[Error Log Like this]
---
E/HttpUtils(  114): Host name may not be null
E/HttpUtils(  114): java.lang.IllegalArgumentException: Host name may
not be null
E/HttpUtils(  114): at org.apache.http.HttpHost.init(HttpHost.java:
83)
E/HttpUtils(  114): at
com.android.mms.transaction.HttpUtils.httpConnection(HttpUtils.java:
111)
E/HttpUtils(  114): at com.android.mms.transaction.Transaction.sendPdu
(Transaction.java:139)
E/HttpUtils(  114): at com.android.mms.transaction.SendTransaction.run
(SendTransaction.java:106)
E/HttpUtils(  114): at java.lang.Thread.run(Thread.java:935)
E/SendTransaction(  114): Delivery failed.
I/ActivityManager(   64): Stopping service:
com.android.mms/.transaction.TransactionService

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



[android-developers] Are there any requirements for game applications.

2008-11-29 Thread jlmari...@gmail.com

When developing  an app  are there  any requirements for the game app
(e.g. Splash screen content, game requirements, menu requirements,
violence or mature content)

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



[android-developers] SMS entry

2008-11-29 Thread Kingorcus

I am trying to insert a new SMS entry in the Database using the
undocumented SMS URI

I am successful in accessing the sms table, but not the threads table

anyone knows how to do it

or what is the content name for the threads table (URI)

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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] How to connect to google base?

2008-11-29 Thread kingfu

Hi friends,
I want to save data to google base, but I always failed to connect to
google base.
I found that Andriod has also java.net.* package, so I think I can use
it just like the java.net package for PC, that's right?
Could you please help me to investigate it? thanks a lot!

the code that I connect google account,this is the first step
to connect google base:getToken() which failed to
connect--
private static final String AUTHENTICATION_URL = https://
www.google.com/accounts/ClientLogin;
private String authenticate() {
// create the login request
String postOutput = null;
try {
URL url = new URL(AUTHENTICATION_URL);
postOutput = getToken(url);
} catch (Exception e) {
System.out.println(Could not connect to authentication 
server: 
+ e.toString());
return null;
}

StringTokenizer tokenizer = new StringTokenizer(postOutput, 
=\n );
String token = null;

while (tokenizer.hasMoreElements()) {
if (tokenizer.nextToken().equals(Auth)) {
if (tokenizer.hasMoreElements()) {
token = tokenizer.nextToken();
}
break;
}
}
return token;
}

private String getTokenForPC(URL url) throws IOException {

// Open connection
HttpURLConnection urlConnection = (HttpURLConnection) url
.openConnection();

// Set properties of the connection
urlConnection.setRequestMethod(POST);
urlConnection.setDoInput(true);
urlConnection.setDoOutput(true);
urlConnection.setUseCaches(false);
urlConnection.setRequestProperty(Content-Type,
application/x-www-form-urlencoded);

// Form the POST parameters
StringBuilder content = new StringBuilder();
content.append(Email=).append(URLEncoder.encode(gmail, 
UTF-8));
content.append(Passwd=).append(URLEncoder.encode(pws, 
UTF-8));
content.append(service=).append(URLEncoder.encode(gbase,
UTF-8));

OutputStream outputStream = urlConnection.getOutputStream();
outputStream.write(content.toString().getBytes(UTF-8));
outputStream.close();

// Retrieve the output
int responseCode = urlConnection.getResponseCode();
InputStream inputStream;
if (responseCode == HttpURLConnection.HTTP_OK) {
inputStream = urlConnection.getInputStream();
} else {
inputStream = urlConnection.getErrorStream();
}

return toString(inputStream);
}

Notes:gmail,pws is that your google mail address and password

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



[android-developers] Bug / Feature ( Wifi only works if your SSID is broadcast )

2008-11-29 Thread Scotti

Is there a way to for Wifi to connect to a secure network when the
SSID is not being broadcast? Perhapes add a button to the menu when
you click on the network that says force connect or connect?

Might be a fun project to write but it seems that the main system
needs this functionality for folks who don't want to broadcast their
SSID.

Scotti

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



[android-developers] How to connect to google base?

2008-11-29 Thread kingfu

Hi all,
I want to save data to google base, but I failed to connect to the
google account client which is the first step that connect to google
base.
I found Andriod provides the same java.net package as PC platform's,
so I use this java.net to connect to google base. The following is my
code.
Could you please help me to investigate it? thanks a lot!

the code that connect to google client---
private static final String AUTHENTICATION_URL = https://
www.google.com/accounts/ClientLogin;
String gmail = ;
String pws = ;
private String authenticate() {
// create the login request
String postOutput = null;
try {
URL url = new URL(AUTHENTICATION_URL);
postOutput = getToken(url);
} catch (Exception e) {
System.out.println(Could not connect to authentication 
server: 
+ e.toString());
return null;
}

StringTokenizer tokenizer = new StringTokenizer(postOutput, 
=\n );
String token = null;

while (tokenizer.hasMoreElements()) {
if (tokenizer.nextToken().equals(Auth)) {
if (tokenizer.hasMoreElements()) {
token = tokenizer.nextToken();
}
break;
}
}
return token;
}

private String getToken(URL url) throws IOException {

// Open connection
HttpURLConnection urlConnection = (HttpURLConnection) url
.openConnection();

// Set properties of the connection
urlConnection.setRequestMethod(POST);
urlConnection.setDoInput(true);
urlConnection.setDoOutput(true);
urlConnection.setUseCaches(false);
urlConnection.setRequestProperty(Content-Type,
application/x-www-form-urlencoded);

// Form the POST parameters
StringBuilder content = new StringBuilder();
content.append(Email=).append(URLEncoder.encode(gmail, 
UTF-8));
content.append(Passwd=).append(URLEncoder.encode(pws, 
UTF-8));
content.append(service=).append(URLEncoder.encode(gbase,
UTF-8));

OutputStream outputStream = urlConnection.getOutputStream();
outputStream.write(content.toString().getBytes(UTF-8));
outputStream.close();

// Retrieve the output
int responseCode = urlConnection.getResponseCode();
InputStream inputStream;
if (responseCode == HttpURLConnection.HTTP_OK) {
inputStream = urlConnection.getInputStream();
} else {
inputStream = urlConnection.getErrorStream();
}

return toString(inputStream);
}
---
Notes: gmail,pws is your own google mail address and password

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



[android-developers] Re: Touch/mouse event processing in Android's browser

2008-11-29 Thread csvy

Has anyone made any progress on this?  I skimmed through the Webkit
source used in Android, but I couldn't find any non-standard events
(although it is extraordinarily possible that I missed something).

I really need to be able to get touch events and this seems like a
huge omission...

On Oct 21, 8:21 am, ...Max... [EMAIL PROTECTED] wrote:
 Is there any way to process the messages generated by the touch events
 in Android's version of WebKit? On iPhone, this is done with
 additional events (ontouchstart, ontouchend, ontouchmove). I
 understand these are not available in Android. I have tried (on the
 emulator) monitoring the onmousedown, onmouseup and onmousemove which
 are implemented in base WebKit and the results were not encouraging:

 - Clicking and releasing the mouse without moving it generates
 onmousedown followed by onmouseup but ONLY when the mouse button is
 released
 - Clicking, holding for a short period of time, moving and then
 releasing generates a sequence of onmousemove, onmousedown, onmouseup
 (in that order) again, ONLY when the button is released
 - Clicking, moving immediately and releasing does not generate any
 events

 This is clearly not enough for any kind of touch-based UI. Is there
 some provision in the DOM, or a meta tag for capturing the missing
 events?

 Thanks in advance,
 ...Max...

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



[android-developers] how to get the listview item's default on-pressed drawable resource id

2008-11-29 Thread [EMAIL PROTECTED]

how to get the listview item's default  on-pressed drawable resource
id? I mean the orange background image when the listview's item is
pressed.

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



[android-developers] What is the difference between onOptionsItemSelected and onMenuItemSelected?

2008-11-29 Thread monkeypipi

Any difference? Thank you for your reply ^_^
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Spinner background change - how?

2008-11-29 Thread Evgeny V
The same problem happens when I'm trying to change the Button backgroud.
After that i'm loosing button behavior.

Looks strange if I have inherit and implemet MyButton to provide so basic
functionality like background color...

Any ideas? Missing I something?

Thanks,
Evgeny



On Fri, Nov 28, 2008 at 3:00 PM, EvgenyV [EMAIL PROTECTED] wrote:


 Hi All,

 How can i change the background of spinner from code or from layot
 xml?
 I tried to change it from xml it becames some unexpected flat line :(
 In addition if it's possible to change the trinagle color?

 Thanks in advance,
 Evgeny
 [EMAIL PROTECTED]
 


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



[android-developers] Newbe question - Application folders, how to?

2008-11-29 Thread Anders Rundgren

In other operating systems you can typically define a folder and when
clicked it opens a view with applications.

I may be blind, but I don't see any of this using the emulator and SDK
1.0.

Is the ApiDemos the only GUI-way you can create a suite of associated
applications?

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



[android-developers] Re: Newbe question - Application folders, how to?

2008-11-29 Thread Romain Guy

Long press an empty space on Home (or click Menu  Add) then choose
Shortcut  Folder. You can drop applications in the newly created
folder.

On Sat, Nov 29, 2008 at 2:56 AM, Anders Rundgren
[EMAIL PROTECTED] wrote:

 In other operating systems you can typically define a folder and when
 clicked it opens a view with applications.

 I may be blind, but I don't see any of this using the emulator and SDK
 1.0.

 Is the ApiDemos the only GUI-way you can create a suite of associated
 applications?

 




-- 
Romain Guy
www.curious-creature.org

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



[android-developers] Re: Console program with service without actuvity

2008-11-29 Thread freepine
You can invoke your app in adb shell after pushing the executables into the
image. But as we are told again and again, android doesn't support native
code development:)

On Thu, Nov 27, 2008 at 6:51 PM, sal123 [EMAIL PROTECTED] wrote:


 Hi All,

 Can anyone tell me if there is anyway to run console programs in
 android , i mean can i run app with just a service without any
 activity . and if there is some way then let me know how can i invoke
 the program from emulator.

 Thanks and regards
 Suhail

 


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



[android-developers] Re: Listening for dynamic buttons created by an adapter

2008-11-29 Thread for android

I have a strange problem.

I am using an efficient list adapter with a list which has row with a
text view and a button.Now on click of the button,I collapse that row
and download a file,with a progress bar.(this has been done along the
lines of the list collapsible adapter example of the api demos).

On click of the button,if any of the other rows have their progress
bar running(i interupt the download).I set the progress bar to 0 and
start of the download of the click of the row which has been clicked
latest,.

The code works perfectly ok when I have the list size to be 5.

When the list size is two, say i click row 1 and the progress bar is
25% complete.And then I click row 2.then still the progress bar shows
to be 25%,though I set the progress bar to 0.

Remember the same peice of code works for when the size of the list is 5.

The work around which I got was not to use the efficient list adapter
when the list size is 2.Immediately after that I fond that the code
starts to work like magic.

Is there anything that I am doing wrong? Or is there a lower limit in
the size as to when to use the efficient list adapter.And whats the
reason for such a behaviour.

Thanks.Let me know if I am not clear.









On 11/20/08, Mark Murphy [EMAIL PROTECTED] wrote:

 alexdonnini wrote:
 Hello,

 I think I may have solved the problem. As I suspected (if I am right),
 the solution was pretty simple. All I had to do is change:

 kill2 =  (Button) findViewById(R.id.kill2);
 to
 kill2 =  (Button) convertView.findViewById(R.id.kill2);

 Ah, yes.

 findViewById(R.id.kill2) searches the root view of your Activity for the
 item identified as kill2. convertView.findViewById(R.id.kill2) searches
 your list row for the item identified as kill2.

 The latter is definitely what you want.

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 1.4 Published!

 


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



[android-developers] Re: Android market and ADCII

2008-11-29 Thread Teo

Hi Juan,

it's free and closed source for now. I plan to keep it this way until
sometime next year, since i constantly add features to it based on
user feedback. When the app skeleton will stabilize and all the
features i planned for will be implemented, i'll open source it for
sure :)

Thanks,
Teo

On Nov 28, 5:05 pm, Juan David Trujillo C. [EMAIL PROTECTED]
wrote:
 Hi Teo!

 Is the application you uploaded open-source? or, is it free, but
 closed source?

 Thanks,

 Juan.

 On 14 nov, 09:18, Teo [EMAIL PROTECTED] wrote:

  Regarding your first question, i asked myself the same... I uploaded
  my app to the Market though, with the assumption that i'll be able to
  participate. I hope it will be possible :)

  On Nov 13, 9:39 pm, JuanDavidTrujilloC. [EMAIL PROTECTED]
  wrote:

   Hi guys!

   I have a question: Is it possible to upload an application to the
   Android market (free or charging) and then use this same application
   to participate in the Android developer Challenge - ADCII?
   When will it be possible to upload applications to the Android market,
   and charge for them?

   Thanks!

   best regards,

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



[android-developers] submenu

2008-11-29 Thread jalandar

Hi

I want to add submenu to menu item , I mean when i select menu item
there should be submenu for that menu item. Is anybody have sample for
this.

regards
jagtap

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



[android-developers] Location API and JSR-179/OpenLAPI

2008-11-29 Thread Sam Halliday

Hi all,

When Android was first announced, I offered to help out write any
missing parts of the Location API and port over any code that was part
of the OpenLAPI project (open source LGPL implementation of JSR-179).

I never heard a response back at the time. I'm just checking now to
find out the status of the Location API at this time, and to again
offer the code I wrote as port of OpenLAPI (especially NMEA handling
and calculating distances with the Vincenty algorithm).
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Location API and JSR-179/OpenLAPI

2008-11-29 Thread Sam Halliday

also, OpenLAPI is able to provide a JSR-179 API from an external
bluetooth device, Google Earth XML file (excellent for development) or
the LandmarkStore . Might be of use to you.

On Nov 29, 12:55 pm, Sam Halliday [EMAIL PROTECTED] wrote:
 Hi all,

 When Android was first announced, I offered to help out write any
 missing parts of the Location API and port over any code that was part
 of the OpenLAPI project (open source LGPL implementation of JSR-179).

 I never heard a response back at the time. I'm just checking now to
 find out the status of the Location API at this time, and to again
 offer the code I wrote as port of OpenLAPI (especially NMEA handling
 and calculating distances with the Vincenty algorithm).
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Long Press - a SubMenu popup - how implement that?

2008-11-29 Thread Guillaume Perrot

Activity.registerContextMenu(View);
Then override onContextMenu methods.

On Nov 29, 11:12 am, zLarry [EMAIL PROTECTED] wrote:
 help...

 On 11月29日, 下午2时02分, zLarry [EMAIL PROTECTED] wrote:

  Like android bundled contact applicaiton. When I long press a contact,
  then a sub menu pops up - to let me 'edit','remove' ...

  how to implement that? I was confused for a long time!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: What is the difference between onOptionsItemSelected and onMenuItemSelected?

2008-11-29 Thread Guillaume Perrot

onMenuItemSelected comes from the Window.Callback class.
onOptionsItemSelected is introduced by the Activity class (which
implements Window.Callback) and is called by the implementation of
onMenuItemSelected.
So the difference is the abstracting level.

Copied from doc:
Default implementation of onMenuItemSelected(int, MenuItem)  for
activities. This calls through to the new onOptionsItemSelected
(MenuItem) method for the FEATURE_OPTIONS_PANEL  panel, so that
subclasses of Activity don't need to deal with feature codes. 




On Nov 29, 10:23 am, monkeypipi [EMAIL PROTECTED] wrote:
 Any difference? Thank you for your reply ^_^
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Can I use DownloadProvider and PackageInstaller in my application?

2008-11-29 Thread Xiaoliang Ding
Hi, smart guys

  I want to implement a application whose one of requirements is download a
package and install it. What i want to know is can i use DownloadProvider
and PackageInstaller in my application? How can i use them ?

Thanks
Ding

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



[android-developers] Re: How to call RIL?

2008-11-29 Thread Zigurd

Some information on telephony internals, PhoneApp, and communications
between PhoneApp and the RIL can be found in an upcoming book
published by O'Reilly called Android Application Development. It is
available on the O'Reilly Roughcuts site in draft form:
http://safari.oreilly.com/9780596156220

The chapter on telephony internals is mainly oriented around
illustrating what happens within and underneath the TelephonyManager
API, using the logging facilities. Although it is targeted to an
application developer who needs to go beyond the documentation, it
does provide brief explanations of the telephony internals classes and
the implementations of those interfaces found in the sources. Maybe
that can get you started on a full understanding of the relationship
between the telephony UI apps, PhoneApp, and rild. It will, at least,
walk you through the steps to observe the traffic between PhoneApp and
rild using adb.

ZM

On Nov 28, 8:53 am, sunil [EMAIL PROTECTED] wrote:
 Hi Jeff Hamilton,
 May i know if there is any documentation available which explains
 about the RIL layer , Telephony Manager layer and the service layer.

 Regards,
 Sunil.

 On Nov 18, 7:35 am, Jeff Hamilton [EMAIL PROTECTED] wrote:

   Thanks for your reply.
   But the TelephonyManager doesn't provide enough information for us.
   We really need to get more informaiton from the RIL layer.

  What information do you need from the RIL that isn't provided by the
  TelephonyManager APIs?

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



[android-developers] Re: How to call RIL?

2008-11-29 Thread Jean-Baptiste Queru

Of course, if you go beyond the official SDK documentation, all bets
are off once you start to consider what might happen with newer
versions of the Android platform on the same devices, or on devices
from a different manufacturer, or using a different chipset, or using
a different protocol to communicate between the application CPU and
the baseband CPU.

There's nothing wrong going to see what happens under the hood, as
long as you understand that you're leaving the realm of the SDK with
its supported APIs that are meant to stay compatible across versions
and across devices, and that peeking under the hood is nothing more
than anecdotal data on implementation details about which no
compatibility is guaranteed or even implied.

Discussions about what happens under the SDK APIs are probably better
suited for the android-platform mailing list, such that this list
remains dedicated to discussions related to developing applications on
top of the SDK APIs.

JBQ

On Sat, Nov 29, 2008 at 8:04 AM, Zigurd [EMAIL PROTECTED] wrote:

 Some information on telephony internals, PhoneApp, and communications
 between PhoneApp and the RIL can be found in an upcoming book
 published by O'Reilly called Android Application Development. It is
 available on the O'Reilly Roughcuts site in draft form:
 http://safari.oreilly.com/9780596156220

 The chapter on telephony internals is mainly oriented around
 illustrating what happens within and underneath the TelephonyManager
 API, using the logging facilities. Although it is targeted to an
 application developer who needs to go beyond the documentation, it
 does provide brief explanations of the telephony internals classes and
 the implementations of those interfaces found in the sources. Maybe
 that can get you started on a full understanding of the relationship
 between the telephony UI apps, PhoneApp, and rild. It will, at least,
 walk you through the steps to observe the traffic between PhoneApp and
 rild using adb.

 ZM

 On Nov 28, 8:53 am, sunil [EMAIL PROTECTED] wrote:
 Hi Jeff Hamilton,
 May i know if there is any documentation available which explains
 about the RIL layer , Telephony Manager layer and the service layer.

 Regards,
 Sunil.

 On Nov 18, 7:35 am, Jeff Hamilton [EMAIL PROTECTED] wrote:

   Thanks for your reply.
   But the TelephonyManager doesn't provide enough information for us.
   We really need to get more informaiton from the RIL layer.

  What information do you need from the RIL that isn't provided by the
  TelephonyManager APIs?

  -Jeff
 


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



[android-developers] Re: Can I use DownloadProvider and PackageInstaller in my application?

2008-11-29 Thread Jean-Baptiste Queru

Unfortunately, the DownloadProvider is not currently available for
non-system applications to use, and that's unlikely to change in the
foreseeable future. Even more unfortunately, the current
implementation of the DownloadProvider uses private APIs that prevent
it from being recompiled on top of the SDK, which means that you can't
re-use it as is in your application; high-quality contributions in
that direction are likely to be accepted if various efforts are
synchronized in advance.

The manifest for the package installer shows you how you can invoke
it: it responds to ACTION_VIEW / CATEGORY_DEFAULT on file: and
content: URIs for the APK MIME type
application/vnd.android.package-archive. Full details here
http://android.git.kernel.org/?p=platform/packages/apps/PackageInstaller.git;a=blob;f=AndroidManifest.xml

JBQ

On Sat, Nov 29, 2008 at 6:31 AM, Xiaoliang Ding [EMAIL PROTECTED] wrote:
 Hi, smart guys

   I want to implement a application whose one of requirements is download a
 package and install it. What i want to know is can i use DownloadProvider
 and PackageInstaller in my application? How can i use them ?

 Thanks
 Ding

 


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



[android-developers] Re: Can I use DownloadProvider and PackageInstaller in my application?

2008-11-29 Thread Xiaoliang Ding
 Hi, Jean-Baptiste Queru

Thanks a lot for your nice answers.  You said DownloadProvider only can
be used by system application. Mind you tell me which system application use
DownloadProvider ? If the downloading functionality is really needed in my
app, what should I do ?

Even though it's bad for me can't use DownloadProvider in my app, but a
very good thing you told me how to use package installer.

Thanks
Ding

2008/11/30 Jean-Baptiste Queru [EMAIL PROTECTED]


 Unfortunately, the DownloadProvider is not currently available for
 non-system applications to use, and that's unlikely to change in the
 foreseeable future. Even more unfortunately, the current
 implementation of the DownloadProvider uses private APIs that prevent
 it from being recompiled on top of the SDK, which means that you can't
 re-use it as is in your application; high-quality contributions in
 that direction are likely to be accepted if various efforts are
 synchronized in advance.

 The manifest for the package installer shows you how you can invoke
 it: it responds to ACTION_VIEW / CATEGORY_DEFAULT on file: and
 content: URIs for the APK MIME type
 application/vnd.android.package-archive. Full details here

 http://android.git.kernel.org/?p=platform/packages/apps/PackageInstaller.git;a=blob;f=AndroidManifest.xml

 JBQ

 On Sat, Nov 29, 2008 at 6:31 AM, Xiaoliang Ding [EMAIL PROTECTED]
 wrote:
  Hi, smart guys
 
I want to implement a application whose one of requirements is download
 a
  package and install it. What i want to know is can i use DownloadProvider
  and PackageInstaller in my application? How can i use them ?
 
  Thanks
  Ding
 
  
 

 


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



[android-developers] Re: Are there any requirements for game applications.

2008-11-29 Thread AndroidGeek

Hi,
I am J2ME game and app. developer. Following are my views about your
queries.

-- Violence/Mature Content: I don't think splash it is a mandatory...
But yeah... it depends on the service provider's choice like ATT
never keeps any game showing nudity or any violence specially blood
etc.

-- Splash screen: it is nice to show the splash screen for following
reasons:
1. to tell end user whose and which game it is on the first screen
2. publicity of the studio/developer
3. authenticity of the studio or developer
4. looks good as app/game starts... it is a kind of showing name/
production house etc before a movie starts.
5. In games it gives a chance to tell the story of the game before
your actual game starts.

-- Game/ Menu Requirements: I think this should be shown before
anyone install the game/app. on device because if the requirements are
not matching than the game/app. will not work hence no need to install
it on the device.

Hope I have given answer to all of your queries.

Tabrez

On Nov 29, 3:57 am, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
 When developing  an app  are there  any requirements for the game app
 (e.g. Splash screen content, game requirements, menu requirements,
 violence or mature content)
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Strange behavior with AlarmManager.RTC_WAKEUP and PowerManager.WakeLock

2008-11-29 Thread Noam Wolf

I have a BroadcastReceiver which acquires a lock onReceive.  I use an
alarm manager with AlarmManager.RTC_WAKEUP set to broadcast my
intent.  I have found that when the phone is locked (and asleep) it
will not wake up sometimes, and when it does many times it will have a
delay (up to 30 seconds from when the alarm manager was supposed to go
off).

I don't understand how/what I'm doing different than the AlarmClock
application since I'm acquiring the lock in the receiver.  I've also
seen the screen turn on but then immediately turn off

Does anyone have any ideas as to why this is happening?  Or has anyone
run into this?  Is RTC_WAKEUP stable and trustworthy?

Any help would be greatly appreciated.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: AlarmManager not always waking device (using RTC_WAKEUP)

2008-11-29 Thread Noam Wolf

Hi Adam,

Have you figured this out?  I'm seeing something similar.  Basically I
acquired the lock at the start of the onReceive() in my receiver and
release it when it's done doing it's work.  I still dont' see the
phone waking up correctly...

On Nov 19, 12:56 am, Adam K [EMAIL PROTECTED] wrote:
 Thanks Dianne.

 Should I be holding a wakelock in the pendingintent receiver of the
 alarm (basically acquiring at the start of the onReceive() and
 releasing at the end)?  All I am doing in the receiver is setting off
 a notification - I am not creating any other intents or accessing any
 other threads or services.

 Cheers,

 Adam

 On Tue, Nov 18, 2008 at 9:22 PM, Dianne Hackbod [EMAIL PROTECTED] wrote:
  Fwiw, I am not aware of any issues with the alarm itself not waking up the
  phone.  Typically bugs in this area are a result of applications not holding
  wake locks the entire time needed.

  Note that the behavior when not holding a wake lock can change
  significantly between devices, depending on things like how often sync is
  running.

  On Tue, Nov 18, 2008 at 6:15 PM, Adam K [EMAIL PROTECTED]wrote:

  Ping.  Anyone?  It seems for certain people the alarm can never wake
  up the phone.  For others (like myself) it pretty much always wakes up
  the phone.

  Thanks,

  Adam

  On Nov 16, 8:15 pm, Adam K [EMAIL PROTECTED] wrote:
   Hi all,

   I noticed that AlarmManager does not always seem to wake the device
   correctly when using types RTC_WAKEUP or ELAPSED_REALTIME_WAKEUP.  It
   seems like whatever intent was pending is triggered later after the
   Menu key is hit.

   I realize you need to hold a wakelock for any activity fired after the
   initial pending intent event - but I thought at least the pending
   intent should execute without a wakelock being required?  All I want
   to do is set off a Notification when the alarm is complete - nothing
   else.

   It does seem to work 90% of the time without an issue, just not 100%
   of the time.  Has anyone else noticed this?

   Here is a summarized version of what I'm doing:

   //in main activity, set alarm for some time in future
   myPendingIntent = PendingIntent.getBroadcast(myContext, 0, new
   Intent(myContext, MyReceiver.class), 0);
   myAM = (AlarmManager) getSystemService(ALARM_SERVICE);
   myAM.set(AlarmManager.RTC_WAKEUP, getTriggerTime(), myPendingIntent);

   //in MyReceiver.class, onReceiver(), trigger notification
   NotificationManager myNM = (NotificationManager)
   context.getSystemService(Context.NOTIFICATION_SERVICE);
   Notification notif = new Notification();
   ..setup notification to play alarm, vibrate etc.
   myNM.notify(MYNOTIFICATION_ID, notif);

   Thanks,

   Adam

  --
  Dianne Hackborn
  [EMAIL PROTECTED]


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



[android-developers] Getting information from the Internet

2008-11-29 Thread Juan David Trujillo C.

Hi guys!

I am creating a software application for the Android platform that
requires getting information from the Internet (getting information
from a specific Web page, at Facebook).  Does anyone know how could
this be done?  Perhaps some reference code?

Thanks in advance for all your help!

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



[android-developers] screen orientation question

2008-11-29 Thread joshbeck

Hello all,
I am trying to determine exactly what happens when the screen
orientation changes.
(What I mean is, what happens to the lifecycle of an app when the user
slides the screen out.)

Reason:
 I show a dialog in my app.
 If the user slides the screen out, the app crashes with
'View not attached to window manager error.'

Is onPause called or something else?

I'm thinking if I can slip a progressdialog.dismiss(); into an
override, I'll
be able to eliminate that particular element when the screen changes.


Thanks,
Josh Beck

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



[android-developers] Re: screen orientation question

2008-11-29 Thread Mark Murphy

joshbeck wrote:
 Hello all,
 I am trying to determine exactly what happens when the screen
 orientation changes.
 (What I mean is, what happens to the lifecycle of an app when the user
 slides the screen out.)
 
 Reason:
  I show a dialog in my app.
  If the user slides the screen out, the app crashes with
 'View not attached to window manager error.'
 
 Is onPause called or something else?

By default, the activity is destroyed (onPause() through onDestroy()) 
and then restarted.

I have a five-part blog series on this topic over at AndroidGuys:

http://androidguys.com/?s=rotational+forcesx=0y=0

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

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



[android-developers] Re: Location API and JSR-179/OpenLAPI

2008-11-29 Thread Mark Murphy

Sam Halliday wrote:
 also, OpenLAPI is able to provide a JSR-179 API from an external
 bluetooth device, Google Earth XML file (excellent for development) or
 the LandmarkStore . Might be of use to you.
 
 On Nov 29, 12:55 pm, Sam Halliday [EMAIL PROTECTED] wrote:
 Hi all,

 When Android was first announced, I offered to help out write any
 missing parts of the Location API and port over any code that was part
 of the OpenLAPI project (open source LGPL implementation of JSR-179).

 I never heard a response back at the time. I'm just checking now to
 find out the status of the Location API at this time, and to again
 offer the code I wrote as port of OpenLAPI (especially NMEA handling
 and calculating distances with the Vincenty algorithm).

If you are offering this as an extension to the Android platform, you 
might want to head over to the android-platform Google Group and inquire 
there:

http://source.android.com/discuss

Or, submit an enhancement issue on the issue tracker:

http://code.google.com/p/android/issues/list

Or, possibly, just contribute a patch through the patch process:

http://source.android.com/submit-patches

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

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



[android-developers] Re: Long Press - a SubMenu popup - how implement that?

2008-11-29 Thread Mark Murphy

zLarry wrote:
 Like android bundled contact applicaiton. When I long press a contact,
 then a sub menu pops up - to let me 'edit','remove' ...
 
 how to implement that? I was confused for a long time!

Use Menu#addSubMenu().

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

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



[android-developers] Re: Bug / Feature ( Wifi only works if your SSID is broadcast )

2008-11-29 Thread Dan Pou
I thought it worked by manually specifying a network (Add a Wi-Fi network).
 I was able to connect to my own network without SSID broadcast.

If it is not being broadcast, and you don't know the SSID, you probably
shouldn't be connecting.

On Sat, Nov 29, 2008 at 12:23 AM, Scotti [EMAIL PROTECTED]wrote:


 Is there a way to for Wifi to connect to a secure network when the
 SSID is not being broadcast? Perhapes add a button to the menu when
 you click on the network that says force connect or connect?


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



[android-developers] Re: AutoCompleteTextView without keyboard input

2008-11-29 Thread [EMAIL PROTECTED]

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



[android-developers] Re: Word Document

2008-11-29 Thread Protocol-X

hello Humble,

this is a developers page not a general forum.  you can access google
docs from the device via the web.  as far as an app goes ythere is
nothing as of yet but youd be better off going to a forum to ask ?ls
like this.  as far as the device being new and you not understanding
how it could not have the features you need, putting a little work
into learning about what you are buying is always a good practice.

On Nov 27, 4:17 pm, humble [EMAIL PROTECTED] wrote:
 I purchased this phone thinking that I would be able to do my school
 papers while on the run - train, bus, ect...  I can't get into any
 document through the Gdoc and I can't download MS Office.  How can
 this phone be so new and not have that application?  Bummer.  Makes me
 regret buying it.  Do any of you on the web world know how I can get a
 Word program on this T-Mobile G1?  Please, I got final papers due very
 soon.
 Humble.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: contextmenu getselectedtestid

2008-11-29 Thread Protocol-X

this is my sample code


  @Override
  public boolean onContextItemSelected(MenuItem item)
  {
  final AdapterView.AdapterContextMenuInfo acmi =
(AdapterView.AdapterContextMenuInfo)
  item.getMenuInfo();
  long clickedId = (long) acmi.id;

switch (item.getItemId()) {

case INSERT_ID:
Toast.makeText(this, '+clickedId+', Toast.LENGTH_SHORT).show
();
return true;

no matter what list item i select it always shows 6

On Nov 28, 6:54 pm, Protocol-X [EMAIL PROTECTED] wrote:
 Thanks for the reply.  I tried your method but now instead of 0 every
 time i get 6

 On Nov 26, 1:58 pm, G [EMAIL PROTECTED] wrote:

  @Override
  public boolean onContextItemSelected(MenuItem item) {
          // TODO Auto-generated method stub
          AdapterContextMenuInfo acmi = (AdapterContextMenuInfo)
  item.getMenuInfo();
          long clickedId = acmi.id;

  }

  In the above case, clickedId is the id of the row that was long-
  pressed to bring up the context menu. You can also get a specific view
  in the row that was long pressed...
  TextView tv = (TextView)acmi.targetView.findViewById
  (R.id.some_view_inside_your_row_view)

  Take a look at the docs for AdapterContextMenuInfo for more info.

  On Nov 25, 1:15 pm, Protocol-X [EMAIL PROTECTED] wrote:

   How do u the row id or position of a listactiviy when using a context
   menu.  It always seems to always select 0  for the row id.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Can I use DownloadProvider and PackageInstaller in my application?

2008-11-29 Thread Ralf

You might also want to check the Downloader sample code from apps-for-android:
http://code.google.com/p/apps-for-android/source/browse/trunk/Samples/Downloader/README.txt

R/

On Sat, Nov 29, 2008 at 8:47 AM, Xiaoliang Ding [EMAIL PROTECTED] wrote:
  Hi, Jean-Baptiste Queru

 Thanks a lot for your nice answers.  You said DownloadProvider only can
 be used by system application. Mind you tell me which system application use
 DownloadProvider ? If the downloading functionality is really needed in my
 app, what should I do ?

 Even though it's bad for me can't use DownloadProvider in my app, but a
 very good thing you told me how to use package installer.

 Thanks
 Ding

 2008/11/30 Jean-Baptiste Queru [EMAIL PROTECTED]

 Unfortunately, the DownloadProvider is not currently available for
 non-system applications to use, and that's unlikely to change in the
 foreseeable future. Even more unfortunately, the current
 implementation of the DownloadProvider uses private APIs that prevent
 it from being recompiled on top of the SDK, which means that you can't
 re-use it as is in your application; high-quality contributions in
 that direction are likely to be accepted if various efforts are
 synchronized in advance.

 The manifest for the package installer shows you how you can invoke
 it: it responds to ACTION_VIEW / CATEGORY_DEFAULT on file: and
 content: URIs for the APK MIME type
 application/vnd.android.package-archive. Full details here

 http://android.git.kernel.org/?p=platform/packages/apps/PackageInstaller.git;a=blob;f=AndroidManifest.xml

 JBQ

 On Sat, Nov 29, 2008 at 6:31 AM, Xiaoliang Ding [EMAIL PROTECTED]
 wrote:
  Hi, smart guys
 
I want to implement a application whose one of requirements is
  download a
  package and install it. What i want to know is can i use
  DownloadProvider
  and PackageInstaller in my application? How can i use them ?
 
  Thanks
  Ding
 
  
 




 


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



[android-developers] Re: Can I use DownloadProvider and PackageInstaller in my application?

2008-11-29 Thread Jean-Baptiste Queru

The applications that use DownloadProvider are the Browser, Gmail,
Market, and the System Updater.

LIke Ralf said, the easiest way would be to look at the Downloader
sample code. You can also just write it from scratch from public
classes, you can look for inspiration in the DownloadProvider's core
code (except for AndroidHttpClient which is easily replaced, the core
DownloadThread should mostly work in the SDK).

JBQ

On Sat, Nov 29, 2008 at 8:47 AM, Xiaoliang Ding [EMAIL PROTECTED] wrote:
  Hi, Jean-Baptiste Queru

 Thanks a lot for your nice answers.  You said DownloadProvider only can
 be used by system application. Mind you tell me which system application use
 DownloadProvider ? If the downloading functionality is really needed in my
 app, what should I do ?

 Even though it's bad for me can't use DownloadProvider in my app, but a
 very good thing you told me how to use package installer.

 Thanks
 Ding

 2008/11/30 Jean-Baptiste Queru [EMAIL PROTECTED]

 Unfortunately, the DownloadProvider is not currently available for
 non-system applications to use, and that's unlikely to change in the
 foreseeable future. Even more unfortunately, the current
 implementation of the DownloadProvider uses private APIs that prevent
 it from being recompiled on top of the SDK, which means that you can't
 re-use it as is in your application; high-quality contributions in
 that direction are likely to be accepted if various efforts are
 synchronized in advance.

 The manifest for the package installer shows you how you can invoke
 it: it responds to ACTION_VIEW / CATEGORY_DEFAULT on file: and
 content: URIs for the APK MIME type
 application/vnd.android.package-archive. Full details here

 http://android.git.kernel.org/?p=platform/packages/apps/PackageInstaller.git;a=blob;f=AndroidManifest.xml

 JBQ

 On Sat, Nov 29, 2008 at 6:31 AM, Xiaoliang Ding [EMAIL PROTECTED]
 wrote:
  Hi, smart guys
 
I want to implement a application whose one of requirements is
  download a
  package and install it. What i want to know is can i use
  DownloadProvider
  and PackageInstaller in my application? How can i use them ?
 
  Thanks
  Ding
 
  
 




 


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



[android-developers] Re: Android market and ADCII

2008-11-29 Thread Shane Isbell
Hi Teo,

If you are going to open-source, better do it early. Disregarding the
Google open-source way,  once your app is stable and complete, there is
little reason or motivation for people to make contributions to your
project.

Shane

On Sat, Nov 29, 2008 at 4:27 AM, Teo [EMAIL PROTECTED] wrote:


 Hi Juan,

 it's free and closed source for now. I plan to keep it this way until
 sometime next year, since i constantly add features to it based on
 user feedback. When the app skeleton will stabilize and all the
 features i planned for will be implemented, i'll open source it for
 sure :)

 Thanks,
 Teo

 On Nov 28, 5:05 pm, Juan David Trujillo C. [EMAIL PROTECTED]
 wrote:
  Hi Teo!
 
  Is the application you uploaded open-source? or, is it free, but
  closed source?
 
  Thanks,
 
  Juan.
 
  On 14 nov, 09:18, Teo [EMAIL PROTECTED] wrote:
 
   Regarding your first question, i asked myself the same... I uploaded
   my app to the Market though, with the assumption that i'll be able to
   participate. I hope it will be possible :)
 
   On Nov 13, 9:39 pm, JuanDavidTrujilloC. [EMAIL PROTECTED]
   wrote:
 
Hi guys!
 
I have a question: Is it possible to upload an application to the
Android market (free or charging) and then use this same application
to participate in the Android developer Challenge - ADCII?
When will it be possible to upload applications to the Android
 market,
and charge for them?
 
Thanks!
 
best regards,
 
   Juan.
 


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



[android-developers] Re: SMS entry

2008-11-29 Thread Kingorcus

anyone ??

On Nov 28, 5:33 pm, Kingorcus [EMAIL PROTECTED] wrote:
 I am trying to insert a new SMS entry in the Database using the
 undocumented SMS URI

 I am successful in accessing the sms table, but not the threads table

 anyone knows how to do it

 or what is the content name for the threads table (URI)

 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Ringtone.isPlaying problem

2008-11-29 Thread Selmi

hi, i hope there is someone who has some experience with ringtones

in short, i open RingtoneManager and i choose ringtone from it using:

mRingtone=mRingtoneManager.getRingtone(position);
mRingtone.play();

after some time i make following test:
if(mRingtone!=null  mRingtone.isPlaying())
{
mRingtone.stop();
mRingtone=null;
}
else
{
  some action
}

problem is that mRingtone.isPlaying() always returns false, even if
sound is still played!
is it some problem in api, or did i misunderstood anything?

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



[android-developers] Re: Allocation too large for this process

2008-11-29 Thread EboMike

Any ideas?

I've created a little test app that's nothing more than a Gallery with
an adapter that creates an ImageView and populates it through new
BitmapDrawable(BitmapFactory.decodeFile(filename)), with always the
same filename.

Every time a new view is created, the data object size increases by
2KB or so. What is classified as a data object and how can I track
them? Likewise, the 1-byte array heap also goes up by 32KB every time,
as do the 4-byte arrays (by 4KB).

And finally, how is the 16MB heap an application has split up? In the
constructor of my test app, Runtime.getRuntime().freeMemory() returns
~760KB.

-Mike


On Nov 16, 12:34 pm, EboMike [EMAIL PROTECTED] wrote:
 I'm reading JPGs off the storage device, and they are typically
 1024x768 since they came straight from a server. The VM typically
 errors out allocating ~1MB of memory. (One time, it errored allocating
 30KB even though the gc freed up 900KB just prior to that).

 Yeah, I could have the server crunch the image to 480x320 first, but
 I'd like to reserve the option to add a zoom function later. Besides,
 it DOES work most of the time, and if I really have a 16MB heap, there
 shouldn't be any issues whatsoever.

 By the way, it does seem like there might be a leak - in the data
 object row in the Heap DDMS view, I seem to be leaking 10KB or so
 with every image. How can I track down what's going on there? Like I
 mentioned earlier, my BitmapDrawables are deleted properly according
 to the allocation tracker.

 -Mike

 On Nov 16, 12:02 pm, Romain Guy [EMAIL PROTECTED] wrote:

  What is the size of the Bitmap you are trying to create?

  On Sun, Nov 16, 2008 at 11:33 AM, EboMike [EMAIL PROTECTED] wrote:

   Um, yes... except that I'm randomly getting OutOfMemoryExceptions when
   I create a new bitmap :)

   On Nov 16, 11:13 am, Romain Guy [EMAIL PROTECTED] wrote:
   16 MB is the maximum limit of the heap. Your app can use at most 16
   MB.  The heap in your application will grow as more memory is needed.
   If you're currently at 3/4 MB, then everything's fine :))

   On Sun, Nov 16, 2008 at 11:00 AM, EboMike [EMAIL PROTECTED] wrote:

Thanks for your answer, Romain!

How much of those 16MB are accessible to the app? When I look at the
Heap view in the DDMS, I only see one heap with a total size of 3MB,
sometimes 4MB. If I add up all the allocations (either in the VM Heap
or the allocation tracker), I don't get anywhere near 16 MB. I also
don't see any major allocation from the drawables themselves other
than 16KB for the BufferedInputReader and BitmapFactory per drawable -
is the bitmap data being allocated by native code and invisible to the
VM allocation tracker?

After a gc, Runtime.getRuntime().freeMemory() typically gives me
numbers between 600KB and 800KB at any given point while I have the
Gallery up.

It also seems that I'm not leaking any drawables, at least judging by
the number of BitmapDrawable/Bitmap/BufferedInputRead/BitmapFactory
objects I have in the allocation tracker - they match the amount of
visible views in my gallery.

-Mike

On Nov 15, 1:01 am, Romain Guy [EMAIL PROTECTED] wrote:
Applications have a hard limit of 16 MB. As for the other bug you
mention, it has nothing to do with memory usage; the implementation of
BitmapFactory that reads images from URL will fail over slow
connections. Besides, when you load a Drawable from the resources, it
simply calls the BitmapFactory to decode the resource anyway.

If you hit an out of memory exception, your app *is* using too much
memory (which you might very well be leaking, it's not that hard,
especially if you use static fields in your code.) You can use DDMS
and its allocation tracker, as well as its various GC/heap monitors to
see when and how your application is allocating so much memory.

I have run myself into this issue several times over the past 18
months and every time, the application was leaking something
(especially on screen rotation.)

On Sat, Nov 15, 2008 at 12:55 AM, blindfold [EMAIL PROTECTED] wrote:

 Well Mike, I don't know either, but just remember from my own app 
 that
 I too had a zillion unexplained Clamp target GC heap messages at
 that 16 MB limit (while my app definitely needs far less memory than
 that), until I got rid of Drawables altogether. It could have been a
 coincidence, but together with the report from a Google Android Team
 member 
 thathttp://groups.google.com/group/android-developers/browse_thread/threa...
 this is a known bug (without being more specific) and his 
 Drawable-
 free workaround it suggested that this could be related to your
 problem. Of course there are plenty of other things that could be
 wrong...

 This is for an ImageSwitcher, so I need a Drawable of some sort

 I have never used ImageSwitcher myself (Android seems to often 

[android-developers] Re: Need Help animating Text

2008-11-29 Thread Dejecting

aye, a One Directional ticker that repeats the same line of text until
manually stopped, much like a stock ticker, is what I'm looking for.

I'm new to Java and Android but I've been playing around with this
quite a bit and displaying the text in static form is easy, I just
can't get it animated.

Any help is greatly appreciated.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: contextmenu getselectedtestid

2008-11-29 Thread Protocol-X

I figured it out kind of ... It seems since i was using the same
method in moth the onItemSelected and the onContextItemSelected  the
onItemSelected was taking ownership of the method instead of listening
to the onContextItemSelected... never encountered this issue before
has anyone else?

On Nov 29, 4:07 pm, Protocol-X [EMAIL PROTECTED] wrote:
 this is my sample code

   @Override
   public boolean onContextItemSelected(MenuItem item)
   {
           final AdapterView.AdapterContextMenuInfo acmi =
 (AdapterView.AdapterContextMenuInfo)
       item.getMenuInfo();
               long clickedId = (long) acmi.id;

         switch (item.getItemId()) {

             case INSERT_ID:
                 Toast.makeText(this, '+clickedId+', 
 Toast.LENGTH_SHORT).show
 ();
                 return true;

 no matter what list item i select it always shows 6

 On Nov 28, 6:54 pm, Protocol-X [EMAIL PROTECTED] wrote:

  Thanks for the reply.  I tried your method but now instead of 0 every
  time i get 6

  On Nov 26, 1:58 pm, G [EMAIL PROTECTED] wrote:

   @Override
   public boolean onContextItemSelected(MenuItem item) {
           // TODO Auto-generated method stub
           AdapterContextMenuInfo acmi = (AdapterContextMenuInfo)
   item.getMenuInfo();
           long clickedId = acmi.id;

   }

   In the above case, clickedId is the id of the row that was long-
   pressed to bring up the context menu. You can also get a specific view
   in the row that was long pressed...
   TextView tv = (TextView)acmi.targetView.findViewById
   (R.id.some_view_inside_your_row_view)

   Take a look at the docs for AdapterContextMenuInfo for more info.

   On Nov 25, 1:15 pm, Protocol-X [EMAIL PROTECTED] wrote:

How do u the row id or position of a listactiviy when using a context
menu.  It always seems to always select 0  for the row id.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Keeping ListView rows clickable

2008-11-29 Thread Dave Orme

Thanks Mark,

I've found that and some other threads now; that was just the nudge I
needed to get going.  Thanks!


Dave

On Nov 27, 5:50 pm, Mark Murphy [EMAIL PROTECTED] wrote:
  I want to create a ListView with a custom row that remains tappable and
  long-tappable.

 Actually, what it appears you're trying to create is a ListView with a
 custom row *containing focusable widgets* that remains
 tappable/long-tappable.

 The distinction is important, and, alas, it's not exactly easy.

  If I use the following row (lifted directly from Mark Murphy's book, p90),
  everything works as expected:

 Sure, sure, drag me into this, why don't you...

 ;-)

  It makes sense that tapping the CheckBox should toggle the star.  But I
  would expect that tapping the TextView would still select and click the
  row
  and it doesn't.  Similaraly, long-taps are now disabled...

  So how do I restore the ability to tap and long-tap on the TextView?

 Romain Guy has covered this issue on this list a couple of times. Here's
 one of the threads:

 http://groups.google.com/group/android-developers/browse_thread/threa...

 Upshot: can you use a context menu instead?

 --
 Mark Murphy (a Commons Guy)http://commonsware.com
 _The Busy Coder's Guide to Android Development_ Version 1.4 Published!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] problems with MapActivity in 1.0_r1 eclipse 3.3.2

2008-11-29 Thread Clay

So I am having a strange behavior which I cannot explain and it only
happens when I try to extend the MapActivity class. This is super
simple stuff so I am bewildered why this is happening. The class is
clearly there if you use the resources tab so I am curious why the
Classloader fails to include it. If I dont extend from MapActivity
and point to another layout it all works. Is there a trick here?

package com.noi.android.maptest;

import android.os.Bundle;

import com.google.android.maps.MapActivity;

public class MapTest extends MapActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.maplocator_activity);
}

@Override
protected boolean isRouteDisplayed() {
return false;
}
}

?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:id=@+id/main
android:layout_width=fill_parent
android:layout_height=fill_parent
com.google.android.maps.MapView
android:layout_width=fill_parent
android:layout_height=fill_parent
android:enabled=true
android:clickable=true
android:apiKey=ABQIlCiea28KB-SECRETFROMHERE/
/LinearLayout

11-29 20:02:08.867: ERROR/AndroidRuntime(327): Uncaught handler:
thread main exiting due to uncaught exception
11-29 20:02:08.877: ERROR/AndroidRuntime(327):
java.lang.RuntimeException: Unable to instantiate activity
ComponentInfo{com.noi.android.maptest/
com.noi.android.maptest.MapTest}: java.lang.ClassNotFoundException:
com.noi.android.maptest.MapTest in loader
[EMAIL PROTECTED]
11-29 20:02:08.877: ERROR/AndroidRuntime(327): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2068)
11-29 20:02:08.877: ERROR/AndroidRuntime(327): at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
2156)
11-29 20:02:08.877: ERROR/AndroidRuntime(327): at
android.app.ActivityThread.access$1800(ActivityThread.java:112)
11-29 20:02:08.877: ERROR/AndroidRuntime(327): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1580)
11-29 20:02:08.877: ERROR/AndroidRuntime(327): at
android.os.Handler.dispatchMessage(Handler.java:88)
11-29 20:02:08.877: ERROR/AndroidRuntime(327): at
android.os.Looper.loop(Looper.java:123)
11-29 20:02:08.877: ERROR/AndroidRuntime(327): at
android.app.ActivityThread.main(ActivityThread.java:3742)
11-29 20:02:08.877: ERROR/AndroidRuntime(327): at
java.lang.reflect.Method.invokeNative(Native Method)
11-29 20:02:08.877: ERROR/AndroidRuntime(327): at
java.lang.reflect.Method.invoke(Method.java:515)
11-29 20:02:08.877: ERROR/AndroidRuntime(327): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run
(ZygoteInit.java:739)
11-29 20:02:08.877: ERROR/AndroidRuntime(327): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:497)
11-29 20:02:08.877: ERROR/AndroidRuntime(327): at
dalvik.system.NativeStart.main(Native Method)
11-29 20:02:08.877: ERROR/AndroidRuntime(327): Caused by:
java.lang.ClassNotFoundException: com.noi.android.maptest.MapTest in
loader [EMAIL PROTECTED]
11-29 20:02:08.877: ERROR/AndroidRuntime(327): at
dalvik.system.PathClassLoader.findClass(PathClassLoader.java:215)
11-29 20:02:08.877: ERROR/AndroidRuntime(327): at
java.lang.ClassLoader.loadClass(ClassLoader.java:453)
11-29 20:02:08.877: ERROR/AndroidRuntime(327): at
java.lang.ClassLoader.loadClass(ClassLoader.java:421)
11-29 20:02:08.877: ERROR/AndroidRuntime(327): at
android.app.Instrumentation.newActivity(Instrumentation.java:1096)
11-29 20:02:08.877: ERROR/AndroidRuntime(327): at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
2060)
11-29 20:02:08.877: ERROR/AndroidRuntime(327): ... 11 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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: problems with MapActivity in 1.0_r1 eclipse 3.3.2

2008-11-29 Thread Clay

bummer I searched like crazy before posting but *just* found this
post...

http://groups.google.com/group/android-developers/browse_thread/thread/cb0169ab3a334671/42cd947c63f2eb48?lnk=gstq=MapActivity+ClassNotFoundException#42cd947c63f2eb48

now it works.

thx.



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



[android-developers] Re: AutoCompleteTextView without keyboard input

2008-11-29 Thread Dianne Hackborn
Currently AutoCompleteTextView is driven by key input events, so the only
way to get it to pop up its autocomplete list is to deliver key events to
its onKeyDown() its funcs and let it perform the text insert and then the
other magic it does.

On Sat, Nov 29, 2008 at 11:06 AM, [EMAIL PROTECTED] [EMAIL PROTECTED]wrote:


 Anyone?
 



-- 
Dianne Hackborn
Android framework engineer
[EMAIL PROTECTED]

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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: AlarmManager not always waking device (using RTC_WAKEUP)

2008-11-29 Thread Dianne Hackborn
You need to hold a wake lock the entire time you want to be running, from
when onReceiveIntent() is called until you have done all of your work.

On Tue, Nov 18, 2008 at 9:56 PM, Adam K [EMAIL PROTECTED] wrote:

 Thanks Dianne.

 Should I be holding a wakelock in the pendingintent receiver of the
 alarm (basically acquiring at the start of the onReceive() and
 releasing at the end)?  All I am doing in the receiver is setting off
 a notification - I am not creating any other intents or accessing any
 other threads or services.

 Cheers,

 Adam

 On Tue, Nov 18, 2008 at 9:22 PM, Dianne Hackbod [EMAIL PROTECTED]wrote:

 Fwiw, I am not aware of any issues with the alarm itself not waking up the
 phone.  Typically bugs in this area are a result of applications not holding
 wake locks the entire time needed.

 Note that the behavior when not holding a wake lock can change
 significantly between devices, depending on things like how often sync is
 running.


 On Tue, Nov 18, 2008 at 6:15 PM, Adam K [EMAIL PROTECTED]wrote:


 Ping.  Anyone?  It seems for certain people the alarm can never wake
 up the phone.  For others (like myself) it pretty much always wakes up
 the phone.

 Thanks,

 Adam

 On Nov 16, 8:15 pm, Adam K [EMAIL PROTECTED] wrote:
  Hi all,
 
  I noticed that AlarmManager does not always seem to wake the device
  correctly when using types RTC_WAKEUP or ELAPSED_REALTIME_WAKEUP.  It
  seems like whatever intent was pending is triggered later after the
  Menu key is hit.
 
  I realize you need to hold a wakelock for any activity fired after the
  initial pending intent event - but I thought at least the pending
  intent should execute without a wakelock being required?  All I want
  to do is set off a Notification when the alarm is complete - nothing
  else.
 
  It does seem to work 90% of the time without an issue, just not 100%
  of the time.  Has anyone else noticed this?
 
  Here is a summarized version of what I'm doing:
 
  //in main activity, set alarm for some time in future
  myPendingIntent = PendingIntent.getBroadcast(myContext, 0, new
  Intent(myContext, MyReceiver.class), 0);
  myAM = (AlarmManager) getSystemService(ALARM_SERVICE);
  myAM.set(AlarmManager.RTC_WAKEUP, getTriggerTime(), myPendingIntent);
 
  //in MyReceiver.class, onReceiver(), trigger notification
  NotificationManager myNM = (NotificationManager)
  context.getSystemService(Context.NOTIFICATION_SERVICE);
  Notification notif = new Notification();
  ..setup notification to play alarm, vibrate etc.
  myNM.notify(MYNOTIFICATION_ID, notif);
 
  Thanks,
 
  Adam




 --
 Dianne Hackborn
 [EMAIL PROTECTED]






 



-- 
Dianne Hackborn
Android framework engineer
[EMAIL PROTECTED]

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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: WindowManager$BadTokenException: Unable to add window -- token null is not for an application

2008-11-29 Thread Dianne Hackborn
It would help if you would include the stack crawl of the error and such.

One cause of this error may be trying to display an application
window/dialog through a Context that is not an Activity.

On Wed, Nov 26, 2008 at 9:33 AM, Ash [EMAIL PROTECTED] wrote:


 Hello super smart people, I've got a strangle little bug to test you.

 I have an application that tries to display an RTSP video in a view
 (Content View - ScrollView - AbsoluteLayout - VideoView). However,
 in the emulator the MediaPlayer throws dispatches an error message
 which tries to display an Alert which throws the WindowManager
 exception. On device I hear the sound but do not see the the video
 then I get the exception when the MediaController is shown. WTF is
 going on? If I create a tiny Activity this works fine but once I get
 into a real application it all goes to hell. Is this Dalvik and the
 Android SDK showing it's immaturity?

 Ash

 



-- 
Dianne Hackborn
Android framework engineer
[EMAIL PROTECTED]

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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Java App UI / Engine C split query

2008-11-29 Thread Dianne Hackborn
At this time native code is not supported in the SDK.

On Thu, Nov 27, 2008 at 9:52 AM, Mungbeans [EMAIL PROTECTED] wrote:


 If I have a large existing component alredy developed for another
 platform in C and I want to port it to Android what are the options?

 If I re-write the entire thing in Java that will take a long time and
 also I would be worried about performance issues with everything
 running in the JVM.

 So if I split it so that the UI is in Java and the engine is in C what
 are the available mechanism(s) for making the C API available to the
 Java application?
 How would I debug this i.e. if I run the Java app in Eclipse how can I
 step into the C code?

 Are there other options?

 



-- 
Dianne Hackborn
Android framework engineer
[EMAIL PROTECTED]

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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: For modular requirement

2008-11-29 Thread Dianne Hackborn
A good way to do this is publish it as a service in another .apk, which you
can query the package manager for and bind to.  This isn't really a true
plug-in though (a service is a global singleton in the system, and you'll
nee to define a .aidl interface to it so it can run in another process).

Another approach is to put your plug-in into another .apk, publish it in the
manifest however you want, find the .apk with the Package Manager, and then
use Context.createApplicationContext() with the flag to load the code.  From
there you can get the ClassLoader for the other .apk and instantiate
classes.

If you do the latter though you really need to be aware of what you are
doing: this has all kinds of security implications for you, can have
problems if code ends up running as different uids, etc.  This is best for
the situation where you provide all of the plug-ins, so you can sign them
with the same certificate and use a shared user ID for all of them as well
as the main application.

On Fri, Nov 28, 2008 at 2:39 AM, Xiaoliang Ding [EMAIL PROTECTED] wrote:

  Hi, Ludwing, Louis

 But how about a new added application. If we want to a new
 plug-in added into the main application, how can do it ?

 Thanks
 Ding


 2008/11/28, Louis [EMAIL PROTECTED]:


 Thanks Ludwig. And by the way, could we download a Jar file and put it
 into the basic application, then the basic application can call it
 through some interfaces?

 On Nov 27, 8:28 pm, Ludwig [EMAIL PROTECTED] wrote:
  Think about Intents and split your application into multiple
 applications
  (perhaps running under the same userid), each serving a bunch of
 intents.
  Then you can upgrade each application (which might just respond to one
  intent) separately and Android will at run-time find the best-matching
  intent (or give the user the choice which one to use if there are
 multiple
  good matches).
 
  Ludwig
 
  2008/11/26 Louis [EMAIL PROTECTED]
 
 
 
   Hi, All:
 
   Our products which running in other platform are using the modular
   approach, which means if user want to add a new feature, he/she only
   need to download a new plug-in, but not reinstall the who application.
   And we used COM library base ideas to do that before, is there anyway
   to do it in Android?
 
   Welcome any help for it.
 
   Best regards,
   Louis. 



-- 
Dianne Hackborn
Android framework engineer
[EMAIL PROTECTED]

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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: SpecialCharacters

2008-11-29 Thread Dianne Hackborn
No.

On Thu, Nov 27, 2008 at 11:24 PM, ena [EMAIL PROTECTED] wrote:


  can it be done using keyCharacterMap Class?

 On Nov 28, 10:41 am, Ernest [EMAIL PROTECTED] wrote:
  It works well if define it in string.xml like string name=XXX
  \u1E00/string
 
  On 11月28日, 下午1时21分, Ernest [EMAIL PROTECTED] wrote:
 
   But setText(\u1234) is not work well ,It shows on Screen like ' Ⴄ'.
 
   On 11月28日, 上午7时34分, Ralf [EMAIL PROTECTED] wrote:
 
Just use myedittext.setText((c)); or setText(\u1234) where 1234
 is
theunicodecharacter you want.
 
R/
 
On Thu, Nov 27, 2008 at 4:32 AM, ena [EMAIL PROTECTED] wrote:
 
 I try to draw SpecialCharacters in Edittext..
 i want draw '(c)' character
 i am used
 
 Java:
 
  KeyCharacterMap keyCharacterMap = KeyCharacterMap
.load(KeyCharacterMap.BUILT_IN_KEYBOARD);
 keyEvents = keyCharacterMap.getEvents(new char[]
 { '(c)'  });
  dispatchKeyEvents(Main.edittext, keyEvents);
 
 but it's show error..could u plz tel me..how to draw it???- 隐藏被引用文字
 -
 
- 显示引用的文字 -- 隐藏被引用文字 -
 
   - 显示引用的文字 -
 



-- 
Dianne Hackborn
Android framework engineer
[EMAIL PROTECTED]

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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to automate emulator hardware keys.

2008-11-29 Thread Dianne Hackborn
Just send a key event with the appropriate key code.  Note that you probably
do not want to do this with, say, HOME, since that will leave your app and
then you aren't going to be able to send any more events to the focus
window.

On Thu, Nov 27, 2008 at 8:15 PM, sush [EMAIL PROTECTED] wrote:


 Hi,

 I am testing my application using Instrumentation I am able to
 automate the virtual keys and UI clicks but I am unable to automate
 the emulator hardware keys such as, Home, Menu, Home etc...

 Please help me in this.

 Thanks in advance.
 Susama
 



-- 
Dianne Hackborn
Android framework engineer
[EMAIL PROTECTED]

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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Screen orientation woes

2008-11-29 Thread Dianne Hackborn
On Thu, Nov 27, 2008 at 3:29 PM, Stoyan Damov [EMAIL PROTECTED]wrote:

 On Fri, Nov 28, 2008 at 1:23 AM, Ralf [EMAIL PROTECTED] wrote:
  On Thu, Nov 27, 2008 at 11:39 AM, Stoyan Damov [EMAIL PROTECTED]
 wrote:
  I also don't want my activity to get restarted when the screen
  orientation changes, so I set the Config changes attribute to
  mcc|mnc|locale|touchscreen|keyboard||fontScale
  and handle onConfigurationChanged myself. That's great too.
  You only need to check for keyboardHidden|orientation.
 I don't want my app restarted when any of these settings change - e.g.
 I don't care if user switched locale, MCC, MNC, etc.


Please don't do this.  If, when your app is restarted due to these changes,
it to breaks, then it will also break when the user moves to another app and
then returns to yours and it needs to be restarted.  There is simply no
reason to do this kind of thing except to hide bugs in your app, which users
will eventually encounter.

As far as finding out if the user tried to put your app in an orientation it
is not allowing...  no, there is no way to do this, because you are forcing
a particular orientation, so actually the orientation didn't change at all.

And actually, I'd have to wonder, if you are forcing the orientation one
way, does it really make sense to show a different UI if the orientation
might have changed?  I mean, if you are forcing portrait, and the user opens
the G1 keyboard, and...  well, the screen stays portrait.  Your app still
works.  Why tell them they can't use it when they happen to have the
keyboard open?  Likewise if on some device the orientation is controlled by
the accelerometer, why tell them they can't use your app if they happen to
have the screen angled a certain way?

-- 
Dianne Hackborn
Android framework engineer
[EMAIL PROTECTED]

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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: FLAG_ONEWAY for asynchronous communication between services

2008-11-29 Thread Dianne Hackborn
On Thu, Nov 27, 2008 at 4:31 AM, nimbus83 [EMAIL PROTECTED] wrote:

 May you shortly explain how Android behave while many services are
 running in separate processes and communicating with each other?


Each process currently has an overhead of about 2MB (generally there is
~20MB total available to applications), and you'll be doing IPCs each time
you cross a process boundary which is 1-2ms of overhead (running an
animation at 60fps gives you 20ms per frame).

Seriously, this is not a desktop system.  You shouldn't be designing an app
like it is one.  The first rule of mobile development is: less is better.

-- 
Dianne Hackborn
Android framework engineer
[EMAIL PROTECTED]

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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: Possibility to access the Own Content Provider

2008-11-29 Thread Dianne Hackborn
Have you gone through the NotePad sample app?  That shows you a complete
working example of writing and using a content  provider.

On Thu, Nov 27, 2008 at 3:24 AM, yasmin afrose [EMAIL PROTECTED]wrote:

 Hi Dianne,

 Thanks for your reply. ie, In OWNCONTENTPROVIDER manifest file, I've
 included provider as follows :

 
 provider

 android:name=com.aspire.android.wikinotes.database.WikiNotesProvider

 android:authorities=com.aspire.android.wikinotes.database.wikinotes /
 In OWNPROVIDERACCESS manifest file, I don't know what I need to include to
 access my OWNCONTENTPROVIDER data. :(
 NOTE : In OWNPROVIDERACCESS manifest file, I've included user-permission
 android.name = READ_CONTACTS if I've accessed the Contacts Application
 database (Contacts.db).

 Please help me.

 Thanks in advance!!!
 Yasmin

 On Thu, Nov 27, 2008 at 8:04 AM, Dianne Hackborn [EMAIL PROTECTED]wrote:

 You need to publish the content provider in your AndroidManifest.xml.
 There is generally no reason to go through all of this trouble unless you
 want to allow other applications to use your content provider, so you need
 to describe in your manifest what it is so others can find it.


 On Tue, Nov 25, 2008 at 9:05 PM, AndroidKid [EMAIL PROTECTED]wrote:


 Hi All,

 I've accessed existing Content Provider. ie, I've retrieved data from
 Contacts Application by including the Permission Read_Contacts
 within my application Android Manifest file.

 I've created new Content Provider by extending my class from Content
 Provider. I've overridded the method query(), delete(), update() 
 getType(). For that, I've included provider within AndroidManifest
 file.

 Now I would like to access my own content provider in another
 application. For this, I've tried the following code :

 package com.aspire.android.accessprovider;

 import android.app.Activity;
 import android.app.ListActivity;
 import android.content.ContentUris;
 import android.content.Intent;
 import android.database.Cursor;
 import android.net.Uri;
 import android.os.Bundle;
 import android.provider.Contacts.People;
 import android.view.View;
 import android.widget.ListAdapter;
 import android.widget.ListView;
 import android.widget.SimpleCursorAdapter;
 import com.aspire.android.wikinotes.database.WikiNote; // TO ACCESS MY
 OWN CONTENT PROVIDER


 public class OwnProviderAccessActivity extends ListActivity {
private ListAdapter mAdapter;

Uri uri = WikiNote.Notes.ALL_NOTES_URI;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
String auth = WikiNote.Notes.ALL_NOTES_URI.getAuthority();
  // Note the below line
 Cursor C = getContentResolver().query(WikiNote.Notes.ALL_NOTES_URI,
 null, null, null, null);
startManagingCursor(C);
 // Here I've accessed one coulmn from the table in OwnContentProvider
 Applciation
String[] columns = new String[] {WikiNote.Notes.TITLE};
int[] names = new int[] {R.id.row_entry};
mAdapter = new SimpleCursorAdapter(this,
 R.layout.contacts, C,
 columns, names);
setListAdapter(mAdapter);

}

@Override
protected void onListItemClick(ListView l, View v, int position,
 long
 id) {
super.onListItemClick(l, v, position, id);
}
 }


 I've got output by adding OWNCONTENTPROVIDER application within
 BuildPath.

 Here the source of entire OWNCONTENTPROVIDER application will be
 inclueded within the my  OWNPROVIDERACCESS application. I would like
 to achieve the same thing using permission like Accessing Existing
 Content Provider.

 Please give your answers... I was totally confused  I've stuck
 with this issue.

 Any kind of reply will be appreciated!!!

 Thanks in Advance!!!
 Yasmin




 --
 Dianne Hackborn
 Android framework engineer
 [EMAIL PROTECTED]

 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.






 --
 Everything is Possible For U only

 



-- 
Dianne Hackborn
Android framework engineer
[EMAIL PROTECTED]

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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to implement a horizon scrollview?

2008-11-29 Thread Dianne Hackborn
There isn't one in the framework.  You can get the ScrollView source code
and make your own version that scrolls horizontally.

On Wed, Nov 26, 2008 at 10:27 PM, ilikeB2 [EMAIL PROTECTED] wrote:


 Hi

 When i want to use a scroll view that can contain a table which has
 large width, I can not find how to use  a view that has horizonal
 scrollbar, can anyone help me?
 



-- 
Dianne Hackborn
Android framework engineer
[EMAIL PROTECTED]

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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Re: How to enable screen transition when launching Activity

2008-11-29 Thread Dianne Hackborn
Inter-activity transitions are not supported at this point, sorry.

On Tue, Nov 25, 2008 at 11:51 PM, Tomei Ningen [EMAIL PROTECTED]wrote:


 This question was asked before

 http://groups.google.com/group/android-developers/browse_thread/thread/d5baa0831af53d80?q=android+G1+screen+transition#8cb9752ead82d2eb

 but I'll ask it again :-)

 On earlier Android SDK, when you are in home screen, and you launch an
 app (like Contacts), there's an iphone-like transition effect, where
 the new app is zoomed out.

 On G1 phone, this is disabled (probably due to poor performance). Is
 there anyway to turn it back on?

 Thanks

 



-- 
Dianne Hackborn
Android framework engineer
[EMAIL PROTECTED]

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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---