[android-developers] Add organization in contact

2010-06-09 Thread Nemat
Hi,

I want to add organization details in any contact.But I am getting
java.lang.UnsupportedOperationException: Unknown uri:
content://contacts/people/67/organizations.

But this error doesnt come in emulator.

What can be the reason?How can I resolve this issue??

Any help will be appreciated..

Thanks in Advance
Nemat

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

2010-06-03 Thread Nemat
Hi..


How can we read birth date from contact list in SDK-1.6 and 1.5??
Any help will be appreciated...

Thanks in Advance
Nemat

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

2010-05-12 Thread Nemat
Hi friends

I have two tables.I want to get all records from one table that are
different from the records in second table.
For eg.
if we have four records in first table like A,B,C,D and three records
in second table thats A,B,C then the answer of query should be D.

I have tried EXCEPT operator but it doesnt work fine.Kindly help me
in writing correct query for the given problem.

Any help is appreciated

Thanks in Advance
Nemat

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

2010-02-19 Thread Nemat
Hi,

I want to listen to the changes occured in file system.I am using
FileObserver.Now the problem I am facing is whenever a file is created
or modified or deleted a lot of events are generated.I dont get any
perfect way to find the change.Here is my code:

class MyDirObserver extends FileObserver
 {
 String superPath;
   public  MyDirObserver(String path)
   {
 super(path, ALL_EVENTS);
 this.superPath=path;
   }

   public void onEvent(int event, String path)
   {
   Log.e(onEvent of Directory, === onEvent ===);
   try{
 _Dump(dir, event, path,superPath);
   }
   catch(NullPointerException ex)
   {
   Log.e(ERROR,I am getting error);
   }
   }
 }



 private void _Dump(final String tag, int event, String path,String
superPath)
 {


   Log.d(tag, === dump begin ===);
   Log.d(tag, path= + path);
   Log.d(tag,super path=+superPath);
   Log.d(tag, event list:);
   if ((event  FileObserver.OPEN) != 0)
   {
 Log.d(tag,   OPEN);
   }
   if ((event  FileObserver.CLOSE_NOWRITE) != 0)
   {

 Log.d(tag,   CLOSE_NOWRITE);




   }
   if ((event  FileObserver.CLOSE_WRITE) != 0)
   {

Log.d(tag,   CLOSE_WRITE);


Log.i(NEWFILEOBSERVER,File is Modified);
 if(path!=null)
   {

Log.d(-FilePath,superPath+path);
   }



   }
   if ((event  FileObserver.CREATE) != 0)
   {
   isCreate=true;
Log.i(NEWFILEOBSERVER,File is Created );
 if(path!=null)
   {
Log.d(-FilePath,superPath+path);
   }
 Log.d(tag,   CREATE);

   }
   if ((event  FileObserver.DELETE) != 0)
   {
Log.i(NEWFILEOBSERVER,File is deleted);
 if(path!=null)
   {
Log.d(-FilePath,superPath+path);
   }
 //  startMyActivity(A new file is deleted thats=+superPath);

   Log.d(tag,   DELETE);

   }
   if ((event  FileObserver.DELETE_SELF) != 0)
   {
   Log.d(tag,   DELETE_SELF);
   }
   if ((event  FileObserver.ACCESS) != 0)
   {
   Log.d(tag,   ACCESS);
   }
   if ((event  FileObserver.MODIFY) != 0)
   {
   if(!isModified)
 isModified=true;

   if(isModified  isOpen)
   isAgainModified=true;
   Log.d(tag,   MODIFY);
   }
   if ((event  FileObserver.MOVED_FROM) != 0)
   {
   Log.d(tag,   MOVED_FROM);
   if(path!=null)
   {

Log.d(-FilePath,superPath+path);
   }
   }
   if ((event  FileObserver.MOVED_TO) != 0)
   {
   Log.d(tag,   MOVED_TO);

   if(path!=null)
   {

Log.d(-FilePath,superPath+path);
   }
   }
   if ((event  FileObserver.MOVE_SELF) != 0)
   {
 Log.d(tag,   MOVE_SELF);
   }
   if ((event  FileObserver.ATTRIB) != 0)
   {
   Log.d(tag,   ATTRIB);
   }
   Log.d(tag, === dump end ===);
}

and also,it stops after some time.I dont get the exact time but doesnt
work always though I call startWatching() in service.

I hope you guys help me.I tried many ways but it doesnt work
perfectly.Am I doing something wrong???
or there we have some other way to do this...

Please help meI have to get this done withing few days..

Any help is appreciated

Thanks in Advance
Nemat

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

2010-02-08 Thread Nemat
Hi,

Is it possible to signout programmatically fron the google account
opened in android phone

Has anyone any clue about it?

Looking forward to your positive response


Thanks in Advance
Nemat

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

2010-02-02 Thread Nemat
Hi friends

I want to save all the contacts into shared preferences.Is it
possible?


I mean.. is there any upper size limit of shared preferences??How
much data it can save??



Thanks in advance
Nemat

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

2010-02-02 Thread Nemat
 This link will help you:
http://blog.chinaunix.net/u/9577/showart_1850111.html

cheers!!!

Regards
Nemat

On Feb 2, 3:26 pm, Kumar Bibek coomar@gmail.com wrote:
 Query the SMS content provider for all the info you need about the SMS
 Search for it, and you will get a few examples.

 Thanks and Regards
 Kumar Bibek

 On Feb 2, 2:36 pm, Rubixcube tristanyoun...@gmail.com wrote:



  yeah , i've read docs for many times , but i haven't found any thing
  helping me. that's why i'm writing here ;P

  On Feb 2, 9:58 am, Kevin Duffey andjar...@gmail.com wrote:

   Have you tried the SDK docs for the objects you are working with? Perhaps
   some code that you are using?

   On Tue, Feb 2, 2010 at 12:28 AM, Rubixcube tristanyoun...@gmail.com 
   wrote:
