[android-developers] H.264 MediaCodec SPS PPS

2015-07-24 Thread Ankur Avlani
Hi All,

I am trying to get RAW YV12 frames (from onPreviewFrame) and convert the
same the H.264, using MediaCodec class.  So far i have not been able to
convert the H.264 successfully.  The reason being not sure how to extract
the NAL (SPS and PPS ) info and add it to the Encoder.   My sample code for
deque is as below.


final int TIMEOUT_USEC = 100;
byte idrFrameType = 0x65;
if (VERBOSE) Log.d(TAG, drainEncoder( + endOfStream + ));
ByteBuffer[] outputBuffers = encoder.getOutputBuffers();
int outputBufferIndex = encoder.dequeueOutputBuffer(bufferInfo,0);
while (outputBufferIndex = 0) {
ByteBuffer outputBuffer = outputBuffers[outputBufferIndex];
byte[] outData = new byte[bufferInfo.size];
outputBuffer.get(outData);
try {
stream.write(outData);
} catch (IOException e) {
e.printStackTrace();
}
Log.d(AvcEncoder, outData.length +  bytes written);

encoder.releaseOutputBuffer(outputBufferIndex, false);
outputBufferIndex = encoder.dequeueOutputBuffer(bufferInfo, 0);
}



I have even tried the INFO_OUTPUT_FORMAT_CHANGED but that didnt help
either.   Currently i am writing the data to a file, but the big
picture is to stream to a server.  When i try to play the save file
with the default android player it never plays.


Thanks,

Ankur.

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


[android-developers] Playing m3u8 URL in android

2014-03-04 Thread Ankur Avlani
Hi

I am trying to play a m3u8 URL using android mediaplayer on nexus7 using
android 4.4 APIs. The video plays for 5 sec and them just hangs.  Is
presumption right that android supports m3u8.  But then curious as to why
it hangs??

Any help is appreciated.

Thanks and regards,
Ankur.

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


Re: [android-developers] TextView maxLines based on height

2014-02-17 Thread Ankur Avlani
Hi,

I guess now i have understood my issue and can explain it much better and
clearly.

I am loading all my view dynamically in a Horizontal ViewGroup.  Inside one
view there a collection of pictures along with text and the bottom.  I have
the width and height of the view fixed (When creating a view i pass the
width and height to the layout params).

The image is loaded dynamically, till then a loading icon is display.  But
the text is already display in the TextView.  The visible lineCount that I
get before the image is different than the lineCount that I actually
displayed after the Image is loaded.  I want to revalidate the whole view
again after the image loading and displayed in the UI.

I tried sevaral methods to revalidate the TextView, the Layouts, but none
of it help me to get the correct visible line count after image is loaded.

-Ankur.


