Re: [android-developers] Re: how to access desktop files from android app remotely?

2011-04-20 Thread Hitendrasinh Gohil
hi,

i want to access desktop through android programatically so can u give me
reference links that i can follow and can achieve.


-- 
Regards,
Hitendrasinh Gohil

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

2011-04-20 Thread Akshay Kulkarni
Hi all,


Is there any way to get the value of the focused item from the listactivity?

AK

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

Re: [android-developers] Re: how to access desktop files from android app remotely?

2011-04-20 Thread Nikolay Elenkov
On Wed, Apr 20, 2011 at 3:00 PM, Hitendrasinh Gohil
hitendra.virtuei...@gmail.com wrote:
 hi,

 i want to access desktop through android programatically

Why? Do you just want to access *your* files, or are you
trying to create something similar to Dropbox or RDM+?
In case it's the former, just use Dropbox. Or, you can startup
an HTTP or FTP server on you computer and access it
from Android (useful as learning exercise, but not worth the
trouble if you just want to access some files).
If it's the latter, well, hire a team to do it. There is no step-by-step
tutorial for this kind of thing.

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


[android-developers] How to get Android Market InApp Billing Product Lists

2011-04-20 Thread muhammad mahmood
Hi

Is there a way to request my Android Market InApp Billing Product List
(listing name,description and value of my items) via the In-app
Billing Service API? I checked the available In-app billing requests
(http://developer.android.com/guide/market/billing/
billing_overview.html) and there is no request for such basic task.

Kind Regards
Muhammad Rashid

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


Re: [android-developers] Re: how to access desktop files from android app remotely?

2011-04-20 Thread Hitendrasinh Gohil
hi,

yes that i know that if i set ftp server on my desktop and put some files
over there than i can access it through by authentication credentials that i
have setup in my ftp server.

but can u give me any reference links for remote desktop access  from
any(mobile or pc) because i just want to know the basics for that.


-- 
Regards,
Hitendrasinh Gohil

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Fwd: How to detect the if soft keyboard is visible on the screen

2011-04-20 Thread Ravi
This should help : 
http://stackoverflow.com/questions/2150078/android-is-software-keyboard-shown

On Apr 20, 10:29 am, Akshay Kulkarni ak.androidm...@gmail.com wrote:
 Hi,

 Am trying to detect if the soft keyboard is active from the
 ImputMethodManager, and the piece of code is as below ;

 * InputMethodManager imm  =
 (InputMethodManager)getActivity().getApplicationContext().getSystemService( 
 Context.INPUT_METHOD_SERVICE);

         Log.e(TAG, Result :+imm.isActive());
 *
 But the above displays the result as true always.

 Is there any way to find if the keyboard is active or visible?

 Akshay

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] which is the best way to play encrpted song instantly?

2011-04-20 Thread Miguel Morales
i've never done it, i figure you'd have to redirect the streams or
something.  Just look it up, this isn't really android specific.

On Tue, Apr 19, 2011 at 9:01 PM, Hitendrasinh Gohil 
hitendra.virtuei...@gmail.com wrote:


 hi,
 play while you decrypthow i can do it?


 --
 Regards,
 Hitendrasinh Gohil

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




-- 
~ Jeremiah:9:23-24
Android 2D MMORPG: http://solrpg.com/,
http://www.youtube.com/user/revoltingx

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

Re: [android-developers] How to get Android Market InApp Billing Product Lists

2011-04-20 Thread Nikolay Elenkov
On Wed, Apr 20, 2011 at 3:10 PM, muhammad mahmood
muhammad.rash...@gmail.com wrote:
 Hi

 Is there a way to request my Android Market InApp Billing Product List
 (listing name,description and value of my items) via the In-app
 Billing Service API? I checked the available In-app billing requests
 (http://developer.android.com/guide/market/billing/
 billing_overview.html) and there is no request for such basic task.


That's been discussed before. Unfortunately, there is no way to
do it at present. The whole in-app billing thing has an early level
experiment feel at this stage, so hopefully they might add this
as well as some other features.

If you'd like to add products without having to release a new
version of your app, you'd have to manage them yourself.
Depending on what you need, this might be as easy as
putting a text/XML/JSON file on some publicly accessible URL.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Fwd: How to detect the if soft keyboard is visible on the screen

2011-04-20 Thread Akshay Kulkarni
Thanks for the help. The link benefits but says the probability of the soft
key board shown. Can I use InputMethodManager or
InputMethodService.isInputViewShown and get the result? can I get the pseudo
or implemented code for the same?

On Wed, Apr 20, 2011 at 11:58 AM, Ravi ravivya...@gmail.com wrote:

 This should help :
 http://stackoverflow.com/questions/2150078/android-is-software-keyboard-shown

 On Apr 20, 10:29 am, Akshay Kulkarni ak.androidm...@gmail.com wrote:
  Hi,
 
  Am trying to detect if the soft keyboard is active from the
  ImputMethodManager, and the piece of code is as below ;
 
  * InputMethodManager imm  =
 
 (InputMethodManager)getActivity().getApplicationContext().getSystemService(
 Context.INPUT_METHOD_SERVICE);
 
  Log.e(TAG, Result :+imm.isActive());
  *
  But the above displays the result as true always.
 
  Is there any way to find if the keyboard is active or visible?
 
  Akshay

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

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

[android-developers] What are the types of video encoding/resolution available for android development?

2011-04-20 Thread lyrical.mas...@hotmail.com
Q1. What are the available different forms of video encoding type
available in android for user to choose from? Because i'm currently
doing a video recording app which i wanted to use ListPreference to
allow user to dynamically choose what type of encoding is available.

Q2. I wanted to know is there any easy way to retrieve video
resolution on the actual phone? Because different phone has different
phone resolution's compatibility, so i wanted to retrieve the
resolution data and display the different resolutions dynamically into
my ListPreference for user selection... Does it have to do with a
method name flatten() i don't quite know what is the method... I'm
kinna new in java/android, can someone guide me on how should i do
that?

My mainActivity.java file
public class CameraTest extends Activity implements
SurfaceHolder.Callback {

private static final String TAG = Exception;

public static SurfaceView surfaceView;
public static SurfaceHolder surfaceHolder;
public static Camera MainCamera;
private static boolean previewRunning;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

surfaceView = (SurfaceView)findViewById(R.id.surface_camera);
surfaceHolder = surfaceView.getHolder();
surfaceHolder.addCallback(this);

 
surfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
//getparameters

Button btnStart = (Button) findViewById(R.id.button4);
btnStart.setOnClickListener(new View.OnClickListener()
{
public void onClick(View v)
{
startService(new Intent(getApplicationContext(),
ServiceRecording.class));
}
});

Button btnStop = (Button) findViewById(R.id.button5);
btnStop.setOnClickListener(new View.OnClickListener()
{
public void onClick(View v)
{
stopService(new Intent(getApplicationContext(),
ServiceRecording.class));
}
});

Button btnSetting = (Button) findViewById(R.id.button2);
btnSetting.setOnClickListener(new View.OnClickListener()
{
public void onClick(View v)
{
startActivity(new Intent(getApplicationContext(),
SettingActivity.class));
}
});
}

public static boolean ServiceStatus;
@Override
public void surfaceCreated(SurfaceHolder holder) {

if(ServiceRecording.recordingStatus)
{
stopService(new Intent(getApplicationContext(),
ServiceRecording.class));

try {
Thread.sleep(4000);
}
catch (InterruptedException e) {
e.printStackTrace();
}

MainCamera = ServiceRecording.ServiceCamera;

startService(new Intent(getApplicationContext(),
ServiceRecording.class));
}
else{

MainCamera = Camera.open();

if (MainCamera != null) {
Camera.Parameters params = MainCamera.getParameters();
params.setPreviewSize(320, 240);
params.setPreviewFormat(PixelFormat.JPEG);
MainCamera.setParameters(params);

try {
MainCamera.setPreviewDisplay(holder);
}

catch (IOException e)
{
e.printStackTrace();
}
MainCamera.startPreview();
previewRunning = true;
}
else {
Toast.makeText(getApplicationContext(), Camera not
available!, Toast.LENGTH_LONG).show();
finish();
}
}

if (previewRunning) {
MainCamera.stopPreview();
}
}

@Override
public void surfaceChanged(SurfaceHolder holder, int format, int
width, int height) {

}

@Override
public void surfaceDestroyed(SurfaceHolder holder){
MainCamera.stopPreview();
previewRunning = false;
MainCamera.release();
}
}

My Preference.xml file since having error because my ListPreference
for Video resolution has empty entries for user to select from...
?xml version=1.0 encoding=utf-8?
PreferenceScreen xmlns:android=http://schemas.android.com/apk/res/
android
PreferenceCategory
android:title=Video
CheckBoxPreference
android:title=Audio
android:defaultValue=True
android:summary=Select w/o Audio
  

[android-developers] Re: Only first record is visible in tablelayout

2011-04-20 Thread pramod.deore
Any one have idea how to show all records in table layout?