No one can help me ?

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubs­cr...@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] Re: Problem in sending sms

2010-01-27 Thread Nemat
but it also happens when I use another constructor of intent.Here is
my code:

PendingIntent pi = PendingIntent.getActivity(this, 0,
new Intent(), 0);
SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage(9001100444, null, This is test message, pi,
null);

Thanks
Nemat


On Jan 21, 4:31 pm, Nikhil Agarwal nikhil.dontpa...@gmail.com wrote:
 Probably your SMSSender.class also sends aSMS. OnceSMSis sent, it
 will pass an intent to the SMSSender activity.

 On Jan 21, 5:02 pm, Nemat nemate...@gmail.com wrote:



  Hi.

  I am trying to sendsmsusing SmsManager class.Here is my code:

  PendingIntent pi = PendingIntent.getActivity(this, 0,
  new Intent(this, SMSSender.class), 0);
  SmsManagersms= SmsManager.getDefault();
 sms.sendTextMessage(9001100444, null, This is test message, pi,
  null);

 SMSis sent successfully but it is sent two times on the same phone-
  number and aving same content.

  I dont get theproblem.Can anyone describe me the reason of this
 problem.??

  Thanks in Advance
  Nemat- 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] getting notified on documents change

2010-01-27 Thread Nemat
Hi friends...

I am currently working to get notified when a new document is added/
edited/deleted.But I dont find any way to do this.Can you guys give me
some suggestions regarding this???

Any help will be appreciated 

Thanks in Advance
Nemat

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

2010-01-27 Thread Nemat
any kind of document like pdf,.doc etc.I want a notification when the
user creates or copies or deletes or edits any document or file in
phone.Is it possible to get notified?



On Jan 28, 10:36 am, Kevin Duffey andjar...@gmail.com wrote:
 Might need more info. Document of what.. added/edited/deleted from
 what/where?



 On Wed, Jan 27, 2010 at 9:02 PM, Nemat nemate...@gmail.com wrote:
  Hi friends...

  I am currently working to get notified when a new document is added/
  edited/deleted.But I dont find any way to do this.Can you guys give me
  some suggestions regarding this???

  Any help will be appreciated 

  Thanks in Advance
  Nemat

  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubs­cr...@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] Problem in sending sms

2010-01-21 Thread Nemat
Hi.

I am trying to send sms using SmsManager class.Here is my code:

PendingIntent pi = PendingIntent.getActivity(this, 0,
new Intent(this, SMSSender.class), 0);
SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage(9001100444, null, This is test message, pi,
null);

SMS is sent successfully but it is sent two times on the same phone-
number and aving same content.

I dont get the problem.Can anyone describe me the reason of this
problem.??

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

[android-developers] problem in AutoCompleteTextView

2009-12-25 Thread Nemat
Hi Friends

I am working on AutoCompleteTextView.Its working fine and doen't give
any error.Now the problem I am facing is,suppose we have 3 words
starting from A,when I start typing the letter A,It shows all the
three words.If we have three words like An,Am,Az,when I type n
after A,two other words should be removed from the list.and it
should display only An.But those two letters are not disappeared in
my AutoCompleteTextView.What should I do???

Any one have any idea

Thanks in Advance
Nemat

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

2009-12-11 Thread Nemat
Hi,

I find a permission named android.permission.MASTER_CLEAR  in uses-
permission list.But I didnt find any documentation regarding this.

Is it possible to master clear all the data in the phoneor set the
phone to factory settings?

What I want to perform is to wipe the phone completely.For this I
tried to delete database tables.But it doesnt work.Here is my code:

getContentResolver().delete(People.CONTENT_URI, null, null);
//   getContentResolver().delete(Uri.parse(content://calendar),
null, null);
 getContentResolver().delete(Browser.BOOKMARKS_URI, null, null);
 getContentResolver().delete(Uri.parse(content://sms), null,
null);
 getContentResolver().delete
(MediaStore.Images.Media.INTERNAL_CONTENT_URI, null, null);
 getContentResolver().delete
(MediaStore.Video.Media.INTERNAL_CONTENT_URI, null, null);
 getContentResolver().delete
(MediaStore.Audio.Media.INTERNAL_CONTENT_URI, null, null);

I found unsupportedoperationException..

is there any other way to do this

I am in need of urgent help
please help me!!!

Regards
Nemat

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

2009-12-01 Thread Nemat
Hi friends

I want to customize the notification being displayed on incoming
sms..

Is it possible?What should I do?

Thanks and Regards
Nemat

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Can anyone tell me ONE app that shows up in Android Market on HTC Tattoo

2009-11-30 Thread Nemat
Hi,

I have tattoo.But I dont understand your problem.How can I help
you

Regards
Nemat

On Dec 1, 9:55 am, Dan Sherman impact...@gmail.com wrote:
 Never bored, always working on new apps :)

 On Mon, Nov 30, 2009 at 11:36 PM, tomei.ninge...@gmail.com 



 tomei.ninge...@gmail.com wrote:
  Why is this group full of people who want to make a statement about
  everything when they don't have anything to contribute? Are you really
  bored? Go get a life!

  On Nov 30, 8:10 pm, Dan Sherman impact...@gmail.com wrote:
   But if you're switching your development efforts, why would you need the
   names of apps?

   Also, blatently stating that you're planning to pirate apps might not be
  the
   best of ways to get help...

   On Mon, Nov 30, 2009 at 11:06 PM, tomei.ninge...@gmail.com 

   tomei.ninge...@gmail.com wrote:
My app is now showing up on HTC tattoo. Many people have complained
about this and I don't see ANY response from Google.

Google, you are PATHETIC!

Could anyone who has a Tattoo post the name of ONE (or preferably a
few :-)  apps that can show up on HTC Tattoo? I will pirate them and
copy their AndroidManifest file.

My app uses only these 3 permissions:

   uses-permission android:name=android.permission.INTERNET/uses-