On Sat, Feb 15, 2014 at 5:27 PM, Ralph Bergmann | the4thFloor.eu 
ra...@the4thfloor.eu wrote:

 Am 13.02.14 03:54, schrieb Ankur Avlani:
  Can someone please suggest me some faster was to achieve my requirement.

 try this one:

 /**
  * Calculates the lines needed to show the text.
  *
  * @param paint
  *   the TextPaint from the TextView
  * @param text
  *   the text for the calculation
  * @param textAppearance
  *   text typeface, size, and style
  * @param avail
  *   the available width
  * @return the number of lines needed to show the text
  */
 public static int neededLines(final TextPaint paint, final String text,
 final TextAppearanceSpan textAppearance, final int avail) {

if (TextUtils.isEmpty(text)) {
   return 0;
}

final TextPaint textPaint = new TextPaint();
textPaint.set(paint);

textPaint.setTextSize(textAppearance.getTextSize());
textPaint.setTypeface(Typeface.create(textAppearance.getFamily(),
 textAppearance.getTextStyle()));

final StaticLayout layout = new StaticLayout(text, textPaint, avail,
 Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
final int lineCount = layout.getLineCount();

return lineCount;
 }



 Ralph



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


[android-developers] Re: TextView maxLines based on height

2014-02-13 Thread Ankur Avlani

 Hi All,

 I am designing an native custom article view in android.  My requirement
 is such that I have a long text which i need to break into pages.  I can
 find out the total height of my TextView, how do i calculate the max
 visible lines for the view based on the height?

 I know Paint.breakText will do for me, but its very slow.  Please have a
 look at the following code snippet:

 public static int getTextLineCountForHeight(String text, int maxWidth,
 float textSize, Typeface typeface, int maxHeight) {
  TextPaint paint = new TextPaint(Paint.LINEAR_TEXT_FLAG |
 Paint.SUBPIXEL_TEXT_FLAG);
 paint.setTextSize(textSize);
  paint.setTypeface(typeface);

 int lineCount = 0;

 int index = 0;
  int length = text.length();
 Rect bounds = new Rect();
 bounds.setEmpty();
  while(index  length - 1) {
 bounds.setEmpty();
 index += paint.breakText(text, index, length, true, maxWidth, null);
  lineCount++;
 paint.getTextBounds(Py, 0, 2, bounds);
 if((int)Math.floor(lineCount * bounds.height())=maxHeight){
  return lineCount;
 }

 }

  return lineCount;
 }

 textView.getHeight()/textView.getLineHeight() doesnt give me the correct
visible lines.

Can someone please suggest me some faster was to achieve my requirement.

 Any help is highly appreciated.

 -Ankur.


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


[android-developers] TextView maxLines based on height

2014-02-12 Thread Ankur Avlani
Hi All,

I am designing an native custom article view in android.  My requirement is
such that I have a long text which i need to break into pages.  I can
find out the total height of my TextView, how do i calculate the max
visible lines for the view based on the height?

I know Paint.breakText will do for me, but its very slow.  Please have a
look at the following code snippet:

public static int getTextLineCountForHeight(String text, int maxWidth,
float textSize, Typeface typeface, int maxHeight) {
TextPaint paint = new TextPaint(Paint.LINEAR_TEXT_FLAG |
Paint.SUBPIXEL_TEXT_FLAG);
paint.setTextSize(textSize);
paint.setTypeface(typeface);

int lineCount = 0;

int index = 0;
int length = text.length();
Rect bounds = new Rect();
bounds.setEmpty();
while(index  length - 1) {
bounds.setEmpty();
index += paint.breakText(text, index, length, true, maxWidth, null);
lineCount++;
paint.getTextBounds(Py, 0, 2, bounds);
if((int)Math.floor(lineCount * bounds.height())=maxHeight){
return lineCount;
}

}

return lineCount;
}

Can someone please suggest me some faster was to achieve my requirement.

Any help is highly appreciated.

-Ankur.

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


[android-developers] Android 4.4 WebView cannot load content:// urls in html page

2014-01-10 Thread Ankur Avlani
We found some behavior changes on Kitkat's new Chromium webview
implementation.  One issue we encountered was the content:// urls in
a downloaded html page are no longer getting loaded via the content
provider. I was able to put together a small Android app to
demonstrate this behavior change
(https://github.com/lhwa/KitkatWebviewTest). When the page contains an
image src url in content:// scheme, the image cannot be loaded on
Kitkat and we get the following errors in logcat:

INFO/chromium(6759): [INFO:CONSOLE(9)] Not allowed to load local
resource: content://com.testing.image/kitkat.png, source:
https://googledrive.com/host/0B6yymhTJtX7ZRVdoRjNuWDA5NGc/example.html
(9)

The image can be loaded correctly in webview on Android 4.3 and priori
versions. I was not able to find any websettings to work around this
on Kitkat.  Can anyone help address this behavior change on Kitkat? Or
share some insights on the given error and suggest any workaround?


Thanks and regards,

Ankur.

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


[android-developers] GoogleTV USB Access

2012-11-28 Thread Ankur Avlani
Hi All,

I am trying to develop a Image explorer in Google TV.  I want to find out a
way to access the USB contents (maybe File IO), once the USB is connected.
 I did a lot of google search but couldnt find relevant answers.
 USBManager and USBDevice class in the API didnt help me much to find the
path of USB.  Can i safely use /mnt/media path, I am not confident that
this path is same for ALL devices.

Any help is appreciated.

Thanks and regards,
Ankur.

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

Re: [android-developers] Re: ContentProvider Memory Leak

2011-12-21 Thread Ankur Avlani
I am developing an application which will help the user view the local sd
card images in web view.

Do we have some better way of displaying sd card images in web view?.

Thanks and regards,
Ankur

On Wed, Dec 21, 2011 at 8:47 AM, Duygu Kahraman
duygu.kahram...@gmail.comwrote:

 What do you want to do? Which picture you are storing? İf you can
 explain,we can learn this is the correct way or not?

 21 Aralık 2011 17:44 tarihinde alexb alexboot...@gmail.com yazdı:

 Why not storing the files on sdcard and passing only the names?

 On Dec 19, 7:01 pm, Ankur Avlani ankuravl...@gmail.com wrote:
  Hi All ,
 
  I am developing an application in WebView.  We serve android sd card
 images
  (average 3 MB per image) using ContentProvider in web view.  Please see
 the
  sample code below:
 
  public class LocalImageContentProvider extends ContentProvider {
  @Override
  public ParcelFileDescriptor openFile(Uri uri, String mode) throws
  FileNotFoundException {
  try {
  String path = uri.getPath();
  File file = new File(path);
 
  ParcelFileDescriptor parcel =
 ParcelFileDescriptor.open(file,
  ParcelFileDescriptor.MODE_READ_ONLY);
  return parcel;
  } catch (IOException e) {
  // TODO Auto-generated catch block
 
  e.printStackTrace();
  }
  return null;
  }
 
  }
 
  This works fine for the first 50-60 images.  But when i start browsing
 more
  images, I see that the memory increaseing and Android starts closing
  background process to free up memory and finally the core process
 shutsdown
  and my app crashes.
 
  Question is, is there anything that I need to add in the above code to
 make
  is more robust and not occupy unnecessary memory.
 
  Thanks and regards
  Ankur

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




 --
 ---
 Duygu Kahraman

 http://tr.linkedin.com/in/duygukahramann

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

2011-12-19 Thread Ankur Avlani
Hi All ,

I am developing an application in WebView.  We serve android sd card images
(average 3 MB per image) using ContentProvider in web view.  Please see the
sample code below:

public class LocalImageContentProvider extends ContentProvider {
@Override
public ParcelFileDescriptor openFile(Uri uri, String mode) throws
FileNotFoundException {
try {
String path = uri.getPath();
File file = new File(path);

ParcelFileDescriptor parcel = ParcelFileDescriptor.open(file,
ParcelFileDescriptor.MODE_READ_ONLY);
return parcel;
} catch (IOException e) {
// TODO Auto-generated catch block

e.printStackTrace();
}
return null;
}
}

This works fine for the first 50-60 images.  But when i start browsing more
images, I see that the memory increaseing and Android starts closing
background process to free up memory and finally the core process shutsdown
and my app crashes.

Question is, is there anything that I need to add in the above code to make
is more robust and not occupy unnecessary memory.

Thanks and regards
Ankur

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

Re: [android-developers] ManagedQuery for Images returns null

2011-11-09 Thread Ankur Avlani
I have set the permissions, because of which it works on 2 devices.  My
only concern is the code is not consistent on all devices, not sure what
mistake I have done.

-Ankur.

On Tue, Nov 8, 2011 at 9:09 PM, Pawan Singh Rathore 
pawan.s.rath...@gmail.com wrote:

 Have you set permission to access SDCard in manifest file ?
 These silly mistakes I often do.
 Thanks  BR,
 Pawan Rathore




 On Wed, Nov 9, 2011 at 10:09 AM, Ankur Avlani ankuravl...@gmail.comwrote:

 Hi,

 The following code returns a null Cursor to me

 String[] projection = {MediaStore.Images.Media._ID};
  // Create the cursor pointing to the SDCard
 Cursor cursor = managedQuery(
 MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
  projection, // Which columns to return
 null,   // Return all rows
  null,
 null);

 I have tried the code on 3 devices, 2 devices it works fine, 1 devices it
 returns null.  Can someone guide me a better way to get image details from
 android SQL Lite, so that it works on all devices. (These devices are
 android 2.3).

 Also, I am not able to query using where clause, basically I want to just
 get incremental cursor of 10 records on each user interaction.

 Any pointers is appreciated.


 Thanks,
 Ankur

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


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

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

2011-11-08 Thread Ankur Avlani
Hi,

The following code returns a null Cursor to me

String[] projection = {MediaStore.Images.Media._ID};
// Create the cursor pointing to the SDCard
Cursor cursor = managedQuery( MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
projection, // Which columns to return
null,   // Return all rows
null,
null);

I have tried the code on 3 devices, 2 devices it works fine, 1 devices it
returns null.  Can someone guide me a better way to get image details from
android SQL Lite, so that it works on all devices. (These devices are
android 2.3).

Also, I am not able to query using where clause, basically I want to just
get incremental cursor of 10 records on each user interaction.

Any pointers is appreciated.


Thanks,
Ankur

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

Re: [android-developers] Re: Nullpointer on fresh app install

2011-10-31 Thread Ankur Avlani
I opened the apk to verify whether the icon is there or not and it exists
inside the apk.

-Ankur.

On Sat, Oct 29, 2011 at 11:41 AM, Belvedere Computer Services 
fa829...@gmail.com wrote:


 you have a NullPointerException on an icon that is not there in
 ContextImpl

 possibly several of them ~ the installer is not the cause of the NPE

 On Oct 29, 12:43 am, Ankur Avlani ankuravl...@gmail.com wrote:
  When I try to Install the APK that's when I get this error.  It just
 happens
  on this device.
 
  On Fri, Oct 28, 2011 at 10:32 PM, Kristopher Micinski 
 
 
 
 
 
 
 
  krismicin...@gmail.com wrote:
   what is mCurrentContent in your program?  Typically when you freshly
   install an app, you might not have set up databases that you expect to
   have (for example, in development), and so you might get null refs
   when you try to look up things that just haven't been created.  Are
   you saying this problem goes away after using the app for a while?  Or
   that it's just an anomaly of this particular device.
 
   Kris
 
   On Sat, Oct 29, 2011 at 12:59 AM, Ankur Avlani ankuravl...@gmail.com
   wrote:
Hi,
I have been trying to install the my APK on my device and I get the
following exception:
 
10-28 16:45:18.150 I/InstallAppProgress(32006): Finished installing
com.wellcore.newyu
10-28 16:45:18.207 W/FileManagerApp(32056): FileManagerActivity:
 onResume
called, mCurrentContent ==nomulti
10-28 16:45:18.207 W/FileManagerApp(32056): FileManagerActivity:
stopActivityThread
10-28 16:45:18.207 W/FileManagerApp(32056): FileManagerActivity:
updateAdapter !
10-28 16:45:18.207 W/FileManagerApp(32056): FileManagerActivity:
   emptylist
10-28 16:45:18.207 W/FileManagerApp(32056): FileManagerActivity:
 Refresh
List
10-28 16:45:18.217 W/FileManagerApp(32056): DirectoryScanner:
 Scanning
directory /mnt/sdcard/Messaging
10-28 16:45:18.247 W/PackageManager(32056): Failure retrieving icon
0x7f020029 in package com.wellcore.newyu
10-28 16:45:18.247 W/PackageManager(32056):
   java.lang.NullPointerException
10-28 16:45:18.247 W/PackageManager(32056):   at
   
 android.app.ActivityThread$ResourcesKey.init(ActivityThread.java:1138)
10-28 16:45:18.247 W/PackageManager(32056):   at
   
 android.app.ActivityThread.getTopLevelResources(ActivityThread.java:1207)
10-28 16:45:18.247 W/PackageManager(32056):   at
   
 android.app.ActivityThread.getTopLevelResources(ActivityThread.java:1266)
10-28 16:45:18.247 W/PackageManager(32056):   at
 
  
 android.app.ContextImpl$ApplicationPackageManager.getResourcesForApplicatio
 n(ContextImpl.java:2439)
10-28 16:45:18.247 W/PackageManager(32056):   at
 
  
 android.app.ContextImpl$ApplicationPackageManager.getDrawable(ContextImpl.j
 ava:2332)
10-28 16:45:18.247 W/PackageManager(32056):   at
android.content.pm.PackageItemInfo.loadIcon(PackageItemInfo.java:140)
10-28 16:45:18.247 W/PackageManager(32056):   at
 
  
 android.app.ContextImpl$ApplicationPackageManager.getApplicationIcon(Contex
 tImpl.java:2387)
10-28 16:45:18.247 W/PackageManager(32056):   at
 
  
 com.motorola.filemanager.utils.IconifiedText.buildIconItem(IconifiedText.ja
 va:287)
10-28 16:45:18.247 W/PackageManager(32056):   at
 
  
 com.motorola.filemanager.local.DirectoryScanner.run(DirectoryScanner.java:8
 3)
10-28 16:45:18.267 W/PackageManager(32056): Failure retrieving icon
0x7f020029 in package com.wellcore.newyu
10-28 16:45:18.267 W/PackageManager(32056):
   java.lang.NullPointerException
10-28 16:45:18.267 W/PackageManager(32056):   at
   
 android.app.ActivityThread$ResourcesKey.init(ActivityThread.java:1138)
10-28 16:45:18.267 W/PackageManager(32056):   at
   
 android.app.ActivityThread.getTopLevelResources(ActivityThread.java:1207)
10-28 16:45:18.267 W/PackageManager(32056):   at
   
 android.app.ActivityThread.getTopLevelResources(ActivityThread.java:1266)
10-28 16:45:18.267 W/PackageManager(32056):   at
 
  
 android.app.ContextImpl$ApplicationPackageManager.getResourcesForApplicatio
 n(ContextImpl.java:2439)
10-28 16:45:18.267 W/PackageManager(32056):   at
 
  
 android.app.ContextImpl$ApplicationPackageManager.getDrawable(ContextImpl.j
 ava:2332)
10-28 16:45:18.267 W/PackageManager(32056):   at
android.content.pm.PackageItemInfo.loadIcon(PackageItemInfo.java:140)
10-28 16:45:18.267 W/PackageManager(32056):   at
 
  
 android.app.ContextImpl$ApplicationPackageManager.getApplicationIcon(Contex
 tImpl.java:2387)
10-28 16:45:18.267 W/PackageManager(32056):   at
 
  
 com.motorola.filemanager.utils.IconifiedText.buildIconItem(IconifiedText.ja
 va:287)
10-28 16:45:18.267 W/PackageManager(32056):   at
 
  
 com.motorola.filemanager.local.DirectoryScanner.run(DirectoryScanner.java:8
 3)
10-28 16:45:18.267 W/FileManagerApp(32056): DirectoryScanner: Sending
   data
back to main thread
 
Any pointers what this means?  It works on other devices

[android-developers] Nullpointer on fresh app install

2011-10-28 Thread Ankur Avlani
Hi,

I have been trying to install the my APK on my device and I get the
following exception:

10-28 16:45:18.150 I/InstallAppProgress(32006): Finished installing
com.wellcore.newyu
10-28 16:45:18.207 W/FileManagerApp(32056): FileManagerActivity:
onResume called, mCurrentContent ==nomulti
10-28 16:45:18.207 W/FileManagerApp(32056): FileManagerActivity:
stopActivityThread
10-28 16:45:18.207 W/FileManagerApp(32056): FileManagerActivity:
updateAdapter !
10-28 16:45:18.207 W/FileManagerApp(32056): FileManagerActivity: emptylist
10-28 16:45:18.207 W/FileManagerApp(32056): FileManagerActivity: Refresh List
10-28 16:45:18.217 W/FileManagerApp(32056): DirectoryScanner: Scanning
directory /mnt/sdcard/Messaging
10-28 16:45:18.247 W/PackageManager(32056): Failure retrieving icon
0x7f020029 in package com.wellcore.newyu
10-28 16:45:18.247 W/PackageManager(32056): java.lang.NullPointerException
10-28 16:45:18.247 W/PackageManager(32056): at
android.app.ActivityThread$ResourcesKey.init(ActivityThread.java:1138)
10-28 16:45:18.247 W/PackageManager(32056): at
android.app.ActivityThread.getTopLevelResources(ActivityThread.java:1207)
10-28 16:45:18.247 W/PackageManager(32056): at
android.app.ActivityThread.getTopLevelResources(ActivityThread.java:1266)
10-28 16:45:18.247 W/PackageManager(32056): at
android.app.ContextImpl$ApplicationPackageManager.getResourcesForApplication(ContextImpl.java:2439)
10-28 16:45:18.247 W/PackageManager(32056): at
android.app.ContextImpl$ApplicationPackageManager.getDrawable(ContextImpl.java:2332)
10-28 16:45:18.247 W/PackageManager(32056): at
android.content.pm.PackageItemInfo.loadIcon(PackageItemInfo.java:140)
10-28 16:45:18.247 W/PackageManager(32056): at
android.app.ContextImpl$ApplicationPackageManager.getApplicationIcon(ContextImpl.java:2387)
10-28 16:45:18.247 W/PackageManager(32056): at
com.motorola.filemanager.utils.IconifiedText.buildIconItem(IconifiedText.java:287)
10-28 16:45:18.247 W/PackageManager(32056): at
com.motorola.filemanager.local.DirectoryScanner.run(DirectoryScanner.java:83)
10-28 16:45:18.267 W/PackageManager(32056): Failure retrieving icon
0x7f020029 in package com.wellcore.newyu
10-28 16:45:18.267 W/PackageManager(32056): java.lang.NullPointerException
10-28 16:45:18.267 W/PackageManager(32056): at
android.app.ActivityThread$ResourcesKey.init(ActivityThread.java:1138)
10-28 16:45:18.267 W/PackageManager(32056): at
android.app.ActivityThread.getTopLevelResources(ActivityThread.java:1207)
10-28 16:45:18.267 W/PackageManager(32056): at
android.app.ActivityThread.getTopLevelResources(ActivityThread.java:1266)
10-28 16:45:18.267 W/PackageManager(32056): at
android.app.ContextImpl$ApplicationPackageManager.getResourcesForApplication(ContextImpl.java:2439)
10-28 16:45:18.267 W/PackageManager(32056): at
android.app.ContextImpl$ApplicationPackageManager.getDrawable(ContextImpl.java:2332)
10-28 16:45:18.267 W/PackageManager(32056): at
android.content.pm.PackageItemInfo.loadIcon(PackageItemInfo.java:140)
10-28 16:45:18.267 W/PackageManager(32056): at
android.app.ContextImpl$ApplicationPackageManager.getApplicationIcon(ContextImpl.java:2387)
10-28 16:45:18.267 W/PackageManager(32056): at
com.motorola.filemanager.utils.IconifiedText.buildIconItem(IconifiedText.java:287)
10-28 16:45:18.267 W/PackageManager(32056): at
com.motorola.filemanager.local.DirectoryScanner.run(DirectoryScanner.java:83)
10-28 16:45:18.267 W/FileManagerApp(32056): DirectoryScanner: Sending
data back to main thread

Any pointers what this means?  It works on other devices.


-Ankur.

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

Re: [android-developers] Nullpointer on fresh app install

2011-10-28 Thread Ankur Avlani
When I try to Install the APK that's when I get this error.  It just happens
on this device.

On Fri, Oct 28, 2011 at 10:32 PM, Kristopher Micinski 
krismicin...@gmail.com wrote:

 what is mCurrentContent in your program?  Typically when you freshly
 install an app, you might not have set up databases that you expect to
 have (for example, in development), and so you might get null refs
 when you try to look up things that just haven't been created.  Are
 you saying this problem goes away after using the app for a while?  Or
 that it's just an anomaly of this particular device.

 Kris

 On Sat, Oct 29, 2011 at 12:59 AM, Ankur Avlani ankuravl...@gmail.com
 wrote:
  Hi,
  I have been trying to install the my APK on my device and I get the
  following exception:
 
  10-28 16:45:18.150 I/InstallAppProgress(32006): Finished installing
  com.wellcore.newyu
  10-28 16:45:18.207 W/FileManagerApp(32056): FileManagerActivity: onResume
  called, mCurrentContent ==nomulti
  10-28 16:45:18.207 W/FileManagerApp(32056): FileManagerActivity:
  stopActivityThread
  10-28 16:45:18.207 W/FileManagerApp(32056): FileManagerActivity:
  updateAdapter !
  10-28 16:45:18.207 W/FileManagerApp(32056): FileManagerActivity:
 emptylist
  10-28 16:45:18.207 W/FileManagerApp(32056): FileManagerActivity: Refresh
  List
  10-28 16:45:18.217 W/FileManagerApp(32056): DirectoryScanner: Scanning
  directory /mnt/sdcard/Messaging
  10-28 16:45:18.247 W/PackageManager(32056): Failure retrieving icon
  0x7f020029 in package com.wellcore.newyu
  10-28 16:45:18.247 W/PackageManager(32056):
 java.lang.NullPointerException
  10-28 16:45:18.247 W/PackageManager(32056):   at
  android.app.ActivityThread$ResourcesKey.init(ActivityThread.java:1138)
  10-28 16:45:18.247 W/PackageManager(32056):   at
  android.app.ActivityThread.getTopLevelResources(ActivityThread.java:1207)
  10-28 16:45:18.247 W/PackageManager(32056):   at
  android.app.ActivityThread.getTopLevelResources(ActivityThread.java:1266)
  10-28 16:45:18.247 W/PackageManager(32056):   at
 
 android.app.ContextImpl$ApplicationPackageManager.getResourcesForApplication(ContextImpl.java:2439)
  10-28 16:45:18.247 W/PackageManager(32056):   at
 
 android.app.ContextImpl$ApplicationPackageManager.getDrawable(ContextImpl.java:2332)
  10-28 16:45:18.247 W/PackageManager(32056):   at
  android.content.pm.PackageItemInfo.loadIcon(PackageItemInfo.java:140)
  10-28 16:45:18.247 W/PackageManager(32056):   at
 
 android.app.ContextImpl$ApplicationPackageManager.getApplicationIcon(ContextImpl.java:2387)
  10-28 16:45:18.247 W/PackageManager(32056):   at
 
 com.motorola.filemanager.utils.IconifiedText.buildIconItem(IconifiedText.java:287)
  10-28 16:45:18.247 W/PackageManager(32056):   at
 
 com.motorola.filemanager.local.DirectoryScanner.run(DirectoryScanner.java:83)
  10-28 16:45:18.267 W/PackageManager(32056): Failure retrieving icon
  0x7f020029 in package com.wellcore.newyu
  10-28 16:45:18.267 W/PackageManager(32056):
 java.lang.NullPointerException
  10-28 16:45:18.267 W/PackageManager(32056):   at
  android.app.ActivityThread$ResourcesKey.init(ActivityThread.java:1138)
  10-28 16:45:18.267 W/PackageManager(32056):   at
  android.app.ActivityThread.getTopLevelResources(ActivityThread.java:1207)
  10-28 16:45:18.267 W/PackageManager(32056):   at
  android.app.ActivityThread.getTopLevelResources(ActivityThread.java:1266)
  10-28 16:45:18.267 W/PackageManager(32056):   at
 
 android.app.ContextImpl$ApplicationPackageManager.getResourcesForApplication(ContextImpl.java:2439)
  10-28 16:45:18.267 W/PackageManager(32056):   at
 
 android.app.ContextImpl$ApplicationPackageManager.getDrawable(ContextImpl.java:2332)
  10-28 16:45:18.267 W/PackageManager(32056):   at
  android.content.pm.PackageItemInfo.loadIcon(PackageItemInfo.java:140)
  10-28 16:45:18.267 W/PackageManager(32056):   at
 
 android.app.ContextImpl$ApplicationPackageManager.getApplicationIcon(ContextImpl.java:2387)
  10-28 16:45:18.267 W/PackageManager(32056):   at
 
 com.motorola.filemanager.utils.IconifiedText.buildIconItem(IconifiedText.java:287)
  10-28 16:45:18.267 W/PackageManager(32056):   at
 
 com.motorola.filemanager.local.DirectoryScanner.run(DirectoryScanner.java:83)
  10-28 16:45:18.267 W/FileManagerApp(32056): DirectoryScanner: Sending
 data
  back to main thread
 
  Any pointers what this means?  It works on other devices.
 
  -Ankur.
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en

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

[android-developers] Bluetooth sync fails.

2011-09-09 Thread Ankur Avlani
Hi,

I am trying to develop an application on bluetooth.  I am successfully able
to pair and send,receive data.  Everything works fine.  I have a service
running in the background, which keep on checking for any incoming
connections.  Now if i leave the device as is for an hour or more.  Android
automatically stops and later starts the service.  After the service
restarts, I am not successfully able to receive any incoming connections
from Bluetooth.  There are no error in the logs as such.

Googling suggested to try START_STICKY and power wake.  I have tried
START_STICKY for the service and Power wake as well.  But all this doesnt
seem to help.

Any pointers is highly appreciated.

Thanks and regards,
Ankur.

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

[android-developers] Invoking Youtube app in full screen mode

2011-07-12 Thread Ankur Avlani
Hi,

I am invoking the youtube player from my app.

Intent i = new Intent(Intent.ACTION_VIEW,
Uri.parse(vnd.youtube:+videoId));
i.putExtra(VIDEO_ID, videoId);
startActivity(i);

This opens the youtube app and plays the video in small screen and *not in
full screen.*  Can some one please guide me how to play the video app in
full screen mode for youtube.

Thanks and regards,
Ankur.

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

[android-developers] Fwd: Keyboard issue on android 2.3.3

2011-06-23 Thread Ankur Avlani
No one has faced this issue???

-- Forwarded message --
From: Ankur Avlani ankuravl...@gmail.com
Date: Wed, Jun 22, 2011 at 7:48 PM
Subject: Keyboard issue on android 2.3.3
To: android-developers@googlegroups.com


HI,

I upgraded my phone to android 2.3.3.  I have an app which opens the
keyboard in landscape mode when it starts.  After upgrading, i am not seeing
the keyboard unless I click on the field.

InputMethodManager man = (InputMethodManager)
this.getApplicationContext().getSystemService(INPUT_METHOD_SERVICE);
man.showSoftInput(edit, InputMethodManager.SHOW_FORCED);
// man.toggleSoftInput(InputMethodManager.SHOW_FORCED,
InputMethodManager.RESULT_SHOWN);

I tried both the above methods, but neither brings the keyboard by default.
 This is working in older version of android (2.2).

Any inputs are appreciated.

Thanks,
Ankur.

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

[android-developers] Keyboard issue on android 2.3.3

2011-06-22 Thread Ankur Avlani
HI,

I upgraded my phone to android 2.3.3.  I have an app which opens the
keyboard in landscape mode when it starts.  After upgrading, i am not seeing
the keyboard unless I click on the field.

InputMethodManager man = (InputMethodManager)
this.getApplicationContext().getSystemService(INPUT_METHOD_SERVICE);
man.showSoftInput(edit, InputMethodManager.SHOW_FORCED);
// man.toggleSoftInput(InputMethodManager.SHOW_FORCED,
InputMethodManager.RESULT_SHOWN);

