[android-developers] Re: New AChartEngine release

2010-01-22 Thread Dan Dromereschi
Hi,

The license is Apache License 2.0, which provides a lot of flexibility
to the library users.
http://code.google.com/p/achartengine/

Regards,

Dan



On Jan 22, 1:38 am, Zsolt Vasvari  wrote:
> Hi there, looks very cool.
>
> I don't see the license for this library?  Is there one?
>
> Thanks!
>
> On Jan 21, 5:38 pm, Dan Dromereschi  wrote:
>
> > Hi all,
>
> > We are proud to announce a new release for the AChartEngine charting
> > library.
> > You can download it 
> > here:http://code.google.com/p/achartengine/downloads/list
>
> > As it is an open-source project (Apache License 2.0), everyone is
> > welcome to contribute:
> >   * join the AChartEngine grouphttp://groups.google.com/group/achartengine
> >   * ask for new features, ideas,...
> >   * contribute new features and patches
>
> > Regards,
>
> > Danhttp://www.achartengine.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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Confused about how focus works

2010-01-22 Thread skink


On Jan 22, 12:25 am, Mark Nuetzmann  wrote:
> The Android settings activity does exactly what I want...  By default
> the text is WHITE and when the listitem is in a selected state the
> text changes color to BLACK...  How did you do that?
>

hi,

i think you should see ColorStateList docs

pskink

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


[android-developers] Re: Strange error with AdMob

2010-01-22 Thread Jason Arora
Does Project->Clean help?

On Jan 21, 4:59 pm, Wayne Wenthin  wrote:
> I have already posted on their developer group but based on everything I've
> seen I don't expect a reply.
>
> I have a strange problem.   When I added and adview to my app it imported a
> bunch of comments that all start with /**   Eclipse is acting like it is not
> a comment.  Although it isn't erroring out it has now marked anything
> starting with R.id as not existing.   Is this something I can remedy in
> eclipse or is it time to chuck my dreams of being mega rich off of all the
> admob revenue I will be receiving?
>
> Example of the beginning of my R.java:
> public final class R {
>     public static final class attr {
>         /** Must be a color value, in the form of
> "#rgb", "#argb",
> "#rrggbb", or "#aarrggbb".
> This may also be a reference to a resource (in the form
> "@[package:]type:name") or
> theme attribute (in the form
> "?[package:][type:]name")
> containing a value of this type.
>          */
>         public static final int backgroundColor=0x7f010001;
>         /** Must be a boolean value, either "true" or
> "false".
> This may also be a reference to a resource (in the form
> "@[package:]type:name") or
> theme attribute (in the form
> "?[package:][type:]name")
> containing a value of this type.
>          */
>         public static final int isGoneWithoutAd=0x7f010005;
>         /** Must be a string value, using '\\;' to escape characters such
> as '\\n' or '\\u' for a unicode character.
> This may also be a reference to a resource (in the form
> "@[package:]type:name") or
> theme attribute (in the form
> "?[package:][type:]name")
> containing a value of this type.
>          */
>         public static final int keywords=0x7f010003;
>         /** Must be an integer value, such as "100".
> This may also be a reference to a resource (in the form
> "@[package:]type:name") or
> theme attribute (in the form
> "?[package:][type:]name")
> containing a value of this type.
>          */
>         public static final int refreshInterval=0x7f010004;
>         /** Must be a boolean value, either "true" or
> "false".
> This may also be a reference to a resource (in the form
> "@[package:]type:name") or
> theme attribute (in the form
> "?[package:][type:]name")
> containing a value of this type.
>          */
>         public static final int testing=0x7f01;
>         /** Must be a color value, in the form of
> "#rgb", "#argb",
> "#rrggbb", or "#aarrggbb".
> This may also be a reference to a resource (in the form
> "@[package:]type:name") or
> theme attribute (in the form
> "?[package:][type:]name")
> containing a value of this type.
>          */
>         public static final int textColor=0x7f010002;
>     }
>
> --
> Writing code is one of few things
> that teaches me I don't know everything.
>
> Join the Closed Beta of Call Girl Managerhttp://www.fuligin.com/forums

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


[android-developers] Re: Adding contacts to a custom account

2010-01-22 Thread Jens
The problem lies within the broken parts of the Contacts app, so a
proper implementation of custom contacts sync is effectively dead for
all devices running 2.0.1 (and probably 2.1).

On 21 Jan, 00:05, sazilla  wrote:
> did anyone fix this problem? any suggestion?
>
> does it mean that there's no application providing contacts sync?
>
> On Dec 29 2009, 3:14 pm, sazilla  wrote:
>
> > Hi Vadim,
>
> > Actually for what I've understood thecustommime type can be used to
> > specify how to render thecustomfields when you view the contact not
> > while you edit it. I've found a bug in the Contacts application
> > (around line 
> > 178):http://android.git.kernel.org/?p=platform/packages/apps/Contacts.git;...
>
> > The ExternalSource component should be able to read the xml file you
> > mentioned above and render it in the contacts editing screen, but...
> > it doesn't.
>
> > The Facebook application, for example, defines acustomfiled (the FB
> > profile) in the contacts.xml file, and it i rendered correctly when
> > you view a FB contact, but the FBaccountin Android is a read onlyaccount, 
> > it means that in any case you cannot create/edit contacts
> > from android.
>
> > Up to now I found only a workaroun, filtering the intent launched
> > everytime a contact must be created/edited and show acustomcontacts
> > edit screen, for our contactsaccount, or forward the request to the
> > default contacts app if the contact belongs to a differentaccount.
>
> > Let me know if you've found any other workaround.
>
> > Thank you
>
> > Carlo
>
> > On Dec 23, 3:16 pm, Vadim Vohmjanin  wrote:
>
> > > I have found something...
>
> > > For thatcustomData row to appear in the Contacts app, you'll need to
> > > associate yourcustomMIME-type with XML that describes how to render
> > > the UI.  The only current way of doing this is to define a sync
> > > adapter  and add  definition inside, something
> > > like this:
>
> > >  > >  android:resource="@xml/contacts" />
>
> > > So you have 2 metas there, one is for sync adapter.
>
> > > Then define the contacts XML inside your app ./res/xml/contacts.xml:
>
> > > --snip--
> > >  http://schemas.android.com/apk/res/
> > > android";>
> > >       > >          android:mimeType="vnd.com.example.voip.cursor.item/phone_v2"
> > >          android:icon="@drawable/icon"
> > >          android:summaryColumn="data2"
> > >          android:detailColumn="data3" />
> > >  
> > > --snip--
>
> > > I have tried this, but i didn't get it working. It sure effects in
> > > some way. But i don't get desirable result.
>
> > > Any help pls?
>
> > > On Dec 18, 4:32 pm, Vadim Vohmjanin  wrote:
>
> > > > I faced the same problem.
>
> > > > I'm doing the research now. If you have found how to do it, please
> > > > provide this info. I'd be very greatfull.
>
> > > > I also wanted to know, what exactly way do you createcustomaccount?
> > > > As i understoodaccountcreation currently *requires* a developer to
> > > > implement a
> > > > service that extends AbstractThreadedSyncAdapter and publishes the
> > > > correct intent in
> > > > its manifest.
> > > > When this is not the case, the "Accounts & Sync" settings does not
> > > > handle the case
> > > > where this is not defined and causes the NPE in the core process that
> > > > causes the
> > > > reboot.
> > > > It is recommended that this defect be patch and/or the documentation
> > > > updated to include the
> > > > proper procedures and requirements for creation of anaccountin
> > > > Android.
>
> > > > Alsoaccountcreation requires of the authenticator to be implemented
> > > > for theaccounttype.
> > > > In order to be an authenticator developer must extend
> > > > AbstractAccountAuthenticator class, provider implementations for the
> > > > abstract methods and write a service that returns implemented
> > > > AccountAuthenticator.
>
> > > > Or there is more simple way to create acustomaccountfor Contacts?
>
> > > > On Dec 15, 4:52 pm, sazilla  wrote:
>
> > > > > Hi everyone,
>
> > > > > I encountered an issue while configuring my ownaccountfor android
> > > > > contacts sync. When the user choses to add a new contact to thecustom
> > > > >account, only the name fields and the photo are showed. This behaviour
> > > > > can be found in the ExternalSource.java android source file.
>
> > > > > My question is, if I don't want to addcustomcontacts fields for my
> > > > >account, how can I configure theaccountto show all the standard
> > > > > fields in the contacts application in the same way the googleaccount
> > > > > does?
>
> > > > > Thank you
>
> > > > > Carlo

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


[android-developers] urgent help Integrating code with Android home screen code.

2010-01-22 Thread satish bhoyar
Hi all,

I am trying to integrate my code to the android Home Screen code.
I want to launch my activity frm the HomeScreen by click of a button.
I Did the code & then build it but when i click the button i m getting error
as
Application not installed on phone.

please help

Thanks,
satish

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

[android-developers] Call forwarding

2010-01-22 Thread monty
is it possible to do call forwarding in android?plz give a solution

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


[android-developers] play audio file from weblink in android

2010-01-22 Thread RamaMohan
Hi all,
I have to play an audio file from weblink .I have to do
1.I have to download the song to phone.
2.I have to play songs without downloading ie.,streaming.
I have used the following code to play from web url.
---
 MediaPlayer mp = new MediaPlayer();
try {
mp.setDataSource(PATH_TO_FILE);
} catch (IllegalArgumentException e) {

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

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

e.printStackTrace();
}
try {
mp.prepare();
} catch (IllegalStateException e) {

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

e.printStackTrace();
}
mp.start();
-
But it was getting errors.and it is getting IOException .so what is
wrong in this.
If anybody know other way to to that task.please tell me.

Please help me.!

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


[android-developers] Re: Help with listview!

2010-01-22 Thread ls02
I understand that. But how do I get the listview individual row view?
I didn't dind any way to get handle or any other access to it. If I
had the row view handle I can use it's findViewById tyo get particular
row's item I want to update. The only way I see is to call adaptor's
notifyDataSetChanged() which causes ALL listview items and ALL
elements in each listview item to be updated.

On Jan 22, 2:15 am, Guillaume  wrote:
> Hi ls02,
>
> It depends how you created the text view.
> You can use the method setText(string) on the text view, and the
> method setBitmap(bitmap) on the image view.
>
> Guillaume
>
> On Jan 22, 8:07 am, ls02  wrote:
>
>
>
> > I am new to Android. Can someone show to me how do I force invalidate
> > a portion of an item in listview? I have listview row item that
> > contains textview and image view. I only want to invalidate text in
> > the textview of a particular item in the listview.- Hide quoted text -
>
> - Show quoted text -

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


Re: [android-developers] $200 per live wallpaper

2010-01-22 Thread fourk xav
hi
I have a mate that is a photographer. Can you be more explicit on your
expectations?
thanks

On Fri, Jan 22, 2010 at 4:33 AM, aspidoff  wrote:

> paying $200 per original, cool, live wallpaper for 2.1
>
> hit me up with ideas or your portfolio. thanks!
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

[android-developers] Timing and using Intent MediaAction.ImageCapture to take pictures

2010-01-22 Thread Ray Benjamin


I'm still working only on the emulator, but I am seeing some unexpected 
behavior when using an Intent to take a picture via 
MediaAction.ImageCapture. At first, I thought everything was working as 
I wished: from my application, control was transferred to the Camera 
application, which allowed me to take a picture, review it, and then 
control transferred back to my original application. I did notice that 
the picture taken seemed to be the same regardless of how long I waited, 
and since the 2.1 emulator has a moving block in the picture stream, 
that seemed odd. The block should have been in a different location 
depending on when I took the picture.


After adding more logging, it appears that the picture is being taken 
immediately, but control doesn't transfer back to my application, it 
stays in the camera, until I've taken another picture and accepted it.


I would prefer the first behavior, put the user in Camera mode, let them 
take and review the picture, and then return to my application.


Has anyone else dealt with this in a way other than writing your own 
camera app? I know that there is also an outstanding issue having to do 
with image size, but I'm hoping by the time I'm finished with the rest 
of my application, some of the Intent/MediaAction stuff will have been 
resolved, like picture resolution.


Thanks,
 Ray

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


[android-developers] Re: Creating a proper Splash/Loading screen

2010-01-22 Thread Maps.Huge.Info (Maps API Guru)
You might want to look at adding a theme to your application in the
manifest, not sure if it can be animated though. The thing about a
theme is it loads first and fast so no blank screen.

-John Coryat

"Radar Now!"

"What Zip Code?"

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


[android-developers] Re: How to forward a phone call to voice mail ?

2010-01-22 Thread Arbixx
Thank you for answering Kumar.

Actually, there is no such option in the Contacts provider. The option
is available in the ContactsContract provider since API Level 5
though.

But I know some apps do forward phone calls to voicemail at least
since API level 3. So there must be some other way.

Any other idea frankly appreciated :)

Greets.



On 21 jan, 20:20, Kumar Bibek  wrote:
> In the contacts Content Provider, there is a field for this. If you
> set this, then all the calls will be diverted to voice mail.
>
> Kumar Bibek
>
> On Jan 21, 4:32 pm, Arbixx  wrote:
>
>
>
> > Hello guyz,
>
> > I've been searching around the net and browsingthe APIs to find a way
> > to forward an incoming phone call to voice mail, but with no success
> > so far.
>
> > I know it can be done since some apps do it already. I also know that
> > blocking an incoming phone call is not possible yet and is an issue
> > Google devs are working on.
>
> > In the app i'm coding, I easily manage to detect an incoming phone
> > call by listening to the phone state. But I cant make the phone NOT
> > ring and NOT show the incoming phone call screen. I' ve tried to cut
> > off the network via a ServiceState object, but that doesn't seem to
> > work.
>
> > Anyone has a clue on how it can be done ?
>
> > Thanks in advance.

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


[android-developers] program's offline installation

2010-01-22 Thread guiha...@gmail.com
Hi,

(questions are marked with *?*, where ? is a letter).

I took a while to read all posts about people trying to create
installation approaches for android.

There are basic two approaches:

1. Put app+data it in the apk.
2. Put app in the apk and download data from somewhere

Most of my users won't use the market to market their products (my
product is a virtual machine with some libraries - near 2mb): they
will have to create an apk with their data (can achieve several mb),
and do a OFFFLINE installation. For an example, take a Sales Force
application with a few MB of databases - not sqlite.

*a* I was wondering if its possible of:

1. Delete some raw data of the original apk (approach 1)
or
2. Delete the apk from data/app after the installation is done
*without* deleting the data installed (approach 2)

*b* One option i imagine would be to use tar.gz or even zip. Is it
possible to use tar.gz in the device?

*c* The res/raw has a very big limitation: only supports resources
with lower case. This is serious for me because all resources have
mixed-case. Is there anything we can do to bypass this limitation? If
not, i was thinking in a way to rename the files to lowercase, put in
the apk, and after installation rename them back.

*d* Can an application run after the apk is installed? This way i
could trigger the file rename of *c*.

Thanks for feedback.

guich

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


[android-developers] Re: How to forward a phone call to voice mail ?

2010-01-22 Thread Arbixx
Thank you for answering Kevin.

I indeed want to do it programmatically.



On 21 jan, 23:07, Kevin Duffey  wrote:
> I think he meant programatically..like he wants to write a service app that
> gets notified of incoming calls and he can write some code that sends the
> call to voice mail directly.
>
>
>
> On Thu, Jan 21, 2010 at 11:20 AM, Kumar Bibek  wrote:
> > In the contacts Content Provider, there is a field for this. If you
> > set this, then all the calls will be diverted to voice mail.
>
> > Kumar Bibek
>
> > On Jan 21, 4:32 pm, Arbixx  wrote:
> > > Hello guyz,
>
> > > I've been searching around the net and browsingthe APIs to find a way
> > > to forward an incoming phone call to voice mail, but with no success
> > > so far.
>
> > > I know it can be done since some apps do it already. I also know that
> > > blocking an incoming phone call is not possible yet and is an issue
> > > Google devs are working on.
>
> > > In the app i'm coding, I easily manage to detect an incoming phone
> > > call by listening to the phone state. But I cant make the phone NOT
> > > ring and NOT show the incoming phone call screen. I' ve tried to cut
> > > off the network via a ServiceState object, but that doesn't seem to
> > > work.
>
> > > Anyone has a clue on how it can be done ?
>
> > > Thanks in advance.
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com > cr...@googlegroups.com>
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en

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