permission
   uses-permission
android:name=android.permission.WRITE_EXTERNAL_STORAGE/uses-
permission
   uses-permission
android:name=android.permission.ACCESS_NETWORK_STATE/uses-
permission

And I say it again, Google, you are PATHETIC! Thank you for you non-
existence development support! I will switch my app to dead OSes like
Windows Mobile and Symbian, instead of wasting my time on a pile of
crap like yours!

--
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to
  android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubs­cr...@googlegroups.com
  android-developers%2bunsubs­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.comandroid-developers%2bunsubs­cr...@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] Remove sms notification

2009-11-22 Thread Nemat
Hi friends...


is it possible to remove incoming sms notification from status bar???

Thanks in Advance
Nemat

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

2009-11-21 Thread Nemat
Hi friends


I have to restore factory settings of phone programmatically..Is
that possible?if yes,How can we do tht?

Thanks in Advance
Nemat

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

2009-11-20 Thread Nemat
Hi friends….
is it possible to replace incall screen by my own activity
Please……I need it urgently!
Thanks in Advance
Nemat

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

2009-11-11 Thread Nemat
Hey friends

I have to buy a new Android phone for testing android applications I
work upon.What about HTC Tatoo??

Can I buy that one??This would be specifically for testing not for
personal use...Can you guys help me out in choosing a good Android
device for testing ...please

Thanks in advance
Nemat

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

2009-11-11 Thread Nemat
Thanks Michael.

As far as I am concerned ,it is touch screen.

By the way...I am in India.

Thanks,
Nemat

On Nov 12, 11:12 am, Chi Kit Leung michaelchi...@gmail.com wrote:
 I use HTC Magic for testing my apps.

 On Thu, Nov 12, 2009 at 4:11 PM, Chi Kit Leung michaelchi...@gmail.comwrote:





  I am in Australia, I have not any hand on experince with HTC Tatto yet.
  Please confirm whether that is a touch screen device. Because in my memory,
  that is not. Moreover, if you are in US, you can consider Droid. That is a
  2.0 native device. I think that is worth to consider.

  On Thu, Nov 12, 2009 at 4:04 PM, Nemat nemate...@gmail.com wrote:

  Hey friends

  I have to buy a new Android phone for testing android applications I
  work upon.What about HTC Tatoo??

  Can I buy that one??This would be specifically for testing not for
  personal use...Can you guys help me out in choosing a good Android
  device for testing ...please

  Thanks in advance
  Nemat

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

  --
  Regards,
  Michael Leung
 http://www.itblogs.info
 http://www.michaelleung.info

 --
 Regards,
 Michael Leunghttp://www.itblogs.infohttp://www.michaelleung.info- 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] Problem in GPS while running in timer

2009-11-10 Thread Nemat
Hi frinds..

I am presently working on GPS.I have to start GPS periodically.I mean
I want GPS to start after a particular intervel,get Location value and
then stop taking location updates.For this,I m calling
requestLocationUpdates( , , ) method in a timer.Then in
onLocationChanged(), I stop taking location by using removeUpdates
().Then after particular intervel ,it again start taking values,then
when location changes ,it stops, and so on..

Here is my code:
TimerTask IntervelTimer = new TimerTask()
{
public void run()
{
Log.d
(startLocationUpdate,startLocationUpdate);
startLocationUpdate();

}
};
Timer  timer2 = new Timer();


  try{
timer2.schedule(IntervelTimer,  1*60 * 1000, 1*60 * 1000);
  }
  catch(Exception e)
  {
  Log.e(Error,e.toString());
  }

 public void startLocationUpdate()
 {
 System.out.println(startLocationUpdate());
 if(locationListener==null)
{
Looper.prepare();

 locationListener = new MyLocationListener();
 try{
lm.requestLocationUpdates(
  LocationManager.GPS_PROVIDER,
 0,
  0,
  locationListener);
 }
 catch(Exception e)
 {
 Log.e(error,e.toString());
 }
 Looper.loop();
 Looper.myLooper().quit();
}
 }

 private class MyLocationListener implements LocationListener
{
public void onLocationChanged(Location loc) {
System.out.println(GetLocation);
if (loc != null) {
StoreGPSlocation(String.valueOf
(loc.getLatitude()),String.valueOf(loc.getLongitude()));
stopLocationUpdate();
}
}

public void onProviderDisabled(String provider) {
// TODO Auto-generated method stub
}

public void onProviderEnabled(String provider) {
// TODO Auto-generated method stub
}

public void onStatusChanged(String provider, int status,
Bundle extras) {
// TODO Auto-generated method stub
}
}

public void stopLocationUpdate()
 {
  LocationManager lm = (LocationManager)getSystemService
(Context.LOCATION_SERVICE);
 if (lm != null)

   {
if (locationListener != null)

 {

lm.removeUpdates(locationListener);
   locationListener= null;

}



   lm = null;

}



 }

Now the problem is:It starts fine for the first time,when location
changes it stops then starts again,but the timer stops running  after
that.I dont get any error or exception.I dont know where is the
problem.As far as I am concirned,the problem is in timer..

What do you guys think...

I need Help. urgently!!!

Thanks in Advance
Nemat

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

2009-11-06 Thread Nemat
Hi,

How can we disable GPS programmatically?

Thanks in advance
Nemat

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

2009-11-03 Thread Nemat
Hi

I want to set the background color of ListView as white.I tried this:

getListView().setBackgroundColor(color.white);
getListView().setCacheColorHint(color.transparent);

But it doesnt change the color.What should I do?

Thanks in advance
Nemat

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

2009-10-29 Thread Nemat

Hi Friends

I have written my HttpConnection code for Android.I have also set
Network preferences. Should I change the code so that it would be able
to work for Wifi?or I dont need any change.Does the same code work for
Wifi correctly?Here is my code:

public static String http_get(String urlParameters)
  {
String msg = ,uid = ;
int ch;


url = url + urlParameters ;

int BUFFER_SIZE = 2000;
InputStream in = null;
try {
in = OpenHttpConnection(url);
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();

}

try
{
 InputStreamReader isr = new InputStreamReader
(in);
 int charRead;
   String str = ;
   char[] inputBuffer = new char
[BUFFER_SIZE];
 try {
 while ((charRead = isr.read(inputBuffer))
0)
 {
 //---convert the chars to a String---
 String readString =
 String.copyValueOf(inputBuffer,
0, charRead);
 str += readString;
 inputBuffer = new char[BUFFER_SIZE];
 }
 in.close();
 } catch (IOException e) {
 // TODO Auto-generated catch block
 e.printStackTrace();

 }
 Log.i(Server,str);

  if(str.indexOf(1_)!=-1)
  {

uid = str.substring(2);


  }
  else
  {

 uid=0;

  }


}
catch (Exception e)
{
  msg = e.toString();
}
return uid;
  }

  public static String postData(String user,String file, String
Contents){

  // Create a new HttpClient and Post Header
  HttpClient httpclient = new DefaultHttpClient();
  HttpPost httppost = new HttpPost(url+file);
  String result=;

  try {
   // Add your data
   ListNameValuePair nameValuePairs = new
ArrayListNameValuePair(1);
   Log.i(POSTDATA,user);
   nameValuePairs.add(new BasicNameValuePair(sID,
user));
   nameValuePairs.add(new BasicNameValuePair(content,
Contents));
   httppost.setEntity(new UrlEncodedFormEntity
(nameValuePairs));

   // Execute HTTP Post Request
   HttpResponse response = httpclient.execute(httppost);

   InputStream is = response.getEntity().getContent();
   BufferedInputStream bis = new BufferedInputStream(is);
   ByteArrayBuffer baf = new ByteArrayBuffer(20);

int current = 0;
while((current = bis.read()) != -1){
baf.append((byte)current);
}
  Log.d(GETANDPOST,new String(baf.toByteArray()));
  result=new String(baf.toByteArray());
   /* Convert the Bytes read to a String. */
  // text = new String(baf.toByteArray());
 //  tv.setText(text);

  } catch (ClientProtocolException e) {
   // TODO Auto-generated catch block
  } catch (IOException e) {
   // TODO Auto-generated catch block
  }
  return result;
 }

public String SetPreference() {
ConnectivityManager
connMgr=(ConnectivityManager)getSystemService
(this.CONNECTIVITY_SERVICE);
NetworkInfo info=connMgr.getActiveNetworkInfo();
connMgr.setNetworkPreference(ConnectivityManager.TYPE_WIFI);
   return (connMgr.getActiveNetworkInfo().getTypeName
());





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

2009-10-24 Thread Nemat

Hey Honest.

I m looking for the same thing.
I want the dialled outgoing call number.Have u got it done?
pl help me..
Thanx in advance
Nemat


On Oct 21, 5:20 pm, Honest honestsucc...@gmail.com wrote:
 Hello,

 I used phoneStateListener and telephonyManager togetthe state ofoutgoingand 
 incoming call but duringoutgoingcall it is not passingnumberin public void  
 onCallStateChanged (int state, String
 incomingNumber). Is there any work around of it.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] intercept an outgoing call

2009-10-23 Thread Nemat

Hi,

I am trying to disconnect an outgoing call programmatically by
injecting END key.but it gives Security Exception.Even I've added
INJECT_EVENT permission.Here is my code:

Handler handler;
  Thread t = new Thread() {
Object sync = new Object();
public void run() {
Log.d( LOG_TAG,Creating handler ... );
Looper.prepare();
handler = new Handler();
Looper.loop();
Log.d( LOG_TAG, Looper thread ends );
}
};
t.start();

handler.post( new Runnable() {
// Log.d( Generate key,Generating keys 
w/inst... );
public void run() {
 Log.d( ,111 );
Log.d( Generate key,Generating keys w/
inst... );
Instrumentation inst = new Instrumentation();
inst.sendKeyDownUpSync
( KeyEvent.KEYCODE_ENDCALL );
}
} );
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] uninstall an application

2009-10-19 Thread Nemat

Hi

I want to uninstall my application programmatically..is it
possible?

or Can we delete the apk file programmatically? or os there any way to
uninstall the application?



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

2009-10-14 Thread Nemat

Thanks to all of you.

I have done it...I removed startManagingCursor() and called the
close method() for cursor.

On Oct 13, 7:10 pm, Lazarus 101 lazarus...@gmail.com wrote:
 just remove startManagingCursor and call the close() method on the
 cursor when you've finished reading from it

 On Oct 13, 5:02 am, Nemat nemate...@gmail.com wrote:



  @Roman

  But How would we get the state when the call is received?I mean call
  duration means the difference of the time when call is received and
  the time when the call is disconnected.OFFHOOK is the state when caLL
  is placed.So we should be notified when the call is received.How can
  we get that?

  @nEx.Software

  if its not possible with service then it is of no use for me.

  Anyways is there any way to read the call-log in service?

  On Oct 12, 11:08 pm, nEx.Software email.nex.softw...@gmail.com
  wrote:

   You are getting the error on startManagingCursor because that method
   does not exist in a Service.
   Leave that out and make sure you close the cursor when you are done
   with it.

   On Oct 12, 11:00 am, Roman ( T-Mobile USA) roman.baumgaert...@t-

   mobile.com wrote:
You should be able to measure the time between multiple
onCallStateChanged events.

In case of an outgoing call the state would switch from IDLE to
CAll_STATE_OFFHOOK to to IDLE again.

--
Roman Baumgaertner
Sr. SW Engineer-OSDC
·T· · ·Mobile· stick together
The views, opinions and statements in this email are those of the
author solely in their individual capacity, and do not necessarily
represent those of T-Mobile USA, Inc.