I tried both the above methods, but neither brings the keyboard by default.
 This is working in older version of android (2.2).

Any inputs are appreciated.

Thanks,
Ankur.

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

[android-developers] MPlayer for Android

2011-03-26 Thread Ankur Avlani
Hi All,

I am trying to develop a Audio/Video library, where users can listen and
view audio/video files.  I was looking forward to do this with Android
MPlayer.  But I am running out of ways to invoke the MPlayer from the Java
(android java) code.  Any pointer will be really helpful.

Thanks and regards,
Ankur

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

Re: [android-developers] MPlayer for Android

2011-03-26 Thread Ankur Avlani
Since Android is deployed on Linux, I am guessing there should be a
mechanism in Android to invoke the MPlayer? or any undocumented way?

Thanks and regards,
Ankur.

On Sat, Mar 26, 2011 at 2:28 PM, Mark Murphy mmur...@commonsware.comwrote:

 On Sat, Mar 26, 2011 at 5:15 PM, Ankur Avlani ankuravl...@gmail.com
 wrote:
  I am trying to develop a Audio/Video library, where users can listen and
  view audio/video files.  I was looking forward to do this with Android
  MPlayer.  But I am running out of ways to invoke the MPlayer from the
 Java
  (android java) code.  Any pointer will be really helpful.

 The Linux mplayer is not part of Android. If there is an mplayer port
 for Android, you are better off asking that project's members any
 questions regarding the use of their port.

 If you are referring to something else, please elaborate.

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

 Android Training in London: http://bit.ly/smand1, http://bit.ly/smand2

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