On Apr 20, 9:37 am, pramod.deore deore.pramo...@gmail.com wrote:
 Hi, all I am parsing one string and showing data in table layout
 format. But only one record is visible and other are not.

 Here is my xml file:

 ?xml version=1.0 encoding=utf-8?

 LinearLayout xmlns:android=http://schemas.android.com/apk/res/
 android
     android:orientation=vertical
     android:layout_width=fill_parent
     android:layout_height=fill_parent
     

     HorizontalScrollView xmlns:android=http://schemas.android.com/
 apk/res/android
         android:layout_width=320px
 android:layout_height=fill_parent

 TableLayout
         android:layout_width=fill_parent
         android:layout_height=fill_parent
         xmlns:android=http://schemas.android.com/apk/res/android;
         

         TableRow
                 TextView
                 android:text=Date
                 android:gravity=center
                 android:layout_width=fill_parent
                 android:layout_height=wrap_content

                  /

                 TextView
                 android:text=Order Ref
                 android:gravity=center
                 android:layout_width=fill_parent
                 android:layout_height=wrap_content

                  /

                 TextView
                 android:text=Exch
                 android:gravity=center
                 android:layout_width=fill_parent
                 android:layout_height=wrap_content

                  /

                 TextView
                 android:text=St
                 android:gravity=center
                 android:layout_width=fill_parent
                 android:layout_height=wrap_content
                 /

                 TextView
                 android:text=Buy/Sell
                 android:gravity=center
                 android:layout_width=fill_parent
                 android:layout_height=wrap_content

                  /

                 TextView
                 android:text=Qty
                 android:gravity=center
                 android:layout_width=fill_parent
                 android:layout_height=wrap_content

                  /

                 TextView
                 android:text=Price
                 android:gravity=center
                 android:layout_width=fill_parent
                 android:layout_height=wrap_content

                  /

                 TextView
                 android:text=Status
                 android:gravity=center
                 android:layout_width=fill_parent
                 android:layout_height=wrap_content
                 /

         /TableRow

         TableRow
                 TextView
                 android:id=@+id/date
                 android:gravity=center
                 android:layout_width=fill_parent
                 android:layout_height=wrap_content

                  /

                 TextView
                 android:id=@+id/orderRef
                 android:gravity=center
                 android:layout_width=fill_parent
                 android:layout_height=wrap_content

                  /

                 TextView
                 android:id=@+id/exch
                 android:gravity=center
                 android:layout_width=fill_parent
                 android:layout_height=wrap_content

                  /

                 TextView
                 android:id=@+id/st
                 android:gravity=center
                 android:layout_width=fill_parent
                 android:layout_height=wrap_content
                 /

                 TextView
                 android:id=@+id/buysell
                 android:gravity=center
                 android:layout_width=fill_parent
                 android:layout_height=wrap_content

                  /

                 TextView
                 android:id=@+id/qty
                 android:gravity=center
                 android:layout_width=fill_parent
                 android:layout_height=wrap_content

                  /

                 TextView
                 android:id=@+id/price
                 android:gravity=center
                 android:layout_width=fill_parent
                 android:layout_height=wrap_content

                  /

                 TextView
                 android:id=@+id/status
                 android:gravity=center
                 android:layout_width=fill_parent
                 android:layout_height=wrap_content
                 /

         /TableRow

 /TableLayout

 /HorizontalScrollView

 /LinearLayout

 and my activity is like:

 public class TableLayoutTest extends Activity
 {
         TextView date,orderRef,exch,st,buysell,qty,price,status;
         String[] temp;
         String del = [|$^]+;
         String[] tokens ;

     /** Called when the activity is first created. */
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
        

[android-developers] Re: How to properly clear intent data from singleTop Activity?

2011-04-20 Thread String
I've been bothered by this issue myself for a while. Streets' solution works 
in the scenario where the system kills the activity in the background, but 
not when the user exits the activity with the Back button, then later 
returns to it by a long-press of Home: the Recents list re-launches the 
app with the last-used Intent, and savedInstanceState isn't preserved. If 
the Intent in question was meant to be a one-shot (it has Extras which have 
been used up), then you're back in the same, unwanted situation.

Any thoughts? I could certainly save something to SharedPrefs which would 
work around this, but it seems like overkill.

String

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

[android-developers] ActivityGroup, when i press back the activity does not reload itself...

2011-04-20 Thread Sergio Luceno
Hi everybody!

I have a tabhost on my application and I'm using an Activity group
which handles 3 activities inside.

Example:
ActivityGroup Handles
 A - B - C

When i start this activities i'm using the flag
Intent.FLAG_ACTIVITY_CLEAR_TOP.

My problem is when the user goes from A-B-C and press back button,
my B activity shows up, but it does not resume or reload or refresh.
It has the same state as before.

For example if the user goes again to C, C is refreshed, but when from
C goes back B is not.

  On B I have implementend methods such as onResume, onStart,
onReestart and debugging it the main thread never goes in there...

And i need to refresh B because C can make changes that change the
content displayed on B.

I have googleled this for 3 days and I couldn't found a solution..

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


[android-developers] Re: ActivityGroup, when i press back the activity does not reload itself...

2011-04-20 Thread Zsolt Vasvari
There are many annoying bugs with ActivityGroups.  Your best bet is to
bite the bullet and rewrite your app so that it uses a single Activity
with a TabHost and View's for the pages.

On Apr 20, 3:05 pm, Sergio Luceno slucen...@gmail.com wrote:
 Hi everybody!

 I have a tabhost on my application and I'm using an Activity group
 which handles 3 activities inside.

 Example:
 ActivityGroup Handles
  A - B - C

 When i start this activities i'm using the flag
 Intent.FLAG_ACTIVITY_CLEAR_TOP.

 My problem is when the user goes from A-B-C and press back button,
 my B activity shows up, but it does not resume or reload or refresh.
 It has the same state as before.

 For example if the user goes again to C, C is refreshed, but when from
 C goes back B is not.

   On B I have implementend methods such as onResume, onStart,
 onReestart and debugging it the main thread never goes in there...

 And i need to refresh B because C can make changes that change the
 content displayed on B.

 I have googleled this for 3 days and I couldn't found a solution..

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


[android-developers] Appwidget + AsyncTask + Handler

2011-04-20 Thread b_t
Hi,

In my app I was going to use an AsyncTask to update appwidget data
because this process can be long. To get the state I have to call
BluetoothAdapter.getDefaultAdapter(). The problem is that in some
device (not in mine) it tries to initialize a Handler and throws
Exception about
missing Looper.

I don't know what should I do.

T.

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

2011-04-20 Thread James W
Does anyone happen to know the official required resolutions of the
Live Wallpaper thumbnail icons for the various densities? The
documentation doesn't mention a specific size.

The resolution used seems to be a lot larger than the launcher icon
resolution, using 48 for medium or 72 for high gives a very blurred
image on both the emulator and real devices, leading me to think there
is some scaling going on.

In my investigation 96, 112 or even 128 seems to be best for Medium
density, and 144 for high density, but that seems pretty arbitrary.
What does everyone else use?

Regards
James



On Apr 19, 7:14 am, a a harvey.a...@gmail.com wrote:
 In order to see aniconin thelivewallpapermenu, you need to set
 the android:thumbnail attribute for the applications Wallpaper tag.
 This will normally be found in the XML file corresponding to the class
 that extends WallpaperService.

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

 wallpaper
     xmlns:android=http://schemas.android.com/apk/res/android;
     android:thumbnail=@drawable/thumb
     android:description=@string/description
     
 android:settingsActivity=com.example.android.livecubes.cube2.CubeWallpaper­2Settings
 /

 2011/1/15 John Lussmyer johnlussm...@gmail.com:



  So, anyone have any ideas why myicondoesn't show up in the list ofLive
  Wallpapers (just the genericiconshows), but DOES show up in theWallpaper
  menu, Configure entry after installing thewallpaper?

  On Thu, Jan 6, 2011 at 1:18 PM, John Lussmyer johnlussm...@gmail.com
  wrote:

  Okay, I didn't have theiconspecified there.
  I've added it.
  Uninstalled from the emulator, and re-installed.
  Theiconstill doesn't show up in theLiveWallpapers menu, and no errors
  are displayed in logcat.
  (Sure wish my ATT 2.1 phone supportedLiveWallpapers!)

  On Thu, Jan 6, 2011 at 12:26 PM, Josh josh.olek...@gmail.com wrote:

  You generally have a file like /res/xml/MyWallpaper.xml with a
  wallpaper tag as the root.  This is where you define the settings
  activity and thumbnailicon, which is generally the same as your app
 icon, but can be different.  See

 http://developer.android.com/resources/samples/CubeLiveWallpaper/res/...

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

 - Show quoted text -

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


Re: [android-developers] Appwidget + AsyncTask + Handler

2011-04-20 Thread Kostya Vasilyev

You could try calling Looper.prepare() first thing in doInBackground().

Oh, and logcat output would help us help you, as usual.

-- Kostya

20.04.2011 12:07, b_t пишет:

Hi,

In my app I was going to use an AsyncTask to update appwidget data
because this process can be long. To get the state I have to call
BluetoothAdapter.getDefaultAdapter(). The problem is that in some
device (not in mine) it tries to initialize a Handler and throws
Exception about
missing Looper.

I don't know what should I do.




--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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


[android-developers] Get Firefox and Opera History

2011-04-20 Thread Mochamad Basofi
Hello,

Is there any way to get history from firefox and opera web browser?

Thank you

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


[android-developers] Click event in list on list items.

2011-04-20 Thread vix
Hi,

I am able to navigate activities using listitem click.

Please share the code

Thanks
Vikas Dhar

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

2011-04-20 Thread Nathaniel Warner
I need to boost the accuracy of the accelerometer or at least increase the
number of times that it triggers onSensorChanged (or the accelerometer is
polled).  Is there any way to do that?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 there any example for auto Multiple Bouncing balls(more than one ball) in android

2011-04-20 Thread Jitesh dedhiya
Can we have auto bouncing balls(say 3 to 5 balls bouncing automatically with
medium pace moving here and there in the given rectangle area or screen) in
android. If yes, then what will be needed to start with it. Target device :
2.2 Thanks in advance.

-- 
--Jitesh .V. Dedhiya---

Don't Learn To Hack but Hack To Learn

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: ActivityGroup, when i press back the activity does not reload itself...

2011-04-20 Thread Sergio Luceno
m

I had the activity builded with a tabhost, but I wanted to have the
menu buttons at the bottoms always visible. So i started to adapt the
app for using ActivityGroups. Since i started i have been solving
problems...

Maybe you are right, and it's better to not use the activity group.

Let's say i'm not using the activity group, but the application has a
must. The bottom menú has to stay visible always...

What can I do for it?

I was thinking to have a view with the buttons and merge the layout in
every view of the application, to have the look and feel that you're
using activity groups...

Or there is a better solution for this?

On Apr 20, 9:34 am, Zsolt Vasvari zvasv...@gmail.com wrote:
 There are many annoying bugs with ActivityGroups.  Your best bet is to
 bite the bullet and rewrite your app so that it uses a single Activity
 with a TabHost and View's for the pages.

 On Apr 20, 3:05 pm, Sergio Luceno slucen...@gmail.com wrote:







  Hi everybody!

  I have a tabhost on my application and I'm using an Activity group
  which handles 3 activities inside.

  Example:
  ActivityGroup Handles
   A - B - C

  When i start this activities i'm using the flag
  Intent.FLAG_ACTIVITY_CLEAR_TOP.

  My problem is when the user goes from A-B-C and press back button,
  my B activity shows up, but it does not resume or reload or refresh.
  It has the same state as before.

  For example if the user goes again to C, C is refreshed, but when from
  C goes back B is not.

    On B I have implementend methods such as onResume, onStart,
  onReestart and debugging it the main thread never goes in there...

  And i need to refresh B because C can make changes that change the
  content displayed on B.

  I have googleled this for 3 days and I couldn't found a solution..

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


Re: [android-developers] Re: How to properly clear intent data from singleTop Activity?

2011-04-20 Thread Kostya Vasilyev
You could override onResume as well, have it check a flag set in onCreate to
distinguish between the first original callback sequence and subsequent
ones, and clear some data values.
20.04.2011 11:03 пользователь String sterling.ud...@googlemail.com
написал:
 I've been bothered by this issue myself for a while. Streets' solution
works
 in the scenario where the system kills the activity in the background, but

 not when the user exits the activity with the Back button, then later
 returns to it by a long-press of Home: the Recents list re-launches the
 app with the last-used Intent, and savedInstanceState isn't preserved. If
 the Intent in question was meant to be a one-shot (it has Extras which
have
 been used up), then you're back in the same, unwanted situation.

 Any thoughts? I could certainly save something to SharedPrefs which would
 work around this, but it seems like overkill.

 String

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

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

[android-developers] Re: ActivityGroup, when i press back the activity does not reload itself...

2011-04-20 Thread Zsolt Vasvari
A TabHost children are shown/hidden as you flip tabs.  If you are
building an iPhone clone app with a button bar on the bottom, just
simply put below the TabHost.

My layout that uses this pattern looks like this.   I have a TabHost
and an always visible status bar.


LinearLayout   android:orientation=vertical

  TabHost android:id=@android:id/tabhost
 android:layout_width=match_parent
 android:layout_height=0px
 android:layout_weight=1

  LinearLayout android:layout_width=match_parent
  android:layout_height=match_parent
  android:orientation=vertical

 TabWidget android:id=@android:id/tabs
android:layout_width=match_parent
android:layout_height=wrap_content/

FrameLayout android:id=@android:id/tabcontent
 
android:layout_width=match_parent
 android:layout_height=0px
 android:layout_weight=1

FrameLayout android:id=@+id/page1
 
android:layout_width=match_parent
 
android:layout_height=match_parent

/FrameLayout

FrameLayout android:id=@+id/page2
 
android:layout_width=match_parent
 
android:layout_height=match_parent

/FrameLayout

FrameLayout android:id=@+id/page3
 
android:layout_width=match_parent
 
android:layout_height=match_parent

/FrameLayout
/FrameLayout
   /LinearLayout
 /TabHost

FrameLayout android:id=@+id/status_bar
/FrameLayout
/LinearLayout


On Apr 20, 4:42 pm, Sergio Luceno slucen...@gmail.com wrote:
 m

 I had the activity builded with a tabhost, but I wanted to have the
 menu buttons at the bottoms always visible. So i started to adapt the
 app for using ActivityGroups. Since i started i have been solving
 problems...

 Maybe you are right, and it's better to not use the activity group.

 Let's say i'm not using the activity group, but the application has a
 must. The bottom menú has to stay visible always...

 What can I do for it?

 I was thinking to have a view with the buttons and merge the layout in
 every view of the application, to have the look and feel that you're
 using activity groups...

 Or there is a better solution for this?

 On Apr 20, 9:34 am, Zsolt Vasvari zvasv...@gmail.com wrote:



  There are many annoying bugs with ActivityGroups.  Your best bet is to
  bite the bullet and rewrite your app so that it uses a single Activity
  with a TabHost and View's for the pages.

  On Apr 20, 3:05 pm, Sergio Luceno slucen...@gmail.com wrote:

   Hi everybody!

   I have a tabhost on my application and I'm using an Activity group
   which handles 3 activities inside.

   Example:
   ActivityGroup Handles
    A - B - C

   When i start this activities i'm using the flag
   Intent.FLAG_ACTIVITY_CLEAR_TOP.

   My problem is when the user goes from A-B-C and press back button,
   my B activity shows up, but it does not resume or reload or refresh.
   It has the same state as before.

   For example if the user goes again to C, C is refreshed, but when from
   C goes back B is not.

     On B I have implementend methods such as onResume, onStart,
   onReestart and debugging it the main thread never goes in there...

   And i need to refresh B because C can make changes that change the
   content displayed on B.

   I have googleled this for 3 days and I couldn't found a solution..- 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: How to properly clear intent data from singleTop Activity?

2011-04-20 Thread Zsolt Vasvari
 It was a mistake to have the setIntent() method.  The Intent is always the
 original intent used to launch the activity, nothing more.  This is
 immutable.

Can you deprecate it and throw an exception if the target SDK is  11?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Is there any example for auto Multiple Bouncing balls(more than one ball) in android

2011-04-20 Thread Zsolt Vasvari
No, Android supports up to 2 balls only.  It's a male dominated
platform...

On Apr 20, 4:46 pm, Jitesh dedhiya jitesh.dedh...@gmail.com wrote:
 Can we have auto bouncing balls(say 3 to 5 balls bouncing automatically with
 medium pace moving here and there in the given rectangle area or screen) in
 android. If yes, then what will be needed to start with it. Target device :
 2.2 Thanks in advance.

 --
 --Jitesh .V. Dedhiya---

 Don't Learn To Hack but Hack To Learn

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

2011-04-20 Thread Indicator Veritatis
When I read your reply to Nikolay, I remembered the line form the
Natsume Souseki's 'Ten Nights of Dreams', Hyaku nen, watasi no hako
no soba ni suwatte matte ite kudasai. Of course, you won't really
have to wait that long;)