[android-developers] Re: Activity.finish() x System.exit

2010-01-22 Thread Albert
What about this:
int pid = android.os.Process.myPid();
android.os.Process.killProcess(pid);

You exit the app asking android to kill your process. I think that
what is used in 3D games as most of them have and exit button, you
kill the process so that it wont drain battery and use memory.

Anyway if your app consist of only 1 activity you should call finish();

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


[android-developers] Re: Loop audio from mic to earpiece?

2010-01-22 Thread draf...@gmail.com
Hi Micheal,

do you fancy helping me try to solve the ear piece problem to make it
two pints? :-)

It initially sounds like it gets routed to the ear piece on the HTC
Hero but thats because of the way the earpiece and speaker are set up
on the hero, on a G1 it is clearly coming through the speaker.

here is the full code I have:

boolean isRecording; //currently not used
AudioManager am;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
am = (AudioManager) getSystemService(Context.AUDIO_SERVICE);
Record record = new Record();
record.run();

}

  public class Record extends Thread
  {

  static final int bufferSize = 20;
  final short[] buffer = new short[bufferSize];
  short[] readBuffer = new short[bufferSize];

  public void run() {
  isRecording = true;
  android.os.Process.setThreadPriority
  (android.os.Process.THREAD_PRIORITY_URGENT_AUDIO);

  int buffersize = AudioRecord.getMinBufferSize(11025,
  AudioFormat.CHANNEL_CONFIGURATION_MONO,
  AudioFormat.ENCODING_PCM_16BIT);

 AudioRecord arec = new AudioRecord
(MediaRecorder.AudioSource.MIC,
 11025,

AudioFormat.CHANNEL_CONFIGURATION_MONO,

AudioFormat.ENCODING_PCM_16BIT,
 buffersize);

 AudioTrack atrack = new AudioTrack
(AudioManager.STREAM_VOICE_CALL,
 11025,

AudioFormat.CHANNEL_CONFIGURATION_MONO,

AudioFormat.ENCODING_PCM_16BIT,
 buffersize,
 
AudioTrack.MODE_STREAM);

 am.setRouting(AudioManager.MODE_NORMAL,
AudioManager.ROUTE_EARPIECE,
 
AudioManager.ROUTE_ALL);

 Log.d("SPEAKERPHONE", "Is speakerphone
on? : " + am.isSpeakerphoneOn());

 atrack.setPlaybackRate(11025);

 byte[] buffer = new byte[buffersize];
 arec.startRecording();
 atrack.play();

 while(isRecording) {
 arec.read(buffer, 0, 
buffersize);
 atrack.write(buffer, 0,
buffer.length);
 }

 arec.stop();
 atrack.stop();
 isRecording = false;
  }
  }
}

The log message shows that isSpeakerPhoneOn returns false yet the
audio still comes through the speaker,
The setRouting method is deprecated and doesnt work either and no
matter what stream I choose in the AudioTrack
constructor the audio gets played out over the Speaker.

Cant find much on it with a search either, just people having the same
problems as me.

Would you or anyone have any insight on how to get it to play through
the ear piece?

Thanks again in advance,
Donal


On Jan 21, 5:29 pm, Michael  wrote:
> No worries.
>
> Had a week off in summer and spent some of it watching the tennis in
> the sweltering heat and learning how the AudioRecord and AudioTrack
> stuff works.
> Just polishing some of it up to release my first app, but glad it
> could be of use to someone else as well.
>
> I look forward to that pint ;-)
>
> Mike
>
> On Jan 21, 5:23 pm, Donal Rafferty  wrote:
>
> > Thanks Mike,
>
> > Your a legend, have that working now,
>
> > I owe you a pint!
>
> > Many thanks,
> > Regards,
> > Donal
>
> > On Thu, Jan 21, 2010 at 5:02 PM, Michael  wrote:
> > > Hi Donal,
>
> > > I have pulled together some of my code to form an example. I have no
> > > idea if this code would compile, but it should be pretty close and
> > > should serve as an example to get you going.
>
> > >                android.os.Process.setThreadPriority
> > > (android.os.Process.THREAD_PRIORITY_URGENT_AUDIO);
>
> > >                int buffersize = AudioRecord.getMinBufferSize(11025,
> > > AudioFormat.CHANNEL_CONFIGURATION_MONO,
> > > AudioFormat.ENCODING_PCM_16BIT);
>
> > >                AudioRecord arec = new
> > > AudioRecord(MediaRecorder.AudioSource.MIC,
> > >                                11025,
> > >                                AudioFormat.CHANNEL_CO

[android-developers] tazsk manager

2010-01-22 Thread Deacon
to terminate a process,cut and trim the string constant of bit flow

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


Re: [android-developers] program's offline installation

2010-01-22 Thread Mark Murphy
> *a* I was wondering if its possible of:
>
> 1. Delete some raw data of the original apk (approach 1)

If by "raw data" you mean things in res/raw of the APK, then no, that is
not possible. APK files are digitally signed and cannot be modified.

> 2. Delete the apk from data/app after the installation is done
> *without* deleting the data installed (approach 2)

That depends on where the "data" is "installed". Data on the SD card
survives an uninstall. Everything else is removed.

> *b* One option i imagine would be to use tar.gz or even zip. Is it
> possible to use tar.gz in the device?

Use it how?

> If
> not, i was thinking in a way to rename the files to lowercase, put in
> the apk, and after installation rename them back.

You cannot modify the contents of the APK.

> *d* Can an application run after the apk is installed? This way i
> could trigger the file rename of *c*.

No.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


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


[android-developers] onKeyDown() functionality issue

2010-01-22 Thread Kshitij Aggarwal
Hi,

I was trying to override the back button functionality where I wanted
to call the default functionality in case a boolean is set false

public boolean onKeyDown(int keyCode, KeyEvent event) {
boolean temp = false;
if (event.KEYCODE_BACK == keyCode) {
System.out.println("Back pressed");
if (isTrue) {
//Do something
return true;
}
else return false;
}
return false;
}

Now this doesn't exactly work how the documentation states. the //Do
Something part is executed well, but when isTrue is false i want the
default back functionality which is not happening. Im using SDK 1.5

Now,

   1.  How do I fix this?
   2.  Is this issue fixed in later SDK updates? If not can
someone raise a bug for the same?

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


[android-developers] Re: Accessing google calendar through Android using the given protocol

2010-01-22 Thread Nikhil Agarwal
I request the developers to please look into this problem. Am I
sending the request correctly?
Thank you.

On Jan 21, 7:22 pm, Nikhil Agarwal  wrote:
> I need to insert,update,delete events in google calendar using
> android. I tried using the protocol given 
> athttp://code.google.com/apis/calendar/data/2.0/developers_guide_protoc...
> but I was unable to go beyond authenticating the user.
>
> I was able to authenticate the user and I extracted the Auth code
> using:-
>  temp1 = EntityUtils.toString(response.getEntity());
> if(response.getStatusLine().getStatusCode()==200)
>                 auth = temp1.substring(temp1.indexOf("Auth=")+5).trim
> ();
>
> After this I tried inserting an event which did not work. I was
> getting status code 200 in response and I am not sure even if I did
> get a proper response, how can I extract the cookie s and gsessionid
> for my next request.
>
> I tried creating a calendar instead and I received the same status
> code 200. I used the following code:-
>
>    String messageBody="        " xmlns:gd='http://schemas.google.com/g/2005'"+
>        " xmlns:gCal='http://schemas.google.com/gCal/2005'>"+
>   " ABC Project Schedule"+
>   " This calendar..."+
>   " "+
>   " "+
>   " "+
>   " "+
> " ";
>  StringEntity entity =new StringEntity(messageBody);
>             entity.setContentType("application/atom+xml");
>             entity.setChunked(true);
>             httppost.setEntity(entity);
>             httppost.setHeader("Authorization", "GoogleLogin
> auth="+auth);
>             httppost.setHeader("GData-Version", "2");
>             //httppost.setHeader("Content-Length",String.valueOf
> (entity.getContentLength()));
>             //httppost.setHeader("Content-Type", "application/atom
> +xml");
>             HttpResponse response = httpclient.execute(httppost);
>
> As can be seen from the code, I commented Content-Length and Content-
> Type as otherwise I would get a ClientProtocolException (content-
> length was causing the exception, didn't put content-type since it is
> already mentioned in the entity...not sure where it should be
> defined).
>
> I am sorry that I don't understand the basics correctly. I did refer
> to the apache site for httpclient stuff but it wasn't of much help.
> Please help me out with the above problems.  Thank you.

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


Re: [android-developers] Launch ContextMenu from ContextMenu

2010-01-22 Thread Mark Murphy

> How can I launch a contextmenu from a contextmenu?
>
> I'm trying to replicate the MediaPlayer action that happens when you
> long click a song, then click "Add to playlist" in the resulting
> contextmenu. When you click that menu item, another contextmenu pops
> up with "Add to playlist" as the title, and "Current playlist", "New",
> and however-many-playlists-you-have defined after that.

The second one might just be an AlertDialog.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


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


[android-developers] Re: program's offline installation

2010-01-22 Thread guiha...@gmail.com
Good morning, Mark (et al).

> That depends on where the "data" is "installed". Data on the SD card
> survives an uninstall. Everything else is removed.

And can the apk install files in the sd card?

>
> > *b* One option i imagine would be to use tar.gz or even zip. Is it
> > possible to use tar.gz in the device?
>
> Use it how?

Running a script the first time the program runs to decompress the
data.

> > not, i was thinking in a way to rename the files to lowercase, put in
> > the apk, and after installation rename them back.
>
> You cannot modify the contents of the APK.

The idea would be to rename the files in the file system, not in the
apk.
Well, actually i can modify the apk, because the apk is a zip file
(=jar). I could add the files in uppercase, but i'm not sure if
Android will complain when it tries to install the apk.

thanks

guich

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


Re: [android-developers] Re: program's offline installation

2010-01-22 Thread Mark Murphy
>> That depends on where the "data" is "installed". Data on the SD card
>> survives an uninstall. Everything else is removed.
>
> And can the apk install files in the sd card?

The application in the APK can put files on the SD card when it is run.

>> > *b* One option i imagine would be to use tar.gz or even zip. Is it
>> > possible to use tar.gz in the device?
>>
>> Use it how?
>
> Running a script the first time the program runs to decompress the
> data.

I think there is a GZip decoder in Android, but you would need a
third-party tar class. ZIP files can be handled natively.

> Well, actually i can modify the apk, because the apk is a zip file
> (=jar).

Not at runtime.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


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


[android-developers] Re: Layout issues for multiple screen sizes and API versions

2010-01-22 Thread snowy_tracks
Thanks Lance,

I thought it may have been an OS issue.

On Jan 19, 8:25 pm, Lance Nanek  wrote:
> You might be running into the Android 2.0.0 bug where it only matches
> the -v6 
> specifier:http://groups.google.com/group/android-developers/msg/315ce9b9dde1161a
>
> On Jan 19, 8:13 am, snowy_tracks  wrote:
>
>
>
> > I am currently trying to make my app compliant with all screen sizes /
> > api levels.
>
> > I have this mostly working, however there is 1 issue i cannot resolve:
>
> > Layouts in the "layout-hdpi" folder are used by and any phone on 1.5
> > (API level 3).  - Which i dont want, i want API level 3 phones to use
> > the "layout" folder.  So to resolve this I added "-v4" onto the folder
> > also, this works, the folder is no longer used by 1.5 phones.
>
> > However, now the folder is also not used on API Level 6 phones, for
> > example the droid.  The droid only picks up the folder if i name the
> > folder: "layout-hdpi-v6".  (Also if i put "-v3" on a folder, the
> > layout folder is not used by API level 4 phones)
>
> > My understanding is that the -v qualifer allows you to
> > exclude phones on an API level that is too low, so -v4 should mean
> > that the folder will be used by all phones on API level 4 and above.
> > I am finding a folder is only used for that specific API level.
>
> > Has anybody else ran into this same issue? And does anybody know of
> > any possible solutions?
>
> > I hope that makes sense.
>
> > Marc
>
> > My current manifest file has the following:
>
> > 
>
> > and my resources folder list is:
>
> > drawable
> > drawable-hdpi
> > drawable-ldpi
> > layout
> > layout-hdpi-v4
> > layout-ldpi-v4- Hide quoted text -
>
> - Show quoted text -

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


[android-developers] How to find GoogleLoginServiceConstants.FEATURE_LEGACY_HOSTED_OR_GOOGLE?

2010-01-22 Thread Mariano Kamp
Hi,

I am trying to use the new Account API to get rid of my homegrown
authentication against Google. The recently introduced Account API seems to
do the trick, only it is totally undocumented about the use with Google as
provider.

Now that the Android 2.1 sources are out I checked if the official apps
meanwhile use the new API - and they do - Yay! Unfortunately they still
access non-sdk code. So to replicate its functionality I would need to know
what 
com.google.android.googlelogin.GoogleLoginServiceConstantsFEATURE_LEGACY_HOSTED_OR_GOOGLE
contains.

I get a ClassNotFoundException when I try to load the class with
Class.forName(). I tried this on an Android 2.1 emulator with the Google API
and on an 2.0 Droid.

How do I get my hands on this class?

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

[android-developers] How to draw Text mobile with Canvas and thread

2010-01-22 Thread SIDIBE Ali-Broma

I want to draw text whitch can move  like a break new in television or
Ticker in Java ME

But i must do  it with canvas?

Regards

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


[android-developers] Re: adding a "quick add event" to the Calendar

2010-01-22 Thread andrew android
I understand where you are coming from...
In my app - Target Date Pro -  it is possible now to do this quick
event addition and also jump to a specific event.  Inclusion of
reminder to the quickly added event is a likely future enhancement.

On Jan 13, 8:26 am, Jonathan Epstein  wrote:
> I am an experienced developer, but an Android newbie.  I have a Droid
> Eris (Android 1.5), and the awkwardness of adding events to a calendar
> is driving me nuts.  I already made a feature request, but wonder
> whether (a) newer versions of Android already have something like this
> OR (b) if I could get some implementation advice on the following
> idea.  In particular, I wonder if there is a hook available for me to
> receive the necessary trigger when the user selects a time from the
> Calendar Day View, as described below, along with the necessary
> parameters (day and time that the user requested).
>
> Alternatively, perhaps the Calendar source code is available, and I
> should modify that.
>
> Thanks in advance for your advice.
>
> 
>
> When adding an event (in Android 1.5) from the Day View, we currently
> get the full event-add dialog, say for Thursday at 4pm.  An additional
> simple interface would make it much easier to add events to calendars,
> as described below.
>
> Assume that the event is being added to the default calendar (e.g.,
> your Google Calendar).
>
> The first line in the screen contains 5 buttons for times in 30-minute
> increments around the initial time.  E.g., in the 4pm example the
> buttons read: 3:30, 3:45, 4:00 (highlighted), 4:15 and 4:30.
>
> The second line shows an event-duration.  There are only four choices
> (0, 30min, 60min, all day).
>
> Below that is the event description.
>
> Below that is a popup menu forreminders(same as on the current event
> add-screen).
>
> Below that are the opportunities to Save&Cancel.
>
> Note that event location and event description are omitted.
>
> If there's room above, there could be a button to take you to the full-
> blown event entry dialog.

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


[android-developers] Re: creating activity-less packages

2010-01-22 Thread Hugo Visser
I'm curious about what you are trying to do here? Nice that what you
are trying is working, but what's your usecase?

On Jan 22, 1:19 am, "guiha...@gmail.com"  wrote:
> Just in case it will be useful to someone, here's the manifest file
> application part for my "library".
>
>      android:label="TotalCross Virtual Machine" android:debuggable="true">
>         
>     
>
> There's no even need to define an action.
>
> guich

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


[android-developers] Re: Nexus GPS antenna is always active when "Use GPS Satellites" is checked...

2010-01-22 Thread Alain
I have resolved this issue problem.

When the browser starts and the google splash page opens up, it has a
small checkbox to Enable location  (allow sites to request access to
your location) if this is checked, then the gps is enabled. Go in
browser menu, choose more and settings and unclick Enable location.
This prevents the browser from starting gps.

GPS will still work when accessing Maps.



On Jan 21, 12:42 pm, Vinay Avasthi  wrote:
> I have seen this problem on milestone. Once I run a browser session, the
> browser remains active and keeps the GPS active. If I manually kill
> browser using Task Manager application the GPS goes off.
>
> On 01/21/2010 08:00 PM, Alain wrote:
>
> > I have intermittently the same problem on my Milestone/Droid. The GPS
> > comes on on its own.
> > I end up turning off the "Use GPS" setting to preven the battery from
> > draining.
>
> > On Jan 21, 2:42 am, String  wrote:
> >> On Jan 20, 9:21 pm, Richard Schilling
> >> wrote:
>
> >>> I may be answering my own question here.  The power control widget had
> >>> the GPS antenna selected to "on".  When I turn off the GPS antenna in
> >>> the power control widget, the antenna goes off.
>
> >> FYI, the power control widget is simply a shortcut to the Settings
> >> option for "Enable GPS satellites". So this isn't doing anything
> >> different than in your original post.
>
> >> Unless this is an N1 bug (possible, I can't test), the likelihood is
> >> that you have a poorly-designed app running in the background which is
> >> consuming the GPS location all the time. It's impossible for us to say
> >> what app it might be without seeing your phone, though. You'll need to
> >> look through your installed apps yourself to try to find the culprit.
>
> >> String

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


Re: [android-developers] Re: Anyone noticing more uninstalls of their app than usual over last weekend/today?

2010-01-22 Thread Justin Giles
Recovered about 5% out of 15-20% lost.  Very disappointed in the lack of
response.

Justin


On Thu, Jan 21, 2010 at 10:30 PM, Seni Sangrujee wrote:

> Sorry to bump this old thread, but has anyone had their active
> percentages completely recover since the "fix"?  Mine's still down
> quite a bit from before the problem started.
>
>
> -seni
>
>
> --
> Android Prayer Network
> http://prayerstoshare.net
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] Re: How to forward a phone call to voice mail ?

2010-01-22 Thread Arbixx
Plus, it would be interesting to be able to forward a phone call to
voicemail from someone who's not in the contact list.

So I dont think the Contact provider will be of any help.

Your help is appreciated though, and i'm looking forward for more
ideas :)