2011-02-26 Thread Ankur Avlani
Hi,

I have developed an application in Android using Webview.  Now i want to
play a music in background.  The Mp3 file will come from a URL dynamically.
 Any pointers would be helpful.  I tried to search online but couldnt find
much help.

Thanks and regards,
Ankur

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

[android-developers] Manually Dispatch Key Event

2011-02-17 Thread Ankur Avlani
Hi All,

I am trying to Manually dispatch Shift and Comma key from Android to my
webview, my code is as follows:

KeyEvent event1 = new
KeyEvent(KeyEvent.ACTION_DOWN,KeyEvent.KEYCODE_SHIFT_LEFT);
boolean isFlag = dispatchKeyEvent(event1);
KeyEvent event2 = new KeyEvent(KeyEvent.ACTION_DOWN,KeyEvent.KEYCODE_COMMA);
dispatchKeyEvent(event2);
KeyEvent event3 = new
KeyEvent(KeyEvent.ACTION_UP,KeyEvent.KEYCODE_SHIFT_LEFT);
dispatchKeyEvent(event3);
But the issue is, its sending the key one by one, i want it to send *Shift,
* key event to webview.  Any ideas what needs to be corrected?.  I tried
googling, but couldnt find any relevant solution.

Any inputs are appreciated.

Thanks,
Anlkur

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