On Apr 18, 6:07 pm, ishihata ishihata.k.t...@gmail.com wrote:
 Hello Kostya/Nikolay,

 Thanks for your valuable reports.
 I felt relieved a little because I could understand the problem
 happened not only to me.
 I will wait for Google to solve the problem.

 On 4月19日, 午前1:10, Nikolay Elenkov nikolay.elen...@gmail.com wrote: On Mon, 
 Apr 18, 2011 at 5:13 PM, Nikolay Elenkov

  nikolay.elen...@gmail.com wrote:
   On Mon, Apr 18, 2011 at 4:47 PM, ishihata ishihata.k.t...@gmail.com 
   wrote:

   Is this an ordeal only to me...?

   I don't have a 2.1 device right now, but I will try to find the original
   NexusOne firmware and flash it to test with. I'll post back when
   I have some results.

  I just tried it with Nexus One/2.1, and it's definitely not working 
  properly.
  After buying the item, the Checkout popup window takes forever,
  but eventually goes away. The purchase notification just doesn't come
  through though. If I restart the app and restore transactions, I do get
  it, but it's kind of tough to have to rely on this behaviour. After I cancel
  the order in Google Checkout, the cancel notification doesn't come
  either (it does on 2.3).

  So I'd say it's broken, or at least unreliable. Which is a bad thing
  when people are supposed to pay money.

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


[android-developers] Re: How does Android PhoneNumberUtils determin the international call prefix for a specific country?

2011-04-20 Thread higonnet
If I understand it correctly, your problem only exists if you receive
a call from (52)   55 while in Indonesia and then you go to,
say, Sweden and try to call that number. If you stay in Indonesia you
don't have a problem.

I think your best choice, being aware of this problem, is to make sure
that you do indeed have a '+' as a prefix in all your contact numbers.

Bernard Higonnet

On Apr 19, 12:06 pm, Freddman fredd...@gmail.com wrote:
 Sweden's prefix for dialing out is 00, but dialing in is 46.

 The problem i encountered was that when my app get's a number that is
 from Hong Kong (852)   it adds (00) to the number, thus
 enabling me to redial the number. My app get's the number
 00852 and determinds that 00 must be the dial out, and 852 is
 dial in for Hong Kong.
 But if i instead get a number from  (52)   55 and i live in
 Indonesia i would append 008 in the begining sense in Indonesia dial
 out can be 008.
 The number would then look like 0085255, how to determin that
 008 is the dial out, and 52 is country code ( for Mexico), and not
 dial out is 00 and country code is 852 ?

 On Apr 19, 10:34 am, Bernard T.Higonnet bthigon...@gmail.com
 wrote:

  On 04/19/11 10:29, Freddman wrote:

   I noticed that when i recive an incoming international call, the call
   screen will show the entire number e.g beginning with '00' because
   Swedens call prefix is '00'. When i later dismissed the call, when the
   notification was shown in the status bar, the '00' had been replaced
   with '+'.

  00 is not Sweden's prefix, which actually is 46.

  00 is the caller's local what follows is an international number code

   How does Android determin the call prefix, and is it compatible with
   every country (e.g Indonesia can have 001 or 008 as call prefix)?

   Im writing an app where i determin the origin of the calling
   international number, but iv discovered the WAST number of
   possibilites a number can have.

   Example:
   00 852  
   This could be a call from Hong Kong  (00 +852  ) when living
   in Sweden, but also a call from Mexico when living in Indonesia ( 008
   +52   ).

  852 is the code for Hong Kong everywhere...

  BernardHigonnet

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

2011-04-20 Thread Nikolay Elenkov
On Wed, Apr 20, 2011 at 6:29 PM, Indicator Veritatis mej1...@yahoo.com wrote:
 When I read your reply to Nikolay, I remembered the line form the
 Natsume Souseki's 'Ten Nights of Dreams', Hyaku nen, watasi no hako
 no soba ni suwatte matte ite kudasai. Of course, you won't really
 have to wait that long;)


Let's hope it takes them less than 100 years, just because our
signing certificates will have expired by then :)

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Calling a system service in fixed intervals within another service

2011-04-20 Thread Indicator Veritatis
Dianne-

I expect your suggestion is sound, since you do know Android so well,
and in particular, what Handlers are good for and how to use them. I
also expect that the reason Diego did not use a Handler was that he
could easily find copious documentation on how to use a raw thread,
but nothing comparable on how to use a Handler; he almost got the
synchronization idiom right: the !wifiSearchComplete test needs to be
repeated inside the synchronized block or moved inside entirely
(http://download.oracle.com/javase/tutorial/essential/concurrency/
guardmeth.html).

Since he almost got it right, he seems to have tolerably good grasp of
Java objects and methods Thread, locks, wait(), notify() and the
synchronized keyword. But to implement the HandlerThread technique, he
has to learn several new objects: Handler, HandlerThread, Message,
Looper, MessageQueue.

The http://developer.android.com/reference/android/os/Handler.html
link certainly leaves much to be desired. Badly written sentences like
When you create a new Handler, it is bound to the thread / message
queue of the thread that is creating it -- from that point on, it will
deliver messages and runnables to that message queue and execute them
as they come out of the message queue. leave the reader doubting it
is worth the bother, especially if the reader has no good sample code
in front of him.

What is so wrong with that sentence? 1) pronoun reference for 'it' is
way too vague: does 'it' stand for 'Handler' or for thread, or the
message queue? After some reflection it appears that 'Handler' has to
be the right answer, but then 2) what get executed as they come ouf
of the message queue? It would appear to mean that both messages and
runnables get executed, but what it means to execute a message is far
from clear. It is a type mismatch: one executes runnables but handles
messages. Not to mention, 3) it says, to be executed in the future,
but it is far from clear which method does this execution.

Also, the purpose of Handlers is described as being mainly either one
of two things: either 1) scheduling for the future, or 2) executing on
a different thread. Which is Diego doing? Apparently not 2), since you
said if the code is not doing blocking. But 1) isn't quite right
either, since he wants to execute the scan again after
WIFI_SCAN_TIMEOUT only if the previously initiated scan does NOT
complete. Of course, he could schedule and unschedule as needed, but
this looks like it could turn out to be more complicated than
debugging the 'raw thread' code.

Of course, I can't guarantee that the one change I suggest will fix
his problem, since I have not run it; I have not run it, because I am
not seeing code for the Service.

Even more of course, it is quite possible that a pointer to sample
code that does the kind of timing he needs, without excess baggage,
showing how to use handleMessage() and hasMessages() to do timing by
responding to the delayed message (and where to place them to avoid
ANR -- his timeouts are 15S and 60S), could tip the balance in favor
of using Handler.

On Apr 18, 4:22 pm, Dianne Hackborn hack...@android.com wrote:
 I suggest not using a raw thread.  If you need it on a separate thread, use
 a HandlerThread and Handler.sendMessageDelayed() to do your timing.

 Even better -- if the code is not doing blocking operations, there is no
 need for another thread at all; just make a class with a Handler in it and
 use Handler.sendMessageDelayed() to schedule your work on the main thread.

 On Mon, Apr 18, 2011 at 3:58 PM, Diego Tori
 diegotoridoesandr...@gmail.comwrote:

  So yeah, I managed to try calling the wifi scanner in this fashion within
  my thread:
          private Object _lock = new Object();

          private final long SLEEP_TIME = 15000; //Scan every 15 secs
          private final long WIFI_SCAN_TIMEOUT = 6; //One minute timeout
  for getting called back, otherwise, initiate a new scan.

         @Override
          public void run() {
              while(running){
                  //Start a new scan;
                  wifiSearchComplete = false;
                  _wifiMan.startScan();
                  while(!wifiSearchComplete){
                      synchronized(_lock){
                          try{
                              _lock.wait(WIFI_SCAN_TIMEOUT);
                          } catch (InterruptedException ie){
                               Log.d(TAG, TAG+.run() caught  +
  ie.getMessage() + when trying to sleep for  + (WIFI_SCAN_TIMEOUT/1000)
  +secs.);
                               Thread.currentThread().interrupt();
                          }
                      }
                      if(!wifiSearchComplete){
                          synchronized(_lock){
                              //Try scanning again since we didn't get called
  back at all;
                              _lock.notify();
                          }
                      }
                  }
              }
          }

          

Re: [android-developers] Get Firefox and Opera History

2011-04-20 Thread Mark Murphy
On Wed, Apr 20, 2011 at 4:23 AM, Mochamad Basofi moch.bas...@gmail.com wrote:
 Is there any way to get history from firefox and opera web browser?

For questions regarding firms' or organizations' products, you might
consider asking those firms and organizations.

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

Android Training in NYC: http://marakana.com/training/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] Howto manage superuser dialog in my app

2011-04-20 Thread maikelalonso
Hi:

I have an application with a MainActivity with a Forward button. When
I click this button,  I'm requesting for surperuser permissions by
process.Runtime.getRuntime().exec(su). I'm attempting to manage the
dialog with the exitValue(). When I click on deny in Superuser
dialog it works correctly (I make a finish ()) but if I click on
Allow in Superuser dialog it doesn't work correctly (button keep
pressed but an Intent to go to another activity never is executed).

This is the code:

Button btnNext = (Button) findViewById(R.id.btnNext);
btnNext.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View v) {
 try {
process =
Runtime.getRuntime().exec(su);
} catch (IOException e) {

e.printStackTrace();
}
try {
process.waitFor();
} catch (InterruptedException e) {

e.printStackTrace();
}
int exitVal = process.exitValue();

if (exitVal!=0)
{

finish();
}
else
{

Intent intent = new
Intent(MainActivity.this,Types.class);
startActivity(intent);
}

}//onClick
});//onClickListener

I'm blocked here. Any idea?

Thanks!

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


Re: [android-developers] Re: how to access desktop files from android app remotely?

2011-04-20 Thread Nicholas Johnson
I provided the reference links above. RFC 959 describes the protocol 
required to interface between an FTP server/client. Here is another link 
that I think you might find useful: 
http://developer.android.com/guide/basics/what-is-android.html

It deals with how to implement apps in Android using Java.

Nick

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

2011-04-20 Thread Yash Jain
Hello All,
Can you please help me in finding the command prompt on android filesystem.
I am trying to automate few task, the procedure is i will find the command
prompt (#) and then execute few commands but to encounter command prompt i
have to press enter, could you please let me know how to simulate enter key
in shell scripts.
Can anyone help me to supress the messages to be displayed on console for
android file system.

Thanks and Regards,
Yash.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Icons looks blurred instead of being sharp after resizing

2011-04-20 Thread varinag gold
Hi Dianne,

Thanks for your reply.
If I don't resize them some application icons appear larger than
others and suppose the android should choose all resources according
to the device lcd density (hdpi, mdpi or ldpi )?

Regards,
varinag




On Apr 20, 12:09 pm, Dianne Hackborn hack...@android.com wrote:
 The size of app icons is 48x48 dp units.  If you are drawing them at some
 different size, they will be blurry because you are scaling them from their
 designed size.



 On Tue, Apr 19, 2011 at 8:59 PM, varinag gold varinagg...@gmail.com wrote:

  Hi,

  I am displaying a grid of icons of all the applications on my device
  and I found after I resize them to be all same width and height they
  appear on screen some what blurred or foggy .  Also the Icon Text
  looks blurred . I have put code snippet below that actually resizing
  the icons.

  Please let me know if I am missing some thing to make them appear
  sharp on screen.

  Thanks a lot.
  varinag
  -

   if (!info.filtered) {

             int width = 42;
             int height= 42;

             final int iconWidth = icon.getIntrinsicWidth();
             final int iconHeight = icon.getIntrinsicHeight();

             if (icon instanceof PaintDrawable) {
                 PaintDrawable painter = (PaintDrawable) icon;
                 painter.setIntrinsicWidth(width);
                 painter.setIntrinsicHeight(height);
             }

             if (width  0  height  0  (width  iconWidth ||
  height  iconHeight)) {
                 final float ratio = (float) iconWidth / iconHeight;

                 if (iconWidth  iconHeight) {
                     height = (int) (width / ratio);
                 } else if (iconHeight  iconWidth) {
                     width = (int) (height * ratio);
                 }

                 final Bitmap.Config c =
                         icon.getOpacity() != PixelFormat.OPAQUE ?
                             Bitmap.Config.ARGB_ :
  Bitmap.Config.RGB_565;
              //   final Bitmap thumb = Bitmap.createBitmap(80, 80, c);
                 final Bitmap thumb = Bitmap.createBitmap(42, 42, c);
                 final Canvas canvas = new Canvas(thumb);
                 canvas.setDrawFilter(new
  PaintFlagsDrawFilter(Paint.DITHER_FLAG, 0));
                 // Copy the old bounds to restore them later
                 // If we were to do oldBounds = icon.getBounds(),
                 // the call to setBounds() that follows would
                 // change the same instance and we would lose the
                 // old bounds
                 mOldBounds.set(icon.getBounds());
                // icon.setBounds(0, 0, 80, 80);
                 icon.setBounds(0, 0, width, height);
                 icon.draw(canvas);
                 icon.setBounds(mOldBounds);
                 icon = info.icon = new BitmapDrawable(thumb);
                 info.filtered = true;
             }
         }

         final TextView textView = (TextView)
  convertView.findViewById(R.id.label);
         textView.setCompoundDrawablesWithIntrinsicBounds(null, icon,
  null, null);
         textView.setText(info.title);

         return convertView;
     }

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

 --
 Dianne Hackborn
 Android framework engineer
 hack...@android.com

 Note: please don't send private questions to me, as I don't have time to
 provide private support, and so won't reply to such e-mails.  All such
 questions should be posted on public forums, where I and others can see and
 answer them.

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