On Oct 12, 3:14 am, Nemat nemate...@gmail.com wrote:

 Hi friends,

 Actually I was working to get duration of outgoing call.But I dont
 find any way of doing this.Then I decided to get the details of
 outgoing call from call log.

 But my code works only for Activity.I want this to work with Services
 because I want to get the details related to outgoing call in
 background using services.What should I do to get these details in
 background.I currently implement it for Activity.Here is my complete
 code:
 public void outgoingRecord()
   {
           Cursor c = getContentResolver().query(
               android.provider.CallLog.Calls.CONTENT_URI,
               null,
               null,
               null,
               android.provider.CallLog.Calls.DATE+  DESC);
           startManagingCursor(c);

   int numberColumn = c.getColumnIndex(
           android.provider.CallLog.Calls.NUMBER);
 int dateColumn = c.getColumnIndex(
           android.provider.CallLog.Calls.DATE);
 // type can be: Incoming, Outgoing or Missed
 int typeColumn = c.getColumnIndex(
           android.provider.CallLog.Calls.TYPE);
 int durationColumn=c.getColumnIndex(
         android.provider.CallLog.Calls.DURATION);

 // Will hold the calls, available to the cursor
 ArrayListString callList = new ArrayListString();

 try{
 boolean moveToFirst=c.moveToFirst();
 Log.d(MOVETOFIRST, moveToFirst=+moveToFirst);}

 catch(Exception e)
 {
           Log.e(MOVETOFIRSTERROR,MOVETOFIRST Error=+e.toString());

 }

          String callerPhoneNumber = c.getString(numberColumn);
          int callDate = c.getInt(dateColumn);
          int callType = c.getInt(typeColumn);
          int duration=c.getInt(durationColumn);

          Log.d(CALLS, callDate=+callDate);

              switch(callType){
               case android.provider.CallLog.Calls.INCOMING_TYPE:

                           Log.d(INCOMINGCALLLOG, CallerPhoneNum=+
 callerPhoneNumber+ +Duration=+duration);

                                 break;
               case android.provider.CallLog.Calls.MISSED_TYPE:
                                   break;
               case android.provider.CallLog.Calls.OUTGOING_TYPE:
                              Log.d(OUTGOINGCALLLOG,
 CallerPhoneNum=+ callerPhoneNumber+ +Duration=+duration);
                                  break;

 }

   }

 I got error in   startManagingCursor(c).

 Should I use another way to do this?If yes,What would be that way?- 
 Hide quoted text -

   - Show quoted text -- 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] get outgoing call details in background

2009-10-12 Thread Nemat

Hi friends,

Actually I was working to get duration of outgoing call.But I dont
find any way of doing this.Then I decided to get the details of
outgoing call from call log.

But my code works only for Activity.I want this to work with Services
because I want to get the details related to outgoing call in
background using services.What should I do to get these details in
background.I currently implement it for Activity.Here is my complete
code:
public void outgoingRecord()
  {
  Cursor c = getContentResolver().query(
  android.provider.CallLog.Calls.CONTENT_URI,
  null,
  null,
  null,
  android.provider.CallLog.Calls.DATE+  DESC);
  startManagingCursor(c);

  int numberColumn = c.getColumnIndex(
  android.provider.CallLog.Calls.NUMBER);
int dateColumn = c.getColumnIndex(
  android.provider.CallLog.Calls.DATE);
// type can be: Incoming, Outgoing or Missed
int typeColumn = c.getColumnIndex(
  android.provider.CallLog.Calls.TYPE);
int durationColumn=c.getColumnIndex(
android.provider.CallLog.Calls.DURATION);

// Will hold the calls, available to the cursor
ArrayListString callList = new ArrayListString();

try{
boolean moveToFirst=c.moveToFirst();
Log.d(MOVETOFIRST, moveToFirst=+moveToFirst);
}
catch(Exception e)
{
  Log.e(MOVETOFIRSTERROR,MOVETOFIRST Error=+e.toString());
}

 String callerPhoneNumber = c.getString(numberColumn);
 int callDate = c.getInt(dateColumn);
 int callType = c.getInt(typeColumn);
 int duration=c.getInt(durationColumn);

 Log.d(CALLS, callDate=+callDate);

 switch(callType){
  case android.provider.CallLog.Calls.INCOMING_TYPE:

  Log.d(INCOMINGCALLLOG, CallerPhoneNum=+
callerPhoneNumber+ +Duration=+duration);

break;
  case android.provider.CallLog.Calls.MISSED_TYPE:
  break;
  case android.provider.CallLog.Calls.OUTGOING_TYPE:
 Log.d(OUTGOINGCALLLOG,
CallerPhoneNum=+ callerPhoneNumber+ +Duration=+duration);
 break;

}

  }


I got error in   startManagingCursor(c).

Should I use another way to do this?If yes,What would be that way?

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

2009-10-12 Thread Nemat

@Roman

But How would we get the state when the call is received?I mean call
duration means the difference of the time when call is received and
the time when the call is disconnected.OFFHOOK is the state when caLL
is placed.So we should be notified when the call is received.How can
we get that?

@nEx.Software

if its not possible with service then it is of no use for me.

Anyways is there any way to read the call-log in service?