2011-02-17 Thread Ankur Avlani
any one???

On Thu, Feb 17, 2011 at 12:30 PM, Ankur Avlani ankuravl...@gmail.comwrote:

 Hi All,

 I am trying to Manually dispatch Shift and Comma key from Android to my
 webview, my code is as follows:

 KeyEvent event1 = new
 KeyEvent(KeyEvent.ACTION_DOWN,KeyEvent.KEYCODE_SHIFT_LEFT);
  boolean isFlag = dispatchKeyEvent(event1);
 KeyEvent event2 = new
 KeyEvent(KeyEvent.ACTION_DOWN,KeyEvent.KEYCODE_COMMA);
  dispatchKeyEvent(event2);
 KeyEvent event3 = new
 KeyEvent(KeyEvent.ACTION_UP,KeyEvent.KEYCODE_SHIFT_LEFT);
  dispatchKeyEvent(event3);
 But the issue is, its sending the key one by one, i want it to send *
 Shift,* key event to webview.  Any ideas what needs to be corrected?.  I
 tried googling, but couldnt find any relevant solution.

 Any inputs are appreciated.

 Thanks,
 Anlkur


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

2011-02-17 Thread Ankur Avlani
Sorry about that, will make sure of it next time.  Just was in a midst of
things, so was eager to know.

Anywayz, will remember about this next time.

Thanks,
Ankur.

On Thu, Feb 17, 2011 at 1:59 PM, TreKing treking...@gmail.com wrote:

 On Thu, *Feb 17, 2011 at 2:30 PM*, Ankur Avlani ankuravl...@gmail.comwrote:

 Any inputs are appreciated.


 On Thu, *Feb 17, 2011 at 3:52 PM*, Ankur Avlani ankuravl...@gmail.com
  wrote:

 any one???


 Please wait more than 1 hour and 22 minutes before bumping your post - a
 few days in between bumps is recommended.


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

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

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

[android-developers] Webview window.opener returns undefined

2011-01-20 Thread Ankur Avlani
Hi All,