Re: [android-developers] Re: Icons looks blurred instead of being sharp after resizing

2011-04-20 Thread Marcin Orlowski
On 20 April 2011 13:49, varinag gold varinagg...@gmail.com wrote:

 Hi Dianne,

 Thanks for your reply.
 If I don't resize them some application icons appear larger than
 others and suppose the android should choose all resources according
 to the device lcd density (hdpi, mdpi or ldpi )?


Android do choose, but if image is still not accurate size then scalling
will occur.

Regards,
Marcin Orlowski

*Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
*Date In Tray* http://bit.ly/dateintraypro - current date at glance...
WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
*Twitterhttp://webnetmobile.com/twitter/
*

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

[android-developers] Flash 10.2 on Android 2.2 crashes

2011-04-20 Thread Sumeet
Hi,

I am writing a simple application that loads a flash video in the
webview and plays it.

However, I am facing flash crash issues even in this simple scenario.

Many a times, the flash just crashes after running for 5-10 minutes.
What might be
the reason for this, and what is the way to resolve it?

Thanks.
Sumeet

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

2011-04-20 Thread Sumeet
This can happen when you have an application already installed on the
device, and you try
installing another app with the same name (but different application
signature.)

In that case, you will have to uninstall the previous app before
installation.

On Apr 20, 12:53 am, Kostya Vasilyev kmans...@gmail.com wrote:
 Bob,

 If you have the phone hooked up to a development system with all the
 tools, including Java and Android SDK, you could just run adb logcat
 in a command line window.

 If not, there is a bunch of apps in Market that can read and display the
 logcat right on the phone.

 -- Kostya

 19.04.2011 23:03, bob пишет:



  How do I check the logcat?

  On Apr 18, 5:05 pm, Kostya Vasilyevkmans...@gmail.com  wrote:
  Bob,

  Do you see any relevant messages in the logcat when installation fails?
  19.04.2011 2:03 пользователь Russell DuRossr2s...@gmail.com  написал:

  I tried this previously and also couldn't get an apk to install that
  way - couldn't figure out why. I ended up using dropbox.com to pass
  files between my development PC and my test device - they install fine
  when brought down by Dropbox.
  On Apr 18, 12:31 pm, bobb...@coolgroups.com  wrote:
  I e-mailed an apk file to myself and looked at it thru the Gmail app.
  It showed an install button, so I tried to install it like that, but
  it says Application not installed.
  Anyone know how to fix this?
  I'm on an LG Optimus.
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en

 --
 Kostya Vasilyev --http://kmansoft.wordpress.com

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


[android-developers] Re: How can we open browser in Android through code?

2011-04-20 Thread Steve


This will do:

Uri uri = Uri.parse(http://www.example.com;);
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
startActivity(intent);

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

2011-04-20 Thread Justin Anderson
On Apr 20, 2011 2:34 AM, vix vikas.dh...@gmail.com wrote:

 Hi,

 I am able to navigate activities using listitem click.

Good for you...


 Please share the code

No...


 Thanks
 Vikas Dhar

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

2011-04-20 Thread Neo Apostol
Hi there,
I wrote the method that downloads the file. How can I found out the speed of
downloading the file?
Maybe smb. has written the method like that?

Thank YOU.

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

Re: [android-developers] Speed Download

2011-04-20 Thread Kostya Vasilyev
Speed (rate) is something over time.

Download speed is the number of bytes divided by elapsed time.

Sample code: speed = size / time.
20.04.2011 16:57 пользователь Neo Apostol neo.apos...@gmail.com написал:
 Hi there,
 I wrote the method that downloads the file. How can I found out the speed
of
 downloading the file?
 Maybe smb. has written the method like that?

 Thank YOU.

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

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

Re: [android-developers] Re: Android 2.1 WebKit and applicationCache

2011-04-20 Thread Christopher Dale
I would also be interested to know the current state of the applicationCache 
implementation. I am running into issues in the Android browser with going 
offline where I have no issues on Chrome. I think it would also be helpful 
if there was a central place where the statuses of implemented standards 
were layed out by android version so developers knew what they had to work 
with.

Thanks,

Christopher

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

2011-04-20 Thread markusn82
I tried out several other applications with In-App billing (Dungeon
Defenders and Comics) and they suffered from the same issue.

Are there any official responses from the Android team about this
undocumented way of starting a service?

On Apr 19, 3:51 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 Mark,

 The calls to startService in BillingService are matched by stopSelf(),
 so that's not the cause.

 I believe this long-running service is caused by how the purchase
 activity starts the billing service:

 Dungeons.java

 mBillingService = new BillingService();
 mBillingService.setContext(this);

 I don't see anything in the documentation to support that this is a
 proper way to start a service.

 Bug report:

 http://code.google.com/p/marketbilling/issues/detail?id=8

 The call to unbindService in Dungeons.onDestroy is a bit of a red herring:

 The this in unbindService(this) is BillingService.this as a
 ServiceConnection.

 Therefore, the code unbinds the Vending service (inside Market) from the
 Billing service (inside the application), releasing the former, but does
 nothing to stop the latter.

 -- Kostya

 19.04.2011 22:30, markusn82 пишет:









  Hi,

  I recently implemented In-App billing for an application and I used
  the Dungeons example as a starting point. I noticed that after leaving
  my application (onDestroy is called in the base stack activity), the
  BillingService service is still running on the phone and stays running
  long after. I made sure that I was unbinding from the BillingService
  service during onDestroy of my base activity.

  As I understand it, a service that is started with startService needs
  to be stopped with stopService/stopSelf, even if components bind/
  unbind to it during its lifecycle (See
 http://developer.android.com/guide/topics/fundamentals/bound-services...).
  Does this mean that stopSelf should be called manually after calling
  unbindService() or should the service stop itself automatically?

  I looked further into the example code and saw that the BillingService
  service was being started with startService, but stopService/stopSelf
  was not being called ever. The call to stopSelf does exist in code but
  it is never executed during the lifecycle of the application. Does
  this indicate a bug in the example code or perhaps a bug in my usage.
  I  noticed that the Dungeon example app itself also experiences the
  same problem (service still running after application exited).

  Any help would be appreciated.

  Thanks,

  Mark

 --
 Kostya Vasilyev --http://kmansoft.wordpress.com

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


Re: [android-developers] Re: In-App Billing example service lifecycle

2011-04-20 Thread Kostya Vasilyev

20.04.2011 17:32, markusn82 пишет:

I tried out several other applications with In-App billing (Dungeon
Defenders and Comics) and they suffered from the same issue.

Are there any official responses from the Android team about this
undocumented way of starting a service?


If you mean this list, well, we're both here, and I don't see any, do 
you? :)


Don't see any in the issue I filed, either.

-- Kostya


On Apr 19, 3:51 pm, Kostya Vasilyevkmans...@gmail.com  wrote:

Mark,

The calls to startService in BillingService are matched by stopSelf(),
so that's not the cause.

I believe this long-running service is caused by how the purchase
activity starts the billing service:

Dungeons.java

mBillingService = new BillingService();
mBillingService.setContext(this);

I don't see anything in the documentation to support that this is a
proper way to start a service.

Bug report:

http://code.google.com/p/marketbilling/issues/detail?id=8

The call to unbindService in Dungeons.onDestroy is a bit of a red herring:

The this in unbindService(this) is BillingService.this as a
ServiceConnection.

Therefore, the code unbinds the Vending service (inside Market) from the
Billing service (inside the application), releasing the former, but does
nothing to stop the latter.

-- Kostya

19.04.2011 22:30, markusn82 пишет:










Hi,
I recently implemented In-App billing for an application and I used
the Dungeons example as a starting point. I noticed that after leaving
my application (onDestroy is called in the base stack activity), the
BillingService service is still running on the phone and stays running
long after. I made sure that I was unbinding from the BillingService
service during onDestroy of my base activity.
As I understand it, a service that is started with startService needs
to be stopped with stopService/stopSelf, even if components bind/
unbind to it during its lifecycle (See
http://developer.android.com/guide/topics/fundamentals/bound-services...).
Does this mean that stopSelf should be called manually after calling
unbindService() or should the service stop itself automatically?
I looked further into the example code and saw that the BillingService
service was being started with startService, but stopService/stopSelf
was not being called ever. The call to stopSelf does exist in code but
it is never executed during the lifecycle of the application. Does
this indicate a bug in the example code or perhaps a bug in my usage.
I  noticed that the Dungeon example app itself also experiences the
same problem (service still running after application exited).
Any help would be appreciated.
Thanks,
Mark

--
Kostya Vasilyev --http://kmansoft.wordpress.com



--
Kostya Vasilyev -- http://kmansoft.wordpress.com

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


[android-developers] Re: Appwidget + AsyncTask + Handler

2011-04-20 Thread b_t
The original stack trace is:

Caused by: java.lang.RuntimeException: Can't create handler inside
thread that has not called Looper.prepare()
   at android.os.Handler.init(Handler.java:121)
   at android.bluetooth.BluetoothAdapter
$1.init(BluetoothAdapter.java:961)
   at
android.bluetooth.BluetoothAdapter.init(BluetoothAdapter.java:961)
   at
android.bluetooth.BluetoothAdapter.getDefaultAdapter(BluetoothAdapter.java:
308)
   *** myTask.doInBackground() ***
   at android.os.AsyncTask$2.call(AsyncTask.java:185)
   at java.util.concurrent.FutureTask
$Sync.innerRun(FutureTask.java:305)
   at java.util.concurrent.FutureTask.run(FutureTask.java:137)
   at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:
1068)
   at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:561)
   at java.lang.Thread.run(Thread.java:1102)

I try to explain what I want:

- I have an appwidget with a bluetooth toggle
- If the bluetooth state changes the appwidget will be updated
- If I click on the appwidget than I toggle bluetooth state

If I click on the toggle:

- an IntentService will be executed
- it creates a Handler and displays a toast by Handler.post() with the
message turning off...
- I change bluetooth state
- bluetooth state changes so my broadcast receiver tries to update
appwidget

If I update appwidget in a service than everything is ok except that
APN can occur if the
update process is slow for some reason.

I would like to put appwidget update mechanism into an AsyncTask.
But because of BluetoothAdapter.getDefaultAdapter creates a Handler
(in some roms) it throws
the exception above.

If I put Looper.prepare() in the begin of doInBackground, then the
following error occurs
for a thread (there are five asynctask thread in my device so it
happens very early)

   java.lang.RuntimeException: Only one Looper may be created per
thread

If I use the following code:

Looper myLooper = Looper.myLooper();
if (myLooper == null) {
Looper.prepare();
}

than everything seems fine except one thing: to toast I would like to
display
in the beginning of the process will be displayed much time later.

I don't know why and how can I avoid it.

I hope somebody understand my problem and can give me a solution.

T.


On Apr 20, 10:17 am, Kostya Vasilyev kmans...@gmail.com wrote:
 You could try calling Looper.prepare() first thing in doInBackground().

 Oh, and logcat output would help us help you, as usual.

 -- Kostya

 20.04.2011 12:07, b_t пишет:

  Hi,

  In my app I was going to use an AsyncTask to update appwidget data
  because this process can be long. To get the state I have to call
  BluetoothAdapter.getDefaultAdapter(). The problem is that in some
  device (not in mine) it tries to initialize a Handler and throws
  Exception about
  missing Looper.

  I don't know what should I do.

 --
 Kostya Vasilyev --http://kmansoft.wordpress.com

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


[android-developers] Handle Multi Screen

2011-04-20 Thread Me
Hi Community I am using smack for a chatting module in my application …

Now there is need to handle the multi chat screens.

Right now I am opening my chat screen activity as below

Intent chatIntent=new Intent(HomeActivity.this,ChatActivity.class);

startActivity(chatIntent);

When a user press back button/receive call/other function to that away
him/her from current screen There I need to handle the activity GUI with
data..

What should I do for this ?

Is there other way I can user other View else start to new activity for chat
windows . . . .

How I can handle the multi chat screens ….

Thanks  . .
---
Regards :
   Aftab
---

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

2011-04-20 Thread Kostya Vasilyev
Have you looked at Android's own Power Controls widget? It's part of
Settings application.

Also, is it possible you're dealing with some heavily modified, buggy
firmware?
 20.04.2011 18:00 пользователь b_t bartata...@gmail.com написал:
 The original stack trace is:

 Caused by: java.lang.RuntimeException: Can't create handler inside
 thread that has not called Looper.prepare()
 at android.os.Handler.init(Handler.java:121)
 at android.bluetooth.BluetoothAdapter
 $1.init(BluetoothAdapter.java:961)
 at
 android.bluetooth.BluetoothAdapter.init(BluetoothAdapter.java:961)
 at