Greets.


On 22 jan, 11:06, Arbixx  wrote:
> Thank you for answering Kevin.
>
> I indeed want to do it programmatically.
>
> On 21 jan, 23:07, Kevin Duffey  wrote:
>
>
>
> > I think he meant programatically..like he wants to write a service app that
> > gets notified of incoming calls and he can write some code that sends the
> > call to voice mail directly.
>
> > On Thu, Jan 21, 2010 at 11:20 AM, Kumar Bibek  wrote:
> > > In the contacts Content Provider, there is a field for this. If you
> > > set this, then all the calls will be diverted to voice mail.
>
> > > Kumar Bibek
>
> > > On Jan 21, 4:32 pm, Arbixx  wrote:
> > > > Hello guyz,
>
> > > > I've been searching around the net and browsingthe APIs to find a way
> > > > to forward an incoming phone call to voice mail, but with no success
> > > > so far.
>
> > > > I know it can be done since some apps do it already. I also know that
> > > > blocking an incoming phone call is not possible yet and is an issue
> > > > Google devs are working on.
>
> > > > In the app i'm coding, I easily manage to detect an incoming phone
> > > > call by listening to the phone state. But I cant make the phone NOT
> > > > ring and NOT show the incoming phone call screen. I' ve tried to cut
> > > > off the network via a ServiceState object, but that doesn't seem to
> > > > work.
>
> > > > Anyone has a clue on how it can be done ?
>
> > > > Thanks in advance.
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com > >  cr...@googlegroups.com>
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en

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


Re: [android-developers] Re: Anyone noticing more uninstalls of their app than usual over last weekend/today?

2010-01-22 Thread Greg Donald
On Thu, Jan 21, 2010 at 10:30 PM, Seni Sangrujee  wrote:
> Sorry to bump this old thread, but has anyone had their active
> percentages completely recover since the "fix"?  Mine's still down
> quite a bit from before the problem started.

Still not fixed.


-- 
Greg Donald
destiney.com | gregdonald.com

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


[android-developers] OpenGL ES

2010-01-22 Thread Greg Donald
Why is support for OpenGL lagging so far behind with Android?  I have
ebooks that date OpenGL 1.0 ES back to 1997 or so.  I don't understand
why ~13 year old technology is what's being offered in the Android
API.  Could someone enlighten me?

What's the best path for someone wanting to learn OpenGL ES 1.0?  The
ebooks I have are of course not oriented for Java/Android and most
everything in them doesn't work when I try it.  I can post some
specific examples later but at this point I'm just wondering if I'm
wasting time or if I should keep going and struggle through it.  I
have a tiny amount of OpenGL experience but it's with 2.0 and
apparently things were very different back in the ES 1.0 world.

I guess my question boils down to, is OpenGL ES 2.0 support coming to
Android anytime soon?And what OpenGL ES 1.0 + Android learning
resources already exist?


Thanks,


-- 
Greg Donald
destiney.com | gregdonald.com

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


[android-developers] Notification sound from file inside the app package ?

2010-01-22 Thread elpix1
Hi,

Is it possible to play a notification sound from a sound file
inside the application package ?

Where should this file be stored in the apk  (/res/raw or /assets)
and what should be the URI to pass to the notification ?

notification.sound = Uri.parse(... ? ...);


Best regards.

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


Re: [android-developers] OpenGL ES

2010-01-22 Thread Justin Giles
I can't speak as to why Android is putting on Hammer pants and going back to
the 90's with OpenGL 1.0.

In regards to resources, we always have the wonderful official OpenGL 1.0
reference...oh, wait...Khronos says that OpenGL 1.0 reference is
obsolete...hmmmlet's seeoh, I can direct you to the OpenGL 1.1
reference: http://www.khronos.org/opengles/sdk/1.1/docs/man/

On second thought, I just remembered that Android only supports v1.0 and
some basic 1.1 support that is NOT COMPLETE (
http://developer.android.com/guide/topics/graphics/opengl.html).  So, it
looks like we are stuck in the stone ages until Google and Android get back
into the 21st century.

In the meantime, why don't we head to the landfill and get some turn of the
century phones, download the BREW SDK and get to work!

Justin



On Fri, Jan 22, 2010 at 8:50 AM, Greg Donald  wrote:

> Why is support for OpenGL lagging so far behind with Android?  I have
> ebooks that date OpenGL 1.0 ES back to 1997 or so.  I don't understand
> why ~13 year old technology is what's being offered in the Android
> API.  Could someone enlighten me?
>
> What's the best path for someone wanting to learn OpenGL ES 1.0?  The
> ebooks I have are of course not oriented for Java/Android and most
> everything in them doesn't work when I try it.  I can post some
> specific examples later but at this point I'm just wondering if I'm
> wasting time or if I should keep going and struggle through it.  I
> have a tiny amount of OpenGL experience but it's with 2.0 and
> apparently things were very different back in the ES 1.0 world.
>
> I guess my question boils down to, is OpenGL ES 2.0 support coming to
> Android anytime soon?And what OpenGL ES 1.0 + Android learning
> resources already exist?
>
>
> Thanks,
>
>
> --
> Greg Donald
> destiney.com | gregdonald.com
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

[android-developers] Re: Anyone noticing more uninstalls of their app than usual over last weekend/today?

2010-01-22 Thread matt smith
Still not fixed. If google can't fix this, they should feature all of
our apps or at least show some kind of concession for messing up our
stats.

Our app has fallen out of the top 4 in category and never returned
back despite always being in top 3, usually top 2 before the stats
messed up.

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


[android-developers] Re: adding a "quick add event" to the Calendar

2010-01-22 Thread jarkman
Andrew, can you share how you are adding events to the calendar ? I
can't find any documented API, so I am assuming you are using an
undocumented one... :-)

Thanks,

Richard


On Jan 22, 1:49 pm, andrew android  wrote:
> I understand where you are coming from...
> In my app - Target Date Pro -  it is possible now to do this quick
> event addition and also jump to a specific event.  Inclusion of
> reminder to the quickly added event is a likely future enhancement.
>
> On Jan 13, 8:26 am, Jonathan Epstein  wrote:
>
> > I am an experienced developer, but an Android newbie.  I have a Droid
> > Eris (Android 1.5), and the awkwardness of adding events to a calendar
> > is driving me nuts.  I already made a feature request, but wonder
> > whether (a) newer versions of Android already have something like this
> > OR (b) if I could get some implementation advice on the following
> > idea.  In particular, I wonder if there is a hook available for me to
> > receive the necessary trigger when the user selects a time from the
> > Calendar Day View, as described below, along with the necessary
> > parameters (day and time that the user requested).
>
> > Alternatively, perhaps the Calendar source code is available, and I
> > should modify that.
>
> > Thanks in advance for your advice.
>
> > 
>
> > When adding an event (in Android 1.5) from the Day View, we currently
> > get the full event-add dialog, say for Thursday at 4pm.  An additional
> > simple interface would make it much easier to add events to calendars,
> > as described below.
>
> > Assume that the event is being added to the default calendar (e.g.,
> > your Google Calendar).
>
> > The first line in the screen contains 5 buttons for times in 30-minute
> > increments around the initial time.  E.g., in the 4pm example the
> > buttons read: 3:30, 3:45, 4:00 (highlighted), 4:15 and 4:30.
>
> > The second line shows an event-duration.  There are only four choices
> > (0, 30min, 60min, all day).
>
> > Below that is the event description.
>
> > Below that is a popup menu forreminders(same as on the current event
> > add-screen).
>
> > Below that are the opportunities to Save&Cancel.
>
> > Note that event location and event description are omitted.
>
> > If there's room above, there could be a button to take you to the full-
> > blown event entry dialog.
>
>

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


Re: [android-developers] Re: Anyone noticing more uninstalls of their app than usual over last weekend/today?

2010-01-22 Thread Greg Donald
On Fri, Jan 22, 2010 at 9:16 AM, matt smith  wrote:
> Still not fixed. If google can't fix this, they should feature all of
> our apps or at least show some kind of concession for messing up our
> stats.

I don't understand why it's always the same apps up there being
featured.  I've never once seen any kind of casino app/game featured
for example.  At least with iTunes there's a rotation and some
variety.


-- 
Greg Donald
destiney.com | gregdonald.com

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


Re: [android-developers] Re: Strange error with AdMob

2010-01-22 Thread Wayne Wenthin
Nope.  I've tried cleaning it.  I'm starting to wonder if its eclipse.
Maybe there is some setting that allows you to use the double asterisks in a
comment.

It's extremely frustrating since I was on the verge of another release.

On Fri, Jan 22, 2010 at 12:52 AM, Jason Arora  wrote:

> Does Project->Clean help?
>
> On Jan 21, 4:59 pm, Wayne Wenthin  wrote:
> > I have already posted on their developer group but based on everything
> I've
> > seen I don't expect a reply.
> >
> > I have a strange problem.   When I added and adview to my app it imported
> a
> > bunch of comments that all start with /**   Eclipse is acting like it is
> not
> > a comment.  Although it isn't erroring out it has now marked anything
> > starting with R.id as not existing.   Is this something I can remedy in
> > eclipse or is it time to chuck my dreams of being mega rich off of all
> the
> > admob revenue I will be receiving?
> >
> > Example of the beginning of my R.java:
> > public final class R {
> > public static final class attr {
> > /** Must be a color value, in the form of
> > "#rgb", "#argb",
> > "#rrggbb", or "#aarrggbb".
> > This may also be a reference to a resource (in the form
> > "@[package:]type:name") or
> > theme attribute (in the form
> > "?[package:][type:]name")
> > containing a value of this type.
> >  */
> > public static final int backgroundColor=0x7f010001;
> > /** Must be a boolean value, either "true" or
> > "false".
> > This may also be a reference to a resource (in the form
> > "@[package:]type:name") or
> > theme attribute (in the form
> > "?[package:][type:]name")
> > containing a value of this type.
> >  */
> > public static final int isGoneWithoutAd=0x7f010005;
> > /** Must be a string value, using '\\;' to escape characters
> such
> > as '\\n' or '\\u' for a unicode character.
> > This may also be a reference to a resource (in the form
> > "@[package:]type:name") or
> > theme attribute (in the form
> > "?[package:][type:]name")
> > containing a value of this type.
> >  */
> > public static final int keywords=0x7f010003;
> > /** Must be an integer value, such as "100".
> > This may also be a reference to a resource (in the form
> > "@[package:]type:name") or
> > theme attribute (in the form
> > "?[package:][type:]name")
> > containing a value of this type.
> >  */
> > public static final int refreshInterval=0x7f010004;
> > /** Must be a boolean value, either "true" or
> > "false".
> > This may also be a reference to a resource (in the form
> > "@[package:]type:name") or
> > theme attribute (in the form
> > "?[package:][type:]name")
> > containing a value of this type.
> >  */
> > public static final int testing=0x7f01;
> > /** Must be a color value, in the form of
> > "#rgb", "#argb",
> > "#rrggbb", or "#aarrggbb".
> > This may also be a reference to a resource (in the form
> > "@[package:]type:name") or
> > theme attribute (in the form
> > "?[package:][type:]name")
> > containing a value of this type.
> >  */
> > public static final int textColor=0x7f010002;
> > }
> >
> > --
> > Writing code is one of few things
> > that teaches me I don't know everything.
> >
> > Join the Closed Beta of Call Girl Managerhttp://www.fuligin.com/forums
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Writing code is one of few things
that teaches me I don't know everything.

Join the Closed Beta of Call Girl Manager
http://www.fuligin.com/forums

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

Re: [android-developers] Re: Anyone noticing more uninstalls of their app than usual over last weekend/today?

2010-01-22 Thread Kevin Duffey
What exactly is this issue? I am not sure what the original thread was?

On Fri, Jan 22, 2010 at 7:25 AM, Greg Donald  wrote:

> On Fri, Jan 22, 2010 at 9:16 AM, matt smith 
> wrote:
> > Still not fixed. If google can't fix this, they should feature all of
> > our apps or at least show some kind of concession for messing up our
> > stats.
>
> I don't understand why it's always the same apps up there being
> featured.  I've never once seen any kind of casino app/game featured
> for example.  At least with iTunes there's a rotation and some
> variety.
>
>
> --
> Greg Donald
> destiney.com | gregdonald.com
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Re: [android-developers] OpenGL ES

2010-01-22 Thread Kevin Duffey
Just curious..but being a mobile device with limited resources, does it
really need OpenGL 2.0? Can it even handle what 2.0 may offer now? Not
trying to stir the pot, asking out of curiosity as I sense the anger over
the delay and old API and certainly as one interested in game development
I'd like to know as well why it can't have the latest... I would think the
limited resources and perhaps size of 2.0s API as an implementation.

On Fri, Jan 22, 2010 at 7:12 AM, Justin Giles  wrote:

> I can't speak as to why Android is putting on Hammer pants and going back
> to the 90's with OpenGL 1.0.
>
> In regards to resources, we always have the wonderful official OpenGL 1.0
> reference...oh, wait...Khronos says that OpenGL 1.0 reference is
> obsolete...hmmmlet's seeoh, I can direct you to the OpenGL 1.1
> reference: http://www.khronos.org/opengles/sdk/1.1/docs/man/
>
> On second thought, I just remembered that Android only supports v1.0 and
> some basic 1.1 support that is NOT COMPLETE (
> http://developer.android.com/guide/topics/graphics/opengl.html).  So, it
> looks like we are stuck in the stone ages until Google and Android get back
> into the 21st century.
>
> In the meantime, why don't we head to the landfill and get some turn of the
> century phones, download the BREW SDK and get to work!
>
> Justin
>
>
>
>
> On Fri, Jan 22, 2010 at 8:50 AM, Greg Donald  wrote:
>
>> Why is support for OpenGL lagging so far behind with Android?  I have
>> ebooks that date OpenGL 1.0 ES back to 1997 or so.  I don't understand
>> why ~13 year old technology is what's being offered in the Android
>> API.  Could someone enlighten me?
>>
>> What's the best path for someone wanting to learn OpenGL ES 1.0?  The
>> ebooks I have are of course not oriented for Java/Android and most
>> everything in them doesn't work when I try it.  I can post some
>> specific examples later but at this point I'm just wondering if I'm
>> wasting time or if I should keep going and struggle through it.  I
>> have a tiny amount of OpenGL experience but it's with 2.0 and
>> apparently things were very different back in the ES 1.0 world.
>>
>> I guess my question boils down to, is OpenGL ES 2.0 support coming to
>> Android anytime soon?And what OpenGL ES 1.0 + Android learning
>> resources already exist?
>>
>>
>> Thanks,
>>
>>
>> --
>> Greg Donald
>> destiney.com | gregdonald.com
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Re: [android-developers] Re: Creating dialogs from a thread

2010-01-22 Thread Android Development
You can also spawn an AsyncTask from the UI thread.

Whenever it needs to show a dialog, this task can call publishProgress()
method..that automatically runs on the UI Thread and the dialog can be shown
in the onProgressUpdate method.

On Fri, Jan 22, 2010 at 3:41 AM, Kevin Duffey  wrote:

> Ah yes Streets.. that was what I was missing.. been a while since I dealt
> with UI threads. It's not that you have to run a thread on the UI.. you run
> a Runnable. The Runnable just defines run() method.. I forget now but I
> think basically it allows the UI thread to just call run() on your Runnable
> you pass in to run your UI code.. but it allows you to access the UI thread
> from outside of that thread (in another thread) so that any UI stuff you
> need to access or do is possible.. since it will now run on the UI thread.
> The reason you need to do this is that in a separate thread, and code you
> use that expects to use the UI in some way, will not be able to access the
> UI from a different thread. There is quite a bit of code that uses something
> like Thread.getContextLoader()  and if that call is made while in a
> separate thread, it will fail if it's expecting to do some UI stuff. When
> you put that Runnable wraper of your UI code on the UI thread, the UI is
> available.
>
>
>
> On Thu, Jan 21, 2010 at 2:01 PM, Streets Of Boston <
> flyingdutc...@gmail.com> wrote:
>
>> Note that 'post' and 'runOnUiThread' takes a Runnable and it should
>> *not* be a Thread (although that implements Runnable as well)! (Mis)
>> using a Thread for this is not good. Just use a Runnable.
>>
>> Create a new instance of a Runnable and implement its 'public void run
>> ()' method (see my example code in my previous post).
>>
>> On Jan 21, 4:50 pm, TreKing  wrote:
>> > On Thu, Jan 21, 2010 at 3:30 PM, Dirk Vranckaert
>> > wrote:
>> >
>> > > It seems your solution does not work either.
>> >
>> > Um ... it should, I've used this technique repeatedly. Can you post the
>> code
>> > you're using?
>> >
>> > > As long as I'm doing it in a thread it doesn't work.
>> >
>> > Well, it depends on how you're running the thread. If you're posting it
>> to
>> > the runOnUiThread() function, it should work. If you're starting it with
>> > Thread.start(), then yeah, that won't work. Again, some code would
>> clarify.
>> >
>> > > Altough what I tried next was setting the error message for the user
>> > > in my catch clause. And right after the thread finished I handled the
>> > > showing of the errors based on wheater some error message was set or
>> > > not!
>> >
>> > I'm not sure I follow here.
>> >
>> > > Thx for your help! (If you get me some advanced explanation on why
>> > > dialogs cannot be created from within a thread plz let me know!)
>> >
>> > Probably because of the complexities of ensuring thread safety. If you
>> could
>> > update the UI from any thread, you could run into various threading
>> issues
>> > (deadlocks, race conditions, etc). If they core framework were designed
>> to
>> > support this it would introduce more complexity and overhead to the
>> system.
>> > Just a guess, but again, this is pretty standard behavior in GUI
>> systems, so
>> > it's really something that's just accepted.
>> >
>> >
>> ---­--
>> > TreKing - Chicago transit tracking app for Android-powered
>> deviceshttp://sites.google.com/site/rezmobileapps/treking
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

[android-developers] Re: Anyone noticing more uninstalls of their app than usual over last weekend/today?

2010-01-22 Thread matt smith
Any app that updated on or around the 18th December lost 10 - 15% of
their active installs in less than a day. Active installs is the
largest component of determining ranking in the Android market and so
these apps have dropped significantly in the rankings (mine from 2nd
to 5th in category). The stats have never been restored and these apps
are still much lower placed than before the market error occurred.

Google admitted this was an error on their part (see message from
Dontae on link below) but have never reverted the stats to their
correct values.
http://www.google.com/support/forum/p/Android+Market/thread?tid=4c5752ca3e5af4ff&hl=en

Quoted below is the official response from Google 4 weeks ago :
'There was an issue impacting a limited number of developers that can
be traced back to December 18th. Our team has implemented a fix that
will return all impacted developers' Active User numbers to normal. We
will remain vigilant in order to ensure that any data that does not
automatically return to active user counts is properly applied. Please
allow some time for this information to return to its normal state and
per usual, be sure to let us know if anything irregular pops onto your
radar.'

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


[android-developers] Re: Android 2.1 bug: uses res/layout-v3 instead of res/layout

2010-01-22 Thread Stefan Klumpp
Thanks for your response Lance.

> The documentation states that version qualifiers are for that version
> and higher, not just that version:
Yes, I mixed that up. Is corrected now.

> Although there are bugs. Android 2.0.0 matches only -v6, for example.
Yes, I just figured that out as well by accidentally using -v6 instead
of -v5 ;-)

-Stefan

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


[android-developers] Re: Nexus One - Geocoder causes IOException - works perfectly with other devices and emulator

2010-01-22 Thread Stefan Klumpp
Okay. The weird thing is now: sometimes it works. Sometimes it
doesn't. Anyone a clue?

On Jan 18, 5:20 pm, Stefan Klumpp  wrote:
> The code below works perfectly for real devices running on 1.5, 1.6
> and 2.0 as well as the emulator running on 2.1. However, executing it
> on the Nexus One (running 2.1) raises an IOException:
>
> java.io.IOException: Unable to parse response from server
> at android.location.Geocoder.getFromLocation(Geocoder.java:124)
>
> That's the code snippet where it happens:
>
> Double myLatitude = AppObject.myLocation.getLatitude();
> Double myLongitude = AppObject.myLocation.getLongitude();
> Geocoder geocoder = new Geocoder(MainActivity.this);
> java.util.List addressList;
> try {
>         addressList = geocoder.getFromLocation(myLatitude, myLongitude, 5);
>         if(addressList!=null && addressList.size()>0) {
>                 currentAddress = new String();
>                 currentAddress = addressList.get(0).getAddressLine(0) + ", "
>                 + addressList.get(0).getAddressLine(1) + ", "
>                 + addressList.get(0).getAddressLine(2);
>
>         }
>         return true;
>
> } catch (IOException e) {
>
>         e.printStackTrace();
>         return false;
>
> }
>
>

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


Re: [android-developers] Re: Strange error with AdMob

2010-01-22 Thread Wayne Wenthin
Ok I'm stupid.   Evidently it pulled in Android.R without me noticing.

On Fri, Jan 22, 2010 at 7:30 AM, Wayne Wenthin  wrote:

> Nope.  I've tried cleaning it.  I'm starting to wonder if its eclipse.
> Maybe there is some setting that allows you to use the double asterisks in a
> comment.
>
> It's extremely frustrating since I was on the verge of another release.
>
>
> On Fri, Jan 22, 2010 at 12:52 AM, Jason Arora  wrote:
>
>> Does Project->Clean help?
>>
>> On Jan 21, 4:59 pm, Wayne Wenthin  wrote:
>> > I have already posted on their developer group but based on everything
>> I've
>> > seen I don't expect a reply.
>> >
>> > I have a strange problem.   When I added and adview to my app it
>> imported a
>> > bunch of comments that all start with /**   Eclipse is acting like it is
>> not
>> > a comment.  Although it isn't erroring out it has now marked anything
>> > starting with R.id as not existing.   Is this something I can remedy in
>> > eclipse or is it time to chuck my dreams of being mega rich off of all
>> the
>> > admob revenue I will be receiving?
>> >
>> > Example of the beginning of my R.java:
>> > public final class R {
>> > public static final class attr {
>> > /** Must be a color value, in the form of
>> > "#rgb", "#argb",
>> > "#rrggbb", or "#aarrggbb".
>> > This may also be a reference to a resource (in the form
>> > "@[package:]type:name") or
>> > theme attribute (in the form
>> > "?[package:][type:]name")
>> > containing a value of this type.
>> >  */
>> > public static final int backgroundColor=0x7f010001;
>> > /** Must be a boolean value, either "true" or
>> > "false".
>> > This may also be a reference to a resource (in the form
>> > "@[package:]type:name") or
>> > theme attribute (in the form
>> > "?[package:][type:]name")
>> > containing a value of this type.
>> >  */
>> > public static final int isGoneWithoutAd=0x7f010005;
>> > /** Must be a string value, using '\\;' to escape characters
>> such
>> > as '\\n' or '\\u' for a unicode character.
>> > This may also be a reference to a resource (in the form
>> > "@[package:]type:name") or
>> > theme attribute (in the form
>> > "?[package:][type:]name")
>> > containing a value of this type.
>> >  */
>> > public static final int keywords=0x7f010003;
>> > /** Must be an integer value, such as "100".
>> > This may also be a reference to a resource (in the form
>> > "@[package:]type:name") or
>> > theme attribute (in the form
>> > "?[package:][type:]name")
>> > containing a value of this type.
>> >  */
>> > public static final int refreshInterval=0x7f010004;
>> > /** Must be a boolean value, either "true" or
>> > "false".
>> > This may also be a reference to a resource (in the form
>> > "@[package:]type:name") or
>> > theme attribute (in the form
>> > "?[package:][type:]name")
>> > containing a value of this type.
>> >  */
>> > public static final int testing=0x7f01;
>> > /** Must be a color value, in the form of
>> > "#rgb", "#argb",
>> > "#rrggbb", or "#aarrggbb".
>> > This may also be a reference to a resource (in the form
>> > "@[package:]type:name") or
>> > theme attribute (in the form
>> > "?[package:][type:]name")
>> > containing a value of this type.
>> >  */
>> > public static final int textColor=0x7f010002;
>> > }
>> >
>> > --
>> > Writing code is one of few things
>> > that teaches me I don't know everything.
>> >
>> > Join the Closed Beta of Call Girl Managerhttp://www.fuligin.com/forums
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>
>
> --
> Writing code is one of few things
> that teaches me I don't know everything.
>
> Join the Closed Beta of Call Girl Manager
> http://www.fuligin.com/forums
>



-- 
Writing code is one of few things
that teaches me I don't know everything.

Join the Closed Beta of Call Girl Manager
http://www.fuligin.com/forums

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

[android-developers] Re: urgent help Integrating code with Android home screen code.

2010-01-22 Thread deeMurthy
Hi Satish,

   If m not wrong, you are playing around with cupcake/donut or eclair
code directly. In that case you will have to build your app into the
system for your homescreen code to recognise it. Include your
application into the generic.mk and rebuild the code. This should
work.

Cheers!

On Jan 22, 2:00 pm, satish bhoyar  wrote:
> Hi all,
>
> I am trying to integrate my code to the android Home Screen code.
> I want to launch my activity frm the HomeScreen by click of a button.
> I Did the code & then build it but when i click the button i m getting error
> as
> Application not installed on phone.
>
> please help
>
> Thanks,
> satish

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


[android-developers] Re: adding voice search

2010-01-22 Thread Achanta
Thank you Schwiz,
Thats what I needed

On Jan 21, 11:20 am, schwiz  wrote:
> I think you would override onActivityResult like I did in my project.
>
> On Jan 21, 12:17 pm, Achanta  wrote:
>
> > Thank you Schwiz and David for the replies. they were helpful.
>
> > I included the part that David advised and it works great.
>
> > Now I have a requirement with the search in my project.
> > I need to provide a widget like the quick Search box in the main page
> > of the app..ie., it should always be visible. It should also have the
> > voice search[mic] button.
>
> > So when users start typing in this or click on the mic button and
> > start speaking, it should grab the string and open the search results
> > page with this search string.
> > How can I implement that?
>
> > Thanks again.

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


[android-developers] Re: adding voice search

2010-01-22 Thread Achanta
Thank you Schwiz,
Thats what I needed

On Jan 21, 11:20 am, schwiz  wrote:
> I think you would override onActivityResult like I did in my project.
>
> On Jan 21, 12:17 pm, Achanta  wrote:
>
> > Thank you Schwiz and David for the replies. they were helpful.
>
> > I included the part that David advised and it works great.
>
> > Now I have a requirement with the search in my project.
> > I need to provide a widget like the quick Search box in the main page
> > of the app..ie., it should always be visible. It should also have the
> > voice search[mic] button.
>
> > So when users start typing in this or click on the mic button and
> > start speaking, it should grab the string and open the search results
> > page with this search string.
> > How can I implement that?
>
> > Thanks again.

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


[android-developers] Re: program's offline installation

2010-01-22 Thread guiha...@gmail.com
Can a program call the uninstaller of itself?

thx

   guich

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


[android-developers] Timer and Timer Task

2010-01-22 Thread nikhil
I am using a timer in my app. I wish to vary the interval or period
with which the timer task runs. Like when my app is being used the
timer task is scheduled at say 1 sec while the moment user exits the
app the service changes the timer to 5 seconds.

Currently, I am cancelling the previous timer and create a new timer
instance with new period. I dont know if this is efficient way to do
it because for some reason the timer messes up and it sometimes hits
more than twice per second..when its suppose to hit every 5 seconds.

Is there a better way to vary the interval or period by using the same
timer variable through out?

My Timer is in the service which I have created to run in the
background.

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


[android-developers] Re: Notification sound from file inside the app package ?

2010-01-22 Thread Retrodis
You should store your mp3 in res/raw and a quick and easy way to
reference it would be

notification.sound = Uri.parse("android.resource://
com.yourpackagename.appname/" +R.raw.your_sound_file);


On Jan 22, 3:01 pm, elpix1  wrote:
> Hi,
>
> Is it possible to play a notification sound from a sound file
> inside the application package ?
>
> Where should this file be stored in the apk  (/res/raw or /assets)
> and what should be the URI to pass to the notification ?
>
> notification.sound = Uri.parse(... ? ...);
>
> Best regards.

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


Re: [android-developers] Re: Problem while sending unicode character via SMS

2010-01-22 Thread Frank Weiss
If the received character is U+0020 instead of U+1200, then chances are that
the message is being restricted to 7-bit somewhere along the line. This is
somewhat alluded to in the SDK Reference
http://developer.android.com/reference/android/telephony/SmsMessage.html#calculateLength(java.lang.CharSequence,%20boolean
)

Another problem may be the font. Have you installed the Ethiopian fonts in
your device or emulator? I just tried adding ቁ into an Android
application's string.xml res file. On both the emulator and the Droid, the
character is displayed as a small rectangle.

It may help in debugging to try some Latin-1/ISO-8859-1 characters, such as
U+00E3. This would test the 7-bit issue without having to install Ethiopian
fonts on the emulator or device.

On Thu, Jan 21, 2010 at 10:53 PM, andu  wrote:

> Hello How are you
>
> I have tried to send the sms with unicode character to the android
> phone itself and accept the message by my application (using
> BroadcastReceiver ...)  to view its content. but still the unicode
> character is displayed as space. And I tried to see its code using
> codePointAt( )  and it displays number 32.
>
> What do you suggest?
> Should I change the encoding for my code, JVM, ...? How can I change
> the encoding of my program? I am developing my application by Eclipse
> and Android ADT.
>
> Thank you for response.
>
> and also I waiting your response
>
> Andu
>
>
> On Jan 1, 1:49 am, Frank Weiss  wrote:
> > The code looks good AFAICT.
> >
> > Please give the actual before/after characters that are coming out wrong.
> > For example, try the Ethiopian syllable qu, U+1241. If it's coming across
> as
> > a box followed by an "A", then the receiver has gotten two characters,
> > U+0012 and U+0041. I really need to see the hexadecimal data in your sent
> > and received SMS messages to figure out what's going wrong.
> >
> > I would also suggest that using the debugger or android.util.Log, instead
> of
> > Toast, would be a better way to debug.
> >
> > On Thu, Dec 31, 2009 at 2:26 AM, andu  wrote:
> > > To send the message I have used the following function:
> >
> > > public boolean sendSMSMessage(String compiledContent, String
> > > DistinationAddress)
> > >{
> > >String receiverPhoneNumber = DistinationAddress;
> > >String messageCenterPhoneNumber = "";
> > >SmsManager smsMgr = SmsManager.getDefault();
> > >smsMgr.sendTextMessage(receiverPhoneNumber, null,
> > > compiledContent,
> > > null, null);
> > >return isSent;
> > >}
> >
> > > To receive the message I have used the following function:
> >
> > > @Override
> > >public void onReceive(Context context, Intent intent) {
> > >Bundle bundle = intent.getExtras();
> >
> > >if(bundle != null)
> > >{
> > >Object messages[] = (Object[]) bundle.get("pdus");
> > >SmsMessage smsMessage[] = new
> SmsMessage[messages.length];
> > >for (int n = 0; n < messages.length; n++)
> > >{
> > >smsMessage[n] = SmsMessage.createFromPdu((byte[])
> > > messages
> > > [n]);
> > >}
> >
> > >// show first message
> > >Toast toast = Toast.makeText(context, " Brhp Received
> SMS: "
> > > + smsMessage[0].getMessageBody()+ "from " + smsMessage
> > > [0].getOriginatingAddress(), Toast.LENGTH_LONG);
> > >toast.show();
> >
> > >String messageBody = smsMessage[0].getMessageBody();
> > >String messageSource =
> > > smsMessage[0].getOriginatingAddress();
> > > }
> >
> > >}
> >
> > > On Dec 29, 1:02 am, andu  wrote:
> > > > How are you all?
> >
> > > > I am developing application for android phone. Currently I am testing
> > > > my system in the emulator. In my application, I want to send unicode
> > > > character (Amharic language character) via SMS to the other emulator
> > > > instance. But in the receiver side, the message is not viewed
> > > > properly. I think the problem is some character encoding related
> > > > problem.
> >
> > > > In addition similar problem happens for texts which are queried for
> > > > the sqlite database. that is when I send a query result via SMS the
> > > > same problem occurs. Please help me.
> >
> > > > Sorry for posting the same message again. Please help me.
> >
> > > > Thank you
> >
> > > > Andu.
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> 
> >
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.

[android-developers] Re: OpenGL ES

2010-01-22 Thread Tim Hansen

Well the new IPhone supports OpenGL ES 2.0, so I'm sure my droid could
too!  8)

But guys, OpenGL ES 1.0 was only released in 2003. It was OpenGL 1.0
which was in 1992 I believe. From the IO webisodes it seems that there
is no plans to implement ES 2.0 and use 1.1 ES extensions at your own
risk, as only 1.0 ES are garenteed to be supported in the future, well
that is if I understood the IO right, I kind of zoned out after a
while!  ;)

The ES version is an optimised version for embedded devices by the
way, so it's not all doom and gloom!

First I would get yourself the Android Pro book, which will very
breifly explan about how to set up the Surface View and EGL, etc, and
will get you up and running at least. Then you should be able to find
some tutorials or start working through the Redbook.

Good luck! T.