I am developing an application in Android using WebView.  I am opening
multiple tabs, which is handled by my WebViewClient.  Now if i say
window.opener.() (where XXX is some javascript method) it returns
undefined.  Any ideas what I need to do, to get it working?.

Any pointers is appreciated.

Thanks and regards,
Ankur

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

[android-developers] Android Keyboard Hide event.

2011-01-18 Thread Ankur Avlani
Hi All,

I have been trying to get some event that would let me know, that the
Keyboard was just hidden.  I tried onConfigurationChanged and onKeyDown.
 But none of these help me.

I have 4 EditText in my Activity.  On keyboard hide, i need to calculate
based on the number(s) provided on the EditText.

Any help is appreciated.

Thanks,
Ankur.

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

Re: [android-developers] Android GeoCoder Issue

2011-01-14 Thread Ankur Avlani
I want lat, lng of an address and not the other was round

On Fri, Jan 7, 2011 at 7:56 PM, narasimha venkat 
chandra.narasimha...@gmail.com wrote:

 Geocoder geocoder = new Geocoder(this, Locale.getDefault());
 ListAddress addresses = geocoder.getFromLocation(lat, lng, 1);

 using this code its working
 On Sat, Jan 8, 2011 at 2:03 AM, Ankur Avlani ankuravl...@gmail.comwrote:

 Hi All,

 I am using android map api.  To plot overlays, for some address I need to
 get the lat lng values.  I user GeoCoder to get the lat lng values based on
 address.  I am passing the complete address with City, State and Zip.  But
 the interesting part is, the GeoCoder does not always returns the lat lng
 value for address.

 What I mean is, for some address it gets the lat lng, if i try again for
 the same address it wont get the lat lng address.

 Has anyone faced this issue?.  Any help is highly appreciated.

 Thanks,
 Ankur

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

2011-01-13 Thread Ankur Avlani
I can start the MapActivitiy in a separate process as well?.  What are the
cons, if I start it in a separate process?.

The one that I see is, accessing data across these multiple processes.

Is it recommended to start a separate process, for multiple map activities.?

Thanks,
Ankur


On Tue, Jan 11, 2011 at 12:02 PM, TreKing treking...@gmail.com wrote:

 On Tue, Jan 11, 2011 at 1:54 PM, Ankur Avlani ankuravl...@gmail.comwrote:

 My question is, is there a way to create MapView without MapActivity.


 Nope.


 Or does someone know any workaround for multiple MapActivities.


 Instead of having mutliple MapActivities, have multiple MapModes or
 whatever you want to called it. Then refactor your primary MapActivity
 instance to support running an any arbitrary mode.


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

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

2011-01-13 Thread Ankur Avlani
I understand your previous post.  Probably I am asking a silly question:,

I have 2 separate Activities, It already has some views, now I need
MapActivity in both these Activities.  How can I get Map in both the
Activities.

I hope you understood what I mean to say.

Thanks,
Ankur.

On Thu, Jan 13, 2011 at 7:46 PM, TreKing treking...@gmail.com wrote:

 On Thu, Jan 13, 2011 at 9:37 PM, Ankur Avlani ankuravl...@gmail.comwrote:

 Is it recommended to start a separate process, for multiple map
 activities.?


 Probably not. I think you're over-complicating the matter. Read my previous
 post.



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

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

2011-01-12 Thread Ankur Avlani
Hi All,

I am developing an application on Android.  I have seen that at times when I
try to connect using HttpURLConnection, for getting an Image or anydata, I
get the following error:

01-12 11:24:05.073: WARN/System.err(16780): java.net.UnknownHostException:
Host is unresolved: www.XXX.com:80.

Note: I get this error on my Motorolla Droid and not in emulator.

Any ideas?


Thanks,
Ankur

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

Re: [android-developers] HttpURLConnection gives UnknownHostException

2011-01-12 Thread Ankur Avlani
I am connected to network, I am on Wifi.  If i try again it works.  Its just
random.

On Wed, Jan 12, 2011 at 11:34 AM, Kumar Bibek coomar@gmail.com wrote:

 This error/exception comes because of no network connectivity.

 Kumar Bibek
 http://techdroid.kbeanie.com
 http://www.kbeanie.com



 On Thu, Jan 13, 2011 at 1:02 AM, Ankur Avlani ankuravl...@gmail.comwrote:

 Hi All,

 I am developing an application on Android.  I have seen that at times when
 I try to connect using HttpURLConnection, for getting an Image or anydata, I
 get the following error:

 01-12 11:24:05.073: WARN/System.err(16780): java.net.UnknownHostException:
 Host is unresolved: www.XXX.com:80.

 Note: I get this error on my Motorolla Droid and not in emulator.

 Any ideas?


 Thanks,
 Ankur

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

2011-01-12 Thread Ankur Avlani
I am sorry, that somehow doesn't convince me.  I am connected to the same
wifi on my laptop and i never see any web page load error on my laptop.


On Wed, Jan 12, 2011 at 11:38 AM, Kumar Bibek coomar@gmail.com wrote:

 Yup, then it's a problem with your Wi-Fi.



 Kumar Bibek
 http://techdroid.kbeanie.com
 http://www.kbeanie.com



 On Thu, Jan 13, 2011 at 1:07 AM, Ankur Avlani ankuravl...@gmail.comwrote:

 I am connected to network, I am on Wifi.  If i try again it works.  Its
 just random.


 On Wed, Jan 12, 2011 at 11:34 AM, Kumar Bibek coomar@gmail.comwrote:

 This error/exception comes because of no network connectivity.

 Kumar Bibek
 http://techdroid.kbeanie.com
 http://www.kbeanie.com



 On Thu, Jan 13, 2011 at 1:02 AM, Ankur Avlani ankuravl...@gmail.comwrote:

 Hi All,

 I am developing an application on Android.  I have seen that at times
 when I try to connect using HttpURLConnection, for getting an Image or
 anydata, I get the following error:

 01-12 11:24:05.073: WARN/System.err(16780):
 java.net.UnknownHostException: Host is unresolved: www.XXX.com:80.

 Note: I get this error on my Motorolla Droid and not in emulator.

 Any ideas?


 Thanks,
 Ankur

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

2011-01-12 Thread Ankur Avlani
Somehow I have this feeling it is related to my app only.  Other apps on the
phone, I don't see any such issue.  Even when browsing on my phone, I don't
see any error.

On Wed, Jan 12, 2011 at 11:41 AM, Kumar Bibek coomar@gmail.com wrote:

 By Wi-Fi, I meant, you phone's Wi-Fi could be turning on and off. There is
 no other reason I can think of. It happens for me as well, sometimes.



 Kumar Bibek
 http://techdroid.kbeanie.com
 http://www.kbeanie.com



 On Thu, Jan 13, 2011 at 1:10 AM, Ankur Avlani ankuravl...@gmail.comwrote:

 I am sorry, that somehow doesn't convince me.  I am connected to the same
 wifi on my laptop and i never see any web page load error on my laptop.


 On Wed, Jan 12, 2011 at 11:38 AM, Kumar Bibek coomar@gmail.comwrote:

 Yup, then it's a problem with your Wi-Fi.



 Kumar Bibek
 http://techdroid.kbeanie.com
 http://www.kbeanie.com



 On Thu, Jan 13, 2011 at 1:07 AM, Ankur Avlani ankuravl...@gmail.comwrote:

 I am connected to network, I am on Wifi.  If i try again it works.  Its
 just random.


 On Wed, Jan 12, 2011 at 11:34 AM, Kumar Bibek coomar@gmail.comwrote:

 This error/exception comes because of no network connectivity.

 Kumar Bibek
 http://techdroid.kbeanie.com
 http://www.kbeanie.com



 On Thu, Jan 13, 2011 at 1:02 AM, Ankur Avlani 
 ankuravl...@gmail.comwrote:

 Hi All,

 I am developing an application on Android.  I have seen that at times
 when I try to connect using HttpURLConnection, for getting an Image or
 anydata, I get the following error:

 01-12 11:24:05.073: WARN/System.err(16780):
 java.net.UnknownHostException: Host is unresolved: www.XXX.com:80.

 Note: I get this error on my Motorolla Droid and not in emulator.

 Any ideas?


 Thanks,
 Ankur

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


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