android.bluetooth.BluetoothAdapter.getDefaultAdapter(BluetoothAdapter.java:
 308)
 *** myTask.doInBackground() ***
 at android.os.AsyncTask$2.call(AsyncTask.java:185)
 at java.util.concurrent.FutureTask
 $Sync.innerRun(FutureTask.java:305)
 at java.util.concurrent.FutureTask.run(FutureTask.java:137)
 at
 java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:
 1068)
 at java.util.concurrent.ThreadPoolExecutor
 $Worker.run(ThreadPoolExecutor.java:561)
 at java.lang.Thread.run(Thread.java:1102)

 I try to explain what I want:

 - I have an appwidget with a bluetooth toggle
 - If the bluetooth state changes the appwidget will be updated
 - If I click on the appwidget than I toggle bluetooth state

 If I click on the toggle:

 - an IntentService will be executed
 - it creates a Handler and displays a toast by Handler.post() with the
 message turning off...
 - I change bluetooth state
 - bluetooth state changes so my broadcast receiver tries to update
 appwidget

 If I update appwidget in a service than everything is ok except that
 APN can occur if the
 update process is slow for some reason.

 I would like to put appwidget update mechanism into an AsyncTask.
 But because of BluetoothAdapter.getDefaultAdapter creates a Handler
 (in some roms) it throws
 the exception above.

 If I put Looper.prepare() in the begin of doInBackground, then the
 following error occurs
 for a thread (there are five asynctask thread in my device so it
 happens very early)

 java.lang.RuntimeException: Only one Looper may be created per
 thread

 If I use the following code:

 Looper myLooper = Looper.myLooper();
 if (myLooper == null) {
 Looper.prepare();
 }

 than everything seems fine except one thing: to toast I would like to
 display
 in the beginning of the process will be displayed much time later.

 I don't know why and how can I avoid it.

 I hope somebody understand my problem and can give me a solution.

 T.


 On Apr 20, 10:17 am, Kostya Vasilyev kmans...@gmail.com wrote:
 You could try calling Looper.prepare() first thing in doInBackground().

 Oh, and logcat output would help us help you, as usual.

 -- Kostya

 20.04.2011 12:07, b_t пишет:

  Hi,

  In my app I was going to use an AsyncTask to update appwidget data
  because this process can be long. To get the state I have to call
  BluetoothAdapter.getDefaultAdapter(). The problem is that in some
  device (not in mine) it tries to initialize a Handler and throws
  Exception about
  missing Looper.

  I don't know what should I do.

 --
 Kostya Vasilyev --http://kmansoft.wordpress.com

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

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

[android-developers] amdroid GPS problems

2011-04-20 Thread kaushik p
Hi all

i am working on an app which uses the current location  GPS  values .i am
getting some error in the xml file . I have added this line in the xml file,
just before manifest to get permission to access the location values

uses-permission android:name=“android.permission.ACCESS_FINE_LOCATION”
/uses-permission

i am error in the same line , please help me resolve this .

-- 
ThanksRegards
Kaushik Pendurthi

http://kaushikpendurthi.blogspot.com/

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

Re: [android-developers] amdroid GPS problems

2011-04-20 Thread Mark Murphy
You cannot put that just before manifest. That element needs to go
inside the manifest element.

On Wed, Apr 20, 2011 at 10:35 AM, kaushik p kaushiks...@gmail.com wrote:
 Hi all
 i am working on an app which uses the current location  GPS  values .i am
 getting some error in the xml file . I have added this line in the xml file,
 just before manifest to get permission to access the location values
     uses-permission android:name=“android.permission.ACCESS_FINE_LOCATION”
     /uses-permission

 i am error in the same line , please help me resolve this .
 --
 ThanksRegards
 Kaushik Pendurthi
 http://kaushikpendurthi.blogspot.com/

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



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

Android Training in NYC: http://marakana.com/training/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


Re: [android-developers] amdroid GPS problems

2011-04-20 Thread kaushik p
my final XML file appears this way



?xml version=1.0 encoding=utf-8?
manifest xmlns:android=http://schemas.android.com/apk/res/android;
  package=Firstdroid.Tutorial.Gps
  android:versionCode=1
  android:versionName=1.0


application android:icon=@drawable/icon
android:label=@string/app_name
activity android:name=.UseGps
  android:label=@string/app_name
intent-filter
action android:name=android.intent.action.MAIN /
category android:name=android.intent.category.LAUNCHER /
/intent-filter
/activity

/application

uses-permission android:name=“android.permission.ACCESS_FINE_LOCATION”
/uses-permission
/manifest

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

2011-04-20 Thread kaushik p
Thanks mark , i solved the prob

On Wed, Apr 20, 2011 at 8:14 PM, kaushik p kaushiks...@gmail.com wrote:


 my final XML file appears this way



 ?xml version=1.0 encoding=utf-8?
 manifest xmlns:android=http://schemas.android.com/apk/res/android;
   package=Firstdroid.Tutorial.Gps
   android:versionCode=1
   android:versionName=1.0


 application android:icon=@drawable/icon
 android:label=@string/app_name
 activity android:name=.UseGps
   android:label=@string/app_name
 intent-filter
 action android:name=android.intent.action.MAIN /
 category android:name=android.intent.category.LAUNCHER
 /
 /intent-filter
 /activity

 /application

 uses-permission
 android:name=“android.permission.ACCESS_FINE_LOCATION”
 /uses-permission
 /manifest





-- 
ThanksRegards
Kaushik Pendurthi

http://kaushikpendurthi.blogspot.com/

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

[android-developers] Where does Android Emulator store APK files?

2011-04-20 Thread BrickMan
Where does the Android Emulator store APK files on a PC? I did
windows search on c:\program files\ android  for *.apk  but it didn't
return anything.

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


Re: [android-developers] Where does Android Emulator store APK files?

2011-04-20 Thread Kostya Vasilyev
Why would it store .apk's in Windows? It works the same as a real device,
installing applications within its own file system(s).
20.04.2011 19:07 пользователь BrickMan giants...@gmail.com написал:
 Where does the Android Emulator store APK files on a PC? I did
 windows search on c:\program files\ android for *.apk but it didn't
 return anything.

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

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

Re: [android-developers] Problem with timed notification

2011-04-20 Thread Brad Stintson
Thanks a tonne Kostya, that worked just fine.

I have another query, I am unable to pass or retrieve an extra in a
BroadcastReceiver. How can I work that out?

On Wed, Apr 20, 2011 at 1:05 AM, Kostya Vasilyev kmans...@gmail.com wrote:

  19.04.2011 21:48, Brad Stintson пишет:

 When I set alarm for few mins from current time, it shows this
   Elapsed realtime wakeup (now=1263900):
   ELAPSED_WAKEUP #0: Alarm{43d52750 type 2 android}
 type=2 when=112231046 repeatInterval=0 count=0
 operation=PendingIntent{43c2e498: PendingIntentRecord{43c5abb0 android
 broad
 castIntent}}


 This one is a different time of alarm, ELAPSED_REALTIME_WAKEUP, which is
 specified with milliseconds since boot.

 The now value above is about 20 minutes since boot, whereas the when
 value is over 31 hours. This doesn't compute for testing.

 A more typical alarm of this type might be:

   Elapsed realtime wakeup (now=*711975424*):
   ELAPSED_WAKEUP #0: Alarm{452f1648 type 2
 com.google.android.apps.gtalkservice}
 type=2 when=*712046996 *repeatInterval=0 count=0
 operation=PendingIntent{4549a598: PendingIntentRecord{44eadc18
 com.google.android.apps.gtalkservice broadcastIntent}}

 The above says that my device was rebooted some 197 hours ago, and the
 alarm is set to go off some 70 seconds from now.

 Your previous code snippet used RTC_WAKEUP, which uses real time (in
 UTC).

 Which of the two - ELAPSED_REALTIME_WAKEUP or RTC_WAKEUP are you actually
 trying to make work?

 To test your intent and receiver, you could do this:


 Intent activate = new Intent(this, TimeAlarm.class);
 PendingIntent alarmIntent = PendingIntent.getBroadcast(this, 0,
 activate, 0);
 alarms = (AlarmManager)getSystemService(Context.ALARM_SERVICE);
 alarms.set(AlarmManager.RTC_WAKEUP, *System.currentTimeMills() + 30 *
 1000*, alarmIntent);

 The above alarm is set to go off in 30 seconds, and is an easy way to test
 if your intent / receiver / manifest / etc. are correct.


 --
 Kostya Vasilyev -- http://kmansoft.wordpress.com

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


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

[android-developers] Re: SipManager - setAutoRegistration Incoming call intents

2011-04-20 Thread tgisunnysay
 [up]

Please. No one ?

On Apr 5, 5:58 pm, tgisunnysay tgiasunny...@gmail.com wrote:
 Hi,

 I have a question regarding the profile and thesipstack: When my
 profile has setAutoRegistration(false), once I am registered to thesipserver 
 (manually), I don't receive any incoming call intents in my
 broadcastreceiver. But when I let the setAutoRegistration() to default
 (which is true), intents are well sent to my broadcast receiver.

 Any idea why ?

 Thank You.TGI

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

2011-04-20 Thread Kostya Vasilyev
Brad,

You can put the extras in the Intent you create the PendingIntent from.
20.04.2011 19:16 пользователь Brad Stintson geek.bin...@gmail.com
написал:
 Thanks a tonne Kostya, that worked just fine.

 I have another query, I am unable to pass or retrieve an extra in a
 BroadcastReceiver. How can I work that out?

 On Wed, Apr 20, 2011 at 1:05 AM, Kostya Vasilyev kmans...@gmail.com
wrote:

 19.04.2011 21:48, Brad Stintson пишет:

 When I set alarm for few mins from current time, it shows this
 Elapsed realtime wakeup (now=1263900):
 ELAPSED_WAKEUP #0: Alarm{43d52750 type 2 android}
 type=2 when=112231046 repeatInterval=0 count=0
 operation=PendingIntent{43c2e498: PendingIntentRecord{43c5abb0 android
 broad
 castIntent}}


 This one is a different time of alarm, ELAPSED_REALTIME_WAKEUP, which is
 specified with milliseconds since boot.

 The now value above is about 20 minutes since boot, whereas the when
 value is over 31 hours. This doesn't compute for testing.

 A more typical alarm of this type might be:

 Elapsed realtime wakeup (now=*711975424*):
 ELAPSED_WAKEUP #0: Alarm{452f1648 type 2
 com.google.android.apps.gtalkservice}
 type=2 when=*712046996 *repeatInterval=0 count=0
 operation=PendingIntent{4549a598: PendingIntentRecord{44eadc18
 com.google.android.apps.gtalkservice broadcastIntent}}

 The above says that my device was rebooted some 197 hours ago, and the
 alarm is set to go off some 70 seconds from now.

 Your previous code snippet used RTC_WAKEUP, which uses real time (in
 UTC).

 Which of the two - ELAPSED_REALTIME_WAKEUP or RTC_WAKEUP are you actually
 trying to make work?

 To test your intent and receiver, you could do this:


 Intent activate = new Intent(this, TimeAlarm.class);
 PendingIntent alarmIntent = PendingIntent.getBroadcast(this, 0,
 activate, 0);
 alarms = (AlarmManager)getSystemService(Context.ALARM_SERVICE);
 alarms.set(AlarmManager.RTC_WAKEUP, *System.currentTimeMills() + 30 *
 1000*, alarmIntent);

 The above alarm is set to go off in 30 seconds, and is an easy way to
test
 if your intent / receiver / manifest / etc. are correct.


 --
 Kostya Vasilyev -- http://kmansoft.wordpress.com

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


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

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

2011-04-20 Thread social hub
Thanks Kris. Yes I didnt see any errors when I send message to nokia phone.

Has anyone connected successfully to iphone from android over bluetooth. ?

Thanks



On Tue, Apr 19, 2011 at 1:46 PM, Kristopher Micinski krismicin...@gmail.com
 wrote:



 On Tue, Apr 19, 2011 at 9:15 AM, social hub shubem...@gmail.com wrote:

 With Nokia I can establish connection. Here the connection was successful
 but as mentioned when I Send using socket.send() it seems successful I dont
 see any errors on logcat. Any thoughts on why nokia is not showing that
 message. I also flushed as mentioned but I dont see any hello  on nokia
 device


 Hrrm... I don't see why that should happen, and there were no errors on the
 socket?


 With iphone I get connection refused. If i try to pair android from iphone
 i am getting device not supported.


 I don't know why this is, I don't think any apps do Android / Iphone
 Bluetooth


 In short, you might be out of luck, there's no app I know that goes Iphone
 to Android BT connection.

 Usually it's just Android - Android, too bad.


 Kris

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


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

[android-developers] Re: Appwidget + AsyncTask + Handler

2011-04-20 Thread b_t
I don't know what firmware it is but when I updated my app today I got
tons of error mails from different types of devices so it must be a
popular one.