On Jan 22, 3:40 pm, Kevin Duffey  wrote:
> Just curious..but being a mobile device with limited resources, does it
> really need OpenGL 2.0? Can it even handle what 2.0 may offer now? Not
> trying to stir the pot, asking out of curiosity as I sense the anger over
> the delay and old API and certainly as one interested in game development
> I'd like to know as well why it can't have the latest... I would think the
> limited resources and perhaps size of 2.0s API as an implementation.
>
>
>
> On Fri, Jan 22, 2010 at 7:12 AM, Justin Giles  wrote:
> > I can't speak as to why Android is putting on Hammer pants and going back
> > to the 90's with OpenGL 1.0.
>
> > In regards to resources, we always have the wonderful official OpenGL 1.0
> > reference...oh, wait...Khronos says that OpenGL 1.0 reference is
> > obsolete...hmmmlet's seeoh, I can direct you to the OpenGL 1.1
> > reference:http://www.khronos.org/opengles/sdk/1.1/docs/man/
>
> > On second thought, I just remembered that Android only supports v1.0 and
> > some basic 1.1 support that is NOT COMPLETE (
> >http://developer.android.com/guide/topics/graphics/opengl.html).  So, it
> > looks like we are stuck in the stone ages until Google and Android get back
> > into the 21st century.
>
> > In the meantime, why don't we head to the landfill and get some turn of the
> > century phones, download the BREW SDK and get to work!
>
> > Justin
>
> > On Fri, Jan 22, 2010 at 8:50 AM, Greg Donald  wrote:
>
> >> Why is support for OpenGL lagging so far behind with Android?  I have
> >> ebooks that date OpenGL 1.0 ES back to 1997 or so.  I don't understand
> >> why ~13 year old technology is what's being offered in the Android
> >> API.  Could someone enlighten me?
>
> >> What's the best path for someone wanting to learn OpenGL ES 1.0?  The
> >> ebooks I have are of course not oriented for Java/Android and most
> >> everything in them doesn't work when I try it.  I can post some
> >> specific examples later but at this point I'm just wondering if I'm
> >> wasting time or if I should keep going and struggle through it.  I
> >> have a tiny amount of OpenGL experience but it's with 2.0 and
> >> apparently things were very different back in the ES 1.0 world.
>
> >> I guess my question boils down to, is OpenGL ES 2.0 support coming to
> >> Android anytime soon?    And what OpenGL ES 1.0 + Android learning
> >> resources already exist?
>
> >> Thanks,
>
> >> --
> >> Greg Donald
> >> destiney.com | gregdonald.com
>
> >> --
> >> You received this message because you are subscribed to the Google
> >> Groups "Android Developers" group.
> >> To post to this group, send email to android-developers@googlegroups.com
> >> To unsubscribe from this group, send email to
> >> android-developers+unsubscr...@googlegroups.com
> >> For more options, visit this group at
> >>http://groups.google.com/group/android-developers?hl=en
>
> >  --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en- Hide quoted text -
>
> - Show quoted text -

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


[android-developers] Max APK SIZE

2010-01-22 Thread mailbox.jku...@gmail.com
Hi,

 I would like to know the max apk size that i can use in the
device as i have a 232 mb of videos and i want to use them in the
application itself.What are the chances and any other option if
possible.


Please help me out as i need to release my app asap.

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


Re: [android-developers] Re: OpenGL ES

2010-01-22 Thread Greg Donald
On Fri, Jan 22, 2010 at 10:58 AM, Tim Hansen
 wrote:
> But guys, OpenGL ES 1.0 was only released in 2003.

The point is Kronos has deprecated ES 1.0 and Android's API for it is
undocumented:

http://developer.android.com/intl/fr/reference/android/opengl/package-summary.html


Is this list my best option for when I have problems with glDrawElements() ?

I mean, this isn't any help:

http://developer.android.com/intl/fr/reference/android/opengl/GLES10.html#glDrawElements%28int,%20int,%20int,%20java.nio.Buffer%29


Where is the Android + OpenGL ES 1.0 book?  I'd happily purchase it if
I could find it.


-- 
Greg Donald
destiney.com | gregdonald.com

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


[android-developers] Re: How to increase FPS (now ~20, desired ~40-50)

2010-01-22 Thread TonyDoc
using logcat to output you fps will reduce your fps.

On Jan 22, 6:37 am, Andre  wrote:
> Hi Jason,
>
> Thank you very much for test and code example
>
> Best Regards, Andre
>
> On 22 янв, 01:19, Jason Arora  wrote:
>
> > Hi Andre,
>
> > I got around 60 fps without bullets on my Google Ion device. When
> > touching the screen it would go around 53 and when shooting it would
> > dip just under 40. Before doing my test, I closed all apps with Task
> > Killer.
>
> > You can remove the status bar by calling the following in your
> > Activity.onCreate method:
> > requestWindowFeature(Window.FEATURE_NO_TITLE);
> > getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
> > WindowManager.LayoutParams.FLAG_FULLSCREEN);
>
> > -Jason
>
> > On Jan 21, 6:09 am, Andre  wrote:
>
> > > Hi TonyDoc,
>
> > > I agree with you, recently I've started to study Open GL ES...
> > > But I think it worth to know, what limitations exist for Canvas? And
> > > what kind of games can be implemented with Canvas? As we know, thanks
> > > to google, simple 2D games like Snake, Tetris and so on, can be
> > > created without Open GL ES.
>
> > > Best Regards, Andre
>
> > > On 21 ÑÎ×, 16:07, TonyDoc  wrote:
>
> > > > Hi all, interesting thread, here's my tuppenceworth.
>
> > > > My first attempt at a simple game took the same approach, things
> > > > looked favourable when I first threw a few dozen sprites onto the
> > > > canvas along with some simple game logic to try and get a handle on
> > > > fps and timing. I was getting around 40-45fps which I was happy with,
> > > > as my goal was around 30fps for the final game. I then added matrix
> > > > transformations to the sprites (scaling and/or rotating) and bang!
> > > > 20-25fps... I fiddled some more for a while then gave up. I guessed
> > > > that without GL hardware acceleration, bitmap transforms just take way
> > > > too long. The only solution that I could come up with, was to cache a
> > > > whole load of transformed bitmaps prior to game start up, and draw/
> > > > swap these 'pre transformed' sprites directly to the canvas without
> > > > the use of matrix/rotate etc...
>
> > > > GL is probably the way to go, and biting the bullet might be the only
> > > > solution. It's a pity google don't provide a basic example of a 2d GL
> > > > game with their SDK, if they did, they might end up with a few more
> > > > decent games on the market.
>
> > > > On Jan 20, 7:05 am, Kevin Duffey  wrote:
>
> > > > > Was just watching the video from back in May by Chris Pruett. He had a
> > > > > performance slide comparing canvas to opengl and as he noted there, 
> > > > > canvas
> > > > > is much slower. I am sure you know this, but getting 30fps on a 
> > > > > Canvas with
> > > > > more than a dozen or so sprites might be difficult when you factor in 
> > > > > game
> > > > > logic, collision detections, etc. I didn't realize you were running 
> > > > > this on
> > > > > the emulator as well. For sure you'll see much faster fps on a real 
> > > > > device.
>
> > > > > On Tue, Jan 19, 2010 at 10:55 PM, Dan Sherman  
> > > > > wrote:
> > > > > > > I run my app on emulator, and currently have
> > > > > > > not tested it on real device.
>
> > > > > > The emulator is not, in any way, going to run the same speed as a 
> > > > > > real
> > > > > > device.
>
> > > > > > Run it on a real device and see what FPS you get.  Or if you want, 
> > > > > > publish
> > > > > > an APK and someone here will run it I'm sure (I'll do it =P)
>
> > > > > > - Dan
>
> > > > > > On Wed, Jan 20, 2010 at 1:44 AM, Andre  
> > > > > > wrote:
>
> > > > > >> Hi,
>
> > > > > >> Yesterday, I've changed my code, to work with the matrix more
> > > > > >> effectively...
>
> > > > > >> My GameEntity class now looks like this:
>
> > > > > >> --GAME ENTITY--
>
> > > > > >> public class GameEntity {
> > > > > >>        public Bitmap mBitmap;
> > > > > >>        private Rect mBounds;
> > > > > >>        private Matrix mMatrix;
> > > > > >>        public int mWidth;
> > > > > >>        public int mHeight;
> > > > > >>        public boolean mAlive;
> > > > > >>        public float mX, mY;
> > > > > >>        public float mVelocityX, mVelocityY;
> > > > > >>        public float mMoveAngle, mFaceAngle;
> > > > > >>        public float mRotationVelocity;
>
> > > > > >>        public GameEntity(Bitmap bitmap) {
> > > > > >>                mBitmap = bitmap;
> > > > > >>                mBounds = new Rect();
> > > > > >>                mMatrix = new Matrix();
> > > > > >>                mWidth = bitmap.getWidth();
> > > > > >>                mHeight = bitmap.getHeight();
> > > > > >>                mAlive = false;
> > > > > >>                mX = 0.0f;
> > > > > >>                mY = 0.0f;
> > > > > >>                mVelocityX = 0.0f;
> > > > > >>                mVelocityY = 0.0f;
> > > > > >>                mMoveAngle = 0.0f;
> > > > > >>                mFaceAngle = 0.0f;
> > > > > >>                mRotationVelocity = 0

[android-developers] Re: Launch ContextMenu from ContextMenu

2010-01-22 Thread Ken H
But an AlertDialog with selectable items? I thought you could just do
"Yes", "No", "Ok", "Cancel", etc. and a message above with those.

Well I guess my question should be how do you launch a ContextMenu-
like menu from a contextmenu?

Ken

On Jan 22, 3:06 am, "Mark Murphy"  wrote:
> > How can I launch a contextmenu from a contextmenu?
>
> > I'm trying to replicate the MediaPlayer action that happens when you
> > long click a song, then click "Add to playlist" in the resulting
> > contextmenu. When you click that menu item, another contextmenu pops
> > up with "Add to playlist" as the title, and "Current playlist", "New",
> > and however-many-playlists-you-have defined after that.
>
> The second one might just be an AlertDialog.
>
> --
> Mark Murphy (a Commons Guy)http://commonsware.com
> Android App Developer Books:http://commonsware.com/books.html

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


[android-developers] Re: Launch ContextMenu from ContextMenu

2010-01-22 Thread Ken H
Mark,

Dang, I just looked it up (http://developer.android.com/intl/fr/guide/
topics/ui/dialogs.html) and you are right! It's an alertdialog using
the setitems method.

Ken

On Jan 22, 9:54 am, Ken H  wrote:
> But an AlertDialog with selectable items? I thought you could just do
> "Yes", "No", "Ok", "Cancel", etc. and a message above with those.
>
> Well I guess my question should be how do you launch a ContextMenu-
> like menu from a contextmenu?
>
> Ken
>
> On Jan 22, 3:06 am, "Mark Murphy"  wrote:
>
>
>
> > > How can I launch a contextmenu from a contextmenu?
>
> > > I'm trying to replicate the MediaPlayer action that happens when you
> > > long click a song, then click "Add to playlist" in the resulting
> > > contextmenu. When you click that menu item, another contextmenu pops
> > > up with "Add to playlist" as the title, and "Current playlist", "New",
> > > and however-many-playlists-you-have defined after that.
>
> > The second one might just be an AlertDialog.
>
> > --
> > Mark Murphy (a Commons Guy)http://commonsware.com
> > Android App Developer Books:http://commonsware.com/books.html

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


Re: [android-developers] Re: Nexus GPS antenna is always active when "Use GPS Satellites" is checked...

2010-01-22 Thread Matt Oakes
Does this mean there's a bug in the browser which keeps GPS active
when it isn't needed?

Matt

On Fri, Jan 22, 2010 at 2:00 PM, Alain  wrote:
> I have resolved this issue problem.
>
> When the browser starts and the google splash page opens up, it has a
> small checkbox to Enable location  (allow sites to request access to
> your location) if this is checked, then the gps is enabled. Go in
> browser menu, choose more and settings and unclick Enable location.
> This prevents the browser from starting gps.
>
> GPS will still work when accessing Maps.
>
>
>
> On Jan 21, 12:42 pm, Vinay Avasthi  wrote:
>> I have seen this problem on milestone. Once I run a browser session, the
>> browser remains active and keeps the GPS active. If I manually kill
>> browser using Task Manager application the GPS goes off.
>>
>> On 01/21/2010 08:00 PM, Alain wrote:
>>
>> > I have intermittently the same problem on my Milestone/Droid. The GPS
>> > comes on on its own.
>> > I end up turning off the "Use GPS" setting to preven the battery from
>> > draining.
>>
>> > On Jan 21, 2:42 am, String  wrote:
>> >> On Jan 20, 9:21 pm, Richard Schilling
>> >> wrote:
>>
>> >>> I may be answering my own question here.  The power control widget had
>> >>> the GPS antenna selected to "on".  When I turn off the GPS antenna in
>> >>> the power control widget, the antenna goes off.
>>
>> >> FYI, the power control widget is simply a shortcut to the Settings
>> >> option for "Enable GPS satellites". So this isn't doing anything
>> >> different than in your original post.
>>
>> >> Unless this is an N1 bug (possible, I can't test), the likelihood is
>> >> that you have a poorly-designed app running in the background which is
>> >> consuming the GPS location all the time. It's impossible for us to say
>> >> what app it might be without seeing your phone, though. You'll need to
>> >> look through your installed apps yourself to try to find the culprit.
>>
>> >> String
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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


[android-developers] How to Change the Android APN Settings Programmetically ??.

2010-01-22 Thread Ramesh(BABY-FACE)
I was able to bring up the UI in android that allows the user to edit the
APN settings. But I need to know how can I access these APN settings
programmetically and set them. Any Ideas ?. Is this possible ??.

- startActivity(new Intent(Settings.ACTION_APN_SETTINGS));
 --
*
M.Shehan Ramesh Perera
Phone: +94 724787407

*
Winston Churchill -- Success is Going From Failure To Failure Without
Loosing Enthusiasm.
~~~

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

[android-developers] Fwd: Question regarding media player android

2010-01-22 Thread ameya dandekar
Hi...i am ameya.
  I am new to android platform and i am currently working on
an application, in which i use android built in media player for playing the
song.But i want to control the buffering of media player when i pass a "URL"
to play for it. Is there a function or a method to do that ?or i need to
manually buffer the data.?i have read the *Android Tutorial 3: Custom
Media Streaming with MediaPlayer*,but that produces a pause in playing of
the song. * *


Regards,
Ameya

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

[android-developers] Re: Doc of java.util.Formatter. "%<$" available or not?

2010-01-22 Thread Elliott Hughes
On Jan 21, 8:58 am, Diego Torres Milano  wrote:
> Use:
>
> String.format("It is %d and % On Jan 21, 3:37 am, Farproc  wrote:
>
> >http://d.android.com/reference/java/util/Formatter.html
> > In the doc above there is "The two characters <$ immediately following
> > the % sign indicate that the previous value should be used again
> > instead of moving on to the next value argument".
> > I tested it as "String.format("It is %d and %<$ again!", 10)" but it
> > throws. Any idea?

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


[android-developers] Network connection via USB

2010-01-22 Thread fserrano
Can I get my Nexus One/Android on my local network over USB instead of
WiFi and browse to my computer's IP address, the one to which the
phone would be connected to, via USB? For instance, let's say my
computer has an IP address 100.1.1.1 and when I go to it from the
computer I would go to my localhost and see a website I've set up
locally in the computer. Then, I connect my phone to that computer via
USB. Can I then go to 100.1.1.1 from the browser and see the same
website? All this through the USB, no WiFi?

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


[android-developers] How to implement the stars of the rate

2010-01-22 Thread Yefei
Hey, you guys all know those apps which show you the rate of the
restaurant, book, movie, music. Like 1 star, 2 star ... Oh yea, the
rate of the app in market is also an example.

I am a little unsure how to implement this feature. It doesn't need to
be clickable since for now it should just be static element. Any
hints, comments are very appreciated!

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


Re: [android-developers] Re: MyLocationOverlay causing crash in 1.6 (Donut)

2010-01-22 Thread Johan Nilsson
Thank you Pieter for the code snippet.

I can also confirm that this workaround is needed for Samsung Spica,
phone model GT-I5700
with android 1.5.

Johan

On Fri, Nov 13, 2009 at 10:12 AM, Pieter  wrote:
> Allright, I have taken up the gauntlet and wrote a subclass for
> working around this bug.
> It draws the "my location" disc and an accuracy circle.  You can test
> it on a device that is
> not bugged by initializing the "bugged" variable to true.
>
> It is a quick and dirty hack but it seems to work correctly on my G1,
> although the calculations
> might be way off when you are near the poles ;-). I hope to have some
> more feedback from an
> actual Cliq user later today.
>
> You are free to use and adapt the source code as you see fit:
> http://www.spectrekking.com/download/FixedMyLocationOverlay.java
>
> And the accompanying drawable:
> http://www.spectrekking.com/download/mylocation.png
>
> I made the drawable orange instead of blue on purpose so users can see
> when their device is bugged.
> Note that there is no animation on GPS activity (as there is in the
> original MyLocationOverlay).
>
> On a related note: it seems that the "Google logo" drawable is also
> bugged on the Cliq as I get reports
> of a "red square in the lower left where the Google logo is supposed
> to be". I don't really see any
> workaround for that one.
>
> If you find any problems with this solution, or have any improvements
> to share please let us know!
>
> ---
> package com.spectrekking.play;
>
> import android.content.Context;
> import android.graphics.Canvas;
> import android.graphics.Paint;
> import android.graphics.Point;
> import android.graphics.Paint.Style;
> import android.graphics.drawable.Drawable;
> import android.location.Location;
>
> import com.google.android.maps.GeoPoint;
> import com.google.android.maps.MapView;
> import com.google.android.maps.MyLocationOverlay;
> import com.google.android.maps.Projection;
> import com.spectrekking.R;
>
> public class FixedMyLocationOverlay extends MyLocationOverlay {
>        private boolean bugged = false;
>
>        private Paint accuracyPaint;
>        private Point center;
>        private Point left;
>        private Drawable drawable;
>        private int width;
>        private int height;
>
>        public FixedMyLocationOverlay(Context context, MapView mapView) {
>                super(context, mapView);
>        }
>
>       �...@override
>        protected void drawMyLocation(Canvas canvas, MapView mapView,
> Location lastFix, GeoPoint myLoc, long when) {
>                if (!bugged) {
>                        try {
>                                super.drawMyLocation(canvas, mapView, lastFix, 
> myLoc, when);
>                        } catch (Exception e) {
>                                bugged = true;
>                        }
>                }
>
>                if (bugged) {
>                        if (drawable == null) {
>                                accuracyPaint = new Paint();
>                                accuracyPaint.setAntiAlias(true);
>                                accuracyPaint.setStrokeWidth(2.0f);
>
>                                drawable = 
> mapView.getContext().getResources().getDrawable
> (R.drawable.mylocation);
>                                width = drawable.getIntrinsicWidth();
>                                height = drawable.getIntrinsicHeight();
>                                center = new Point();
>                                left = new Point();
>                        }
>                        Projection projection = mapView.getProjection();
>
>                        double latitude = lastFix.getLatitude();
>                        double longitude = lastFix.getLongitude();
>                        float accuracy = lastFix.getAccuracy();
>
>                        float[] result = new float[1];
>
>                        Location.distanceBetween(latitude, longitude, 
> latitude, longitude +
> 1, result);
>                        float longitudeLineDistance = result[0];
>
>                        GeoPoint leftGeo = new GeoPoint((int)(latitude*1e6), 
> (int)
> ((longitude-accuracy/longitudeLineDistance)*1e6));
>                        projection.toPixels(leftGeo, left);
>                        projection.toPixels(myLoc, center);
>                        int radius = center.x - left.x;
>
>                        accuracyPaint.setColor(0xffff);
>                        accuracyPaint.setStyle(Style.STROKE);
>                        canvas.drawCircle(center.x, center.y, radius, 
> accuracyPaint);
>
>                        accuracyPaint.setColor(0x18ff);
>                        accuracyPaint.setStyle(Style.FILL);
>                        canvas.drawCircle(center.x, center.y, radius, 
> accuracyPaint);
>
>                        drawable.setBounds(center.x - width / 2, center.y - 
> height / 2,
> center.x + width / 2, center.y + height / 2);
>                        drawable.draw(canvas);
>  

[android-developers] Bluetooth UUID

2010-01-22 Thread Fran
Hi everyone :)

I've got a doubt with the uuid. The question is I've the uuid from a
J2ME app  with javax.bluetooth.uuid new UUID(19088743L); and I'd like
to convert it to java.util to port to Android using fromString(String
uuid) or something similar that let me make the same UUID on Android.

Cheers.

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


[android-developers] Can we Change APN settings programmatically?

2010-01-22 Thread Silent Warrior
I've found out that we can bring up a UI in which we can show the APN
settings of the phone by using the following code inside a class that
extends an activity  :

--
Intent intent = new Intent(Settings.ACTION_APN_SETTINGS);
startActivity(intent);
--

But I'm still  searching to find out is there a method to
programetically edit the above apn settings ??. Is this possible in
android or not ??. It would be great if anyone could clarify this
issue as I need this urgently.

--
Thanks & Regards,
Shehan

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


[android-developers] AVD - Emulator limitations

2010-01-22 Thread Sudhir Nallagangu
I am curious on limitations on AVD /Emulators. It is clear that it
cannot support making phone calls etc ..Can it emulate GPS to leverage
google maps and navigations?

Sudhir

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


[android-developers] why isn't the progress bar full width of the view

2010-01-22 Thread Jonathan
Hello, I am making a custom progress bar, and I can't seem to get it
to fill out to the full width of the control. The view is set to fill.
I have extended the ProgressBar view. I am drawing it through xml like
so:




My styling is:


false
@drawable/
my_progress_bar
@drawable/
my_progress_bar
50dip
50dip


But when it renders, the actual progress bar only consumes about 3/4
of the actual view, no matter what I set the min/max width to. I know
that the whole view itself is filling the window because I am drawing
a box around the control to view its canvas area:

canvas.drawRect(0, 0, getWidth()-1, getHeight()-1, mPaint);

Do I have to do something special to get the progress bar to fill out
the window?

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


[android-developers] NDK Development with Objective-C 2.0

2010-01-22 Thread Philippe Hausler
I had started a thread over at the android-porting group, and figured it might 
be a better venue to post a request here.

Recently I have embarked on a project that aims to imbue the Android NDK gcc 
4.2.1 with support for Objective-C 2.0. This project is of course to bolster 
the Android platform with more options for developers, and not to usurp the 
current application environment (more choices can make better products). As of 
the current status of the project, I have been able to successfully modify gcc 
to compile not only objc code but also objc 2.0 code. There are a few features 
that are still not finished with the compiler end as well as there are no 
frameworks that I have finished for building applications for Android. However 
that being said there is a potential for being able to make a directly code 
compatible set of frameworks targeted for the Android OS that would allow 
applications written for iPhone to be compiled for Android with zero code 
modifications to the application, in turn allowing the exact same functionality 
of the iPhone counterpart to work on Android.

This all being the case, I need some feedback from the community. I am not 
looking for any sort of comparison of which platform is "better", nor am I 
looking for a comparison of which language is "better". 

If you are an iPhone developer and an Android developer:
For any of your iPhone projects, which frameworks would you pose as top 
priority to create (other than Foundation and UIKit)
How highly would you rank the need for a gui building interface (perhaps maybe 
something in Interface Builder that works then with both NDK based apps and 
Java apps)?

General Android Developers:
Other than arm-eabi targets, what other targets would be on the top of "must 
make ports of this compiler"?
Would a objc interface to the Java ui be useful to your projects?
What would be the upper limit of the size of a static library that you would 
include within your apps?
Would a dynamic library stored in another application bundle (e.g. 
/data/data/com.example/libs/libSomethingGoesHere.so) to save on user space be 
preferable?

People with compiler testing/building experience:
I need help testing the current versions of my fork of the compiler... I narry 
could fathom that I could anticipate any and all potential code that could 
create an issue with the compiler, I need testing to track down the bugs (which 
I know there are already a few).

The fork of the NDK gcc is being hosted at 
http://code.google.com/p/android-gcc-objc2-0/ I have gotten it to work 
reasonably so, there are a few things that still are a bit on the squirrly 
side, and some stuff that is still just flat out broken. Of the things that do 
work: Objective-C code compiles, properties work, synth'd variables work, 
private ivars work, blocks work but still need the runtime library (which i 
just need to commit the changes to add that). 

Sincerely,
Philippe Hausler

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


[android-developers] java.io.File.DeleteOnExit holds too many strings

2010-01-22 Thread dimple
I found java.io.File.DeleteOnExit can hold file paths and delete files
before VM shutdowns.

I got a problem that DeleteOnExit holds about 33000 file paths which
are 5.3MB before my apk throws an OutOfMemory exception.
It seems that the virtual machine won't remove file paths even those
files pointed by the paths are deleted.

Is there any solution to remove file paths in DeleteOnExit?

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


[android-developers] Re: JDBC Driver for SQLiteDatabase

2010-01-22 Thread Elliott Hughes


On Jan 18, 1:49 am, kristianlm  wrote:
> Hi folks,
>
> I guess we've concluded that the built-in JDBC for Android should not
> be used (even though it's there). Those of you who still want to use
> JDBC on Android can check out the JDBC driver I started myself for
> precisely this reason:
>
> http://code.google.com/p/sqldroid/
>
> It's a relatively simple implementation but does its job: offer jdbc
> access to android sqlite db.

writing a JDBC driver in terms of the supported
android.database.sqlite API, as you've done, is a clever idea! let us
know in the issue tracker if you find bugs in either
android.database.sqlite or java.sql. (you might want to go for the
APL2 license, though, if you want to maximize the number of projects
that will be able to use it. ianal.)

 --elliott

> And thanks for all the constructive feedback!
> Kris
>
> On Jan 12, 10:53 pm, jotobjects  wrote:
>
>
>
> > On Jan 11, 9:14 pm, Elliott Hughes  wrote:
>
> > > On Dec 19 2009, 2:05 am, kristianlm  wrote:
>
> > > > hi Elliott,
>
> > > > what exactly does it mean that the driver is unsupported and that
> > > > it shouldn't be used?
>
> > > > areyousaying thatJDBCshould not be used at all?
>
> > >youcanuseJDBC,thoughitisn'twelltested.butwedopublicly
> > >supportthejava.sqlAPI.
>
> > Hi Elliott -
>
> > YoucannotuseJDBCifyoucan't get a Connection. Andyoucannot get
> > a Connection unless there is some documented way for the DriverManager
> > to find the SQLite driver.  ASFAIK this would be done by the platform
> > registering the driver, or it is done in a static initializer in the
> > driver class, hence theuseof Class.forName().
>
> > This is the pattern thatyouapparently say is NOT supported -
>
> >             String db = "jdbc:sqlite:" + getFilesDir() + "/test.db";
> >             Class.forName("SQLite.JDBCDriver");
> >             Connection conn = DriverManager.getConnection(db);
>
> > So then what is the correct supported way to get a Connection object?
> > If there is no documented way then maybe it is true thatJDBCis NOT
> > usable on Android currently?
>
> > I don't thinkJDBCis that critical to the platformbutit would be
> > nice to clarify if it is even usable.

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


[android-developers] AndroidManifest errors in Eclipse

2010-01-22 Thread Droidy
When I refactor or do something else in Eclipse my AndroidManifest.xml
gets a red error cross - no idea why that is - there seems to be not
much to go wrong in it. Any ideas 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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] OpenSSLSessionImpl.java finalize() problem - HeapWorker is wedged

2010-01-22 Thread hart
Hi there,

I got a VM abort while running my application that uses
HttpsConnection.
The error log is attached below:

12-15 21:26:37.149 E/dalvikvm(26605): HeapWorker is wedged:
11625ms spent inside
Lorg/apache/harmony/xnet/provider/jsse/OpenSSLSessionImpl;.finalize()
V

12-15 21:26:37.249 I/dalvikvm(26605): "Thread-10" prio=5 tid=19 NATIVE
12-15 21:26:37.249 I/dalvikvm(26605):   | group="main" sCount=1
dsCount=0 s=N obj=0x2e980bd0 self=0x20f9b0
12-15 21:26:37.249 I/dalvikvm(26605):   | sysTid=26614 nice=10
sched=0/0 handle=2178088
12-15 21:26:37.249 I/dalvikvm(26605):   at
org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.nativeconne
ct(Native Method)
12-15 21:26:37.249 I/dalvikvm(26605):   at
org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.startHandsh
ake(OpenSSLSocketImpl.java:305)
12-15 21:26:37.249 I/dalvikvm(26605):   at
org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl$SSLInputSt
ream.(OpenSSLSocketImpl.java:505)
12-15 21:26:37.259 I/dalvikvm(26605):   at
org.apache.harmony.xnet.provider.jsse.OpenSSLSocketImpl.getInputStre
am(OpenSSLSocketImpl.java:446)

I found the problem was caused by finalize() occupying more than 10
seconds, and therefore the HeapWorker abort the VM.

The "finalize()" of OpenSSLSessionImpl.java is as below:

protected void finalize() {
synchronized (OpenSSLSocketImpl.class) {
nativefree(session);
}
}

Dose the "synchronized" really necessary?
Because I found the "nativefree()" of
org_apache_harmony_xnet_provider_jsse_OpenSSLSessionImpl.cpp would
call "SSL_SESSION_free()" of ssl_sess.c, which would use CRYPTO_add()
to lock the reference count of SSL_SESSION object.

It should be quite safe if we try to free the native SSL_SESSION
object while someone is still using it, because the free operation
would fail in such situatuion.

Therefore, I think the "synchronized" could be removed.
Does anybody have suggestion on this?

Thanks.

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


[android-developers] Threading in activity and AsyncTask problem

2010-01-22 Thread yasirmturk
i have a class derived from AsyncTask and i initialize it in my
activity. Now i m facing two problems...

1. I want to send result back to my activity and execute a chunk of
code in my activty on onPostExecute(Object result) event. (i tried
handler but its not working)
2. I want to execute asynctask multiple times.

Please suggest me some better solution or a fix to this...
thanx in advance

ACTIVITY CODE:

 StudentTask st = new StudentTask(getThis());
 st.execute(new Object[] {StudentTask.Task.AUTH, null, 
userName,
password);


CLASS CODE:

public class StudentTask extends AsyncTask {

private Context context;
private ProgressDialog pd;

public static enum Task {
SYNCRONIZE, AUTH, ACTIVATE
}

public StudentTask(Context context) {
super();
this.context = context;
}

@Override
protected void onPreExecute() {
pd = ProgressDialog.show(context, "Please wait", "Starting");
}

@Override
protected Object doInBackground(Object... params) {

Object result = null;
Task t = (Task) params[0];
switch (t) {
case AUTH:
if (this.authenticateStudent(params[1].toString(),
params[2].toString()).IsSuccessFul()) {
result = true;
} else {
result = false;
}
break;
case SYNCRONIZE:
result =this.synchronize(null, null);
break;
default:
break;
}
return result;
}

@Override
protected void onProgressUpdate(Object... values) {
pd.setMessage(values[0].toString());
super.onProgressUpdate(values);
}

@Override
protected void onPostExecute(Object result) {
pd.dismiss();
// Send this result back to activity and execute some code there
e.g. launch next activity or display error
super.onPostExecute(result);
}

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


[android-developers] Re: JDBC Driver for SQLiteDatabase

2010-01-22 Thread Elliott Hughes


On Jan 12, 1:53 pm, jotobjects  wrote:
> On Jan 11, 9:14 pm, Elliott Hughes  wrote:
>
> > On Dec 19 2009, 2:05 am, kristianlm  wrote:
>
> > > hi Elliott,
>
> > > what exactly does it mean that the driver is unsupported and that
> > > it shouldn't be used?
>
> > > are you saying that JDBC should not be used at all?
>
> > you can use JDBC, though it isn't well tested. but we do publicly
> > support the java.sql API.
>
> Hi Elliott -
>
> You cannot use JDBC if you can't get a Connection. And you cannot get
> a Connection unless there is some documented way for the DriverManager
> to find the SQLite driver.  ASFAIK this would be done by the platform
> registering the driver, or it is done in a static initializer in the
> driver class, hence the use of Class.forName().
>
> This is the pattern that you apparently say is NOT supported -
>
>             String db = "jdbc:sqlite:" + getFilesDir() + "/test.db";
>             Class.forName("SQLite.JDBCDriver");
>             Connection conn = DriverManager.getConnection(db);
>
> So then what is the correct supported way to get a Connection object?

you supply your own driver, and use that.

 --elliott

> If there is no documented way then maybe it is true that JDBC is NOT
> usable on Android currently?
>
> I don't think JDBC is that critical to the platform but it would be
> nice to clarify if it is even usable.

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


[android-developers] Remove/Replace Google Setup Wizard

2010-01-22 Thread drive
We're looking to do some enterprise-y stuff like removing the stock
Google apps and replace with our own.  Does anyone know how the Google
Setup Wizard works (and how to remove it)?  Specifically, when you
first get the phone, you get a tutorial and then a setup screen where
you enter your Google account information.  We're thinking of creating
our own wizard that loads instead of this - has anyone tried this?  I
assume as Android gets to Netbooks and is already on the Nook, that it
is possible.

Thanks for any feedback.

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


[android-developers] newbie question on onDraw

2010-01-22 Thread bhupesh
All references so far I have seen is that the "framework" will call
onDraw.  Which part of the framework specifically calls onDraw.  Can I
control when onDraw gets called or can I call it myself without
causing any problems.  What happens after onDraw.  Basically, if
anybody can point me to or explain a complete detail flow of graphics,
I would really appreciate that.  I am trying to benchmark performance
and hence need these details.  Thanks.

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


[android-developers] Re: OpenGL ES

2010-01-22 Thread Roderick Colenbrander
There is OpenGL ES 2.0 support on the Milestone/Droid and I think on
the Nexus one as well. The device just ships with the 2.0 libs but it
takes some effort to use it though since at this point you need your
own EGL code but it is just around.

If you want examples the android git tree has a sample which will be
part of ndk 2.0.

Roderick

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


Re: [android-developers] Android Icon Templates Pack - Menu Icons PSD Corrupted?

2010-01-22 Thread Objectist Software Inc
I am having the same problem on PhotoShop CS4.
Some of the other icons in the pack are OK with PS4/Illustrator, others are 
not.

What is the proper way to report the issue or ask for assistance?


On Wednesday 20 January 2010 03:28:18 am Dirk wrote:
> Hello everyone,
> 
> Opening the menu icon template file from the Android Icon Templates
> Pack just shows two icon shapes in Photoshop CS2 on my PC, but there
> should be many more. I assume the file is corrupted or I still don't
> have the specifically needed version of Photoshop.
> 
> Can anyone please provide a complete and compatible version of the
> Menu_Icons_master.psd? It would be sufficient to have all the basic
> Android menu icon shapes as .pdf files. From the .psd i can still read
> the gradients styles and so on.
> 
> 
> A few more details what I have tried so far:
> I just downloaded the Android Icon Templates Pack v1.0 mentioned on
> the site:
> 
> http://developer.android.com/guide/practices/ui_guidelines/icon_design.html
> #templatespack
> 
> Extracting the zip, the .psd file Menu_Icons_master.psd can be found
> in the menu folder. Opening it in my Photoshop CS2 first brought an
> error message that DroidSans font could not be found - I solved this
> issue by installing the DroidSans font from:
> 
> http://damieng.com/blog/2007/11/14/droid-font-family-courtesy-of-google-asc
> ender
> 
> Restarting Photoshop and opening the file now brings no error message,
> but only the icon shapes for a house and a star are shown, missing all
> other menu icon shapes.
> 
> 
> Many thanks for your help!
> Dirk
> 

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


[android-developers] Re: Call forwarding

2010-01-22 Thread Michael boggess
what exactly are you looking to do? set the call forwarding up via
internal settings? the only way i know of to change the call
forwarding is to dial a code and send it.

I did find through a quick search that there is a way to detect fall
forwarding state changes. it is in PhoneStateListener and has a public
method of onCallForwardingIndicatorChanged(boolean cfi)  Search the
developer docs for more.

-mike

On Jan 22, 2:25 am, monty  wrote:
> is it possible to do call forwarding in android?plz give a solution

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


Re: [android-developers] How to Change the Android APN Settings Programmetically ??.

2010-01-22 Thread Murali M
I also have a same question as to how to programatically get/set/add EMAIL
and MMS settings. Currently i believe we have retrieve the information from
the db

Database: /data/data/com.android.providers.telephony/databases/telephony.db
Table: carriers
URI: content://telephony/carriers

Does anybody know if there is readily avaible APIs to  set EMAIL,MMS and
APNs

thanks,
Murali

On Fri, Jan 22, 2010 at 1:33 AM, Ramesh(BABY-FACE) wrote:

> I was able to bring up the UI in android that allows the user to edit the
> APN settings. But I need to know how can I access these APN settings
> programmetically and set them. Any Ideas ?. Is this possible ??.
>
> - startActivity(new Intent(Settings.ACTION_APN_SETTINGS));
>  --
> *
> M.Shehan Ramesh Perera
> Phone: +94 724787407
>
> *
> Winston Churchill -- Success is Going From Failure To Failure Without
> Loosing Enthusiasm.
> ~~~
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

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

[android-developers] Re: AndroidManifest errors in Eclipse

2010-01-22 Thread Michael boggess
Eclipse is normally really good at letting you know where the error
might be. perhaps there is something simple your overlooking while
trying to dig deeper into the problem.

-mike

On Jan 22, 5:24 am, Droidy  wrote:
> When I refactor or do something else in Eclipse my AndroidManifest.xml
> gets a red error cross - no idea why that is - there seems to be not
> much to go wrong in it. Any ideas 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
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Re: Threading in activity and AsyncTask problem

2010-01-22 Thread Streets Of Boston
1. If your code is on onPostExecute(), your code is already running in
the UI thread. Just call a method on your activity to execute that
chunk of code (instead of holding a reference to 'context', hold a
reference to your activity instead).

2. Just call this again:
  StudentTask st = new StudentTask(getThis());
  st.execute(new Object[] {StudentTask.Task.AUTH, null, userName,
password });

Tasks are like executable messages that will be executed on a
background thread. Creating multiple tasks does not necessarily create
multiple threads. Tasks are scheduled on the available background
threads. Whenever you create a new AsyncTask and call 'execute', the
task will be scheduled on the next available thread. The next
available thread is obtained from a pool of threads (I don't know how
large the pool is that AsyncTask uses).

On Jan 22, 5:21 am, yasirmturk  wrote:
> i have a class derived from AsyncTask and i initialize it in my
> activity. Now i m facing two problems...
>
> 1. I want to send result back to my activity and execute a chunk of
> code in my activty on onPostExecute(Object result) event. (i tried
> handler but its not working)
> 2. I want to execute asynctask multiple times.
>
> Please suggest me some better solution or a fix to this...
> thanx in advance
>
> ACTIVITY CODE:
>
>                          StudentTask st = new StudentTask(getThis());
>                          st.execute(new Object[] {StudentTask.Task.AUTH, 
> null, userName,
> password);
>
> CLASS CODE:
>
> public class StudentTask extends AsyncTask {
>
>         private Context context;
>         private ProgressDialog pd;
>
> public static enum Task {
>                 SYNCRONIZE, AUTH, ACTIVATE
>         }
>
> public StudentTask(Context context) {
>                 super();
>                 this.context = context;
>         }
>
>         @Override
>         protected void onPreExecute() {
>                 pd = ProgressDialog.show(context, "Please wait", "Starting");
>         }
>
>         @Override
>         protected Object doInBackground(Object... params) {
>
>                 Object result = null;
>                 Task t = (Task) params[0];
>                 switch (t) {
>                 case AUTH:
>                         if (this.authenticateStudent(params[1].toString(),
>                                         params[2].toString()).IsSuccessFul()) 
> {
>                                 result = true;
>                         } else {
>                                 result = false;
>                         }
>                         break;
>                 case SYNCRONIZE:
> result =                        this.synchronize(null, null);
>                         break;
>                 default:
>                         break;
>                 }
>                 return result;
>         }
>
>         @Override
>         protected void onProgressUpdate(Object... values) {
>                 pd.setMessage(values[0].toString());
>                 super.onProgressUpdate(values);
>         }
>
>         @Override
>         protected void onPostExecute(Object result) {
>                 pd.dismiss();
>                 // Send this result back to activity and execute some code 
> there
> e.g. launch next activity or display error
>                 super.onPostExecute(result);
>         }

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


[android-developers] Re: Out of memory / orientation change / Memory Analyzer question

2010-01-22 Thread OldSkoolMark
No effect here.

On Jan 21, 6:11 pm, Matt Kanninen  wrote:
> I had a similar issue, randomly getting the external allocation too
> large for this process error.
>
> For me, it started when I added android:targetSdkVersion="4" to the
> manifest, and went away when I removed that bit.
>
> On Jan 21, 3:17 pm, OldSkoolMark  wrote:
>
> > Yes,  the OOM is related to 'external allocations'. I googled
> > 'dalvikvm external allocation' and there's plenty to pore over. Is
> > there an update on this issue in general?
>
> > Here's the relevant logcat excerpt:
>
> > 01-21 13:04:49.140: INFO/WindowManager(79): onOrientationChanged,
> > rotation changed to 1
> > 01-21 13:04:49.140: INFO/WindowManager(79): Setting rotation to 1,
> > animFlags=0
> > 01-21 13:04:49.150: INFO/WindowManager(79): Config changed:
> > { scale=1.0 imsi=0/0 loc=en_US touch=3 keys=1/1/2 nav=3 orien=2
> > layout=18}
> > 01-21 13:04:49.370: DEBUG/StatusBar(79): updateResources
> > 01-21 13:04:49.680: DEBUG/dalvikvm(2630): GC freed 556 objects / 24056
> > bytes in 127ms
> > 01-21 13:04:49.790: ERROR/dalvikvm-heap(2630): 614400-byte external
> > allocation too large for this process.
> > 01-21 13:04:49.790: ERROR/(2630): VM won't let us allocate 614400
> > bytes
>
> > On Jan 21, 2:47 pm, fadden  wrote:
>
> > > On Jan 21, 12:58 pm, OldSkoolMark  wrote:
>
> > > > Is this telling me something useful? If forcing a GC with DDMS
> > > > reclaims the memory used by now-defunct instances of my activity, I
> > > > would have thought the VM would have garbage collected some, if not
> > > > all of these defunct activities automatically. Do I need to request GC
> > > > at the very beginning of my activity lifecycle to make sure?
>
> > > Something doesn't sound right.  What does logcat show?  Are you seeing
> > > GCs in the log file?  Is the OOM related to "external allocations"?

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


[android-developers] Re: onKeyDown() functionality issue

2010-01-22 Thread Marek Uhel
Try to call return super.onKeyDown(keyCode, event)

On Jan 22, 11:46 am, Kshitij Aggarwal  wrote:
> Hi,
>
> I was trying to override the back button functionality where I wanted
> to call the default functionality in case a boolean is set false
>
> public boolean onKeyDown(int keyCode, KeyEvent event) {
>         boolean temp = false;
>         if (event.KEYCODE_BACK == keyCode) {
>             System.out.println("Back pressed");
>             if (isTrue) {
>                 //Do something
>                 return true;
>             }
>             else return false;
>         }
>         return false;
>     }
>
> Now this doesn't exactly work how the documentation states. the //Do
> Something part is executed well, but when isTrue is false i want the
> default back functionality which is not happening. Im using SDK 1.5
>
> Now,
>
>    1.      How do I fix this?
>    2.      Is this issue fixed in later SDK updates? If not can
> someone raise a bug for the same?

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


Re: [android-developers] Max APK SIZE

2010-01-22 Thread Matt Oakes
No chance. I'm not sure what the limit is but apps are stored on the
phone itself so the biggest amount of storage it has for ALL apps is
around 512mb (on the N1). There's no way anyone will want something
over 200mb on their phone taking up their application storage.

Why not just have the videos load over the network?

Matt

On Fri, Jan 22, 2010 at 5:33 PM, mailbox.jku...@gmail.com
 wrote:
> Hi,
>
>         I would like to know the max apk size that i can use in the
> device as i have a 232 mb of videos and i want to use them in the
> application itself.What are the chances and any other option if
> possible.
>
>
> Please help me out as i need to release my app asap.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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


[android-developers] Re: SQLiteDatabase lifecycle and threads

2010-01-22 Thread jotobjects
Interesting. Thanks for that link.  It is a reasonable
"speculation" (guess) that the enable locking method has "something"
to do with the various threading options.   In addition to thread safe
operation there is the question of how multiple processes (different
JVMs) inter-operate with the same SQLLite database.  Database engines
usually isolate parallel transactions for multiple clients.  Which
brings us back to the question of what are the semantics of the
Adnroid API "beginTransaction" method?  And maybe the intended best
practice programming model is to wrap these operations inside a
ContentProvider.

On Jan 21, 5:42 pm, Nathan  wrote:
> On Jan 21, 4:22 pm, jotobjects  wrote:
>
>
>
> > It doesn't make any sense to me that you have to turn locking on
> > (whatever that means) if you are using transactions.  
>
> You probably don't if you are using one thread.
>
> I think the setLocking is about making the the SQLite *code* thread
> safe, and not about enabling or disabling transactions.
>
> It's probably this:http://www.sqlite.org/threadsafe.html
>
> Assuming the binary on Android has been compiled as threadsafe, it is
> probably whether or not the connection is opened as threadsafe. You
> don't get direct access to connections through the interface (not that
> I miss them). No word on whether this mean "MultiThread" mode or
> "Serialized" mode, but I would guess serialized as it is the default.
> Somewhere deep in there, a call is being made to sqlite3_open_v2()
> with that parameter.
>
> Nathan

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


[android-developers] Re: JDBC Driver for SQLiteDatabase

2010-01-22 Thread jotobjects
There are a number of open source JDBC drivers for SQLLite out there
already (including the one already built into Android).

On Jan 21, 10:22 pm, Elliott Hughes  wrote:
> On Jan 12, 1:53 pm, jotobjects  wrote:
>
>
>
> > On Jan 11, 9:14 pm, Elliott Hughes  wrote:
>
> > > On Dec 19 2009, 2:05 am, kristianlm  wrote:
>
> > > > hi Elliott,
>
> > > > what exactly does it mean that the driver is unsupported and that
> > > > it shouldn't be used?
>
> > > > are you saying that JDBC should not be used at all?
>
> > > you can use JDBC, though it isn't well tested. but we do publicly
> > > support the java.sql API.
>
> > Hi Elliott -
>
> > You cannot use JDBC if you can't get a Connection. And you cannot get
> > a Connection unless there is some documented way for the DriverManager
> > to find the SQLite driver.  ASFAIK this would be done by the platform
> > registering the driver, or it is done in a static initializer in the
> > driver class, hence the use of Class.forName().
>
> > This is the pattern that you apparently say is NOT supported -
>
> >             String db = "jdbc:sqlite:" + getFilesDir() + "/test.db";
> >             Class.forName("SQLite.JDBCDriver");
> >             Connection conn = DriverManager.getConnection(db);
>
> > So then what is the correct supported way to get a Connection object?
>
> you supply your own driver, and use that.
>
>  --elliott
>
> > If there is no documented way then maybe it is true that JDBC is NOT
> > usable on Android currently?
>
> > I don't think JDBC is that critical to the platform but it would be
> > nice to clarify if it is even usable.

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


Re: [android-developers] Max APK SIZE

2010-01-22 Thread Frank Weiss
You probably should say who the users of this application are to get more
reasonable replies. The most common advice would be to have the application
download the video to the SD card or stream the video. Many users are not
going to see the benefit of downloading a 200MB+ application just to see a
video.

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

[android-developers] Re: OpenGL ES

2010-01-22 Thread Lance Nanek
They aren't Android specific, but the Sun and Khronos sites have
documentation on that method:

http://java.sun.com/javame/reference/apis/jsr239/javax/microedition/khronos/opengles/GL10.html#glDrawElements%28int,%20int,%20int,%20java.nio.Buffer%29
http://khronos.org/opengles/documentation/opengles1_0/html/glDrawElements.html

From:
http://java.sun.com/javame/reference/apis/jsr239/
http://khronos.org/opengles/documentation/opengles1_0/html/index.html

Again, OpenGL in general, but this book had some good information re
using OpenGL:
Mobile 3D Graphics: with OpenGL ES and M3G (The Morgan Kaufmann Series
in Computer Graphics)
http://www.amazon.com/Mobile-3D-Graphics-Kaufmann-ebook/dp/B0019O10IW

It often covered things that basic lessons and tutorials didn't, like:
"Similar primitives should be batched as much as possible, i.e., they
should be put into the same array. It is much faster to draw one array
of a hundred triangles than fifty arrays of two triangles each. This
becomes even more important if parts of the scene use different
materials and textures-combining primitives that share the same state,
e.g., texture maps, can produce considerable savings as the state
changes are often quite costly."

On Jan 22, 12:37 pm, Greg Donald  wrote:
> On Fri, Jan 22, 2010 at 10:58 AM, Tim Hansen
>
>  wrote:
> > But guys, OpenGL ES 1.0 was only released in 2003.
>
> The point is Kronos has deprecated ES 1.0 and Android's API for it is
> undocumented:
>
> http://developer.android.com/intl/fr/reference/android/opengl/package...
>
> Is this list my best option for when I have problems with glDrawElements() ?
>
> I mean, this isn't any help:
>
> http://developer.android.com/intl/fr/reference/android/opengl/GLES10
>
> Where is the Android + OpenGL ES 1.0 book?  I'd happily purchase it if
> I could find it.
>
> --
> Greg Donald
> destiney.com | gregdonald.com

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


Re: [android-developers] URGENT ...How to get MCC , MNC, LAC of neighboring cells

2010-01-22 Thread Simon Tennant (Buddycloud)

Have a grep through the buddycloud source code.  We collect all of these.

code here:  
http://code.google.com/p/buddycloud/source/browse/trunk/client/android/main/src/com/buddycloud/android/buddydroid/collector/CellListener.java


S.

On 22/01/2010 02:09, BowlOfChilli wrote:

I am utilizing the getNeighboringCellsInfo method of the telephony
manager to get the cells. thanks
   




--
Simon Tennant

.de mobile: +49 17 8545 0880
.uk mobile: +44 78 5335 6047
.uk office: +44 20 7043 6756
.de office: +49 89 4209 55854

email and xmpp: si...@buddycloud.com
http://buddycloud.com

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


[android-developers] Active Sync support for android

2010-01-22 Thread muraleo
Is  there a active-sync support in Android just like how we see in
Windows Mobile . If so how can i programatically set configuration
parameters

thanks,
Murali

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


Re: [android-developers] Re: OpenGL ES

2010-01-22 Thread Greg Donald
On Fri, Jan 22, 2010 at 1:25 PM, Lance Nanek  wrote:
> http://khronos.org/opengles/documentation/opengles1_0/html/glDrawElements.html

Ok, so the Kronos API docs have the fourth parameter glDrawElements()
as a void pointer, and then the Android SDK has it as a Buffer.  But
what kind of Buffer?  I tried using a FloatBuffer and got a segfault.
And why wouldn't a simple float[] work there?  These are the kinds of
questions/problems I'm having.

In general, what do I use to connect the dots from the documented
Kronos C API to the undocumented Android/Java API?  Trial and error is
not something I favor.


-- 
Greg Donald
destiney.com | gregdonald.com

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


[android-developers] Email ,Wifi settings

2010-01-22 Thread muraleo
I am working on a application from which i need to  ADD,Delete ,Change
Email and Wifi Settings. I even need to add new Email Accounts .
Can you please give me some pointers where i can start this .

In Android, Are there APIs i can directly call for this or should it
use content provider to do the same.?

thanks,
Murali

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


Re: [android-developers] Re: Display TextFile

2010-01-22 Thread TreKing
On Thu, Jan 21, 2010 at 8:09 PM, perumal316  wrote:

> Is it correct to use the following code to access the file in /data
> directory?
>
> File file = new File(Environment.getDataDirectory(),"/data/
> monitor.txt");
>

Not really, use openFileInput() (I think that's the name, should be
something like that) to get an InputStream. Write out what you're getting
from the stream to the log to make sure the reading is successful before
trying to show it in the TextView.

-
TreKing - Chicago transit tracking app for Android-powered devices
http://sites.google.com/site/rezmobileapps/treking

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

[android-developers] File Upload - Get Bytes Uploaded

2010-01-22 Thread Bobbie
I have a function I am using to upload files.  How can I get the
number of bytes of the file that have been uploaded (transferred)?
Can I setup a timer that does this?  If so, what variable to I read to
get the number of bytes uploaded?  Here is my code:



String existingFileName = fileToUpload;
File uploadFile = new File(existingFileName);
FileInputStream fileInputStream = new FileInputStream(uploadFile);

// Set some special vars
String lineEnd = "\r\n";
String twoHyphens = "--";
String boundary = "*";

// URL to upload to
URL connectURL = new URL("http://url/to/upload/script.php?
filename="+fileToUpload);

// connectURL is a URL object
conn = (HttpURLConnection)connectURL.openConnection();

// allow inputs
conn.setDoInput(true);

// allow outputs
conn.setDoOutput(true);

// don't use a cached copy
conn.setUseCaches(false);

// use a post method
conn.setRequestMethod("POST");

// set post headers
conn.setRequestProperty("Connection","Keep-Alive");
conn.setRequestProperty("Content-Type","multipart/form-
data;boundary="+boundary);

// open data output stream
DataOutputStream dos = new DataOutputStream(conn.getOutputStream());
dos.writeBytes(twoHyphens + boundary + lineEnd);
dos.writeBytes("Content-Disposition: form-data; name=\"uploadedfile
\";filename=\""+existingFileName +"\"" + lineEnd);
dos.writeBytes(lineEnd);

// create a buffer of maximum size
int bytesAvailable = fileInputStream.available();
int maxBufferSize = 1024;
int bufferSize = Math.min(bytesAvailable, maxBufferSize);
byte[] buffer = new byte[bufferSize];

// read file and write it into form...
bytesRead = fileInputStream.read(buffer, 0, bufferSize);
while (bytesRead > 0)
{
// Upload file part(s)
dos.write(buffer, 0, bufferSize);
bytesAvailable = fileInputStream.available();
bufferSize = Math.min(bytesAvailable, maxBufferSize);
bytesRead = fileInputStream.read(buffer, 0, bufferSize);
}

// Send multipart form data necesssary after file data...
dos.writeBytes(lineEnd);
dos.writeBytes(twoHyphens + boundary + twoHyphens + lineEnd);

// Close streams
fileInputStream.close();
dos.flush();

InputStream is = conn.getInputStream();
int ch;

StringBuffer b =new StringBuffer();
while( ( ch = is.read() ) != -1 ) {
b.append( (char)ch );
}

String s=b.toString();
dos.close();

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


[android-developers] Re: AndroidManifest errors in Eclipse

2010-01-22 Thread Maps.Huge.Info (Maps API Guru)
The place to look for that error is under the "Problems" tab in
Eclipse. I've had similar issues with the manifest and the secret
always was found in that tab.

-John Coryat

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


Re: [android-developers] Re: MyLocationOverlay causing crash in 1.6 (Donut)

2010-01-22 Thread TreKing
Since this was brought back up ... this worked for me as well for the Cliq
(original issue).

Also, FYI, I found that an easier way to get the distance for the circle
radius is to simply use Projection.metersToEquatorPixels(float), which
converts a distance in meters to pixel units.

I also added simple animation to more closely match the default
implementation by simply alternating which Drawable is used in the draw()
call every half second or so.

On Fri, Jan 22, 2010 at 5:54 AM, Johan Nilsson wrote:

> Thank you Pieter for the code snippet.
>
> I can also confirm that this workaround is needed for Samsung Spica,
> phone model GT-I5700
> with android 1.5.
>
> Johan
>
> On Fri, Nov 13, 2009 at 10:12 AM, Pieter  wrote:
> > Allright, I have taken up the gauntlet and wrote a subclass for
> > working around this bug.
> > It draws the "my location" disc and an accuracy circle.  You can test
> > it on a device that is
> > not bugged by initializing the "bugged" variable to true.
> >
> > It is a quick and dirty hack but it seems to work correctly on my G1,
> > although the calculations
> > might be way off when you are near the poles ;-). I hope to have some
> > more feedback from an
> > actual Cliq user later today.
> >
> > You are free to use and adapt the source code as you see fit:
> > http://www.spectrekking.com/download/FixedMyLocationOverlay.java
> >
> > And the accompanying drawable:
> > http://www.spectrekking.com/download/mylocation.png
> >
> > I made the drawable orange instead of blue on purpose so users can see
> > when their device is bugged.
> > Note that there is no animation on GPS activity (as there is in the
> > original MyLocationOverlay).
> >
> > On a related note: it seems that the "Google logo" drawable is also
> > bugged on the Cliq as I get reports
> > of a "red square in the lower left where the Google logo is supposed
> > to be". I don't really see any
> > workaround for that one.
> >
> > If you find any problems with this solution, or have any improvements
> > to share please let us know!
> >
> > ---
> > package com.spectrekking.play;
> >
> > import android.content.Context;
> > import android.graphics.Canvas;
> > import android.graphics.Paint;
> > import android.graphics.Point;
> > import android.graphics.Paint.Style;
> > import android.graphics.drawable.Drawable;
> > import android.location.Location;
> >
> > import com.google.android.maps.GeoPoint;
> > import com.google.android.maps.MapView;
> > import com.google.android.maps.MyLocationOverlay;
> > import com.google.android.maps.Projection;
> > import com.spectrekking.R;
> >
> > public class FixedMyLocationOverlay extends MyLocationOverlay {
> >private boolean bugged = false;
> >
> >private Paint accuracyPaint;
> >private Point center;
> >private Point left;
> >private Drawable drawable;
> >private int width;
> >private int height;
> >
> >public FixedMyLocationOverlay(Context context, MapView mapView) {
> >super(context, mapView);
> >}
> >
> >@Override
> >protected void drawMyLocation(Canvas canvas, MapView mapView,
> > Location lastFix, GeoPoint myLoc, long when) {
> >if (!bugged) {
> >try {
> >super.drawMyLocation(canvas, mapView,
> lastFix, myLoc, when);
> >} catch (Exception e) {
> >bugged = true;
> >}
> >}
> >
> >if (bugged) {
> >if (drawable == null) {
> >accuracyPaint = new Paint();
> >accuracyPaint.setAntiAlias(true);
> >accuracyPaint.setStrokeWidth(2.0f);
> >
> >drawable =
> mapView.getContext().getResources().getDrawable
> > (R.drawable.mylocation);
> >width = drawable.getIntrinsicWidth();
> >height = drawable.getIntrinsicHeight();
> >center = new Point();
> >left = new Point();
> >}
> >Projection projection = mapView.getProjection();
> >
> >double latitude = lastFix.getLatitude();
> >double longitude = lastFix.getLongitude();
> >float accuracy = lastFix.getAccuracy();
> >
> >float[] result = new float[1];
> >
> >Location.distanceBetween(latitude, longitude,
> latitude, longitude +
> > 1, result);
> >float longitudeLineDistance = result[0];
> >
> >GeoPoint leftGeo = new
> GeoPoint((int)(latitude*1e6), (int)
> > ((longitude-accuracy/longitudeLineDistance)*1e6));
> >projection.toPixels(leftGeo, left);
> > 

  1   2   >