Re: [android-developers] Re: HttpURLConnection gives UnknownHostException

2011-01-12 Thread Ankur Avlani
True, I agree with what you say.  Its just that I feel, other apps should
also break or give error.

Anywayz, Thanks a lot for your inputs.

regards,
Ankur.

On Wed, Jan 12, 2011 at 12:17 PM, Brill Pappin br...@pappin.ca wrote:

 Well i suppose thats possible if your messing with the network stack,
 but it's pretty low level for Java/Android.
 I guess its also possible that the Android version you have has a
 crappy stack or driver... or you have rooted it and have been messing
 around under the covers so to speak.

 There is nothing in Android really that would allow you to mess it up
 that badly AFAIK, so I doubt it's your application causing the problem
 if your not specifically getting under the covers.

 However, the meaning of the exception is clear:

 http://download.oracle.com/javase/1.4.2/docs/api/java/net/UnknownHostException.html
 and your app doesn't really control the process of translating a
 domain to an ip.

 - Brill Pappin

 On Jan 12, 2:54 pm, Ankur Avlani ankuravl...@gmail.com wrote:
  Somehow I have this feeling it is related to my app only.  Other apps on
 the
  phone, I don't see any such issue.  Even when browsing on my phone, I
 don't
  see any error.
 
 
 
 
 
 
 
  On Wed, Jan 12, 2011 at 11:41 AM, Kumar Bibek coomar@gmail.com
 wrote:
   By Wi-Fi, I meant, you phone's Wi-Fi could be turning on and off. There
 is
   no other reason I can think of. It happens for me as well, sometimes.
 
   Kumar Bibek
  http://techdroid.kbeanie.com
  http://www.kbeanie.com
 
   On Thu, Jan 13, 2011 at 1:10 AM, Ankur Avlani ankuravl...@gmail.com
 wrote:
 
   I am sorry, that somehow doesn't convince me.  I am connected to the
 same
   wifi on my laptop and i never see any web page load error on my
 laptop.
 
   On Wed, Jan 12, 2011 at 11:38 AM, Kumar Bibek coomar@gmail.com
 wrote:
 
   Yup, then it's a problem with your Wi-Fi.
 
   Kumar Bibek
  http://techdroid.kbeanie.com
  http://www.kbeanie.com
 
   On Thu, Jan 13, 2011 at 1:07 AM, Ankur Avlani ankuravl...@gmail.com
 wrote:
 
   I am connected to network, I am on Wifi.  If i try again it works.
  Its
   just random.
 
   On Wed, Jan 12, 2011 at 11:34 AM, Kumar Bibek coomar@gmail.com
 wrote:
 
   This error/exception comes because of no network connectivity.
 
   Kumar Bibek
  http://techdroid.kbeanie.com
  http://www.kbeanie.com
 
   On Thu, Jan 13, 2011 at 1:02 AM, Ankur Avlani 
 ankuravl...@gmail.comwrote:
 
   Hi All,
 
   I am developing an application on Android.  I have seen that at
 times
   when I try to connect using HttpURLConnection, for getting an
 Image or
   anydata, I get the following error:
 
   01-12 11:24:05.073: WARN/System.err(16780):
   java.net.UnknownHostException: Host is unresolved:www.XXX.com:80.
 
   Note: I get this error on my Motorolla Droid and not in emulator.
 
   Any ideas?
 
   Thanks,
   Ankur
 
--
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
   android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.comandroid-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%2bunsubscr...@googlegroups.comandroid-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%2bunsubscr...@googlegroups.comandroid-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%2bunsubscr...@googlegroups.comandroid-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

Re: [android-developers] Re: HttpURLConnection gives UnknownHostException

2011-01-12 Thread Ankur Avlani
Unfortunately, the server is not local.

On Wed, Jan 12, 2011 at 4:15 PM, Dan king...@gmail.com wrote:

 Hello All,

 I have had this error both on emulator and a Motorola Droid while
 using a WIFI connection.  I have surrounded the http request with WIFI
 state checks and before and after WIFI is reported state 3
 (WIFI_STATE_ENABLED) and a connection speed of 54 . I have also
 confirmed, using an adb shell with the emulator, that the emulator
 cannot ping the website in question giving a domain resolution error.
 To compare notes with Ankur, is the server on your LAN and the IP used
 internal? mine is.

 I have also tried AndroidHttpClient which does work on the same url.

 -Dan

 On Jan 12, 12:23 pm, Ankur Avlani ankuravl...@gmail.com wrote:
  True, I agree with what you say.  Its just that I feel, other apps should
  also break or give error.
 
  Anywayz, Thanks a lot for your inputs.
 
  regards,
  Ankur.
 
 
 
 
 
 
 
  On Wed, Jan 12, 2011 at 12:17 PM, Brill Pappin br...@pappin.ca wrote:
   Well i suppose thats possible if your messing with the network stack,
   but it's pretty low level for Java/Android.
   I guess its also possible that the Android version you have has a
   crappy stack or driver... or you have rooted it and have been messing
   around under the covers so to speak.
 
   There is nothing in Android really that would allow you to mess it up
   that badly AFAIK, so I doubt it's your application causing the problem
   if your not specifically getting under the covers.
 
   However, the meaning of the exception is clear:
 
  http://download.oracle.com/javase/1.4.2/docs/api/java/net/UnknownHost.
 ..
   and your app doesn't really control the process of translating a
   domain to an ip.
 
   - Brill Pappin
 
   On Jan 12, 2:54 pm, Ankur Avlani ankuravl...@gmail.com wrote:
Somehow I have this feeling it is related to my app only.  Other apps
 on
   the
phone, I don't see any such issue.  Even when browsing on my phone, I
   don't
see any error.
 
On Wed, Jan 12, 2011 at 11:41 AM, Kumar Bibek coomar@gmail.com
   wrote:
 By Wi-Fi, I meant, you phone's Wi-Fi could be turning on and off.
 There
   is
 no other reason I can think of. It happens for me as well,
 sometimes.
 
 Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com
 
 On Thu, Jan 13, 2011 at 1:10 AM, Ankur Avlani 
 ankuravl...@gmail.com
   wrote:
 
 I am sorry, that somehow doesn't convince me.  I am connected to
 the
   same
 wifi on my laptop and i never see any web page load error on my
   laptop.
 
 On Wed, Jan 12, 2011 at 11:38 AM, Kumar Bibek 
 coomar@gmail.com
   wrote:
 
 Yup, then it's a problem with your Wi-Fi.
 
 Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com
 
 On Thu, Jan 13, 2011 at 1:07 AM, Ankur Avlani 
 ankuravl...@gmail.com
   wrote:
 
 I am connected to network, I am on Wifi.  If i try again it
 works.