On Apr 20, 4:17 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 Have you looked at Android's own Power Controls widget? It's part of
 Settings application.

 Also, is it possible you're dealing with some heavily modified, buggy
 firmware?
  20.04.2011 18:00 пользователь b_t bartata...@gmail.com написал: The 
 original stack trace is:

  Caused by: java.lang.RuntimeException: Can't create handler inside
  thread that has not called Looper.prepare()
  at android.os.Handler.init(Handler.java:121)
  at android.bluetooth.BluetoothAdapter
  $1.init(BluetoothAdapter.java:961)
  at
  android.bluetooth.BluetoothAdapter.init(BluetoothAdapter.java:961)
  at

 android.bluetooth.BluetoothAdapter.getDefaultAdapter(BluetoothAdapter.java:



  308)
  *** myTask.doInBackground() ***
  at android.os.AsyncTask$2.call(AsyncTask.java:185)
  at java.util.concurrent.FutureTask
  $Sync.innerRun(FutureTask.java:305)
  at java.util.concurrent.FutureTask.run(FutureTask.java:137)
  at
  java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:
  1068)
  at java.util.concurrent.ThreadPoolExecutor
  $Worker.run(ThreadPoolExecutor.java:561)
  at java.lang.Thread.run(Thread.java:1102)

  I try to explain what I want:

  - I have an appwidget with a bluetooth toggle
  - If the bluetooth state changes the appwidget will be updated
  - If I click on the appwidget than I toggle bluetooth state

  If I click on the toggle:

  - an IntentService will be executed
  - it creates a Handler and displays a toast by Handler.post() with the
  message turning off...
  - I change bluetooth state
  - bluetooth state changes so my broadcast receiver tries to update
  appwidget

  If I update appwidget in a service than everything is ok except that
  APN can occur if the
  update process is slow for some reason.

  I would like to put appwidget update mechanism into an AsyncTask.
  But because of BluetoothAdapter.getDefaultAdapter creates a Handler
  (in some roms) it throws
  the exception above.

  If I put Looper.prepare() in the begin of doInBackground, then the
  following error occurs
  for a thread (there are five asynctask thread in my device so it
  happens very early)

  java.lang.RuntimeException: Only one Looper may be created per
  thread

  If I use the following code:

  Looper myLooper = Looper.myLooper();
  if (myLooper == null) {
  Looper.prepare();
  }

  than everything seems fine except one thing: to toast I would like to
  display
  in the beginning of the process will be displayed much time later.

  I don't know why and how can I avoid it.

  I hope somebody understand my problem and can give me a solution.

  T.

  On Apr 20, 10:17 am, Kostya Vasilyev kmans...@gmail.com wrote:
  You could try calling Looper.prepare() first thing in doInBackground().

  Oh, and logcat output would help us help you, as usual.

  -- Kostya

  20.04.2011 12:07, b_t пишет:

   Hi,

   In my app I was going to use an AsyncTask to update appwidget data
   because this process can be long. To get the state I have to call
   BluetoothAdapter.getDefaultAdapter(). The problem is that in some
   device (not in mine) it tries to initialize a Handler and throws
   Exception about
   missing Looper.

   I don't know what should I do.

  --
  Kostya Vasilyev --http://kmansoft.wordpress.com

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

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


Re: [android-developers] Bluetooth socket send issue

2011-04-20 Thread Kristopher Micinski
No, I don't believe so.

I heard this is why the bump app did not use it, but I might be incorrect.
 (See if you can find any apps on the market, it's possible there are.)

Kris

On Wed, Apr 20, 2011 at 11:20 AM, social hub shubem...@gmail.com wrote:

 Thanks Kris. Yes I didnt see any errors when I send message to nokia phone.

 Has anyone connected successfully to iphone from android over bluetooth. ?

 Thanks



 On Tue, Apr 19, 2011 at 1:46 PM, Kristopher Micinski 
 krismicin...@gmail.com wrote:



 On Tue, Apr 19, 2011 at 9:15 AM, social hub shubem...@gmail.com wrote:

 With Nokia I can establish connection. Here the connection was successful
 but as mentioned when I Send using socket.send() it seems successful I dont
 see any errors on logcat. Any thoughts on why nokia is not showing that
 message. I also flushed as mentioned but I dont see any hello  on nokia
 device


 Hrrm... I don't see why that should happen, and there were no errors on
 the socket?


 With iphone I get connection refused. If i try to pair android from
 iphone i am getting device not supported.


 I don't know why this is, I don't think any apps do Android / Iphone
 Bluetooth


 In short, you might be out of luck, there's no app I know that goes Iphone
 to Android BT connection.

 Usually it's just Android - Android, too bad.


 Kris

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

2011-04-20 Thread Stanislav Orlenko aka Smith
Hi
There is a tablet http://www.archos.com/products/ta/archos_70it
On this device buttons Back, Menu, Home, Search located on the screen
http://www.archos.com/img/archos_70it/download/ARCHOS_70_it_front_home_screen.jpg
Which API should I use to find out a size of panel with these buttons?
Thanks

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


[android-developers] Re: Using cursor

2011-04-20 Thread Fougère
You request only one column (passwd). The column index in the cursor
is 0-based, so you should do :

password = c.getString(0);

And you should test the size of your cursor :

 if(c!=null  c.moveToFirst()) {
password = c.getString(0);
}



On 14 avr, 09:10, amey bura ameybur...@gmail.com wrote:
 hi.. i have created login(empname , passwd) table.. I am trying to
 fetch passwd from table for perticular empname by calling a function
 getpwd ()from another activity ..
 I am using following query..

 public String getpwd(String uname)  throws SQLException

 {
     Cursor c  = db.rawQuery(select passwd from emp where
 empname='+uname+' ,null);
           if(c!=null)
        c.moveToFirst();
           password = c.getString(4);

 }

 This code giving an error in logcat as
 java.lang.IllegalStateException:   initialise cursor properly..

 can anyone plz tell me how to remove this errors..?

 any  suggetions  are welcome..

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: setting initial scroll position in scrollable widget

2011-04-20 Thread Don
It looks like setting the scroll position in a RemoteViews object is
broken in ways other than the timing issue mentioned above.  Let's say
I have a count of 80 items in the listview, and I have manually (with
finger) scrolled down to the bottom of the list (item 79).  At that
point, calling remoteViews.setScrollPosition(0) will not cause the
list to make item 0 in the list visible.  Instead it will make item 60
visible in the list.  It seems to me that RemoteViews has a cache of
about 20 elements or so elements that it has obtained from the
RemoteViewsFactory, and when you set the scroll position to an index,
it's using that index relative to it's internal cache, NOT as an
absolute position in the entire list.  So setting the scroll position
to index 0 only works if the listview is currently showing items
between 0 and 20.  Ughh.

Anyway, if anybody has any thoughts on this, I'd like to hear them,
but at this point it sounds like I just need to open a bug report on
these new peculiarities in API 11.

Thanks,
Don

On Apr 13, 1:46 pm, Don donflane...@gmail.com wrote:
 How can I set the initial scroll position in a scrollable widget?
 Calls to remoteViews.setScrollPosition followed by
 appWidgetManager.partiallyUpdateAppWidget do not seem to work until
 some point after at least some of the data has been queried via my
 RemoteViewsService.RemoteViewsFactory implementation.  Perhaps the app
 widget manager has to have some list data prior to being able to set
 the index, but this seemingly makes it impossible to set the scroll
 position immediately after the widget is created.  I'd think I could
 tell the AppWidgetManager the initial position in the list and it
 would start it's querying for data at that position.

 Any pointers would be much appreciated.

 Thanks,
 Don

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

2011-04-20 Thread Parry
Hi,

I am comletely new to Android Programming.I just wanted to know how to
use a particular font type for an item in List View in Android or in
other words how to customize the font in ListView in Android.It would
be really helpful if you could provide a code snippet to explain the
same.

Thanks,
Parry

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

2011-04-20 Thread Prasannaa
Hi,

   Is there a way to specify the following properties through intent
while trying to play a video/audio file.
   I want to use the intent and not the MediaPlayer/VideoView/
SurfaceView for playing the video/audio.

  The properties that i would like to set are ,
 loop - Yes/No
 autoplay - Yes/No
 controls - show/hide


thanks in advance,
Prasnnaa

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

2011-04-20 Thread Ozan Çağlayan

Hi,

On my Linux system, the provided emulator by Google, doesn't shut down 
correctly. After confirming the shut down by pressin OK, the throbber 
keeps spinning and says Shutting down but it actually never shuts down.


Looking through logcat:

I/ShutdownThread(   61): Sending shutdown broadcast...
W/SyncManager(   61): Writing sync state before shutdown...
I/ShutdownThread(   61): Shutting down activity manager...
I/UsageStats(   61): Writing usage stats before shutdown...
W/BatteryStats(   61): Writing battery stats before shutdown...
W/ShutdownThread(   61): Turning off radio...
I/TelephonyRegistry(   61): notifyDataConnection: state=0 
isDataConnectivityPossible=false reason=radioTurnedOff 
interfaceName=/dev/omap_csmi_tty1 networkType=3

I/ShutdownThread(   61): Waiting for Bluetooth and Radio...
I/TelephonyRegistry(   61): notifyServiceState: 3 home null null null  
Unknown CSS not supported -1 -1RoamInd: -1DefRoamInd: -1EmergOnly: false
D/NetUtils(   61): failed to remove default route for 
/dev/omap_csmi_tty1: No such device
I/TelephonyRegistry(   61): notifyDataConnection: state=0 
isDataConnectivityPossible=false reason=radioTurnedOff 
interfaceName=null networkType=0

D/Tethering(   61): MasterInitialState.processMessage what=3
I/ShutdownThread(   61): Radio and Bluetooth shutdown complete.
I/ShutdownThread(   61): Shutting down MountService
I/MountService(   61): Shutting down
I/PackageManager(   61): Updating external media status from mounted to 
unmounted

D/VoldCmdListener(   29): asec list
I/PackageManager(   61): No secure containers on sdcard
D/VoldCmdListener(   29): storage users /mnt/sdcard
D/dalvikvm(   61): GC_EXPLICIT freed 486K, 48% free 4427K/8391K, 
external 4815K/5931K, paused 86ms
I/PackageManager(   61): Updating external media status from unmounted 
to unmounted

D/VoldCmdListener(   29): volume unmount /mnt/sdcard force
D/Vold(   29): Volume sdcard state changing 4 (Mounted) - 5 
(Unmounting)

V/MediaProvider(  221): Detached volume: external
I/Vold(   29): /mnt/secure/staging/.android_secure sucessfully unmounted
I/Vold(   29): /mnt/secure/asec sucessfully unmounted
I/Vold(   29): /mnt/secure/staging sucessfully unmounted
I/Vold(   29): /mnt/sdcard unmounted sucessfully
D/Vold(   29): Volume sdcard state changing 5 (Unmounting) - 1 
(Idle-Unmounted)
I/PackageManager(   61): Updating external media status from unmounted 
to unmounted
I/StorageNotification(  124): Media {/mnt/sdcard} state changed from 
{mounted} - {unmounted}

W/ShutdownThread(   61): Result code 0 from MountService.shutdown
D/VoldCmdListener(   29): volume shared /mnt/sdcard ums
D/dalvikvm(  124): GC_CONCURRENT freed 635K, 54% free 2834K/6151K, 
external 2160K/2630K, paused 5ms+11ms

I/ShutdownThread(   61): Performing low-level shutdown...

It stays here. Any ideas?

Thanks,
Ozan Caglayan

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

2011-04-20 Thread zooldk
Hi All,

Is there any way to do a picture-in-picture video view on android?.
Such that a video is playing in fullscreen in the background and that
a smaller video canvas is displayed on top of that?

It's probably not possible through using two videoView tags like I
did.. And I did not expect that either:

   VideoView
android:id=@+id/surface_view
android:layout_width=wrap_content
android:layout_height=wrap_content
/

VideoView
android:id=@+id/surface_view2
android:layout_width=wrap_content
android:layout_height=wrap_content
/

Is there another way?
If so, can anyone provide a small example, with java source and xml
layout.

-Ciao!
/Steffen

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

2011-04-20 Thread zero4infinitive
Hello,

Can you please tell me the instructions to make my Android a root user
accessible ?

I have a Samsung Galaxy Europa (GT-i5500) which has Android 2.1. I am
interested in installing Android 2.2 or Android 3.0 and needs help for
that too.

Has someone tried dual boot of Androids?

Hoping to hear soon.

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

2011-04-20 Thread fycd
Hi all:

I get Excessive JNI global references (2001) while doing monkey test in
compose activity of email.

and in logcat, I find a log:
04-14 00:01:03.353 W/dalvikvm( 2217):  1468 of
Lcom/android/server/am/ServiceRecord; 196B (1468 unique)

I think it is too much global reference about
android.server.am.ServiceRecord. But I can't make sure who cause it.

I find a lot of IME's log, and AudioPolicyManager/AudioSystem's log.

Pls some one give me a thought to figure out, thanks

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

[android-developers] peer to peer streaming protocol

2011-04-20 Thread parag bafna
Hello,
Please suggest me a peer to peer streaming protocol that works with Android
?

-- 
With Best Wishes,
Parag Bafna,

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

2011-04-20 Thread jcooper1
Did you ever solve this ?? It's really annoying that there are errors
in the sample code.

On Apr 5, 11:30 am, mmontecchi massimo.montec...@gmail.com wrote:
 I have the same problem. Here is my details:

     [javac] /android-sdk-linux_x86/tools/ant/main_rules.xml:384:
 warning: 'includeantruntime' was not set, defaulting to
 build.sysclasspath=last; set to false for repeatable builds
     [javac] Compiling 9 source files to /home/massimo/android-sdk-
 linux_x86/samples/android-11/XmlAdapters/bin/classes
     [javac] /android-sdk-linux_x86/samples/android-11/XmlAdapters/src/
 com/example/android/xmladapters/RssReaderActivity.java:20: cannot find
 symbol
     [javac] symbol  : class XmlDocumentProvider
     [javac] location: package android.content
     [javac] import android.content.XmlDocumentProvider;
     [javac]                       ^

 On Mar 16, 12:13 pm, j.s. mammen mamm...@gmail.com wrote:



  Hi all, I am trying to compile and run the XmlAdapter sample from thesdk, 
  also referenced in the below 
  URLhttp://developer.android.com/resources/samples/XmlAdapters/index.html

  I am unable to compile and run due to following errors listed below,
  any help is greatly appreciated.
  I am using API level 8, also tried with 10, no change in errors.

  -- errors begin --

  mContext cannot be resolved Adapters.java /Feedsample/src/com/example/
  android/xmladapters    line 914        Java Problem
  mContext cannot be resolved     Adapters.java   /Feedsample/src/com/example/
  android/xmladapters    line 972        Java Problem
  mContext cannot be resolved     Adapters.java   /Feedsample/src/com/example/
  android/xmladapters    line 973        Java Problem
  mContext cannot be resolved     Adapters.java   /Feedsample/src/com/example/
  android/xmladapters    line 976        Java Problem
  mFrom cannot be resolved        Adapters.java   /Feedsample/src/com/example/
  android/xmladapters    line 938        Java Problem
  mTo cannot be resolved  Adapters.java   /Feedsample/src/com/example/
  android/xmladapters    line 937        Java Problem
  mTo cannot be resolved  Adapters.java   /Feedsample/src/com/example/
  android/xmladapters    line 939        Java Problem
  The import android.content.XmlDocumentProvider cannot be resolved
  RssReaderActivity.java  /Feedsample/src/com/example/android/
 xmladapters
  line 20 Java Problem

  -- errors end -

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

2011-04-20 Thread YWT
Thanks for the reply.
I tried a 'force close' simulation by a divide-by-zero situation.  I
cannot see the offending line information in the log.
Unless you mean using the Log class to output log messages myself, I
don't see the information from the log window.
It would be much appreciated if you can give more details.

On Apr 14, 9:13 pm, TreKing treking...@gmail.com wrote:
 On Mon, Apr 11, 2011 at 9:12 PM, YWT yamwaits...@gmail.com wrote:
  In a debugging session in Eclipse running with the Android emulator, is
  there a way to know which is the offending line of code when a force close
  occurs?

 Read the log.

 -
 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


[android-developers] programming a simple form application

2011-04-20 Thread elad2109
Hi,

I'm trying to write a java code on an Android emulator that will send
a string to a web service writen in c#.

Android code:
 HttpPost httppost = new HttpPost(http://192.168.2.1:53811/WinnerSite/
WebService.asm/MyMethod



try {
// Add your data
Listnamevaluepair nameValuePairs = new
ArrayListnamevaluepair(2);
nameValuePairs.add(new BasicNameValuePair(json, name));
  //  nameValuePairs.add(new BasicNameValuePair(stringdata,
AndDev is Cool!));
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));

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