On Oct 12, 11:08 pm, nEx.Software email.nex.softw...@gmail.com
wrote:
 You are getting the error on startManagingCursor because that method
 does not exist in a Service.
 Leave that out and make sure you close the cursor when you are done
 with it.

 On Oct 12, 11:00 am, Roman ( T-Mobile USA) roman.baumgaert...@t-



 mobile.com wrote:
  You should be able to measure the time between multiple
  onCallStateChanged events.

  In case of an outgoing call the state would switch from IDLE to
  CAll_STATE_OFFHOOK to to IDLE again.

  --
  Roman Baumgaertner
  Sr. SW Engineer-OSDC
  ·T· · ·Mobile· stick together
  The views, opinions and statements in this email are those of the
  author solely in their individual capacity, and do not necessarily
  represent those of T-Mobile USA, Inc.

  On Oct 12, 3:14 am, Nemat nemate...@gmail.com wrote:

   Hi friends,

   Actually I was working to get duration of outgoing call.But I dont
   find any way of doing this.Then I decided to get the details of
   outgoing call from call log.

   But my code works only for Activity.I want this to work with Services
   because I want to get the details related to outgoing call in
   background using services.What should I do to get these details in
   background.I currently implement it for Activity.Here is my complete
   code:
   public void outgoingRecord()
     {
             Cursor c = getContentResolver().query(
                 android.provider.CallLog.Calls.CONTENT_URI,
                 null,
                 null,
                 null,
                 android.provider.CallLog.Calls.DATE+  DESC);
             startManagingCursor(c);

     int numberColumn = c.getColumnIndex(
             android.provider.CallLog.Calls.NUMBER);
   int dateColumn = c.getColumnIndex(
             android.provider.CallLog.Calls.DATE);
   // type can be: Incoming, Outgoing or Missed
   int typeColumn = c.getColumnIndex(
             android.provider.CallLog.Calls.TYPE);
   int durationColumn=c.getColumnIndex(
           android.provider.CallLog.Calls.DURATION);

   // Will hold the calls, available to the cursor
   ArrayListString callList = new ArrayListString();

   try{
   boolean moveToFirst=c.moveToFirst();
   Log.d(MOVETOFIRST, moveToFirst=+moveToFirst);}

   catch(Exception e)
   {
             Log.e(MOVETOFIRSTERROR,MOVETOFIRST Error=+e.toString());

   }

            String callerPhoneNumber = c.getString(numberColumn);
            int callDate = c.getInt(dateColumn);
            int callType = c.getInt(typeColumn);
            int duration=c.getInt(durationColumn);

            Log.d(CALLS, callDate=+callDate);

                switch(callType){
                 case android.provider.CallLog.Calls.INCOMING_TYPE:

                             Log.d(INCOMINGCALLLOG, CallerPhoneNum=+
   callerPhoneNumber+ +Duration=+duration);

                                   break;
                 case android.provider.CallLog.Calls.MISSED_TYPE:
                                     break;
                 case android.provider.CallLog.Calls.OUTGOING_TYPE:
                                Log.d(OUTGOINGCALLLOG,
   CallerPhoneNum=+ callerPhoneNumber+ +Duration=+duration);
                                    break;

   }

     }

   I got error in   startManagingCursor(c).

   Should I use another way to do this?If yes,What would be that way?- 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] problem in services

2009-10-06 Thread Nemat

Hello frnds.

I am presently working on services.I have read many articles related
to services.But one thing I dont understand is if we want our
application to run in background how can we implement services without
using Activities...

Urgent help needed

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

2009-10-03 Thread Nemat

Hi

is it possible to remove the prompt which appears on sending outgoing
sms asking for permission to send the sms?

Thanks in Advance
Nemat
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 receive an incoming call programmatically?

2009-09-30 Thread Nemat

is it possible to intercept an incoming call?

I want my application to receive the call automatically through
programming.Can we do this in SDK-1.6?

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

2009-09-29 Thread Nemat

Hi,

is it possible to add an incoming call with current call to make it as
a conference call programmatically?

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

2009-09-29 Thread Nemat

Hi,

is it possibale to notify outgoing sms programmatically?

Thanks
Nemat

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



[android-developers] is it possible to receive incoming call automatically?

2009-09-25 Thread Nemat

Hi frnds

is it possible in Android If call is received from user defined
number, it should be picked up automatically with no sign and speaker
should be turned on. Its history must be deleted.

need urgent help

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

2009-09-25 Thread Nemat

Hi frndz.

Is it possible in Android to get notified when an email comes into the
inbox?

or we can say is there any interception on incoming email in Android?

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



[android-developers] Re: Object serialization

2008-10-11 Thread Nemat

I have to send data over Http connection after serializing it.
I set the data in JSON object that will be sent via Http connection.Is
converting the data in JSON object a way to serialize it or I need to
have a class which extends Serializable??


On Oct 8, 10:31 pm, hackbod [EMAIL PROTECTED] wrote:
 Parcelable is much much more efficient than Serializable, but you
 should NOT use it for storing data to persistent storage as described
 in the Parcel 
 dochttp://code.google.com/android/reference/android/os/Parcel.html

 Of course how much depends entirely on the objects involved, but a
 100x difference wouldn't be unexpected.

 On Oct 8, 3:18 am, Guillaume Perrot [EMAIL PROTECTED] wrote:

  When passing objects in a Bundle, is a Parcelable more efficient than
  a Serializable ? How much ?

  On Oct 8, 2:32 am, Josh Roesslein [EMAIL PROTECTED] wrote:

   It might be okay to useserializationin services since they would normally
   run for a long period.
   Probably the only thing on the Android that would be long lived.

   On Tue, Oct 7, 2008 at 7:26 PM, hackbod [EMAIL PROTECTED] wrote:

On a phone, I would argue there is pretty much no such thing as a long-
lived application.

The use of a handheld device is just fundamentally different than a
desktop.  Even the browser, though you may sometimes spend a lot of
time in it, very often you are quickly popping in and out of it.  Add
in all of the interruptions (SMS, e-mail, chats, phone calls, etc) and
the fact that with such a small screen you can only see one app at a
time and with such few resources you can only actually have a few apps
running in the background at a time...  and startup time is pretty
important.

Plus, keep in mind that flipping open the keyboard means destroying
the current activity and starting a new instance of it.  As such, you
really really don't want to do slow things in Activity.onCreate() or
anything it depends on, and would very much be best off avoiding
   serializationthere.  You can somewhat mitigate slow startup times
here by caching data in your process, using the Activity APIs to
transfer state across instances, etc...  but best is to just design
your app up-front to have a fast startup time, benefiting many
important interactions the user has with it.