Its
 just random.
 
 On Wed, Jan 12, 2011 at 11:34 AM, Kumar Bibek 
 coomar@gmail.com
   wrote:
 
 This error/exception comes because of no network connectivity.
 
 Kumar Bibek
http://techdroid.kbeanie.com
http://www.kbeanie.com
 
 On Thu, Jan 13, 2011 at 1:02 AM, Ankur Avlani 
   ankuravl...@gmail.comwrote:
 
 Hi All,
 
 I am developing an application on Android.  I have seen that
 at
   times
 when I try to connect using HttpURLConnection, for getting an
   Image or
 anydata, I get the following error:
 
 01-12 11:24:05.073: WARN/System.err(16780):
 java.net.UnknownHostException: Host is unresolved:
 www.XXX.com:80.
 
 Note: I get this error on my Motorolla Droid and not in
 emulator.
 
 Any ideas?
 
 Thanks,
 Ankur
 
  --
 You received this message because you are subscribed to the
 Google
 Groups Android Developers group.
 To post to this group, send email to
 android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.comandroid-developers%2Bunsubs
 cr...@googlegroups.comandroid-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%2bunsubscr...@googlegroups.comandroid-developers%2Bunsubs
 cr...@googlegroups.comandroid-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

[android-developers] Multiple MapActivity

2011-01-11 Thread Ankur Avlani
Hi,

My application has multiple MapViews, so each classes extends MapActivity.
 Now i read that if you have more that one MapActivity in your app, it will
result in undesired output.

My question is, is there a way to create MapView without MapActivity.  Or
does someone know any workaround for multiple MapActivities.

I do not want to use android:process, since my application shares
data(static) across activities.

Any help is appreciated.

Thanks,
Ankur.

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

[android-developers] Android GeoCoder Issue

2011-01-07 Thread Ankur Avlani
Hi All,

I am using android map api.  To plot overlays, for some address I need to
get the lat lng values.  I user GeoCoder to get the lat lng values based on
address.  I am passing the complete address with City, State and Zip.  But
the interesting part is, the GeoCoder does not always returns the lat lng
value for address.

What I mean is, for some address it gets the lat lng, if i try again for the
same address it wont get the lat lng address.

Has anyone faced this issue?.  Any help is highly appreciated.

Thanks,
Ankur

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

[android-developers] Android Gallery with Remote Image and Cachings

2011-01-05 Thread Ankur Avlani
Hi All,

I am looking forward to create a Gallery which loads remote images.  I am
able to create the gallery, but it always downloads the images (next or
previous).  Can some one guide how to cache these images, so that the images
are not downloaded each and every time.

Thanks,
Ankur

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

Re: [android-developers] How to read file from assets dir?

2010-12-30 Thread Ankur Avlani
String [] fileList = getAssets().list(textImages);
Note, textImages is a folder under Assets.
for (int i = 0; i  fileList.length; i++) {
InputStream is = getAssets().open(textImages/+fileList[i]);
}
Thanks,
Ankur.

On Thu, Dec 30, 2010 at 10:09 PM, Stephan Wiesner 
testexpe...@googlemail.com wrote:

 Hi,
 I want to read a txt file that is deployed with my application.
 The file is in the assets directory and I try to read it with:

  String url = file:///android_asset/text.txt;
 InputStream instream = openFileInput(url);

 This results however in:
 12-31 07:05:46.638: DEBUG/GMAP(14396): Read
 error:java.lang.IllegalArgumentException: File
 file:///android_asset/text.txt contains a path separator

 So, where should I put the file or how should I read it?

 Thanks,
 Stephan

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

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

[android-developers] Android Mouse/MotionEvent

2010-12-28 Thread Ankur Avlani
Hi All,

It seems I am the first one to experiment on this, since I have got much
reply to this.

I tried to use the touch event, but it doest seem to work.

Please find my code snippet below:

Instrumentation inst = new Instrumentation();

long downTime = SystemClock.uptimeMillis();
long eventTime = SystemClock.uptimeMillis();
MotionEvent me = MotionEvent.obtain(downTime, eventTime,
MotionEvent.ACTION_MOVE,
(xy[0]+(xOffset*sensitivity)),(xy[1]+(yOffset*sensitivity)),
0);
dispatchTrackballEvent(me);
onTouchEvent(me);
me.recycle();
inst.sendPointerSync(me);

I have tried both Instrumentation and dispatchTrackballEvent.  Nothing seems
to work.  I am in a midsts of a deadline.

Please, Any help is highly appreciated.

Thanks,
Ankur

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

Re: [android-developers] Android Mouse/MotionEvent

2010-12-27 Thread Ankur Avlani
Hi,

I tried to use the touch event, but it doest seem to work.

Please find my code snippet below:

Instrumentation inst = new Instrumentation();

long downTime = SystemClock.uptimeMillis();
long eventTime = SystemClock.uptimeMillis();
MotionEvent me = MotionEvent.obtain(downTime, eventTime,
MotionEvent.ACTION_MOVE,
(xy[0]+(xOffset*sensitivity)),(xy[1]+(yOffset*sensitivity)),
0);
dispatchTrackballEvent(me);
onTouchEvent(me);
me.recycle();
inst.sendPointerSync(me);

I have tried both Instrumentation and dispatchTrackballEvent.  Nothing seems
to work.  I am in a midsts of a deadline.

Please, Any help is highly appreciated.

Thanks,
Ankur
On Sun, Dec 26, 2010 at 7:05 PM, vikram jain vikram.jain.ii...@gmail.comwrote:

 make use of touch event for mouse event

 On Mon, Dec 27, 2010 at 1:21 AM, Ankur Avlani ankuravl...@gmail.comwrote:

 Hi All,

 I am trying to build a server android, which will take keyboard and mouse
 actions, and pass it on to the appropriate view.  So far I am successful in
 getting keyboard events.  But I need some help in generating the
 mouse/motion events.  Can someone throw some light on how will that work.

 Any help is highly appreciated.

 Thanks,
 Ankur.

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

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

[android-developers] Android Mouse/MotionEvent

2010-12-26 Thread Ankur Avlani
Hi All,

I am trying to build a server android, which will take keyboard and mouse
actions, and pass it on to the appropriate view.  So far I am successful in
getting keyboard events.  But I need some help in generating the
mouse/motion events.  Can someone throw some light on how will that work.

Any help is highly appreciated.

Thanks,
Ankur.

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

Re: [android-developers] Android WebView

2010-12-13 Thread Ankur Avlani
I have around 4 MB of Photos, which I want to keep it local with the APK.
 Why I want to keep HTML on the server is because there is some PHP code
also present, which renders the UI.  By performance I mean is to save the
image loading time taken, by keeping the images local.


On Sat, Dec 11, 2010 at 12:57 PM, Frank Weiss fewe...@gmail.com wrote:

 I bit more info please. How many KB does high resolution mean? If you
 want to store the images locally, why do you want the HTML to come from the
 server? What does performance specifically mean, with respect to the user
 experience?

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 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%2bunsubscr...@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