Also tried:

HttpPost httppost = new HttpPost(http://192.168.2.1:53811/
WinnerSite/WebService.asm/MyMethod



The web-service is on the same machine as the emulator. MyMethod is
accessable through:

http://localhost:53811/WinnerSite/WebService.asmx/MyMethod


I have two problems:
1. When running in debug mode in eclipse, my emulator keeps shuting
down. What should I examin?
2. The execution fails on the httpclient.execute line. Any idea how
can I fix that?


Thanks guys

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

2011-04-20 Thread Finn Johnsen
I've made a very short step-by-step blog post on how to get to see the
android sources in eclipse.

http://johnsenf.blogspot.com/2011/04/android-sources-in-eclipse.html

hope it helps

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Create a daemon in \frameworks\base\cmds\

2011-04-20 Thread wayne
I created \frameworks\base\cmds\qaipd daemon by copy over the
\frameworks\base\cmds\hdmid daemon example .  But the compilation
didn’t pick up my “qaipd”.

I searched for all “hdmid” but only found that it was in “\frameworks
\base\cmds\hdmid \Android.mk” and “system/core/rootdir/etc/
init.qcom.rc”.  I added “qaipd” into “system/core/rootdir/etc/
init.qcom.rc”; and into “\frameworks\base\cmds\qaipd\Android.mk”.

So I don’t know why the build can pick up “hdmid”, but not “qaipd”.
Can anyone tell me which Android.mk or other file I am missing to
include “qaipd” into the build? thanks.

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


[android-developers] Android Market Place

2011-04-20 Thread atul paliwal
I want to create Android Market Place like app. Can anyone tell me how
to create app store in Android. Which Web Technology has been used in
this app store?

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

2011-04-20 Thread Fougère
You just need to build the right URL and display it in a webview.
Use facebook web api documentation to build the url you need.

http://developers.facebook.com/

On 16 avr, 07:59, Laxmi Verma laxmiverma.andr...@gmail.com wrote:
 Hi,

 I want to integrate facebook and twitter into my android app.  Everwhere I
 found the code of showing the dialog box of facebook and twitter login and
 then posting the content from there.
 What I want to do is, on twitter or facebook button click it should forward
 to twitter site for e.g. m.twitter.com and my article id should get
 displayed in the tweet box (twitter) or walll post box (facebook) in the
 site directly.
 Just like it has done in ndtv app.
 Please do help in this.

 Thanks  Regards,
 Laxmi Verma

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

2011-04-20 Thread montassar zarroug

A Samsung Galaxy


svp tu peut me envoyer tout le code Array list to spinner OR json
Array to java Array ?

je  besoin une 'intégralité du code ou de détail.

merci :)

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

2011-04-20 Thread dulal
I want catch the event of sending email with an application which will
do some task autometically when any message is sent from mobile. I
hope somone will help me.

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


[android-developers] How to Upgrade Android Platform - opencv issue

2011-04-20 Thread Kedar Manekar
Hi,
My HTC magic have Android 1.5 installed on it. I am planning to run
the opencv based CVCamera.apk on it. I am facing error as the opencv
requires Platform 1.7. How should i upgrade the platform?
Any help is useful.

Thanks
Kedar

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: startactivity vs launch from home screen - for adobe AIR app

2011-04-20 Thread MOLA
I am looking for some help on launching the android browser through a
button click in Adobe Air.  I cannot seem to find any resources to do
this.  The modified the code below with the VIEW intent and I set a
DataUri but I have had little success.  I have been searching for a
while and cannot seem to find any support on the adobe site that
provides a simple example.  Is there any trick to get this going?

Thanks

On Feb 28, 11:25 pm, Niket niket.kapa...@gmail.com wrote:
 I finally achieved what I wanted.

 Here is the code.

 Intent myIntent;
 myIntent = new Intent(this, newActivity.class);
 myIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
 myIntent.addCategory(android.intent.category.LAUNCHER);   //earlier
 I did not add this line.
 myIntent.setAction(android.intent.action.MAIN);                    //
 earlier I did not add this line.
 startActivityForResult(myIntent, 10);

 To debug the issue: i used LogCat log. I checked the difference
 between when activity is started by clicking in home screen and
 started from another activity.

 On Feb 24, 7:38 pm, Niket niket.kapa...@gmail.com wrote:







  Hi,

  I downloaded this java application from net.
  Link 
  :http://rosarioconti.wordpress.com/2010/10/03/extending-your-android-a...

  Basically this application uses
  dexLoader.loadClass(com.adobe.air.AndroidActivityWrapper) to create
  class instance and then call OnCreate() method of Adobe Air class
  with swf file name as an argument. And so air runtime is launched and
  SWF file is run.

  This activity is working perfectly fine.

  Now when I try to launch same activity via startactivity(), activity
  is launched successfully. All function calls are done successfully.
  But Air application is not launched. I can say, Java part is loaded
  successfully because I can see buttons which I put in java app layout.

  I am not getting the reason, why application launches AIR module and
  SWF while invoking directly but not when calling from another
  activity.

  I tried several permutations like : multiprocess flag true; specify
  process name; specify task affinity etc.; but no luck!!!

  So I want to know:

  1. What is difference between startactivity()  and clicking on
  activity from home screen?
  2. How to invoke Air Application via StartActivity?

  Thanks
  Niket

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 current time OR GMT offset for any location.

2011-04-20 Thread Fougère
I think it is not possible directly from android SDK. You can get a
timezone from a city name, but not from lat/long values (see
http://developer.android.com/intl/fr/reference/java/util/TimeZone.html
setID() and getAvailableIDs() )

You can make a request to a webservice that will give you the time
zone from lat/long. See 
http://stackoverflow.com/questions/55901/web-service-current-time-zone-for-a-city
for more information.

On 16 avr, 10:17, Amita Dev amita.develo...@gmail.com wrote:
 Hi,
     Is it possible to get current time / GMT offset for any location?
 For that location I have longitude / latitude but that is not my current
 location.

 Thanks,
 -A

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


Re: [android-developers] Re: Android Apps, move apps into phone's memory, or switch them into external memory.

2011-04-20 Thread Kelsey Dawes
Somebody has to wield the big hammer - if bad questions aren't shouted down,
it encourages further abuse.

I appreciate the service TreKing provides in this regard.  You'll notice
that he answers good questions too.

-Kelsey

On Fri, Apr 15, 2011 at 12:54 PM, Android K interconnectt...@gmail.comwrote:

 I agree. But there should be some benefit of doubt rather than arrogant
 answers. You don't need to be Android expert to say Read documentation.



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

[android-developers] How to get MD5 fingerprint for google maps in windows 7 ?

2011-04-20 Thread Goutom
Hello,
 How to get MD5 fingerprint in windows 7(64 bit) to use  google maps  in
my app?Can any one give me an example?
Thanks in advance.

Regards,
Goutom.

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

2011-04-20 Thread manu
Hello Friends,

I wanted to implement bar code scanning feature in App and then use
that for searching products.
Can you please share relevant helpful information?

Thanks,
Manu

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

2011-04-20 Thread Ssj5Trunks
Hi, I created an application with 2 Activities as set in the Manifest
MAIN and LAUNCHER because I want to have 2 separate icons that launch
the Activity in the menu of applications.

It happens to me that when I download the program from the market and
it's installed, when I click on the notification icon it ask me what
program to associate with my application, why?

How do I set the default Activity from the notification to start
installation?

If you want test it is SysInfo Widget.

Thanks to all
Bye

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

2011-04-20 Thread Lei Gao
Hi Tor,
Have you tried reproducing the problem in a Mac OS X?
I am using a MacBook and I met the same problem.
What I did is like the following:

1. Create a new project of android.
2. Right-click on res folder, then New a folder named menu.
3. Right-click on the menu folder, then New a file.
4. At the New File dialog, input a filename, like menu.xml, then press
the finish button.
5. Eclipse hangs..

My developing environment is:
Mac OS X v10.6.7
Eclipse IDE for Java Developers
Version: Helios Service Release 2
Build id: 20110218-0911
Android SDK v2.2

Hope the information will be useful for you.


On 4月10日, 上午5时53分, Tor Norbye tnor...@google.com wrote:
 On Fri, Apr 8, 2011 at 12:06 PM, Dustin r.dustin.l...@gmail.com wrote:
  Tor,
  Thanks for the input.  I was not aware of the New Android XML File
  wizard.  I was just creating a new folder called Menu and then
  placing a new xml inside it called menu.xml.  After trying the
  wizard, everything seems to develop just fine.

 I'm glad to hear you've got a solution!

 However, opening the file should never cause the IDE to freeze, so I'd
 like to find out exactly what you did to see if I can reproduce it
 here -- and more importantly, fix it. I've tried using the New XML
 File (the builtin Eclipse template instead of the Android specific
 one) and that too worked for me. So can you tell me in very explicit
 detail what you did? E.g. you created a folder called Menu under
 Res, presumably using the new-wizard, and then how did you place a
 new XML file in there? Using a wizard (if so, which template?), or
 copying from elsewhere, or did you do it on disk using file explorer
 or something? If so, what were the exact contents of the file you
 placed there?

 Thanks,
   Tor

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] emulator.exe has encountered a problem and needs to close. We are sorry for the inconvenience.emulator.exe has encountered a problem and needs to close. We are sorry for the inc

2011-04-20 Thread Swapnil Lipare
emulator.exe has encountered a problem and needs to close.  We are
sorry for the inconvenience.emulator.exe has encountered a problem and
needs to close.  We are sorry for the inconvenience.


plz tell me the solution

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


Re: [android-developers] Re: Icons looks blurred instead of being sharp after resizing

2011-04-20 Thread Dianne Hackborn
Some applications seem to be kind-of lame and not actually have app icons of
the right size.  You'll want to ensure the icons you get are the right size
by scaling them if they aren't actually the correct size.  Launcher and
other things do this.

On Wed, Apr 20, 2011 at 4:49 AM, varinag gold varinagg...@gmail.com wrote:

 Hi Dianne,

 Thanks for your reply.
 If I don't resize them some application icons appear larger than
 others and suppose the android should choose all resources according
 to the device lcd density (hdpi, mdpi or ldpi )?

 Regards,
 varinag




 On Apr 20, 12:09 pm, Dianne Hackborn hack...@android.com wrote:
  The size of app icons is 48x48 dp units.  If you are drawing them at some
  different size, they will be blurry because you are scaling them from
 their
  designed size.
 
 
 
  On Tue, Apr 19, 2011 at 8:59 PM, varinag gold varinagg...@gmail.com
 wrote:
 
   Hi,
 
   I am displaying a grid of icons of all the applications on my device
   and I found after I resize them to be all same width and height they
   appear on screen some what blurred or foggy .  Also the Icon Text
   looks blurred . I have put code snippet below that actually resizing
   the icons.
 
   Please let me know if I am missing some thing to make them appear
   sharp on screen.
 
   Thanks a lot.
   varinag
   -
 