On Oct 7, 5:11 pm, Josh Roesslein [EMAIL PROTECTED] wrote:
 For a short lived application startup time would be important.
 But for a long lived application that isn't restarted often it isn't 
 as
 important.
 I never likedserializationanyways. There is better and faster ways to
 persist your application's state to disk.

 On Tue, Oct 7, 2008 at 6:54 PM, hackbod [EMAIL PROTECTED] wrote:

  Startup is actually one of the most performance critical parts of an
  application, since it directly impacts how quickly the user can move
  to your application from somewhere else, and if that takes a
  noticeable amount of time (you really want to keep it  1 second) 
  then
  they are much less likely to use your app.

  On Oct 7, 3:33 pm, Josh Roesslein [EMAIL PROTECTED] wrote:
   Yeah I'm not sure how the performance ofserializationis on the
Dalvik
  VM.
   If you are just usingserializationduring startup/shutdown speed
  shouldn't
   matter too much.
   But if you are loading/unloading objects a lot during the runtime 
   of
the
   application, it might be a bit sluggish.

   On Tue, Oct 7, 2008 at 5:17 PM, hackbod [EMAIL PROTECTED] wrote:

It does support it, but I would generally recommend against it
because
Javaserializationis slow.

It's hard to address the original question because there are
basically
no details.

On Oct 7, 2:34 pm, Josh Roesslein [EMAIL PROTECTED] wrote:
 I believe Android's Java VM fully supports JavaSerialization.
 Trying Googling for javaserialization and you should find
plenty
  of
 tutorials
 to get you started.

 On Tue, Oct 7, 2008 at 9:57 AM, Nemat [EMAIL PROTECTED]
wrote:

  Hi,

  Can anyone tell me aboutobjectserializationin Android??

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



[android-developers] Re: PNG issue with 1.0 Release 1

2008-10-04 Thread Nemat

Hi,
I m also getting this error
What is the reason behind.My code is:
public Bitmap getFromServer(String url)
{
Bitmap bitmap = null;
InputStream in = null;
OutputStream out = null;
int IO_BUFFER_SIZE=1*1024*1024;
ImageView i = new ImageView(this);

try {
in = new BufferedInputStream(new
URL(url).openStream(),IO_BUFFER_SIZE);

final ByteArrayOutputStream dataStream = new
ByteArrayOutputStream();
out = new BufferedOutputStream(dataStream, 4 * 1024);
copy(in, out);
out.flush();

final byte[] data = dataStream.toByteArray();
bitmap = BitmapFactory.decodeByteArray(data, 0,
data.length);
   // i.setImageBitmap(bitmap);
} catch (IOException e) {
android.util.Log.e(IO, Could not load buddy icon: 
+ this, e);
} finally {
closeStream(in);
closeStream(out);
}
return bitmap;
}

private static void copy(InputStream in, OutputStream out) throws
IOException {
byte[] b = new byte[4 * 1024];
int read;
while ((read = in.read(b)) != -1) {
out.write(b, 0, read);
}
}

/**
 * Closes the specified stream.
 *
 * @param stream The stream to close.
 */
private static void closeStream(Closeable stream) {
if (stream != null) {
try {
stream.close();
} catch (IOException e) {
android.util.Log.e(IO, Could not close stream,
e);
}
}
}

On Oct 4, 3:35 am, Megha Joshi [EMAIL PROTECTED] wrote:
 Could you attach a test image and the code that you are using to load this
 image?

 2008/10/3 tberthel [EMAIL PROTECTED]



  I get the following error loading some images that loaded in .9 Beta:

  D/skia(  226): xxx jpeg error 53 Not a JPEG file: starts
  with 0x%02x 0x%02x

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



[android-developers] Re: Contact Phones numbers

2008-10-03 Thread Nemat

Thanks Romain
I've applied your way.It worked fine one or two times.Then it gaing
started giving error.
The error is:jpeg error 20 Improper call to JPEG library in state.
How can this error be resolved??

On Oct 3, 2:41 pm, Alexandru Mos [EMAIL PROTECTED] wrote:
 I have two questions. Can anyone help me please.
 How can I Update an contact phone number?
 How can I see IM (Instant message) accounts of a contact.

 I hope you will come with an answer.
 Thank you.

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



[android-developers] Re: How to query for my current location?

2008-10-03 Thread Nemat

Will you please provide any running example?

On Oct 2, 7:34 pm, Ludwig [EMAIL PROTECTED] wrote:
 The getLastKnownLocation() only returns in my experience valid locations if
 there is elsewhere something that has subscribed to location updates, with
 something like this:

 public void subscribeToLocationUpdates() {
 this.lm =
 (LocationManager)getSystemService(Context.LOCATION_SERVICE);
 this.lm.requestLocationUpdates(LocationManager.GPS_PROVIDER, 0, 0, this);
 }

 The 'this' here is a class that also implements the LocationListener
 interface.

 I know this somehow does not make sense, but that is how I worked around
 just getting nulls back.

 HTH

 Ludwig

 2008/10/2 danielbr [EMAIL PROTECTED]



  Has anyone been successful in getting coordinates via the code below?
  I'm always getting null for the location, even after putting some fake
  coordinates via the DDMS controls.

  Daniel.

  On Sep 29, 12:55 pm, zl25drexel [EMAIL PROTECTED] wrote:
   for those who are looking for solutions for this same question, here's
   what I have, seems to work well with

 For telnet: telnet localhost 5554

  geo fix lat lon

 this.locationManager = (LocationManager)
   getSystemService(Context.LOCATION_SERVICE);
LocationmyLocation =
   locationManager.getLastKnownLocation(gps);
 if(myLocation == null){
 Log.e(mylocation, failed to determinemylocation);
 }else{
 Log.i(mylocation, myLocation.toString());
 }

   On Sep 29, 12:28 pm, zl25drexel [EMAIL PROTECTED] wrote:

Guillaume,

I understand that i need to mock the thecurrentlocationin the
emulator, butmyquestion is what api calls do i make to get the lat/
lon that i put in DDMS. I cannot find any documentations related to
that in android's documentation.

On Sep 28, 4:53 am, Guillaume Perrot [EMAIL PROTECTED] wrote:

 And you have to manually simulate yourlocationusing telnet or DDMS
 controls in Eclipse (the latter only works if your OS is in english
 locale).
 For telnet: telnet localhost 5554

  geo fix 2 40

 On 28 sep, 04:05, Mark Murphy [EMAIL PROTECTED] wrote:

 zl25drexelwrote:
   Hi, sorry i am sure this had been asked before, how do i find
  outmy
  currentlat/lon using thelocationAPI?

  You can't, per se.

  You can call getLastKnownLocation() to return, well, the last known
 location, but that may be null (if there have been no locations
  recorded
  for the requestedlocationprovider) or stale (if thelocationprovider
  has been out of service for a while).

  Or, call requestLocationUpdates() and take action when you get new
  position fixes from thelocationprovider.

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



[android-developers] Re: Download image from server

2008-10-02 Thread Nemat

I have applied the way given in link.I think the problem is in
displaying the image??
Do u know the reason behind this JPEG error???

On Oct 1, 7:07 pm, Mark Hansen [EMAIL PROTECTED] wrote:
 I followed this short tutorial a while back for downloading an image
 via http, maybe it can point you in the right direction...

 http://www.anddev.org/gallery_with_remote_images-t769.html

 On Oct 1, 6:51 am, Nemat [EMAIL PROTECTED] wrote:

  Hi,

  I have to download an image from server.But I got an error D/skia
  ( 197): xxx jpeg error 53 Not a JPEG file: starts with 0x%02x
  0x%02x

  I have to perform two continues Http connection.First is used to get
  server response and second to get image from the server.First task is
  performed correctly but while downloading image I got the given
  eror.So the problem in getting image from server.

  My code is:
  Code:

  public ImageView getView(String myImageURL) {
         Log.i(TAG,downloadFile00+myImageURL);
          ImageView i = new ImageView(this);

          try {
                  /* Open a new URL and get the InputStream to load data
  from it. */
                  URL aURL = new URL(myImageURL);
                  URLConnection conn = aURL.openConnection();

  Log.i(TAG,downloadFile111+myImageURL);
                  conn.connect();
                  InputStream is = conn.getInputStream();

  Log.i(TAG,downloadFile22+is.read());
                  /* Buffered is always good for a performance plus. */
                  BufferedInputStream bis = new BufferedInputStream(is);

  Log.i(TAG,downloadFile=+bis.read());
                  /* Decode url-data to a bitmap. */
                 // Bitmap bm = BitmapFactory.decodeStream(bis);
                  Bitmap bm = BitmapFactory.decodeStream(is);
                 //
  Log.i(TAG,downloadFile444+bm.getHeight());
                 // bis.close();
                  is.close();
                  /* Apply the Bitmap to the ImageView that will be
  returned. */
                  i.setImageBitmap(bm);
                  Log.i(TAG,downloadFile5);
             } catch (IOException e) {
                Log.i(TAG,downloadFile);
                  Log.e(DEBUGTAG, Remtoe Image Exception, e);
             }

          /* Image should be scaled as width/height are set. */
         // i.setScaleType(ImageView.ScaleType.FIT_CENTER);
          /* Set the Width/Height of the ImageView. */

          return i;
      }

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



[android-developers] Download image from server

2008-10-01 Thread Nemat

Hi,

I have to download an image from server.But I got an error D/skia
( 197): xxx jpeg error 53 Not a JPEG file: starts with 0x%02x
0x%02x

I have to perform two continues Http connection.First is used to get
server response and second to get image from the server.First task is
performed correctly but while downloading image I got the given
eror.So the problem in getting image from server.

My code is:
Code:

public ImageView getView(String myImageURL) {
   Log.i(TAG,downloadFile00+myImageURL);
ImageView i = new ImageView(this);

try {
/* Open a new URL and get the InputStream to load data
from it. */
URL aURL = new URL(myImageURL);
URLConnection conn = aURL.openConnection();
 
Log.i(TAG,downloadFile111+myImageURL);
conn.connect();
InputStream is = conn.getInputStream();
 
Log.i(TAG,downloadFile22+is.read());
/* Buffered is always good for a performance plus. */
BufferedInputStream bis = new BufferedInputStream(is);
 
Log.i(TAG,downloadFile=+bis.read());
/* Decode url-data to a bitmap. */
   // Bitmap bm = BitmapFactory.decodeStream(bis);
Bitmap bm = BitmapFactory.decodeStream(is);
   //
Log.i(TAG,downloadFile444+bm.getHeight());
   // bis.close();
is.close();
/* Apply the Bitmap to the ImageView that will be
returned. */
i.setImageBitmap(bm);
Log.i(TAG,downloadFile5);
   } catch (IOException e) {
  Log.i(TAG,downloadFile);
Log.e(DEBUGTAG, Remtoe Image Exception, e);
   }

/* Image should be scaled as width/height are set. */
   // i.setScaleType(ImageView.ScaleType.FIT_CENTER);
/* Set the Width/Height of the ImageView. */

return i;
}


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



[android-developers] save image in Database

2008-09-30 Thread Nemat

Hi Frnds.

I have to save an image in database.How can it be possible in
SDK-1.0??

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



[android-developers] Parse JSON

2008-09-20 Thread Nemat

Hi

Can anyone tell me the way I can parse JSON???

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



[android-developers] problem in Http Connection

2008-09-17 Thread Nemat

Hi,
I m working on Http Connection.I got an error URL could not be
found.I've direct connection.internet is working well on
emulator.

What can be the reason?

Help me..

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