if (!info.filtered) {
 
  int width = 42;
  int height= 42;
 
  final int iconWidth = icon.getIntrinsicWidth();
  final int iconHeight = icon.getIntrinsicHeight();
 
  if (icon instanceof PaintDrawable) {
  PaintDrawable painter = (PaintDrawable) icon;
  painter.setIntrinsicWidth(width);
  painter.setIntrinsicHeight(height);
  }
 
  if (width  0  height  0  (width  iconWidth ||
   height  iconHeight)) {
  final float ratio = (float) iconWidth / iconHeight;
 
  if (iconWidth  iconHeight) {
  height = (int) (width / ratio);
  } else if (iconHeight  iconWidth) {
  width = (int) (height * ratio);
  }
 
  final Bitmap.Config c =
  icon.getOpacity() != PixelFormat.OPAQUE ?
  Bitmap.Config.ARGB_ :
   Bitmap.Config.RGB_565;
   //   final Bitmap thumb = Bitmap.createBitmap(80, 80, c);
  final Bitmap thumb = Bitmap.createBitmap(42, 42, c);
  final Canvas canvas = new Canvas(thumb);
  canvas.setDrawFilter(new
   PaintFlagsDrawFilter(Paint.DITHER_FLAG, 0));
  // Copy the old bounds to restore them later
  // If we were to do oldBounds = icon.getBounds(),
  // the call to setBounds() that follows would
  // change the same instance and we would lose the
  // old bounds
  mOldBounds.set(icon.getBounds());
 // icon.setBounds(0, 0, 80, 80);
  icon.setBounds(0, 0, width, height);
  icon.draw(canvas);
  icon.setBounds(mOldBounds);
  icon = info.icon = new BitmapDrawable(thumb);
  info.filtered = true;
  }
  }
 
  final TextView textView = (TextView)
   convertView.findViewById(R.id.label);
  textView.setCompoundDrawablesWithIntrinsicBounds(null, icon,
   null, null);
  textView.setText(info.title);
 
  return convertView;
  }
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   android-developers+unsubscr...@googlegroups.com
   For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en
 
  --
  Dianne Hackborn
  Android framework engineer
  hack...@android.com
 
  Note: please don't send private questions to me, as I don't have time to
  provide private support, and so won't reply to such e-mails.  All such
  questions should be posted on public forums, where I and others can see
 and
  answer them.

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




-- 
Dianne Hackborn
Android framework engineer
hack...@android.com

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others 

[android-developers] Re: PendingIntent question

2011-04-20 Thread Fougère
a 10 seconds search on google gave me this answer :
http://stackoverflow.com/questions/3606596/android-start-activity-from-service

please search before asking ...

On 16 avr, 02:43, dashman erjdri...@gmail.com wrote:
 i create PendingIntent and notification from a service.

                 PendingIntent contentIntent = PendingIntent.getActivity( 
 context, 0,
 notificationIntent, PendingIntent.FLAG_CANCEL_CURRENT );

 it creates a notification, user taps on the notification and then
 the activity gets called...

 works fine.

 what i'd like to do is to call the activity immediately from the
 background service and then have the notification act as more
 of a message to user that the activity was called.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Does Android1.6 support Serial Port? any Examples?

2011-04-20 Thread Chen Frank
I am porting the android source on NEC EMMA MOBILE 1.
I want to do some program by Serial Port on Android 1.6.

Is there any Examples?

PS: maybe I will have some other questions. I hope I can get helps
from you guys.

Thank you .

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


[android-developers] SAXParser throws exception for bad character in CDATA block, bug???

2011-04-20 Thread Phil Bayfield
I'm having an issue with SAXParser on an RSS feed from a vBuletin forum.

The parser throws SAXException - At line 212, column 26: not well-formed
(invalid token) when it encounters a right apostrophe character -
http://www.fileformat.info/info/unicode/char/2019/index.htm

I realise this is a unicode character and the feed is ISO-8859-1, however
the character falls in a CDATA block, which the parser is supposed to
ignore.

Anyone encountered this before and know a work around? I've tried things
like forcing UTF-8 with no luck.

Is this a bug that the parser is not ignoring data in the CDATA block?

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

2011-04-20 Thread Fougère
Hi,
I'm currently developping a library for Android. I would like to keep
the source closed (it is a professional project with no open-source
allowed). Is there a way to do it ?
I remember a presentation made by Mark Murphy in London, where he
explained how to do it, but I just can't find it on the web.

Thanks

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


[android-developers] Are NewWeakGlobalRef()/DeleteWeakGlobalRef() already implemented?

2011-04-20 Thread tueda
Hi, android developers!

In the past e-mail (http://groups.google.com/group/android-developers/
browse_thread/thread/c8c84265a97cd2f4),
I found both NewWeakGlobalRef()/DeleteWeakGlobalRef() were not
implemented yet,
but you should see it sooner rather than later.

The other day I invoked NewWeakGlobalRef() and used returned jweak
values. They always crashed (SIGSEGV).
My question is Are NewWeakGlobalRef()/DeleteWeakGlobalRef() already
implemented?
(I expect the answer is NO.)
Of course, NewGlobalRef()/DeleteGlobalRef() works fine.
But I strongly need Weak global reference.

Thanks.

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


[android-developers] Re: C2DMBroadcastReceiver in Activity

2011-04-20 Thread Finn Johnsen
this guide got me up and running: http://code.google.com/android/c2dm/index.html

only thing its missing, is how the server authenticates (the auth
variable in the http post), but i found that pretty easily elsewhere

On Apr 14, 2:31 pm, nino nino.muel...@gmail.com wrote:
 I have an application that uses C2DM notifications. I'm pretty new to
 Android development because I think my problem is actually quite
 simple and I just don't know how the android architecture works so
 here it goes, I hope you guys can help.

 What I did basically is copy the classes C2DMBaseReceiver,
 C2DMBroadcastReceiver and C2DMMessaging from the chrometophone
 project. I then created a C2DMReceiver extends C2DMBaseReceiver and
 created the override events. The onMessage event works, as I added a
 log entry to output the data I push to the device. Now I have an
 activity and would like to pop up an alert box from the (already
 opened) activity, as soon as a message is pushed to my device. I'm
 really lost here, as I can't figure it out.

 Google and many different forums/mailing lists are suggesting me to
 initiate a BroadCastReceiver in the activity and override the
 onReceive method. The problem is that the C2DMBroadcastReceiver has
 declared the onReceive method as final, so there is no way to
 overwrite it. So I started to think, that this is not the right way to
 go...

 I found some other example, telling me to send a broadcast from my
 C2DMReceiver and watch this from my Activity, I think this sounds
 reasonable, but I have no idea how to implement it.. Does anyone of
 you have some examples on how to get started here?

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


[android-developers] Mock Location Provider

2011-04-20 Thread D|3-H4rD
Hi guys,

This is my first android app...

I have a problem, this app work only on google maps and not on others
navigator software like copilot. Copilot tell me there is not gps
signal...

Pls help me


import android.location.Location;
import android.location.LocationManager;
import android.location.LocationProvider;
import android.os.Handler;

public class LocationMock {

private static String GPS_PROVIDER_NAME = gps;

private int mMockLocationSecondsPassed = 0;
private int mMockLocationCurrentIndex = -1;

private Handler mMockLocationHandler = new Handler();

private LocationManager mLocationManager = null;
private Location currentLocation = null;

private double[][] mMockLocations = new double[][] {
{ 53.14131, 8.20885 },
{ 53.14153, 8.20318 },
{ 53.14212, 8.19638 },
{ 53.14417, 8.19142 },
{ 53.14581, 8.18793 },
{ 53.14808, 8.18876 },
{ 53.15014, 8.19162 },
{ 53.14913, 8.20005 },
{ 53.14871, 8.20582 },
{ 53.14677, 8.20953 },
{ 53.14251, 8.21052 }
};

public LocationMock(LocationManager pLocationManager) {

mLocationManager = pLocationManager;

}

private Runnable mMockLocationRunnable = new Runnable() {

public void run() {

if (++mMockLocationSecondsPassed == 5) {
getMockLocation();
mMockLocationSecondsPassed = 0;
}

mMockLocationHandler.postDelayed(this, 1000);
}

};

public void startMockupLocationCycling() {

if (mLocationManager.getProvider(GPS_PROVIDER_NAME) != null) {
  
mLocationManager.removeTestProvider(GPS_PROVIDER_NAME);
}


mLocationManager.addTestProvider(
GPS_PROVIDER_NAME,
requiresNetwork == ,
requiresSatellite == ,
requiresCell == ,
hasMonetaryCost == ,
supportsAltitude == ,
supportsSpeed == ,
supportsBearing == ,

android.location.Criteria.POWER_LOW,
android.location.Criteria.ACCURACY_FINE
);

getMockLocation();
mMockLocationRunnable.run();
}

private void getMockLocation() {

double[] mockLocationLatLng = mMockLocations[+
+mMockLocationCurrentIndex % mMockLocations.length];

currentLocation = new Location(GPS_PROVIDER_NAME);

currentLocation.setLatitude(mockLocationLatLng[0]);
currentLocation.setLongitude(mockLocationLatLng[1]);
currentLocation.setTime(System.currentTimeMillis());
currentLocation.setSpeed(200);

currentLocation.setAccuracy(500);

mLocationManager.setTestProviderLocation(GPS_PROVIDER_NAME,
currentLocation);

mLocationManager.setTestProviderEnabled(GPS_PROVIDER_NAME, 
true);
mLocationManager.setTestProviderStatus(GPS_PROVIDER_NAME,
LocationProvider.AVAILABLE, null, System.currentTimeMillis());

}

}

=


import android.app.Activity;
import android.content.Context;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

public class LocationSpoofer extends Activity {

private static final long MINIMUM_DISTANCE_CHANGE_FOR_UPDATES = 1; //
in Meters
private static final long MINIMUM_TIME_BETWEEN_UPDATES = 1000; // in
Milliseconds

protected LocationManager lm;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {

super.onCreate(savedInstanceState);

setContentView(R.layout.main);

Button cmdSend = (Button) findViewById(R.id.cmdSend);

//final EditText txtLat = (EditText)
findViewById(R.id.txtLat);
//final EditText txtLng = (EditText)
findViewById(R.id.txtLng);

cmdSend.setOnClickListener(new View.OnClickListener() {

public void onClick(View v)
{

lm =
(LocationManager)getSystemService(Context.LOCATION_SERVICE);

//  

[android-developers] Re: Send message with C2DM

2011-04-20 Thread Finn Johnsen
hi

strikes me as a network or firewall problem maybe. from your dev pc i
guess. as its complaining about not reaching mtalk.google.com at that
port.

dont know, just thinking loud.
finn



On Apr 15, 1:57 pm, vokvince vokvi...@gmail.com wrote:
 Hello,

 I'm working on C2DM, my registration is ok but when I send a message
 with my server, my phone don't receive it.
 My servor return an id =  id=0:1302860724014808%cacdd2750031
 And in the logcat i've:

 04-15 13:53:25.889: WARN/GTalkService(2672): [GTalkConnection.12]
 doConnect: caught XMPPError connecting to mtalk.google.com:5228.:
 (502)

 04-15 13:53:25.889: WARN/GTalkService(2672):   -- caused by:
 java.net.SocketTimeoutException: Transport endpoint is not connected

 Someone can help me please ? How find the issue ? Is it the server or
 the mobile ?

 Thx a lot !

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

2011-04-20 Thread Myroslav
Hello everybody,

I'm working now with NFC on Nexus S. And from time to time I get some
problem in NFC Service. After some amount of properly scanned tags,
NFC service fails to scan tag... Then after some amount of trials to
scan tag, there is some buffer overflow and system understands, that
service is failed and restarts it. Then it scans couple tags properly
and fails again. Such endless loop.
I just would like to ask, whether somebody had discovered the same
problem? And whether there exist some solution? Could be the case,
that this problem is caused because of manual update of system to
version 2.3.3?
I can also provide part of LogCat log concerning NFC failures.

Thanks in advance for any help.

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


[android-developers] Re: Android Debugger is DOG Slow

2011-04-20 Thread Roger Heim
I use IDEA on both Windows and Linux and have absolutely no problems.
I much prefer it to Eclipse because of my .NET and ReSharper
background.

On Apr 15, 1:17 pm, TreKing treking...@gmail.com wrote:
 On Fri, Apr 15, 2011 at 11:39 AM, Eric e...@alum.mit.edu wrote:
  What does Eclipse vs. IDEA have to do with any of this?

 You mean besides the fact that all of using Eclipse have no problem and you,
 the lone person using IDEA, are?

 --- 
 --
 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


[android-developers] Change Fast Scroll to Alphabetical like Galaxy S or iPhone

2011-04-20 Thread David
Would it be possible to develop an app that changes the behavior of
fast scroll for all apps that use it?

I would like to change fast scroll from the default thumb slider to
the alphabet seeker on the right side, as in Galaxy S phones
(www.youtube.com/watch?v=Yclcs338CGc) or iPhones.

How would I go about doing this?

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


  1   2   3   4   >