[android-developers] Why do some Android phones see my Bluetooth device and some don't?

2012-02-17 Thread DonFrench
Why do some Android phones see my Bluetooth device and some don't?  I
have a gadget that is controlled via Bluetooth.  The gadget contains a
simple serial (SPP) Bluetooth device connected to a microcontroller.
Some Android phones see it and some don't.  All the phones in question
are 2.1 or greater.  Scanning for devices on these phones using
HomeMenuSettingsWireless  Network Settings  Bluetooth Settings
never succeeds in discovering the gadget.

There is never a problem with these devices:

Nexus One
Droid X
Casio GzOne(Verizon)
HTC G1 (t-mobile)
Vizio Tablet ver. VTAB1008
Samsung Droid Galaxy 2 on T-Mobile
LG Android (Optimus Spirit)

and probably many others.

The Droid Incredible is one that doesn't and I know that there are
more but I don't have a list of the others.

Why?  Why does this happen?  And is there a way I can get a list of
all phones that do and do not work?

-- 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] Re: to develop an app

2012-02-17 Thread Ali Chousein
On Feb 16, 6:31 pm, amit pandey aammit110...@gmail.com wrote:
 Implement a listView in which each contains a Title(text), Description
 and an image at right. Read the data from xml file and fill it into
 list view.

It's also quite sunny today outside but the forecast says it's going
to rain in the afternoon.

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

2012-02-17 Thread Ali Chousein
This link should be a starting point for you:
http://developer.android.com/reference/android/provider/CallLog.Calls.html
Google for CallLog.Calls example and you'll find examples also.

-
Ali Chousein
http://www.codeproject.com/KB/android/PayGol-Android.aspx
http://weatherbuddy.blogspot.com | http://twitter.com/weather_buddy
http://geo-filtered-assistant.blogspot.com
https://marketplace.cisco.com/apphq/products/994

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

2012-02-17 Thread Ganesh Kumar R.
Hi  Rimma.,

Am in need to implementing some functionality while receiving call from my 
application. I raised my quaetion here but no response yet:

http://stackoverflow.com/questions/9289563/how-to-send-my-additional-intent-data-to-dialer-phone-application-and-receive

Intent intent = new Intent(Intent.ACTION_CALL, 
Uri.parse(tel:123456;1##)); 

So, i followed your approach to send the data along with the phone call 
from my application . Sending is done. 

Am unable to recive as your getting 123456;1 . Can you share your 
receiver approach. 

Help me ! How can i receive data along with a phonecall ?

Br.,
Ganesh r.


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

2012-02-17 Thread shihab shiha
2. create cbutton extent Button and override onDraw method and then
instate of button use cbutton
 Can you explain this one little widely. I tried the first one but it
doesnt give the exact solution what i expect
On Fri, Feb 17, 2012 at 1:08 PM, moktarul anam mokta...@gmail.com wrote:

  you can do this two way
 1. set background 2 some drawable xml file and then customize there
 2. create cbutton extent Button and override onDraw method and then
 instate of button use cbutton

 Enjoy
 Moktarul

 On Feb 16, 1:45 pm, value makers shihabkv22...@gmail.com wrote:
  Hi All,
 
  I am new in android development. I have one problem regarding with my
  button customization. i would like to customize a button in a semi
  circular form .

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

2012-02-17 Thread j_a_n.richard...@ntlworld.com
I was just wondering what the install process is for a shared object
and shared object's of different versions.

I mean are they shared between applications and if there are multiple
versions how are they managed?

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

2012-02-17 Thread Anitha
while installing i got error likeunable to open repository
the operation cannot be completed for-because one or more required
items cannot be found.
software being installed.android Traceview 16.0.1v.201112150204-238534.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: The ActionBar can't work when i use requestWindowFeature(Window.FEATURE_NO_TITLE) method.

2012-02-17 Thread Dean Wang
Do you mean i can't use this method when i want the action bar show
correctly?
If is true,is any way can replace the three methods?
Thanks for your response:D

On Feb 17, 10:16 am, Dianne Hackborn hack...@android.com wrote:
 The action bar is the modern version of the title bar.  You can't mix the
 two.









 On Wed, Feb 15, 2012 at 11:10 PM, Dean Wang tomwang...@gmail.com wrote:
  In a recent development process, I found a problem.When i use

  1.requestWindowFeature(Window.FEATURE_NO_TITLE)
  2.requestWindowFeature(Window.FEATURE_LEFT_ICON)
  3.requestWindowFeature(Window.FEATURE_RIGHT_ICON)

  on Activity,the ActionBar can't show correctly.

  Is any one know how to solve it?
  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

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


[android-developers] How to solve bad instruction `vadd.i16 q0,q0,q0' when attempting to check gcc for neon instruction

2012-02-17 Thread sureshmenon87



Checking gcc supports failed for neon instruction vadd.i16 q0,q0,q0
test.c

int main ()
{
__asm__(vadd.i16 q0, q0, q0); return 0;
}

arm-linux-androideabi-gcc test.c
/tmp/ccfc8m0G.s: Assembler messages:
/tmp/ccfc8m0G.s:24: Error: bad instruction `vadd.i16 q0,q0,q0'

Tried with flags -mcpu=cortex-a8 -mfpu=neon but stil no success



Above code was used to test gcc support for neon instruction.

Actually i am trying to build x264 with NEON support for ARM
platformAfter running configure script
x264 config log file contains

Command line options: --cross-prefix=arm-linux-androideabi- --
enable-pic --extra- cflags=-mcpu=cortex-a8 --host=arm-linux

checking whether arm-linux-androideabi-gcc works... yes
checking whether arm-linux-androideabi-gcc supports for( int i = 0; i
 9; i++ ); with -std=gnu99... yes
checking whether arm-linux-androideabi-gcc supports __asm__(rev ip,
ip);... yes
checking whether arm-linux-androideabi-gcc supports __asm__(movt r0,
#0);... yes
checking whether arm-linux-androideabi-gcc supports __asm__(vadd.i16
q0, q0, q0);... no

arm-linux-androideabi-gcc conftest.c -Wall -I. -I$(SRCPATH) -
mcpu=cortex-a8 -std=gnu99 -lm -o conftest
E:\cygwin\tmp\ccVtVI1i.s: Assembler messages:
E:\cygwin\tmp\ccVtVI1i.s:24: Error: bad instruction `vadd.i16
q0,q0,q0'
--
Failed program was:
--
int main () { __asm__(vadd.i16 q0, q0, q0); return 0; }
--


config.h contains

#define HAVE_MALLOC_H 1
#define HAVE_ARMV6 1
#define HAVE_ARMV6T2 1
#define ARCH_ARM 1
#define SYS_LINUX 1
#define HAVE_VECTOREXT 1
#define fseek fseeko
#define ftell ftello
#define HAVE_GPL 1
#define HAVE_INTERLACED 1
#define HAVE_ALTIVEC 0
#define HAVE_ALTIVEC_H 0
#define HAVE_MMX 0
#define HAVE_NEON 0
#define HAVE_BEOSTHREAD 0
#define HAVE_POSIXTHREAD 0
#define HAVE_WIN32THREAD 0
#define HAVE_THREAD 0
#define HAVE_LOG2F 0
#define HAVE_VISUALIZE 0
#define HAVE_SWSCALE 0
#define HAVE_LAVF 0
#define HAVE_FFMS 0
#define HAVE_GPAC 0
#define HAVE_GF_MALLOC 0
#define HAVE_AVS 0
#define HAVE_CPU_COUNT 0


Running make command build x264 static lib based on above config.h
which contains HAVE_NEON 0


**Compiler Version**



arm-linux-androideabi-gcc -v
Using built-in specs.
Target: arm-linux-androideabi
Configured with: /tmp/ndk-digit/src/build/../gcc/gcc-4.4.3/configure --
prefix=/usr/local/google/digit/repo/opensource/ndk/toolchains/arm-
linux-androideabi-4.4.3/prebuilt/windows --target=arm-linux-
androideabi --host=i586-mingw32msvc --build=x86_64-linux-gnu --with-
gnu-as --with-gnu-ld --enable-languages=c,c++ --with-gmp=/tmp/ndk-
digit/build/toolchain/temp-install --with-mpfr=/tmp/ndk-digit/build/
toolchain/temp-install --disable-libssp --enable-threads --disable-nls
--disable-libmudflap --disable
-libgomp --disable-libstdc__-v3 --disable-sjlj-exceptions --disable-
shared --disable-tls --with-float=soft --with-fpu=vfp --with-
arch=armv5te --enable-target-optspace --enable-initfini-array --
disable-nls --prefix=/usr/local/google/digit/repo/opensource/ndk/
toolchains/arm-linux-androideabi-4.4.3/prebuilt/windows --with-
sysroot=/usr/local/google/digit/repo/opensource/ndk/toolchains/arm-
linux-androideabi-4.4.3/prebuilt/windows/sysroot --with-binutils-
version=2.20.1 --with-mpfr-version=2.4.1 --with
-gmp-version=4.2.4 --with-gcc-version=4.4.3 --with-gdb-version=6.6 --
with-arch=armv5te --program-transform-name='s,^,arm-linux-
androideabi-,'
Thread model: posix
gcc version 4.4.3 (GCC)



Goal is to utilize neon enabled ARM processor to boost x264 encoder
performance...

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

2012-02-17 Thread dc
I am attempting to show a progress dialog while I am performing some
actions. I am having troubles getting it to perform the way I would
like. Here is what I want to do:
click event of a button
pop up a progress dialog showing a busy message.
perform some action
then once the action is complete, inflate a new layout into my main
layout. (changing screens)
It works fine except either I inflate the layout while the other
actions are still processing (layout change is outside the thread) or
if I put the layout change in the thread, it forces a close of the
app, at the layout.removeallviews; line.

private OnClickListener feeAcceptListener = new OnClickListener() {
   @Override
  public void onClick(View v) {
  progressBar = ProgressDialog.show(v.getContext(), Please
Wait...,Communicating,true);
   new Thread(new Runnable() {
 @Override
 public void run() {
GetWts(); //processes some action
 progressBar.dismiss();
 }
   }).start();

   Handler handle=new Handler(){
 @Override
 public void handleMessage(Message msg) {
   super.handleMessage(msg);

 }
   };
   LinearLayout layout =
(LinearLayout)findViewById(R.id.main_view);
   layout.removeAllViews();
   LayoutInflater inflater = getLayoutInflater();
   layout.addView(inflater.inflate(R.layout.wts, null));

   Button print = (Button)findViewById(R.id.btnPrintTic);
   Button done= (Button)findViewById(R.id.btnDone);
   print.setOnClickListener(wtsPrintListener);
   done.setOnClickListener(wtsDoneListener);
  }
};

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

2012-02-17 Thread sniper
Hello,

i am a new member of android developers group and this is my first
post.. I found this diskussion 
http://groups.google.com/group/android-developers/browse_thread/thread/c6bff1dfbf3f8c1a/7e191f8e251cd7f2?lnk=gstq=vpnservice+builder#7e191f8e251cd7f2
but was not able to answer to the theme!? (Why not? It's closed?)
I have the same problem like Kristian, the Author of the below named
discussion  i got every time an IllegalStateException when i call the
establish() function!


1. It's really true that the device must have tun.ko installed to run
the establish() function from android.net.VpnService.Builder without
to get an IllegalStateException?

2. The most devices don't have the tun.ko by default?

3. Tun.ko can be installed only on rooted devices?

4. Exists there anywhere in the market a (real) VPN Client which don't
need a rooted device?


Thanks 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] about Permission Denial: not allowed to send broadcast android.bluetooth.device.action.ACL_DISCONNECT_REQUESTED

2012-02-17 Thread xi xia
I creat an  IntentFilter which manually calls BT broadcast receiver as
follows:

IntentFilter disConnectFilter = new
IntentFilter(BluetoothDevice.ACTION_ACL_DISCONNECTED);
registerReceiver(_disConnectReceiver, disConnectFilter);

private BroadcastReceiver _disConnectReceiver = new
BroadcastReceiver() {
public void onReceive(Context context, Intent intent) {
BluetoothDevice bdevice =
intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);

if(BluetoothDevice.ACTION_ACL_DISCONNECTED.equals(action)){
Log.d(acl disconnect, acl 
disconnect);
;


But in Runtime I got the following Exception:
ERROR/AndroidRuntime(4054): Caused by: java.lang.SecurityException:
Permission Denial: not allowed to send broadcast
android.bluetooth.device.action.ACTION_ACL_DISCONNECTED

I gave both BT permission in my manifest file, but still it doesn't
work .

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


[android-developers] NDK and sensors

2012-02-17 Thread dtran
Hello

Is there any example on using NDK to get sensors data via callback.
Currently there is some sample code in the NDK, but it does not show
how to use callback. I can't seem to figure out how to get the sensor
data inside the callback. I only get 3 params, fd = file descriptor,
events which identify the event, and data which is my private data
pointer.


// Callback when we get sensor data
ALooper_callbackFunc get_sensor_events(int fd, int events, void *data)
{

}


int startNativeSensor()
{
.
.
// Create a sensor event queue from the sensor manager and
register it with the
// looper. This needs a callback method (e.g. get_sensor_events)
which is called
// when an event occurs
g_engine.sensorEventQueue = ASensorManager_createEventQueue(
g_engine.sensorManager,
g_engine.looper, LOOPER_ID_USER,
 
(ALooper_callbackFunc)get_sensor_events, data);




-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 PCM data of the songs currently playing in the android phone

2012-02-17 Thread dev_alb
I am planning to fetch the decoded PCM data of a currently playing
song in the android phone. Can we do it from the application layer?
Meanwhile it would be really helpful if any one of you could suggest
me an audio decoder in java.

Regards
Albin

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Problems with MatrixGrabber: java.lang.ClassCastException: com.google.android.gles_jni.GLImpl

2012-02-17 Thread saex
I have a GLSurfaceView class that must show a square with a texture.
I'm trying to fit the screen with the texture/polygon dimensions, then
i need to use projections.

I'm using 3 classes to have compatibility with android 1.5:

MatrixGrabber.java MatrixStack.java MatrixTrackingGL.java

This is the part of the code that it is giving the error:

private MatrixGrabber mg = new MatrixGrabber(); //create the matrix
grabber object in your initialization code
.
.
.
DisplayMetrics dm = new DisplayMetrics();
 
((Activity)context).getWindowManager().getDefaultDisplay().getMetrics(dm);
screenW=dm.widthPixels;
screenH=dm.heightPixels;

modelMatrix=mg.mModelView;
projMatrix=mg.mProjection;
mView[0] = 0;
mView[1] = 0;
mView[2] = screenW; //width
mView[3] = screenH; //height
.
.
.
public void onDrawFrame(GL10 gl) {
//Clear Screen And Depth Buffer
gl.glClear(GL10.GL_COLOR_BUFFER_BIT |
GL10.GL_DEPTH_BUFFER_BIT);
gl.glLoadIdentity();//Reset The Current
Modelview Matrix

mg.getCurrentProjection(gl);
mg.getCurrentModelView(gl);
.
.
.

And this is the error:

02-17 09:13:59.952: WARN/dalvikvm(11405): threadid=8: thread
exiting with uncaught exception (group=0x4001d7e0)
02-17 09:13:59.960: ERROR/AndroidRuntime(11405): FATAL EXCEPTION:
GLThread 9
02-17 09:13:59.960: ERROR/AndroidRuntime(11405):
java.lang.ClassCastException: com.google.android.gles_jni.GLImpl
02-17 09:13:59.960: ERROR/AndroidRuntime(11405): at
com.DemoMagazine.MatrixGrabber.getMatrix(MatrixGrabber.java:56)
02-17 09:13:59.960: ERROR/AndroidRuntime(11405): at
com.DemoMagazine.MatrixGrabber.getCurrentProjection(MatrixGrabber.java:
52)
02-17 09:13:59.960: ERROR/AndroidRuntime(11405): at
com.DemoMagazine.SquareGLSurfaceView.onDrawFrame(SquareGLSurfaceView.java:
112)
02-17 09:13:59.960: ERROR/AndroidRuntime(11405): at
android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:
1332)
02-17 09:13:59.960: ERROR/AndroidRuntime(11405): at
android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1116)

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 solve bad instruction `vadd.i16 q0,q0,q0' when attempting to check gcc for neon instruction

2012-02-17 Thread deb-account

On 17/02/12 08:17, sureshmenon87 wrote:

checking whether arm-linux-androideabi-gcc supports __asm__(vadd.i16
q0, q0, q0);... no
   

Do you need these instructions ?

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

2012-02-17 Thread HighFlyer
Hello to everyone.
We have a big SQLite database file (~11.6 Mb) that ships with
application. All is good except strange problem on several devices
(Samsung Galaxy S and Galaxy 580, both running Android 2.2). System
can't open such db file. Logcat poor with only one error message:

 sqlite returned: error code = 11, msg = database corruption found by source 
 line 40107

After that failure database file is deleted. So all data lost.
Deleting several rows and reducing db file size to 11Mb solves
problem.
On other tested devices running 2.3, 3.x and 4.x version does not have
such problem.

So the question is:
Does there are any documented limits to databases (size or rows count)
for SQLite that ships with Android 2.2 and previous versions?

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

2012-02-17 Thread moktarul anam

HI Giles
  if your web service data he heavy then i will suggest you to
store in database or local files. otherwise memory will be allocated
through out ur application( if u store in static variable/ stack
memory).

if your web service data is xml file use saxParser. ( android sax
parser)

Moktarul anam



On Feb 17, 12:09 pm, giles ian gilesian@gmail.com wrote:
 Hi,

 I have 2 activities A  B. Both display data fetched from 2 different web
 service lets say ws1 and ws2

 When i click on a button on Activity A i call ws2 in that avtivity itself
 and show loading dialog there itself and then move to Activity B and
 display data.(In this case i have to save lot of data in static variables
 so that they can be shared across activities as im getting data on Activity
 A and need to display  on Activity B)

 Is this rite approach.

 The other option that i have is i call ws2 from Activity B instead of A

 Which is a better way.

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


Re: [android-developers] SQLite database maximum size

2012-02-17 Thread Marcelo Henrique
will you Test in emulator ?

2012/2/17 HighFlyer aleks...@gmail.com

 Hello to everyone.
 We have a big SQLite database file (~11.6 Mb) that ships with
 application. All is good except strange problem on several devices
 (Samsung Galaxy S and Galaxy 580, both running Android 2.2). System
 can't open such db file. Logcat poor with only one error message:

  sqlite returned: error code = 11, msg = database corruption found by
 source line 40107

 After that failure database file is deleted. So all data lost.
 Deleting several rows and reducing db file size to 11Mb solves
 problem.
 On other tested devices running 2.3, 3.x and 4.x version does not have
 such problem.

 So the question is:
 Does there are any documented limits to databases (size or rows count)
 for SQLite that ships with Android 2.2 and previous versions?

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




-- 
  - Marcelo Henrique -
  Se não puder se destacar pelo talento, vença pelo esforço. (Dave
Weinbaum)

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 can i export my sqlite database from intellj idea?

2012-02-17 Thread Duygu Kahraman
intellj is not include ddms and you can not push  /data/data/packagename/
etc.

Can anybody help me?


17 Şubat 2012 08:57 tarihinde shihab shiha shihabkp.andr...@gmail.comyazdı:

 ya but you can open it using command mode. just go command mode and change
 your directory into the android sdk .

 android-sdk-linux/tools and type ./ddms then you will get the window from
 there you can get the access to the sdcard and all



 On Fri, Feb 17, 2012 at 11:25 AM, moktarul anam mokta...@gmail.comwrote:

 Hi
 I think ddms feature  is not there in intellj

 Moktarul

 On Feb 17, 10:20 am, shihab shiha shihabkp.andr...@gmail.com wrote:
  you can use ./ddms
 
 
 
 
 
 
 
  On Fri, Feb 17, 2012 at 10:37 AM, moktarul anam mokta...@gmail.com
 wrote:
   best way is use adb shell
 
   1. adb shell
   2. cd /data/data/packagename/
   3. adb pull  database ./
 
   Enjoy
   Moktarul
 
   On Feb 16, 8:18 pm, Duygu Kahraman duygu.kahram...@gmail.com wrote:
I am using intellj idea and i am working with **ORMLite**.
 
My question is, i create a database but i want to export
 database
for looking my data.When i use Eclipse i can export my sqlite
 database
a few ways but i have no idea about **intellj**.
 
Can anybody know something about that?
 
THX.
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   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




-- 
---
Duygu Kahraman

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

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

[android-developers] Re: SQLite database maximum size

2012-02-17 Thread HighFlyer
Yes, database opening also fails in emulator

On 17 фев, 13:46, Marcelo Henrique marceloh...@gmail.com wrote:
 will you Test in emulator ?

 2012/2/17 HighFlyer aleks...@gmail.com









  Hello to everyone.
  We have a big SQLite database file (~11.6 Mb) that ships with
  application. All is good except strange problem on several devices
  (Samsung Galaxy S and Galaxy 580, both running Android 2.2). System
  can't open such db file. Logcat poor with only one error message:

   sqlite returned: error code = 11, msg = database corruption found by
  source line 40107

  After that failure database file is deleted. So all data lost.
  Deleting several rows and reducing db file size to 11Mb solves
  problem.
  On other tested devices running 2.3, 3.x and 4.x version does not have
  such problem.

  So the question is:
  Does there are any documented limits to databases (size or rows count)
  for SQLite that ships with Android 2.2 and previous versions?

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

 --
                                               - Marcelo Henrique -
   Se não puder se destacar pelo talento, vença pelo esforço. (Dave
 Weinbaum)

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

2012-02-17 Thread moktarul anam
Hi Zarrouk,

do u want to display ranking directly fetching from server or want to
store in to database?
but i will suggest u that store all information 2 database and create
one ranking algorithm. this algorithm will be user choice. user also
can select rank by *


Moktarul

On Feb 15, 10:53 pm, zarrouk.ani...@yahoo.fr
azaniszarr...@gmail.com wrote:
 I am creating an android application of football in which you can find
 information, the live matches and rankings championships .. but I'm
 stuck in the ranking. my teacher told me you can do Standings using
 jsoup, in fact I used jsoup and I posted values ​​from a website but I
 have not figured out how to put these values ​​into a table .. please
 help me if you like

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

2012-02-17 Thread vivek elangovan
Hi members,
 I developed a login page application,after
logging in i entered data in required field and then when i click
logout it take to my login page but when i click the back button in my
keypad it takes me to the previous page instead of showing  login page
or it has to exit the application.So is there any session management
which i can apply in this?


- Vivek Elangovan

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

2012-02-17 Thread RLScott
I don't think progressBar.dismiss is appropriate when executed by a
thread other than the main UI thread.  Use a handler to signal from
the worker thread to the main UI thread and let the main UI thread do
the actual messing with the UI.  The same goes for any other action
that touches the UI directly.

On Feb 16, 5:13 pm, dc dcone1...@gmail.com wrote:
 I am attempting to show a progress dialog while I am performing some
 actions. I am having troubles getting it to perform the way I would
 like. Here is what I want to do:
 click event of a button
 pop up a progress dialog showing a busy message.
 perform some action
 then once the action is complete, inflate a new layout into my main
 layout. (changing screens)
 It works fine except either I inflate the layout while the other
 actions are still processing (layout change is outside the thread) or
 if I put the layout change in the thread, it forces a close of the
 app, at the layout.removeallviews; line.

 private OnClickListener feeAcceptListener = new OnClickListener() {
        @Override
       public void onClick(View v) {
           progressBar = ProgressDialog.show(v.getContext(), Please
 Wait...,Communicating,true);
            new Thread(new Runnable() {
                  @Override
                  public void run() {
                     GetWts(); //processes some action
                      progressBar.dismiss();
                  }
            }).start();

            Handler handle=new Handler(){
                  @Override
                  public void handleMessage(Message msg) {
                        super.handleMessage(msg);

                  }
            };
            LinearLayout layout =
 (LinearLayout)findViewById(R.id.main_view);
            layout.removeAllViews();
            LayoutInflater inflater = getLayoutInflater();
            layout.addView(inflater.inflate(R.layout.wts, null));

            Button print = (Button)findViewById(R.id.btnPrintTic);
            Button done= (Button)findViewById(R.id.btnDone);
            print.setOnClickListener(wtsPrintListener);
            done.setOnClickListener(wtsDoneListener);
       }
     };

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

2012-02-17 Thread Doo
Hi.

(i know it's been asked in different forms already)
I've written the live wallpaper (there can't be enough ;) and it has
display settings. The problem is that when after the WP is being
chosen if I go to WP selection, choose the same one, tinker with
settings, the preview window reflect changes, the current running one
does not. I assume that it's because those are two separate processes
and SharedPreferences notify inside same process only (so far).

So the question is is the broadcast intent the only option?
sendWallpaperCommand doesn't work if you're not the view host, no-
create binding(my first idea) to service is impossible because onBind
is final. I mean I can do that but it's somewhat strange that there
are settings for WP and no standard and easy way to notify running
instance about that.

Cheers.

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


[android-developers] Re: sending events from monkeyunner fails

2012-02-17 Thread Tony Ko
I have the very very similar issue. seems like it adb is not receiving 
confirmation of the event (just a hunch).
Main issues seems to be:
java.net.SocketException: Software caused connection abort: recv failed

All my program does is loop over and over

HV = D.getHierarchyViewer()
win = HV.getFocusedWindowName()

it then checks if 
win == com.example.whatever # just an example, not the full activity name

and if it is , sends:
D.press('KEYCODE_BACK', MonkeyDevice.DOWN_AND_UP)

I added a 
MonkeyRunner.sleep(1) to keep it from excessively using my cpu

now this might seem like a stupid problem due to coding, but it isn't (well 
not apparent). why? because if I don't loop the code everything works 
perfectly. After about 10 loops, it errors out.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en120217 04:46:58.743:S [main] [com.android.chimpchat.adb.AdbChimpDevice] Error se
nding press event: KEYCODE_BACK DOWN_AND_UP
120217 04:46:58.743:S [main] [com.android.chimpchat.adb.AdbChimpDevice]java.net.
SocketException: Software caused connection abort: recv failed
120217 04:46:58.743:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at java.
net.SocketInputStream.socketRead0(Native Method)
120217 04:46:58.743:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at java.
net.SocketInputStream.read(Unknown Source)
120217 04:46:58.743:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at java.
net.SocketInputStream.read(Unknown Source)
120217 04:46:58.743:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at sun.n
io.cs.StreamDecoder.readBytes(Unknown Source)
120217 04:46:58.743:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at sun.n
io.cs.StreamDecoder.implRead(Unknown Source)
120217 04:46:58.743:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at sun.n
io.cs.StreamDecoder.read(Unknown Source)
120217 04:46:58.743:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at java.
io.InputStreamReader.read(Unknown Source)
120217 04:46:58.743:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at java.
io.BufferedReader.fill(Unknown Source)
120217 04:46:58.743:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at java.
io.BufferedReader.readLine(Unknown Source)
120217 04:46:58.743:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at java.
io.BufferedReader.readLine(Unknown Source)
120217 04:46:58.743:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at com.a
ndroid.chimpchat.ChimpManager.sendMonkeyEventAndGetResponse(ChimpManager.java:18
7)
120217 04:46:58.743:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at com.a
ndroid.chimpchat.ChimpManager.sendMonkeyEvent(ChimpManager.java:234)
120217 04:46:58.743:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at com.a
ndroid.chimpchat.ChimpManager.press(ChimpManager.java:134)
120217 04:46:58.743:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at com.a
ndroid.chimpchat.adb.AdbChimpDevice.press(AdbChimpDevice.java:322)
120217 04:46:58.743:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at com.a
ndroid.monkeyrunner.MonkeyDevice.press(MonkeyDevice.java:193)
120217 04:46:58.743:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at sun.r
eflect.NativeMethodAccessorImpl.invoke0(Native Method)
120217 04:46:58.743:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at sun.r
eflect.NativeMethodAccessorImpl.invoke(Unknown Source)
120217 04:46:58.743:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at sun.r
eflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
120217 04:46:58.743:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at java.
lang.reflect.Method.invoke(Unknown Source)
120217 04:46:58.743:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at org.p
ython.core.PyReflectedFunction.__call__(PyReflectedFunction.java:175)
120217 04:46:58.743:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at org.p
ython.core.PyObject.__call__(PyObject.java:355)
120217 04:46:58.743:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at org.p
ython.core.PyMethod.__call__(PyMethod.java:215)
120217 04:46:58.743:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at org.p
ython.core.PyMethod.instancemethod___call__(PyMethod.java:221)
120217 04:46:58.743:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at org.p
ython.core.PyMethod.__call__(PyMethod.java:206)
120217 04:46:58.743:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at org.p
ython.core.PyObject.__call__(PyObject.java:414)
120217 04:46:58.743:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at org.p
ython.core.PyObject.__call__(PyObject.java:418)
120217 04:46:58.743:S [main] [com.android.chimpchat.adb.AdbChimpDevice] at org.p

Re: [android-developers] Re: How can i export my sqlite database from intellj idea?

2012-02-17 Thread shihab shiha
I am using intellij . i can access the sdcard using ddms. i tried it using
command mode .

On Fri, Feb 17, 2012 at 3:24 PM, Duygu Kahraman
duygu.kahram...@gmail.comwrote:

 intellj is not include ddms and you can not push  /data/data/packagename/
 etc.

 Can anybody help me?


 17 Şubat 2012 08:57 tarihinde shihab shiha shihabkp.andr...@gmail.comyazdı:

 ya but you can open it using command mode. just go command mode and change
 your directory into the android sdk .

 android-sdk-linux/tools and type ./ddms then you will get the window from
 there you can get the access to the sdcard and all



 On Fri, Feb 17, 2012 at 11:25 AM, moktarul anam mokta...@gmail.comwrote:

 Hi
 I think ddms feature  is not there in intellj

 Moktarul

 On Feb 17, 10:20 am, shihab shiha shihabkp.andr...@gmail.com wrote:
  you can use ./ddms
 
 
 
 
 
 
 
  On Fri, Feb 17, 2012 at 10:37 AM, moktarul anam mokta...@gmail.com
 wrote:
   best way is use adb shell
 
   1. adb shell
   2. cd /data/data/packagename/
   3. adb pull  database ./
 
   Enjoy
   Moktarul
 
   On Feb 16, 8:18 pm, Duygu Kahraman duygu.kahram...@gmail.com
 wrote:
I am using intellj idea and i am working with **ORMLite**.
 
My question is, i create a database but i want to export
 database
for looking my data.When i use Eclipse i can export my sqlite
 database
a few ways but i have no idea about **intellj**.
 
Can anybody know something about that?
 
THX.
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   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




 --
 ---
 Duygu Kahraman

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

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


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

Re: [android-developers] Re: How can i export my sqlite database from intellj idea?

2012-02-17 Thread Duygu Kahraman
where is the ddms in ide?

17 Şubat 2012 13:15 tarihinde shihab shiha shihabkp.andr...@gmail.comyazdı:

 I am using intellij . i can access the sdcard using ddms. i tried it using
 command mode .


 On Fri, Feb 17, 2012 at 3:24 PM, Duygu Kahraman duygu.kahram...@gmail.com
  wrote:

 intellj is not include ddms and you can not push  /data/data/packagename/
 etc.

 Can anybody help me?


 17 Şubat 2012 08:57 tarihinde shihab shiha shihabkp.andr...@gmail.comyazdı:

 ya but you can open it using command mode. just go command mode and
 change your directory into the android sdk .

 android-sdk-linux/tools and type ./ddms then you will get the window
 from there you can get the access to the sdcard and all



 On Fri, Feb 17, 2012 at 11:25 AM, moktarul anam mokta...@gmail.comwrote:

 Hi
 I think ddms feature  is not there in intellj

 Moktarul

 On Feb 17, 10:20 am, shihab shiha shihabkp.andr...@gmail.com wrote:
  you can use ./ddms
 
 
 
 
 
 
 
  On Fri, Feb 17, 2012 at 10:37 AM, moktarul anam mokta...@gmail.com
 wrote:
   best way is use adb shell
 
   1. adb shell
   2. cd /data/data/packagename/
   3. adb pull  database ./
 
   Enjoy
   Moktarul
 
   On Feb 16, 8:18 pm, Duygu Kahraman duygu.kahram...@gmail.com
 wrote:
I am using intellj idea and i am working with **ORMLite**.
 
My question is, i create a database but i want to export
 database
for looking my data.When i use Eclipse i can export my sqlite
 database
a few ways but i have no idea about **intellj**.
 
Can anybody know something about that?
 
THX.
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   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




 --
 ---
 Duygu Kahraman

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

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


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




-- 
---
Duygu Kahraman

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

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

[android-developers] Re: ProgressDialog with Thread

2012-02-17 Thread Seshu
Hi,
Use this code,

 new Thread(new Runnable() {
 @Override
 public void run() {
//GetWts(); //processes some action
try {
sleep(3000);
} catch (Exception e) {
// TODO: handle exception
   }
   handler.sendEmptyMessage(0);
progressBar.dismiss();
 }
   }).start();
  progressBar.dismiss();

   Handler handle=new Handler(){
 @Override
 public void handleMessage(Message msg) {
   super.handleMessage(msg);
   if(msg.what == 0) {
 //perform some action here
   }
 }
   };



On Feb 17, 3:59 pm, RLScott fixthatpi...@yahoo.com wrote:
 I don't think progressBar.dismiss is appropriate when executed by a
 thread other than the main UI thread.  Use a handler to signal from
 the worker thread to the main UI thread and let the main UI thread do
 the actual messing with the UI.  The same goes for any other action
 that touches the UI directly.

 On Feb 16, 5:13 pm, dc dcone1...@gmail.com wrote:







  I am attempting to show a progress dialog while I am performing some
  actions. I am having troubles getting it to perform the way I would
  like. Here is what I want to do:
  click event of a button
  pop up a progress dialog showing a busy message.
  perform some action
  then once the action is complete, inflate a new layout into my main
  layout. (changing screens)
  It works fine except either I inflate the layout while the other
  actions are still processing (layout change is outside the thread) or
  if I put the layout change in the thread, it forces a close of the
  app, at the layout.removeallviews; line.

  private OnClickListener feeAcceptListener = new OnClickListener() {
         @Override
        public void onClick(View v) {
            progressBar = ProgressDialog.show(v.getContext(), Please
  Wait...,Communicating,true);
             new Thread(new Runnable() {
                   @Override
                   public void run() {
                      GetWts(); //processes some action
                       progressBar.dismiss();
                   }
             }).start();

             Handler handle=new Handler(){
                   @Override
                   public void handleMessage(Message msg) {
                         super.handleMessage(msg);

                   }
             };
             LinearLayout layout =
  (LinearLayout)findViewById(R.id.main_view);
             layout.removeAllViews();
             LayoutInflater inflater = getLayoutInflater();
             layout.addView(inflater.inflate(R.layout.wts, null));

             Button print = (Button)findViewById(R.id.btnPrintTic);
             Button done= (Button)findViewById(R.id.btnDone);
             print.setOnClickListener(wtsPrintListener);
             done.setOnClickListener(wtsDoneListener);
        }
      };

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

2012-02-17 Thread HighFlyer
Version in emulator is 3.5.9

On 17 фев, 14:41, Marcelo Henrique marceloh...@gmail.com wrote:
 bug in SQlite 2.2. ? what version SQlite Database in 2.2? 2.3 ? 3.2 ? 4?

 2012/2/17 HighFlyer aleks...@gmail.com









  Yes, database opening also fails in emulator

  On 17 фев, 13:46, Marcelo Henrique marceloh...@gmail.com wrote:
   will you Test in emulator ?

   2012/2/17 HighFlyer aleks...@gmail.com

Hello to everyone.
We have a big SQLite database file (~11.6 Mb) that ships with
application. All is good except strange problem on several devices
(Samsung Galaxy S and Galaxy 580, both running Android 2.2). System
can't open such db file. Logcat poor with only one error message:

 sqlite returned: error code = 11, msg = database corruption found by
source line 40107

After that failure database file is deleted. So all data lost.
Deleting several rows and reducing db file size to 11Mb solves
problem.
On other tested devices running 2.3, 3.x and 4.x version does not have
such problem.

So the question is:
Does there are any documented limits to databases (size or rows count)
for SQLite that ships with Android 2.2 and previous versions?

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

   --
                                                 - Marcelo Henrique -
     Se não puder se destacar pelo talento, vença pelo esforço. (Dave
   Weinbaum)

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

 --
                                               - Marcelo Henrique -
   Se não puder se destacar pelo talento, vença pelo esforço. (Dave
 Weinbaum)

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

2012-02-17 Thread Narendra Singh Rathore
Hi all,
I have two arrays in my Activity / java file --- 1-dimensional and
2-dimensional as follows

 private String[] groups = { People Names, Dog Names, Cat Names,
Fish Names };

 private String[][] children = {
{ Arnold, Barry, Chuck, David },
{ Ace, Bandit, Cha-Cha, Deuce },
{ Fluffy, Snuggles },
{ Goldy, Bubbles }
};

Here I can access them with no prob.

But what if I want to define them in Strings.xml and then to access from my
activity .
I am able to access 1-d array here in java file as below:

String[] groups = getResources().getStringArray(R.array.group_array);


But what to do for 2d array?

Here is my Strings.xml

  ?xml version=1.0 encoding=utf-8 ?
 - file:///F:/strings.xml# resources
   string name=*hello*Hello World, bitmapmesh!/string
   string name=*app_name*bitmapmesh/string
 - file:///F:/strings.xml# string-array name=*group_array*
   item People Names /item
   item Dog Names /item
   item Cat Names /item
   item Fish Names /item
  /string-array
 - file:///F:/strings.xml# string-array name=*child*
   item index0=*0* index1=*0* Arnold /item
   item index0=*0* index1=*1* Barry /item
   item index0=*0* index1=*2* Chuck /item
   item index0=*0* index1=*3* David /item
   item index0=*2* index1=*0* Ace /item
   item index0=*2* index1=*1*Charlottetown/item
   item index0=*3* index1=*0*Zürich/item
   item index0=*3* index1=*1*Bern/item
  /string-array
  /resources

*Now, how to access this 2d array from strings.xml in my Activity?*

Am I doing something wrong here in defining 2d array in strings.xml

Please suggest me what I can do in this situation.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 can i export my sqlite database from intellj idea?

2012-02-17 Thread shihab shiha
which os you are using ?

On Fri, Feb 17, 2012 at 4:48 PM, Duygu Kahraman
duygu.kahram...@gmail.comwrote:

 where is the ddms in ide?

 17 Şubat 2012 13:15 tarihinde shihab shiha shihabkp.andr...@gmail.comyazdı:

 I am using intellij . i can access the sdcard using ddms. i tried it using
 command mode .


 On Fri, Feb 17, 2012 at 3:24 PM, Duygu Kahraman 
 duygu.kahram...@gmail.com wrote:

 intellj is not include ddms and you can not push  /data/data/packagename/
 etc.

 Can anybody help me?


 17 Şubat 2012 08:57 tarihinde shihab shiha 
 shihabkp.andr...@gmail.comyazdı:

 ya but you can open it using command mode. just go command mode and
 change your directory into the android sdk .

 android-sdk-linux/tools and type ./ddms then you will get the window
 from there you can get the access to the sdcard and all



 On Fri, Feb 17, 2012 at 11:25 AM, moktarul anam mokta...@gmail.comwrote:

 Hi
 I think ddms feature  is not there in intellj

 Moktarul

 On Feb 17, 10:20 am, shihab shiha shihabkp.andr...@gmail.com wrote:
  you can use ./ddms
 
 
 
 
 
 
 
  On Fri, Feb 17, 2012 at 10:37 AM, moktarul anam mokta...@gmail.com
 wrote:
   best way is use adb shell
 
   1. adb shell
   2. cd /data/data/packagename/
   3. adb pull  database ./
 
   Enjoy
   Moktarul
 
   On Feb 16, 8:18 pm, Duygu Kahraman duygu.kahram...@gmail.com
 wrote:
I am using intellj idea and i am working with **ORMLite**.
 
My question is, i create a database but i want to export
 database
for looking my data.When i use Eclipse i can export my sqlite
 database
a few ways but i have no idea about **intellj**.
 
Can anybody know something about that?
 
THX.
 
   --
   You received this message because you are subscribed to the Google
   Groups Android Developers group.
   To post to this group, send email to
 android-developers@googlegroups.com
   To unsubscribe from this group, send email to
   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




 --
 ---
 Duygu Kahraman

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

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


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




 --
 ---
 Duygu Kahraman

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

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


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

[android-developers] Re: How can i export my sqlite database from intellj idea?

2012-02-17 Thread moktarul anam
First tell me r u able to connect adb means check whether ur adb is
connected or not.

execute --
adb devices

check whether ur device s there or not
Moktarul

On Feb 17, 2:54 pm, Duygu Kahraman duygu.kahram...@gmail.com wrote:
 intellj is not include ddms and you can not push  /data/data/packagename/
 etc.

 Can anybody help me?

 17 Şubat 2012 08:57 tarihinde shihab shiha shihabkp.andr...@gmail.comyazdı:









  ya but you can open it using command mode. just go command mode and change
  your directory into the android sdk .

  android-sdk-linux/tools and type ./ddms then you will get the window from
  there you can get the access to the sdcard and all

  On Fri, Feb 17, 2012 at 11:25 AM, moktarul anam mokta...@gmail.comwrote:

  Hi
  I think ddms feature  is not there in intellj

  Moktarul

  On Feb 17, 10:20 am, shihab shiha shihabkp.andr...@gmail.com wrote:
   you can use ./ddms

   On Fri, Feb 17, 2012 at 10:37 AM, moktarul anam mokta...@gmail.com
  wrote:
best way is use adb shell

1. adb shell
2. cd /data/data/packagename/
3. adb pull  database ./

Enjoy
Moktarul

On Feb 16, 8:18 pm, Duygu Kahraman duygu.kahram...@gmail.com wrote:
     I am using intellj idea and i am working with **ORMLite**.

     My question is, i create a database but i want to export
  database
 for looking my data.When i use Eclipse i can export my sqlite
  database
 a few ways but i have no idea about **intellj**.

     Can anybody know something about that?

     THX.

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

 --
 ---
 Duygu Kahraman

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

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


Re: [android-developers] Re: App Design Issue

2012-02-17 Thread giles ian
Hi,

basically my question is which of the below methods is better in terms of
app design and UI:

M1: Loding dialog show on first activity and then moving on to next
activity and then displaying data.

M2: Moving to next Activity, then showing loding dialog and then displaying
data



On Fri, Feb 17, 2012 at 3:15 PM, moktarul anam mokta...@gmail.com wrote:


 HI Giles
  if your web service data he heavy then i will suggest you to
 store in database or local files. otherwise memory will be allocated
 through out ur application( if u store in static variable/ stack
 memory).

 if your web service data is xml file use saxParser. ( android sax
 parser)

 Moktarul anam



 On Feb 17, 12:09 pm, giles ian gilesian@gmail.com wrote:
  Hi,
 
  I have 2 activities A  B. Both display data fetched from 2 different web
  service lets say ws1 and ws2
 
  When i click on a button on Activity A i call ws2 in that avtivity itself
  and show loading dialog there itself and then move to Activity B and
  display data.(In this case i have to save lot of data in static variables
  so that they can be shared across activities as im getting data on
 Activity
  A and need to display  on Activity B)
 
  Is this rite approach.
 
  The other option that i have is i call ws2 from Activity B instead of A
 
  Which is a better way.

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

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 can i export my sqlite database from intellj idea?

2012-02-17 Thread Duygu Kahraman
i am using windows 7

17 Şubat 2012 14:08 tarihinde moktarul anam mokta...@gmail.com yazdı:

 First tell me r u able to connect adb means check whether ur adb is
 connected or not.

 execute --
 adb devices

 check whether ur device s there or not
 Moktarul

 On Feb 17, 2:54 pm, Duygu Kahraman duygu.kahram...@gmail.com wrote:
  intellj is not include ddms and you can not push
  /data/data/packagename/
  etc.
 
  Can anybody help me?
 
  17 Şubat 2012 08:57 tarihinde shihab shiha shihabkp.andr...@gmail.com
 yazdı:
 
 
 
 
 
 
 
 
 
   ya but you can open it using command mode. just go command mode and
 change
   your directory into the android sdk .
 
   android-sdk-linux/tools and type ./ddms then you will get the window
 from
   there you can get the access to the sdcard and all
 
   On Fri, Feb 17, 2012 at 11:25 AM, moktarul anam mokta...@gmail.com
 wrote:
 
   Hi
   I think ddms feature  is not there in intellj
 
   Moktarul
 
   On Feb 17, 10:20 am, shihab shiha shihabkp.andr...@gmail.com wrote:
you can use ./ddms
 
On Fri, Feb 17, 2012 at 10:37 AM, moktarul anam mokta...@gmail.com
 
   wrote:
 best way is use adb shell
 
 1. adb shell
 2. cd /data/data/packagename/
 3. adb pull  database ./
 
 Enjoy
 Moktarul
 
 On Feb 16, 8:18 pm, Duygu Kahraman duygu.kahram...@gmail.com
 wrote:
  I am using intellj idea and i am working with **ORMLite**.
 
  My question is, i create a database but i want to export
   database
  for looking my data.When i use Eclipse i can export my sqlite
   database
  a few ways but i have no idea about **intellj**.
 
  Can anybody know something about that?
 
  THX.
 
 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to
   android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 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
 
  --
  ---
  Duygu Kahraman
 
  http://tr.linkedin.com/in/duygukahramann

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




-- 
---
Duygu Kahraman

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

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

Re: [android-developers] Re: How can i export my sqlite database from intellj idea?

2012-02-17 Thread Duygu Kahraman
i can execute adb yes.

17 Şubat 2012 14:21 tarihinde Duygu Kahraman duygu.kahram...@gmail.comyazdı:

 i am using windows 7

 17 Şubat 2012 14:08 tarihinde moktarul anam mokta...@gmail.com yazdı:

 First tell me r u able to connect adb means check whether ur adb is
 connected or not.

 execute --
 adb devices

 check whether ur device s there or not
 Moktarul

 On Feb 17, 2:54 pm, Duygu Kahraman duygu.kahram...@gmail.com wrote:
  intellj is not include ddms and you can not push
  /data/data/packagename/
  etc.
 
  Can anybody help me?
 
  17 Şubat 2012 08:57 tarihinde shihab shiha shihabkp.andr...@gmail.com
 yazdı:
 
 
 
 
 
 
 
 
 
   ya but you can open it using command mode. just go command mode and
 change
   your directory into the android sdk .
 
   android-sdk-linux/tools and type ./ddms then you will get the window
 from
   there you can get the access to the sdcard and all
 
   On Fri, Feb 17, 2012 at 11:25 AM, moktarul anam mokta...@gmail.com
 wrote:
 
   Hi
   I think ddms feature  is not there in intellj
 
   Moktarul
 
   On Feb 17, 10:20 am, shihab shiha shihabkp.andr...@gmail.com
 wrote:
you can use ./ddms
 
On Fri, Feb 17, 2012 at 10:37 AM, moktarul anam 
 mokta...@gmail.com
   wrote:
 best way is use adb shell
 
 1. adb shell
 2. cd /data/data/packagename/
 3. adb pull  database ./
 
 Enjoy
 Moktarul
 
 On Feb 16, 8:18 pm, Duygu Kahraman duygu.kahram...@gmail.com
 wrote:
  I am using intellj idea and i am working with **ORMLite**.
 
  My question is, i create a database but i want to export
   database
  for looking my data.When i use Eclipse i can export my sqlite
   database
  a few ways but i have no idea about **intellj**.
 
  Can anybody know something about that?
 
  THX.
 
 --
 You received this message because you are subscribed to the
 Google
 Groups Android Developers group.
 To post to this group, send email to
   android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 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
 
  --
  ---
  Duygu Kahraman
 
  http://tr.linkedin.com/in/duygukahramann

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




 --
 ---
 Duygu Kahraman

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




-- 
---
Duygu Kahraman

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

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

Re: [android-developers] Re: How can i export my sqlite database from intellj idea?

2012-02-17 Thread shihab shiha
I am using linux and ide is intellij. i can open ddms using command mode. i
never use ecclipse .

2012/2/17 Duygu Kahraman duygu.kahram...@gmail.com

 i can execute adb yes.

 17 Şubat 2012 14:21 tarihinde Duygu Kahraman duygu.kahram...@gmail.comyazdı:

 i am using windows 7

 17 Şubat 2012 14:08 tarihinde moktarul anam mokta...@gmail.com yazdı:

 First tell me r u able to connect adb means check whether ur adb is
 connected or not.

 execute --
 adb devices

 check whether ur device s there or not
 Moktarul

 On Feb 17, 2:54 pm, Duygu Kahraman duygu.kahram...@gmail.com wrote:
  intellj is not include ddms and you can not push
  /data/data/packagename/
  etc.
 
  Can anybody help me?
 
  17 Şubat 2012 08:57 tarihinde shihab shiha shihabkp.andr...@gmail.com
 yazdı:
 
 
 
 
 
 
 
 
 
   ya but you can open it using command mode. just go command mode and
 change
   your directory into the android sdk .
 
   android-sdk-linux/tools and type ./ddms then you will get the window
 from
   there you can get the access to the sdcard and all
 
   On Fri, Feb 17, 2012 at 11:25 AM, moktarul anam mokta...@gmail.com
 wrote:
 
   Hi
   I think ddms feature  is not there in intellj
 
   Moktarul
 
   On Feb 17, 10:20 am, shihab shiha shihabkp.andr...@gmail.com
 wrote:
you can use ./ddms
 
On Fri, Feb 17, 2012 at 10:37 AM, moktarul anam 
 mokta...@gmail.com
   wrote:
 best way is use adb shell
 
 1. adb shell
 2. cd /data/data/packagename/
 3. adb pull  database ./
 
 Enjoy
 Moktarul
 
 On Feb 16, 8:18 pm, Duygu Kahraman duygu.kahram...@gmail.com
 wrote:
  I am using intellj idea and i am working with **ORMLite**.
 
  My question is, i create a database but i want to export
   database
  for looking my data.When i use Eclipse i can export my sqlite
   database
  a few ways but i have no idea about **intellj**.
 
  Can anybody know something about that?
 
  THX.
 
 --
 You received this message because you are subscribed to the
 Google
 Groups Android Developers group.
 To post to this group, send email to
   android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 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
 
  --
  ---
  Duygu Kahraman
 
  http://tr.linkedin.com/in/duygukahramann

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




 --
 ---
 Duygu Kahraman

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




 --
 ---
 Duygu Kahraman

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

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


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

Re: [android-developers] Re: The ActionBar can't work when i use requestWindowFeature(Window.FEATURE_NO_TITLE) method.

2012-02-17 Thread Mark Murphy
On Thu, Feb 16, 2012 at 10:00 PM, Dean Wang tomwang...@gmail.com wrote:
 If is true,is any way can replace the three methods?

You delete them.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

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

2012-02-17 Thread Mark Murphy
On Fri, Feb 17, 2012 at 2:12 AM, dtran dzungduct...@gmail.com wrote:
 Is there any example on using NDK to get sensors data via callback.

You will be better served using the [android-ndk] Google Group for
questions on the Android NDK.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] about Permission Denial: not allowed to send broadcast android.bluetooth.device.action.ACL_DISCONNECT_REQUESTED

2012-02-17 Thread Mark Murphy
Only the firmware can send that broadcast.

On Fri, Feb 17, 2012 at 12:12 AM, xi xia xiaxi@gmail.com wrote:
 I creat an  IntentFilter which manually calls BT broadcast receiver as
 follows:

 IntentFilter disConnectFilter = new
 IntentFilter(BluetoothDevice.ACTION_ACL_DISCONNECTED);
 registerReceiver(_disConnectReceiver, disConnectFilter);

 private BroadcastReceiver _disConnectReceiver = new
 BroadcastReceiver() {
                public void onReceive(Context context, Intent intent) {
                        BluetoothDevice bdevice =
 intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
                                
 if(BluetoothDevice.ACTION_ACL_DISCONNECTED.equals(action)){
                                        Log.d(acl disconnect, acl 
 disconnect);
                ;


 But in Runtime I got the following Exception:
 ERROR/AndroidRuntime(4054): Caused by: java.lang.SecurityException:
 Permission Denial: not allowed to send broadcast
 android.bluetooth.device.action.ACTION_ACL_DISCONNECTED

 I gave both BT permission in my manifest file, but still it doesn't
 work .

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

Warescription: Three Android Books, Plus Updates, One Low Price!

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

2012-02-17 Thread shihab shiha
Hi all,

I am facing a problem regarding with button customization. i am attaching
the image below. i want to activate the onclick on the visible part of this
image. the problem is if i click near to this image that means it takes as
rectangle. i want to activate only that image potion itself. how can i do
it without using canvas . pleas give a solution for 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=enattachment: blue.png

Re: [android-developers] Shared Object Overview

2012-02-17 Thread Mark Murphy
If by shared object you mean .so files, they are not shared between
applications, and it is up to you to manage your own versions for your
own app.

On Fri, Feb 17, 2012 at 2:26 AM, j_a_n.richard...@ntlworld.com
j_a_n.richard...@ntlworld.com wrote:
 I was just wondering what the install process is for a shared object
 and shared object's of different versions.

 I mean are they shared between applications and if there are multiple
 versions how are they managed?

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

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Whats the best way to implement the new fragment activity with a tabhost set up

2012-02-17 Thread Mark Murphy
If you are using fragments, I would recommend putting your tabs in the
action bar, using ActionBarSherlock for supporting your pre-Android
3.0 devices.

If you are certain that you want to use fragments with a TabHost, I
think there is a sample in the SDK samples that demonstrates its use.

On Fri, Feb 17, 2012 at 1:29 AM, Jim Andresakis jimandresa...@gmail.com wrote:
 So now there is the fragment activity what would be the best way to go
 about implementing them within a tabhost.

 I ask this because in reading the documentation they say that tabhost
 has been depreciated in favor of fragments and I have yet to really
 use the fragments
 and would like to do so after getting a little more direction than
 what I read over in the documentation.

 Ideally I would like to set up something similar to a tabhost to show
 three sub activities. One is a listview populated with data from
 online, another would be a mapview populated with the same data, and
 another with some more content from online.

 How would I go about that? Do I just create my activities making them
 extend fragmentActivity and use the tabhost like I used to or is there
 another method to go about this
 with the fragments that is easier on the OS.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

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

2012-02-17 Thread Harri Smått
On Feb 17, 2012, at 12:55 PM, Doo wrote:
 I mean I can do that but it's somewhat strange that there
 are settings for WP and no standard and easy way to notify running
 instance about that.

What gives you an idea there isn't a standard and easy way for getting both 
preview and actual WP instances notified about preference changes? I've never 
had similar problems you're describing here and find it possible there's a flaw 
in your SharedPreference handling instead. Which, for some odd reason, was not 
included as a possible cause in your email at all   ;)

So please, do send some code relevant to SharedPreference handling which 
hopefully leads to more specific answer to your question.

--
H

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

2012-02-17 Thread surabhi jain
Hi all,

I have created a widget and

I want to run activity through app widget provider.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 deal with java.io.exception no space left on device when that isnt the case

2012-02-17 Thread Chris Mawata
That will be it. The file cache is supposed to be small (docs
recommend under 1 MB.
Thanks for the feedback. Many people don't bother to post solutions.
Chris


On Feb 16, 7:13 pm, Jim Andresakis jimandresa...@gmail.com wrote:
 So I got this working by changing the context.getCacheDir() to
 context.getExternalFilesDir(sdState) and now I can once again have my
 app download images from the web and take photos.

 On Feb 16, 3:08 pm, Jim Andresakis jimandresa...@gmail.com wrote:



  Yeah I cant figure that out either. However it wasnt an issue up until
  a week ago.

  This is what Im using to create the place that I thought would be the
  sd card

  String sdState = android.os.Environment.getExternalStorageState();
                  if (sdState.equals(android.os.Environment.MEDIA_MOUNTED)) {
                          File sdDir =
  android.os.Environment.getExternalStorageDirectory();
                          cacheDir = new File(sdDir,data);
                  }
                  else
                          cacheDir = context.getCacheDir();

                  if(!cacheDir.exists())
                          cacheDir.mkdirs();

                  if(sdState.equals(android.os.Environment.MEDIA_MOUNTED)){
                          File adSdDir =
  android.os.Environment.getExternalStorageDirectory();
                          adCacheDir = new File(adSdDir,addata/);
                  }else
                          adCacheDir = context.getCacheDir();

                  if(!adCacheDir.exists())
                      adCacheDir.mkdirs();
          }
  every where I read thats how you get to the sd card

  On Feb 16, 3:02 pm, Chris Mawata chris.maw...@gmail.com wrote:

   Your single application won't be given all of the 1 gig of memory on
   the device. It is a much more humble number like 16MB or 24MB.
   Probably the first thing to investigate is why the images are on
   internal memory.

   On Feb 16, 5:21 pm, Jim Andresakis jimandresa...@gmail.com wrote:

Hello,

I have an app where I let users take pictures and at the same time I
stream pictures to the user based on their location. Im storing the
image files from the download in a file that is supposed to be on the
sd card but for some reason gets created on the internal memory. Just
recently I hit a problem where suddenly after about 80 small image
files have been downloaded into the file my app will no longer allow
users to take images. I get no crash but just a warning in the logcat
that states

Java.IO.Exception no space left on device

This is happening when I am trying to create a file from an
outputstream.

In my code this error happens at this particular line:

bmp.compress(Bitmap.CompressFormat.PNG, 80, out);

I have that line nested within a method that I use to create an image
that can be stored locally on the phone rather than in memory so I
dont run out of memory.
The whole method looks like this:

private void writeFile(Bitmap bmp, File f) {
                FileOutputStream out = null;

                try {
                        out = new FileOutputStream(f);
                        bmp.compress(Bitmap.CompressFormat.PNG, 80, 
out);
                } catch (NullPointerException e) {
                        e.printStackTrace();
                        Log.w(nullpointerException on image error, 
nullpointer);
                } catch (FileNotFoundException e) {
                        Log.w(fileNotfoundException on image error, 
filenotfound);
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }
                finally {
                        try { if (out != null ) out.close(); }
                        catch(Exception ex) {}
                }
        }

both catches never hit when this method fails so I guess Im hitting
the final catch in the finally block.
I have done some research on this and I do not think Im running into
the problem of having to many files in one directory or using names
that are too long. The file names are 1 to 5 characters at most and
last week I was able to have over 400 files in the same directory
without any problems like this occurring. The phone Im testing on at
the moment has over 1gig free of internal and close to the same on the
external so hard memory is not the issue either. This is a sudden
problem that just came on last week so Im kind of stumped and any help
would be much appreciated.- 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

[android-developers] Re: Running wallpaper to react to changes in SharedPreferences

2012-02-17 Thread Doo
Oh, sorry. Stupid me. The thing is that the preview gets notified of
prefs change, the already running wallpaper not. I have this
consistent on stock SGS2 and in 4.0 emulator so thought it's standard
taking in account  that docs claim Note: currently this class does
not support use across multiple processes. This will be added
later..

Anyway, my trimmed down code (i'm using LibdgxWallpaperEngine which is
really a wrapper and I assume is not ultimately relevant):

public class MyWPService extends LibdgxWallpaperService {
public class MyEngine extends LibdgxWallpaperEngine implements
SharedPreferences.OnSharedPreferenceChangeListener {
@Override
protected void initialize(AndroidApplicationLW 
androidApplicationLW)
{
SharedPreferences sharedPreferences = getSharedPrefs();

sharedPreferences.registerOnSharedPreferenceChangeListener(this);
}

public void onSharedPreferenceChanged(SharedPreferences ignored,
String key) {
SharedPreferences sharedPreferences = getSharedPrefs(); 
//

if (key.equals(getText(R.string.prefQuality))) {

MyEngine.this.app.onQualityChanged(sharedPreferences.getInt(key,
0));
} else if (key.equals(getText(R.string.prefWheel))) {
MyEngine.this.app

.onWheelChanged(sharedPreferences.getString(key,
getText(R.string.valTextOnly)));
}
}

private SharedPreferences getSharedPrefs() {
return
MyWPService.this.getSharedPreferences(PreferencesActivity.SHARED_PREFS_NAME,
0);
}
}

Actually you've made think and I moved
registerOnSharedPreferenceChangeListener into onResume and maybe it's
different now. I'll update my findings here.
But does that mean service is always running as single process even if
two different instances of the engine are created?

On Feb 17, 2:01 pm, Harri Smått har...@gmail.com wrote:
 On Feb 17, 2012, at 12:55 PM, Doo wrote:

  I mean I can do that but it's somewhat strange that there
  are settings for WP and no standard and easy way to notify running
  instance about that.

 What gives you an idea there isn't a standard and easy way for getting both 
 preview and actual WP instances notified about preference changes? I've never 
 had similar problems you're describing here and find it possible there's a 
 flaw in your SharedPreference handling instead. Which, for some odd reason, 
 was not included as a possible cause in your email at all   ;)

 So please, do send some code relevant to SharedPreference handling which 
 hopefully leads to more specific answer to your question.

 --
 H

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

2012-02-17 Thread TreKing
On Fri, Feb 17, 2012 at 6:04 AM, Narendra Singh Rathore 
nsr.curi...@gmail.com wrote:

 Please suggest me what I can do in this situation.


Use a database.

-
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] Re: Running wallpaper to react to changes in SharedPreferences

2012-02-17 Thread Doo
Hi Harri,

that was the issue, thanks for pointing it ;) Register to prefs change
in resume event.

Cheers!

On Feb 17, 2:01 pm, Harri Smått har...@gmail.com wrote:
 On Feb 17, 2012, at 12:55 PM, Doo wrote:

  I mean I can do that but it's somewhat strange that there
  are settings for WP and no standard and easy way to notify running
  instance about that.

 What gives you an idea there isn't a standard and easy way for getting both 
 preview and actual WP instances notified about preference changes? I've never 
 had similar problems you're describing here and find it possible there's a 
 flaw in your SharedPreference handling instead. Which, for some odd reason, 
 was not included as a possible cause in your email at all   ;)

 So please, do send some code relevant to SharedPreference handling which 
 hopefully leads to more specific answer to your question.

 --
 H

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

2012-02-17 Thread Harri Smått
On Feb 17, 2012, at 3:36 PM, Doo wrote:
 that was the issue, thanks for pointing it ;) Register to prefs change
 in resume event.

Actually I'd say your problem sums up within these lines in initialize() method;

SharedPreferences sharedPreferences = getSharedPrefs();
sharedPreferences.registerOnSharedPreferenceChangeListener(this);

You only grab local variable for SharedPreferences while you ought to use a 
class wide member variable you can reuse - and most importantly it is not 
garbage collected instantly.

--
H

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

2012-02-17 Thread Mark Cz
I would do that when the adt would support creating a library jar with
res/assets directory. I am sure many 3rd party developers will thank
Google for that.

On Feb 16, 11:18 pm, Dianne Hackborn hack...@android.com wrote:
 Please don't do that.  The correct way to retrieve the content of your .apk
 is with Resources and AssetManager.









 On Thu, Feb 16, 2012 at 6:39 AM, Mark Cz ome...@gmail.com wrote:
  Thanks Mark.
  But I don't want to use the assets directory, since it's not my
  project. I am just giving the developers a jar with an html file
  inside. Of course I can give them two files, a jar to put in their
  classpath and a html file to put in their assets directory, but i want
  to avoid that.
  Anyhow I found a solution to read the file.
  I am reading the apk file using
  getPackageManager().getApplicationInfo(getPackageName(),
  0).sourceDir;
  And then by using java.util.zip.ZipFile I retrieve the html file, and
  copy it to context.getFilesDir().getPath().

  On Feb 16, 3:22 pm, Mark Murphy mmur...@commonsware.com wrote:
   On Thu, Feb 16, 2012 at 4:24 AM, Mark Cz ome...@gmail.com wrote:
Hi,
I am having an android application that is using an external jar that
has in addition to regular classes an html file.

The final apk root directory looks something like this

assests
res
AndroidManifest.xml
classes.dex
resources.arsc
helloworld.html

How can I access from my application to the last file
helloworld.html?

   You move it into assets/ and then use getResources().getAssets().open().

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

   Warescription: Three Android Books, Plus Updates, One Low Price!

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

2012-02-17 Thread TreKing
On Fri, Feb 17, 2012 at 6:46 AM, shihab shiha shihabkp.andr...@gmail.comwrote:

 i want to activate the onclick on the visible part of this image. the
 problem is if i click near to this image that means it takes as rectangle.


How big is this image going to be in practice? It might not be worth the
effort.


 i want to activate only that image potion itself. how can i do it without
 using canvas . pleas give a solution for this


Roughly: you could use the View's touch events to get the exact X / Y touch
coordinates, then use some fancy math to determine that the point is
contained within the geometric area represented by the image in question.

-
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] onInterceptTouchEvent and Gesture detector

2012-02-17 Thread harvinder
The View:
I have a Custom ViewGroup that handles gestures from users. I am overriding 
onTouchEvent

@Override
public boolean onTouchEvent(MotionEvent me)
{
return _gestureDetector.onTouchEvent(me);
}
It also have some other views as its children.


Problem:
I am correctly able to handle all the gestures in my Custom ViewGroup. 
Hoever, if I add a click listener on any of the children, gesture detection 
stops.

I understand that I am suppose to play with onInterceptTouchEvent method. 
However, it seems like I have to handle raw events in this method, which 
make me very uncomfortable given that GestureDetector handles all these low 
level events.


I would like to not intercept the click event and pass that on to the 
children but handle the rest using gesture detector.

thanks
harvinder

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

2012-02-17 Thread TreKing
On Fri, Feb 17, 2012 at 7:10 AM, surabhi jain surabhi17.j...@gmail.comwrote:

 I have created a widget and I want to run activity through app widget
 provider.


What does that mean?
http://www.catb.org/~esr/faqs/smart-questions.html

-
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

Re: [android-developers] Android Button Customization

2012-02-17 Thread fei ji
I think image button can also be a good choice. You just need to set a
attribute called android:src which reference to the image file you want to
use.
在 2012-2-17 上午5:24,value makers shihabkv22...@gmail.com写道:

 Hi All,


 I am new in android development. I have one problem regarding with my
 button customization. i would like to customize a button in a semi
 circular form .

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

2012-02-17 Thread TreKing
On Fri, Feb 17, 2012 at 6:11 AM, giles ian gilesian@gmail.com wrote:

 M1: Loding dialog show on first activity and then moving on to next
 activity and then displaying data.

 M2: Moving to next Activity, then showing loding dialog and then
 displaying data


M2, as that defers the blocking operation until it's actually necessary.
What if the user never makes it to B? Then you blocked them and made them
wait for no reason.

-
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

Re: [android-developers] Re: How to create two projects as one apk file.

2012-02-17 Thread TreKing
On Fri, Feb 17, 2012 at 1:03 AM, Eric Wong (hdmp4.com) ericwon...@gmail.com
 wrote:

 If I have an application (app A) as a binary (i.e. normal apk as
 downloaded from Market, for example.), is it possible to bundle it
 with another application (app B, which I build, i.e. have source code)
 to make it into a single apk, which will be distributed on Android
 market?


No.

-
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

Re: [android-developers] Transparent progress layer on top of imageview

2012-02-17 Thread TreKing
On Fri, Feb 17, 2012 at 12:35 AM, Raneez rane...@gmail.com wrote:

 My app display a waveform for the recorded audio in a
 imageview. I want to display a transparent layer over this
 waveform which progress with respect to the duration of
 the audio when it is played.

 How it is done? Or is there any UI controls in android to do this?


http://developer.android.com/reference/android/widget/RelativeLayout.html
http://developer.android.com/reference/android/widget/FrameLayout.html
http://developer.android.com/reference/android/widget/ProgressBar.html
http://developer.android.com/reference/android/view/View.html#attr_android:background


-
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] sonendra mishra wants to chat

2012-02-17 Thread sonendra mishra
I've been using Google Talk and thought you might like to try it out.
We can use it to call each other for free over the internet. Here's an
invitation to download Google Talk. Give it a try!

---

sonendra mishra wants to stay in better touch using some of Google's coolest new
products.

If you already have Gmail or Google Talk, visit:
http://mail.google.com/mail/b-a57a40e8f1-c32d68bea6-wXsp4OmWaBvayvtK60vUg-j0roo
You'll need to click this link to be able to chat with sonendra mishra.

To get Gmail - a free email account from Google with over 2,800 megabytes of
storage - and chat with sonendra mishra, visit:
http://mail.google.com/mail/a-a57a40e8f1-c32d68bea6-wXsp4OmWaBvayvtK60vUg-j0roo

Gmail offers:
- Instant messaging right inside Gmail
- Powerful spam protection
- Built-in search for finding your messages and a helpful way of organizing
  emails into conversations
- No pop-up ads or untargeted banners - just text ads and related information
  that are relevant to the content of your messages

All this, and its yours for free. But wait, there's more! By opening a Gmail
account, you also get access to Google Talk, Google's instant messaging
service:

http://www.google.com/talk/

Google Talk offers:
- Web-based chat that you can use anywhere, without a download
- A contact list that's synchronized with your Gmail account
- Free, high quality PC-to-PC voice calls when you download the Google Talk
  client

We're working hard to add new features and make improvements, so we might also
ask for your comments and suggestions periodically. We appreciate your help in
making our products even better!

Thanks,
The Google Team

To learn more about Gmail and Google Talk, visit:
http://mail.google.com/mail/help/about.html
http://www.google.com/talk/about.html

(If clicking the URLs in this message does not work, copy and paste them into
the address bar of your browser).

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

2012-02-17 Thread Doo
so i was lucky it started working! thanks again, i've fixed it to use
class field now (good that i've got get-method for that).

On Feb 17, 2:50 pm, Harri Smått har...@gmail.com wrote:
 On Feb 17, 2012, at 3:36 PM, Doo wrote:

  that was the issue, thanks for pointing it ;) Register to prefs change
  in resume event.

 Actually I'd say your problem sums up within these lines in initialize() 
 method;

 SharedPreferences sharedPreferences = getSharedPrefs();
 sharedPreferences.registerOnSharedPreferenceChangeListener(this);

 You only grab local variable for SharedPreferences while you ought to use a 
 class wide member variable you can reuse - and most importantly it is not 
 garbage collected instantly.

 --
 H

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

2012-02-17 Thread fei ji
the call status is stored in contact2.DB. you get the call status from
calllogprovider which is in contact provider module.
在 2012-2-17 上午5:24,deepu mandy deepikamandapa...@gmail.com写道:

 i am very new to the android development and working on desidning
 apps...
 i have so many confusions while doing this plase let me help if u
 have idea...


 nw i am working on a sample module to make phone calls and also to get
 status of that call?
 how to get whether he lift the call/ end call?
 how?

 --
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, 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] How to avoid Starting an activity from adb shell using am start command

2012-02-17 Thread fei ji
Maybe you can change the group of the am binery to root. Then the user can
use this tool when they have not get root permission. I haven't test it yet.
在 2012-2-17 下午2:47,banu banuchan...@gmail.com写道:

 Hi,
Here my scenario is something like i developed am android
 application which requires login authentication from user before
 performing any further operations,but i found that for
 instrumaentation testing they use commands like

 am start packagename activity name

 to start a particular activity,which makes my application insecure so
 i needs a solution to avoid this,because i saw in instrumentation
 testing they will have different testcases for different activities
 where this above command comes into picture to do undergo testing on
 that particular activity.


 i am running on this quite for a long time.so your ideas wiull be
 appreciated

 banu

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

2012-02-17 Thread Jim Morris
Every time I open Eclipse, I get a message about a null pointer
exception. Everything seems to work okay, but I fear someday it might
cause me problems. I have seen postings about this, but I have never
seen a resolution. I am running Eclipse 3.7.1. I have not done
anything non-standard.


==


!ENTRY org.eclipse.core.resources 4 75 2012-02-17 07:18:29.140
!MESSAGE Errors occurred during the build.
!SUBENTRY 1 org.eclipse.jdt.core 4 75 2012-02-17 07:18:29.140
!MESSAGE Errors running builder 'Java Builder' on project 'firms'.
!STACK 0
java.lang.NullPointerException
at java.lang.String.init(Unknown Source)
at
org.eclipse.jdt.internal.compiler.problem.ProblemReporter.conditionalArgumentsIncompatibleTypes(ProblemReporter.java:
1335)
at
org.eclipse.jdt.internal.compiler.ast.ConditionalExpression.resolveType(ConditionalExpression.java:
556)
at
org.eclipse.jdt.internal.compiler.ast.BinaryExpression.resolveType(BinaryExpression.java:
1799)
at
org.eclipse.jdt.internal.compiler.ast.BinaryExpression.resolveType(BinaryExpression.java:
1796)
at
org.eclipse.jdt.internal.compiler.ast.BinaryExpression.resolveType(BinaryExpression.java:
1796)
at
org.eclipse.jdt.internal.compiler.ast.BinaryExpression.resolveType(BinaryExpression.java:
1796)
at
org.eclipse.jdt.internal.compiler.ast.BinaryExpression.resolveType(BinaryExpression.java:
1796)
at
org.eclipse.jdt.internal.compiler.ast.BinaryExpression.resolveType(BinaryExpression.java:
1796)
at
org.eclipse.jdt.internal.compiler.ast.BinaryExpression.resolveType(BinaryExpression.java:
1796)
at
org.eclipse.jdt.internal.compiler.ast.BinaryExpression.resolveType(BinaryExpression.java:
1796)
at
org.eclipse.jdt.internal.compiler.ast.BinaryExpression.resolveType(BinaryExpression.java:
1796)
at
org.eclipse.jdt.internal.compiler.ast.BinaryExpression.resolveType(BinaryExpression.java:
1796)
at
org.eclipse.jdt.internal.compiler.ast.BinaryExpression.resolveType(BinaryExpression.java:
1796)
at
org.eclipse.jdt.internal.compiler.ast.BinaryExpression.resolveType(BinaryExpression.java:
1796)
at
org.eclipse.jdt.internal.compiler.ast.BinaryExpression.resolveType(BinaryExpression.java:
1796)
at
org.eclipse.jdt.internal.compiler.ast.BinaryExpression.resolveType(BinaryExpression.java:
1796)
at
org.eclipse.jdt.internal.compiler.ast.BinaryExpression.resolveType(BinaryExpression.java:
1796)
at
org.eclipse.jdt.internal.compiler.ast.BinaryExpression.resolveType(BinaryExpression.java:
1796)
at
org.eclipse.jdt.internal.compiler.ast.CombinedBinaryExpression.resolveType(CombinedBinaryExpression.java:
337)
at
org.eclipse.jdt.internal.compiler.ast.ReturnStatement.resolve(ReturnStatement.java:
225)
at
org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolveStatements(AbstractMethodDeclaration.java:
463)
at
org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.resolveStatements(MethodDeclaration.java:
252)
at
org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.resolve(AbstractMethodDeclaration.java:
422)
at
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:
1148)
at
org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.resolve(TypeDeclaration.java:
1258)
at
org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.resolve(CompilationUnitDeclaration.java:
539)
at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:
763)
at
org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:
137)
at java.lang.Thread.run(Unknown Source)

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

2012-02-17 Thread tatebn
I'm trying to skin the options menu on android.  I have the background
color changed with a custom theme, but I can't get the text color to
change for some reason.

My Theme

style name=default parent=@android:style/Theme.NoTitleBar

!--  Menu panel colors --
item name=android:panelBackground@color/
optionsMenuBackgroundColor/item
item name=android:panelFullBackground@color/
optionsMenuBackgroundColor/item

!--  Menu item colors --
item name=android:itemTextAppearance@style/OptionsMenuFont/
item

 /style

My Style for the options menu font

style name=OptionsMenuFont parent=@android:style/
TextAppearance.Widget.IconMenu.Item
item name=android:textColor@drawable/menu_item_font/item
/style

My drawable for the button color selector menu_item_font.xml

?xml version=1.0 encoding=utf-8?
selector xmlns:android=http://schemas.android.com/apk/res/android;


!--  Put other state colors up top --


item android:color=@color/optionsMenuTextColor /

/selector

That color is just a hex color #c4c4c4.
I have also tried just putting a straight hex color value of #ff
in there, which also doesn't work.

What am I missing 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] Why all the content of my GL10 gl object is null?

2012-02-17 Thread saex
I'm trying to create a simple opengl test.

i have a GLSurfaceView class that must show a square with a texture.
I'm trying to fit the screen with the texture/polygon dimensions, then
i need to use projections.

I'm using 3 classes to have compatibility with android 1.5:

MatrixGrabber.java MatrixStack.java MatrixTrackingGL.java

The problem is that i am getting an exception because all the content
of my GL10 gl object is null, then, when i try to get the projection
or the model matrix i got exception.

THis is the code:

public class SquareGLSurfaceView extends GLSurfaceView implements
Renderer {
private Square square;
private final float Z = -1.0f;  //eje Z
private float x = 0;//eje X
private float y = 0;//eje Y
private float oldX;
private float oldY;
private final float TOUCH_SCALE = 0.2f; //Proved to be good
for normal rotation ( NEW )
private static Context context;

//los siguientes valores son para hacer proyecciones gluProject
para mover el objeto con el dedo
float screen2GL = 0f;
float [] modelMatrix = new float[16];
float [] projMatrix = new float[16];
float [] outputCoords= new float[4];
int [] mView = new int[4];

private float scale=0.01f;

// Translations
float offset_x , offset_y;

private MatrixGrabber mg = new MatrixGrabber(); //create the
matrix grabber object in your initialization code

int screenW; //screen Width
int screenH; //screen Height

public SquareGLSurfaceView(Context context) {
super(context);
this.setRenderer(this);
this.requestFocus();
this.setFocusableInTouchMode(true);
this.context = context;
Bitmap bm=loadImage(sample_0);
square = new Square(bm);

DisplayMetrics dm = new DisplayMetrics();
 
((Activity)context).getWindowManager().getDefaultDisplay().getMetrics(dm);
screenW=dm.widthPixels;
screenH=dm.heightPixels;

modelMatrix=mg.mModelView;
projMatrix=mg.mProjection;
mView[0] = 0;
mView[1] = 0;
mView[2] = screenW; //width
mView[3] = screenH; //height
}

public void onSurfaceCreated(GL10 gl, EGLConfig config) {
gl.glDisable(GL10.GL_DITHER);   //dithering OFF
gl.glEnable(GL10.GL_TEXTURE_2D);//Texture Mapping
ON
gl.glShadeModel(GL10.GL_SMOOTH);//Smooth Shading
gl.glClearDepthf(1.0f); //Depth Buffer
Setup
gl.glEnable(GL10.GL_DEPTH_TEST);//Depth Testing ON
gl.glDepthFunc(GL10.GL_LEQUAL);
gl.glClearColor(0,0,0,0);   //fondo
transparente
gl.glHint(GL10.GL_PERSPECTIVE_CORRECTION_HINT,
GL10.GL_NICEST);
//Cargamos la textura del cubo.
square.loadGLTexture(gl, this.context);


}


public void onDrawFrame(GL10 gl) {
//Clear Screen And Depth Buffer
gl.glClear(GL10.GL_COLOR_BUFFER_BIT |
GL10.GL_DEPTH_BUFFER_BIT);
gl.glLoadIdentity();//Reset The Current
Modelview Matrix

mg.getCurrentProjection(gl);
mg.getCurrentModelView(gl);

// Translating
if( offset_x != 0 ){
x+=offset_x * screen2GL;
offset_x = 0;
}
if( offset_y != 0 ){
y+=offset_y * screen2GL;
offset_y = 0;
}

gl.glTranslatef(x, y, Z );  //Move z units into the
screen
Log.d(onDrawFrame,x:+x+ y:+y+ z:+Z);
//Drawing
gl.glScalef(scale, scale, 1.0f);

square.draw(gl);//Draw the Cube
}

public void onSurfaceChanged(GL10 gl, int width, int height) {
if(height == 0) {   //Prevent A Divide By
Zero By
height = 1; //Making Height Equal
One
}

gl.glViewport(0, 0, width, height); //Reset The Current
Viewport
gl.glMatrixMode(GL10.GL_PROJECTION);//Select The
Projection Matrix
gl.glLoadIdentity();//Reset The Projection
Matrix

//Calculate The Aspect Ratio Of The Window
GLU.gluPerspective(gl, 45.0f, (float)width / (float)height,
0.1f, 100.0f);

gl.glMatrixMode(GL10.GL_MODELVIEW); //Select The Modelview
Matrix
gl.glLoadIdentity();//Reset The Modelview
Matrix

solveScreen2GL();
}



public boolean onTouchEvent(MotionEvent event) {
float screenX = event.getX();
float screenY = event.getY();
switch (event.getAction()) {
   case MotionEvent.ACTION_DOWN:
   break;
   case MotionEvent.ACTION_UP:
   break;
   case MotionEvent.ACTION_MOVE:
   offset_x+=screenX - oldX;
   offset_y-=screenY - oldY;
   break;
}
oldX=event.getX();

[android-developers] Re: Changing ImageView background with a custom image

2012-02-17 Thread Kookamonga
Just in case I wasn't clear in what I wanted, let me try again.

I basically want to accomplish the same effect as the latest GMail app
does with its buttons at the bottom of the main Activity. If you click
on the Compose button, it is highlighted in blue while it is
pressed. My question is whether this is possible with a selector and a
single actual image of the icon, or whether I necessarily need as many
images as I have different backgrounds.

Again, I realize that the selector itself requires separate images for
each state, but my drawables in that case are simple... For example:

?xml version=1.0 encoding=utf-8?
shape
xmlns:android=http://schemas.android.com/apk/res/android;
android:shape=rectangle

solid
 android:color=#FF /
/shape

It is much easier to create multiple such drawables for changing the
background as long as there is a single icon image that can be applied
on top of the changing background. Hopefully this is more clear.

Thanks again for your help.

On Feb 16, 10:53 pm, Kookamonga site...@yahoo.ca wrote:
 I have a clickable ImageView that contains an image, say an X, set by
 using the android:src attribute of the ImageView to a drawable/png
 file. Searching around, I've been able to figure out how to use a
 selector to change the background colour of an ImageView when it is
 pressed. But again, this uses the android:src attribute... So my
 question is whether there is an easy way to both set the image to an X
 AND use a selector to change the background when pressed? The obvious
 answer is to have the images in my selector all include the X with
 different backgrounds depending on the state... But I'm hoping that I
 don't have to go and create 2 versions of every image I want to have
 with different backgrounds (right now, the selectors point to simple
 drawables that are solid colours, so no image creation needed). Or do
 I just have to bite the bullet?

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

2012-02-17 Thread John Goche
Hello,

I would like to produce a PDF file programmatically in my application.
I have found that itext (http://itextpdf.com/) does the job but that the
later versions are covered by the AGPL rather than the LGPL which
as far as I understand means that if the application is sold then I need
to purchase the license for $1,500 which is quite a lot especially given
that I do not know in advance how many copies of my application will
sell. I have found that there is a bundle from a previous version called
droid text: http://code.google.com/p/droidtext/downloads/list
which is based on the LGPL so that users don't have to pay
for it.

I wonder if anyone knows what the differences are between the old
version and the new version. Are the APIs compatible and what more
does the new version (currently 5.1.3) offer besides PDF 2 support that
the former version does not? I would like to hear from anyone whom has
used droid pdf.

Also, where do I save the PDF? I would like to fire a browser intent which
attaches the generated PDF file as an attachment. Anyone know how to
do that? Where on the file system can I save the generated PDF and can
I specify the PDF as an intent bundle extra?

Thanks,

JG

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

2012-02-17 Thread Muhammad UMER

hi pskink,
  I want Mediarecorder documantation or report on Mediarecorder can 
you provide me.

Thanks

From: muhammad.ume...@hotmail.com
To: android-developers@googlegroups.com
Subject: RE: [android-developers] Re: Encoder???
Date: Wed, 15 Feb 2012 17:56:24 +0500







Hi pskink,
  How are you, I am disturbing you again sorry for that. I want 
this application on at most 10 mobiles, so how can i apply the user 
authentication on this application to restrict the other user.
that will not use this application also not connect to server.

Thanks

umer


 Date: Mon, 13 Feb 2012 08:20:22 -0800
 Subject: [android-developers] Re: Encoder???
 From: psk...@gmail.com
 To: android-developers@googlegroups.com
 
 
 
 Muhammad UMER wrote:
  Hi pskink,
 
Thank you for your kind help. I have done this app with your 
  help. I have handle the file header on server side and now 3gp file is 
  playable. You are such a great great great. man.
 
  Thanks and Regards,
  umer
 
 
 
 
 
 
 you are welcome, no problem
 
 pskink
 
 -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en
  




-- 

You received this message because you are subscribed to the Google

Groups Android Developers group.

To post to this group, send email to android-developers@googlegroups.com

To unsubscribe from this group, 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: Encoder???

2012-02-17 Thread Muhammad UMER

hi pskink,


  I want Mediarecorder documantation or report on Mediarecorder can 
you provide me.





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] PDF on android: request for comments

2012-02-17 Thread Mark Murphy
On Fri, Feb 17, 2012 at 12:33 PM, John Goche johngoch...@googlemail.com wrote:
 I wonder if anyone knows what the differences are between the old
 version and the new version.

That would be a fine question for some iText-specific list or group.

 Also, where do I save the PDF?

On internal storage or external storage.

 I would like to fire a browser intent which
 attaches the generated PDF file as an attachment.

Browsers don't have attachments. Email messages might have attachments.

 Where on the file system can I save the generated PDF

On internal storage or external storage.

 and can
 I specify the PDF as an intent bundle extra?

You can specify the path to a PDF as an extra, or as the Uri
associated with the Intent. You need to follow the rules for whatever
it is that you are trying to do (e.g., ACTION_SEND would use
EXTRA_STREAM).

Note that paths to files on internal storage are frequently useless,
as other apps cannot access those files by default. You would either
need to use MODE_WORLD_READABLE (ick) or create a small
ContentProvider for serving that file and making it available to other
apps via a content:// Uri.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Same codebase, 2 apks, one free, another paid ?

2012-02-17 Thread androidmediadeveloper
We are trying to come up with a tablet optimized pro product that we
only want shipped in the market as a paid app. We currently do have a
free app in the market which is doing fairly well. I understand there
are package naming restrictions and even if we build multiple apks
(phone and tablet), we wont be able to host them separately. From a
tech perspective we want to just maintain one codebase given both
flavors are going to share a majority of the functionality.

That leaves us with some preprocessor type step where prior to
building the tablet apk, we create a new manifest, change the package
name, change package names on all sources, and then produce separate
apks. This is undesirable as is obvious.

Any ideas here ? Any lessons learnt ? Any advice ?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Same codebase, 2 apks, one free, another paid ?

2012-02-17 Thread TreKing
On Fri, Feb 17, 2012 at 1:55 PM, androidmediadeveloper 
kamathaj...@gmail.com wrote:

 I understand there
 are package naming restrictions and even if we build multiple apks
 (phone and tablet), we wont be able to host them separately.


http://android-developers.blogspot.com/2011/07/multiple-apk-support-in-android-market.html


 Any ideas here ? Any lessons learnt ? Any advice ?


http://developer.android.com/guide/developing/projects/projects-eclipse.html#SettingUpLibraryProject


-
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

Re: [android-developers] Same codebase, 2 apks, one free, another paid ?

2012-02-17 Thread Mark Murphy
Use an Android library project for the common code, and refer to it
from the apps.

On Fri, Feb 17, 2012 at 2:55 PM, androidmediadeveloper
kamathaj...@gmail.com wrote:
 We are trying to come up with a tablet optimized pro product that we
 only want shipped in the market as a paid app. We currently do have a
 free app in the market which is doing fairly well. I understand there
 are package naming restrictions and even if we build multiple apks
 (phone and tablet), we wont be able to host them separately. From a
 tech perspective we want to just maintain one codebase given both
 flavors are going to share a majority of the functionality.

 That leaves us with some preprocessor type step where prior to
 building the tablet apk, we create a new manifest, change the package
 name, change package names on all sources, and then produce separate
 apks. This is undesirable as is obvious.

 Any ideas here ? Any lessons learnt ? Any advice ?

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

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Same codebase, 2 apks, one free, another paid ?

2012-02-17 Thread Kostya Vasilyev
To build separate APKs while maintaining a more-or-less common code 
base, look into using an Android Library project:


http://developer.android.com/guide/developing/projects/index.html

Market lets you upload multiple APKs for the same package name, 
targeting distinct API levels or screen sizes. I'd recomment the latter, 
given that Android 4.0 supports both phone class and tablet class devices.


All of those are presented to the user as a single application, so I 
don't think you'd be able to charge just for the tablet version - unless 
you used in-app billing.


Alternatively, you could give the tablet version its own package name, 
essentially creating a separate paid app.


-- K


On 02/17/2012 11:55 PM, androidmediadeveloper wrote:

We are trying to come up with a tablet optimized pro product that we
only want shipped in the market as a paid app. We currently do have a
free app in the market which is doing fairly well. I understand there
are package naming restrictions and even if we build multiple apks
(phone and tablet), we wont be able to host them separately. From a
tech perspective we want to just maintain one codebase given both
flavors are going to share a majority of the functionality.

That leaves us with some preprocessor type step where prior to
building the tablet apk, we create a new manifest, change the package
name, change package names on all sources, and then produce separate
apks. This is undesirable as is obvious.

Any ideas here ? Any lessons learnt ? Any advice ?



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

2012-02-17 Thread exax
So, I wanted to create a simple sound player that will just play a
sound when I touch a button. I created it without errors but it
crashes everytime i run it. I got rid of all the extra code and found
that the error is coming from the media player initialization

public MediaPlayer music = MediaPlayer.create
(getApplicationContext(), R.raw.sound_1);

I believe this is due to my lack of understanding context. i need some
help figuring out what context to put into the first parameter.
thanks in advance

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


Re: [android-developers] sound player

2012-02-17 Thread Mark Murphy
On Fri, Feb 17, 2012 at 3:14 PM, exax evan.yeu...@gmail.com wrote:
 So, I wanted to create a simple sound player that will just play a
 sound when I touch a button. I created it without errors but it
 crashes everytime i run it. I got rid of all the extra code and found
 that the error is coming from the media player initialization

 public MediaPlayer music = MediaPlayer.create
 (getApplicationContext(), R.raw.sound_1);

 I believe this is due to my lack of understanding context. i need some
 help figuring out what context to put into the first parameter.

Try:

public MediaPlayer music = MediaPlayer.create(this, R.raw.sound_1);

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

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Whats the best way to implement the new fragment activity with a tabhost set up

2012-02-17 Thread Jim Andresakis
Hey Mark thanks for the reply. After looking at it I think Ill go with
the actionbarsherlock set up. Id imagine its all open source but I
dont see any mentions of a license. Do you happen to know what license
they have it under?

On Feb 17, 4:48 am, Mark Murphy mmur...@commonsware.com wrote:
 If you are using fragments, I would recommend putting your tabs in the
 action bar, using ActionBarSherlock for supporting your pre-Android
 3.0 devices.

 If you are certain that you want to use fragments with a TabHost, I
 think there is a sample in the SDK samples that demonstrates its use.









 On Fri, Feb 17, 2012 at 1:29 AM, Jim Andresakis jimandresa...@gmail.com 
 wrote:
  So now there is the fragment activity what would be the best way to go
  about implementing them within a tabhost.

  I ask this because in reading the documentation they say that tabhost
  has been depreciated in favor of fragments and I have yet to really
  use the fragments
  and would like to do so after getting a little more direction than
  what I read over in the documentation.

  Ideally I would like to set up something similar to a tabhost to show
  three sub activities. One is a listview populated with data from
  online, another would be a mapview populated with the same data, and
  another with some more content from online.

  How would I go about that? Do I just create my activities making them
  extend fragmentActivity and use the tabhost like I used to or is there
  another method to go about this
  with the fragments that is easier on the OS.

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

 Warescription: Three Android Books, Plus Updates, One Low Price!

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

2012-02-17 Thread Narendra Singh Rathore
On Fri, Feb 17, 2012 at 6:56 PM, TreKing treking...@gmail.com wrote:

  On Fri, Feb 17, 2012 at 6:04 AM, Narendra Singh Rathore 
 nsr.curi...@gmail.com wrote:

 Please suggest me what I can do in this situation.


 Use a database.


Well..., Thanks for suggestion, and I am sure this will solve my prob.

But, FYI, I am using ExpandableListView and for that I was using
strings.xml.
It seems I must depend on database everytime I want to use
ExpandableListView.
So, I guess, its not a very good idea to use database for that reason.

I referred android doc for ExpandableListView. (link followed)
http://developer.android.com/resources/samples/ApiDemos/src/com/example/android/apis/view/ExpandableList1.html

I will be very glad on getting some better way to achieve my target.

With Regards,
NSR.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Whats the best way to implement the new fragment activity with a tabhost set up

2012-02-17 Thread Mark Murphy
If you check the GitHub repo (see the ribbon, upper-right corner,
pretty much every ABS site page), it's Apache License 2.0.

On Fri, Feb 17, 2012 at 3:17 PM, Jim Andresakis jimandresa...@gmail.com wrote:
 Hey Mark thanks for the reply. After looking at it I think Ill go with
 the actionbarsherlock set up. Id imagine its all open source but I
 dont see any mentions of a license. Do you happen to know what license
 they have it under?

 On Feb 17, 4:48 am, Mark Murphy mmur...@commonsware.com wrote:
 If you are using fragments, I would recommend putting your tabs in the
 action bar, using ActionBarSherlock for supporting your pre-Android
 3.0 devices.

 If you are certain that you want to use fragments with a TabHost, I
 think there is a sample in the SDK samples that demonstrates its use.









 On Fri, Feb 17, 2012 at 1:29 AM, Jim Andresakis jimandresa...@gmail.com 
 wrote:
  So now there is the fragment activity what would be the best way to go
  about implementing them within a tabhost.

  I ask this because in reading the documentation they say that tabhost
  has been depreciated in favor of fragments and I have yet to really
  use the fragments
  and would like to do so after getting a little more direction than
  what I read over in the documentation.

  Ideally I would like to set up something similar to a tabhost to show
  three sub activities. One is a listview populated with data from
  online, another would be a mapview populated with the same data, and
  another with some more content from online.

  How would I go about that? Do I just create my activities making them
  extend fragmentActivity and use the tabhost like I used to or is there
  another method to go about this
  with the fragments that is easier on the OS.

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

 Warescription: Three Android Books, Plus Updates, One Low Price!

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

Warescription: Three Android Books, Plus Updates, One Low Price!

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

2012-02-17 Thread TreKing
On Fri, Feb 17, 2012 at 2:18 PM, Narendra Singh Rathore 
nsr.curi...@gmail.com wrote:

 But, FYI, I am using ExpandableListView and for that I was using
 strings.xml.
 It seems I must depend on database everytime I want to use
 ExpandableListView.
 So, I guess, its not a very good idea to use database for that reason.


I didn't follow all that. But, have a look at this for the database option.
http://developer.android.com/reference/android/widget/SimpleCursorTreeAdapter.html


-
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

Re: [android-developers] PDF on android: request for comments

2012-02-17 Thread John Goche
On Fri, Feb 17, 2012 at 6:38 PM, Mark Murphy mmur...@commonsware.com wrote:

 You can specify the path to a PDF as an extra, or as the Uri
 associated with the Intent. You need to follow the rules for whatever
 it is that you are trying to do (e.g., ACTION_SEND would use
 EXTRA_STREAM).

 Note that paths to files on internal storage are frequently useless,
 as other apps cannot access those files by default. You would either
 need to use MODE_WORLD_READABLE (ick) or create a small
 ContentProvider for serving that file and making it available to other
 apps via a content:// Uri.

I've found the following code which would allow the user to select an
email client from a list fired as an intent. The email client on the phone
would have the pdf as an attachment. Here the pdf is called shortcuts.pdf.
However I don't know how to save it so that it becomes accessible as
R.raw.shortcuts . How is this magic achieved? What is R.raw? Does it
reside on external storage?

Do I really need to use content:// and a content provider or can I do
away with using android:resource:// as below? What's the difference?

Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);
emailIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL,
 new String[]{emailaddress});
emailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, Subject);
emailIntent.putExtra(android.content.Intent.EXTRA_TEXT, Body);

String rawFolderPath = android.resource:// + getPackageName()
   + / + R.raw.shortcuts;

// Here my file name is shortcuts.pdf which i have stored in /res/raw folder
Uri emailUri = Uri.parse(rawFolderPath );
emailIntent.putExtra(Intent.EXTRA_STREAM, emailUri);
emailIntent.setType(application/pdf);
startActivity(Intent.createChooser(emailIntent, Send mail...));


Thanks,

JG

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

2012-02-17 Thread Mark Murphy
On Fri, Feb 17, 2012 at 3:45 PM, John Goche johngoch...@googlemail.com wrote:
 I've found the following code which would allow the user to select an
 email client from a list fired as an intent. The email client on the phone
 would have the pdf as an attachment. Here the pdf is called shortcuts.pdf.
 However I don't know how to save it so that it becomes accessible as
 R.raw.shortcuts . How is this magic achieved? What is R.raw?

R.raw refers to raw resources, stored in res/raw/ in your project (or
other resource sets, such as res/raw-es/ for Spanish-language raw
resources).

 Does it reside on external storage?

No.

 Do I really need to use content:// and a content provider or can I do
 away with using android:resource:// as below?

Only if your PDF is a raw resource.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Avoiding FAILED BINDER TRANSACTION error when updating lots of widget bitmaps

2012-02-17 Thread YuviDroid
Hi,

sorry to resurrect this post...but I got into a similar problem. And as the
OP did, I'm using RemoteViews.setImageViewUri() to set my image on the
appwidget. However I noticed that my image is being scaled according to the
screen density.

So, for example, on an XHDPI screen, if I have a bitmap which is 100x100
and I set it using setImageViewBitmap() I get the image to look as 100x100.
However, if I store that bitmap into a png on disk, and then use
setImageViewUri() my bitmap is displayed as 50x50.

Do you know if there is a way to change this behavior? (i.e. if my image is
100x100 I'd like it to remain 100x100 also after it is decoded).
Maybe there is a way to force some density on the ImageView itself?

My only workaround (which sucks..) is to scale-up the bitmap before storing
on disk so that when it is being decoded I get back my original size. But
in this way I use more memory to save the image and I also loose image
quality..:(

I hope someone can help me!
Thanks,
Yuvi

On Mon, Aug 1, 2011 at 8:05 PM, Ash McConnell ash.mcconn...@gmail.comwrote:

 Thanks Kostya and Dianne, setUri works as expected.  I had to create the
 files using context.openFileOutput.  Unfortunately that means I loose the
 ability to use directories.  I can't see a Java way to set permission on
 files, it can be done with native methods, but that seems like overkill.
  I'll do some more googling.

 Thanks again for the help, I was worried that this problem might have been
 a show-stopper.
 Ash

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




-- 
YuviDroid
Check out Launch-X http://android.yuvalsharon.net/launchx.php (a widget
to quickly access your favorite apps and contacts!)
http://android.yuvalsharon.net

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

[android-developers] Re: Cursor Blinking Management (TabHost/ActivityGroup)

2012-02-17 Thread Jan Burse

lbendlin schrieb:

You could even refine the approach by first taking the focus away and
then setting it again.

http://developer.android.com/reference/android/view/View.html#requestFocus%28%29


I guess you are not a good listener, didn't grasp how I
described my application.

Since my application is a tab host, if I switch
to another tab, this is exactly what happens underneath, the
tab that comes to front also receives a request focus. You
can lookup the source code of the tab host. The tab host
will first try to focus inside the tab widget, but if
there are no focusable elements it will next focus
inside the fragment.

The fact is that some of the tabs that receives the focus
nevertheless don't switch on the cursor blinking whereas
some switch on the cursor blinking. Basically those tabs
that where first removed via clearAllTabs() and then
re-added via addTab() lose the blinking. Tabs that were
freshly added don't lose the blinking.

The clearAllTabs() / addTab() thing is a workaround to
the fact that the tab host does not provide removeTab()
or insertTab().

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


Re: [android-developers] PDF on android: request for comments

2012-02-17 Thread John Goche
On Fri, Feb 17, 2012 at 9:51 PM, Mark Murphy mmur...@commonsware.com wrote:
 On Fri, Feb 17, 2012 at 3:45 PM, John Goche johngoch...@googlemail.com 
 wrote:
 I've found the following code which would allow the user to select an
 email client from a list fired as an intent. The email client on the phone
 would have the pdf as an attachment. Here the pdf is called shortcuts.pdf.
 However I don't know how to save it so that it becomes accessible as
 R.raw.shortcuts . How is this magic achieved? What is R.raw?

 R.raw refers to raw resources, stored in res/raw/ in your project (or
 other resource sets, such as res/raw-es/ for Spanish-language raw
 resources).

 Does it reside on external storage?

 No.

 Do I really need to use content:// and a content provider or can I do
 away with using android:resource:// as below?

 Only if your PDF is a raw resource.

OK. Well I guess since the PDF is being generated dynamically it does
not qualify as a raw resource. I probably don't mind storing the generated
PDF on internal storage and making it world readable as there is not much
other apps can do with it. This seems like the simplest solution as not all
devices possess external storage. I don't see how writing a content provider
would release me from any burden. After all, even if I make the content only
available to email clients I don't gain much (wouldn't that be the extra purpose
of having the content provider?). Plus, how does android know whether an
application is an email client with access to the content provider's content
or not?

Thanks,

JG

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Whats the best way to implement the new fragment activity with a tabhost set up

2012-02-17 Thread Jim Andresakis
Cool I guess I totally missed that the first time I peeked at it :)

On Feb 17, 12:24 pm, Mark Murphy mmur...@commonsware.com wrote:
 If you check the GitHub repo (see the ribbon, upper-right corner,
 pretty much every ABS site page), it's Apache License 2.0.









 On Fri, Feb 17, 2012 at 3:17 PM, Jim Andresakis jimandresa...@gmail.com 
 wrote:
  Hey Mark thanks for the reply. After looking at it I think Ill go with
  the actionbarsherlock set up. Id imagine its all open source but I
  dont see any mentions of a license. Do you happen to know what license
  they have it under?

  On Feb 17, 4:48 am, Mark Murphy mmur...@commonsware.com wrote:
  If you are using fragments, I would recommend putting your tabs in the
  action bar, using ActionBarSherlock for supporting your pre-Android
  3.0 devices.

  If you are certain that you want to use fragments with a TabHost, I
  think there is a sample in the SDK samples that demonstrates its use.

  On Fri, Feb 17, 2012 at 1:29 AM, Jim Andresakis jimandresa...@gmail.com 
  wrote:
   So now there is the fragment activity what would be the best way to go
   about implementing them within a tabhost.

   I ask this because in reading the documentation they say that tabhost
   has been depreciated in favor of fragments and I have yet to really
   use the fragments
   and would like to do so after getting a little more direction than
   what I read over in the documentation.

   Ideally I would like to set up something similar to a tabhost to show
   three sub activities. One is a listview populated with data from
   online, another would be a mapview populated with the same data, and
   another with some more content from online.

   How would I go about that? Do I just create my activities making them
   extend fragmentActivity and use the tabhost like I used to or is there
   another method to go about this
   with the fragments that is easier on the OS.

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

  Warescription: Three Android Books, Plus Updates, One Low Price!

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

 Warescription: Three Android Books, Plus Updates, One Low Price!

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

2012-02-17 Thread exax
On Feb 17, 3:16 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Fri, Feb 17, 2012 at 3:14 PM,exaxevan.yeu...@gmail.com wrote:
  So, I wanted to create a simple sound player that will just play a
  sound when I touch a button. I created it without errors but it
  crashes everytime i run it. I got rid of all the extra code and found
  that the error is coming from the media player initialization

  public MediaPlayer music = MediaPlayer.create
  (getApplicationContext(), R.raw.sound_1);

  I believe this is due to my lack of understanding context. i need some
  help figuring out what context to put into the first parameter.

 Try:

 public MediaPlayer music = MediaPlayer.create(this, R.raw.sound_1);

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

 Warescription: Three Android Books, Plus Updates, One Low Price!

That's actually what I originally had before I added the
getApplicationContext().
The error message I get is that the application has stopped
unexpectedly and that I have to force close it. not sure what's going
on...

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

2012-02-17 Thread Mark Murphy
Use adb logcat, DDMS, or the LogCat view in Eclipse to examine LogCat
and look at the stack trace associated with your error.

On Fri, Feb 17, 2012 at 4:42 PM, exax evan.yeu...@gmail.com wrote:
 On Feb 17, 3:16 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Fri, Feb 17, 2012 at 3:14 PM,exaxevan.yeu...@gmail.com wrote:
  So, I wanted to create a simple sound player that will just play a
  sound when I touch a button. I created it without errors but it
  crashes everytime i run it. I got rid of all the extra code and found
  that the error is coming from the media player initialization

  public MediaPlayer music = MediaPlayer.create
  (getApplicationContext(), R.raw.sound_1);

  I believe this is due to my lack of understanding context. i need some
  help figuring out what context to put into the first parameter.

 Try:

 public MediaPlayer music = MediaPlayer.create(this, R.raw.sound_1);

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

 Warescription: Three Android Books, Plus Updates, One Low Price!

 That's actually what I originally had before I added the
 getApplicationContext().
 The error message I get is that the application has stopped
 unexpectedly and that I have to force close it. not sure what's going
 on...

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

Warescription: Three Android Books, Plus Updates, One Low Price!

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

2012-02-17 Thread Tony Ko
I have an issue with key press and touch press events. seems like it
adb is not receiving
confirmation of the event (just a hunch). see log

Main issues seems to be:
java.net.SocketException: Software caused connection abort: recv
failed

All my program does is loop over and over using

while True:
   HV = D.getHierarchyViewer()
   win = HV.getFocusedWindowName()
   #it then checks if
   win == com.example.whatever # just an example, not the full
activity name
   #and if it is , sends:
   D.press('KEYCODE_BACK', MonkeyDevice.DOWN_AND_UP)
   #I added this to keep it from excessively using my cpu
   MonkeyRunner.sleep(1)

now this might seem like a stupid problem due to coding, but it isn't
(well
not apparent). why? because if I don't loop the code everything works
perfectly. After about 10 loops, it errors out. If anyone can tell me
how to fix this it would be appreciated

Thanks,

Tony

LOG PASTED HERE
**
120217 04:46:58.743:S [main]
[com.android.chimpchat.adb.AdbChimpDevice] Error se
nding press event: KEYCODE_BACK DOWN_AND_UP
120217 04:46:58.743:S [main]
[com.android.chimpchat.adb.AdbChimpDevice]java.net.
SocketException: Software caused connection abort: recv failed
120217 04:46:58.743:S [main]
[com.android.chimpchat.adb.AdbChimpDevice] at java.
net.SocketInputStream.socketRead0(Native Method)
120217 04:46:58.743:S [main]
[com.android.chimpchat.adb.AdbChimpDevice] at java.
net.SocketInputStream.read(Unknown Source)
120217 04:46:58.743:S [main]
[com.android.chimpchat.adb.AdbChimpDevice] at java.
net.SocketInputStream.read(Unknown Source)
120217 04:46:58.743:S [main]
[com.android.chimpchat.adb.AdbChimpDevice] at sun.n
io.cs.StreamDecoder.readBytes(Unknown Source)
120217 04:46:58.743:S [main]
[com.android.chimpchat.adb.AdbChimpDevice] at sun.n
io.cs.StreamDecoder.implRead(Unknown Source)
120217 04:46:58.743:S [main]
[com.android.chimpchat.adb.AdbChimpDevice] at sun.n
io.cs.StreamDecoder.read(Unknown Source)
120217 04:46:58.743:S [main]
[com.android.chimpchat.adb.AdbChimpDevice] at java.
io.InputStreamReader.read(Unknown Source)
120217 04:46:58.743:S [main]
[com.android.chimpchat.adb.AdbChimpDevice] at java.
io.BufferedReader.fill(Unknown Source)
120217 04:46:58.743:S [main]
[com.android.chimpchat.adb.AdbChimpDevice] at java.
io.BufferedReader.readLine(Unknown Source)
120217 04:46:58.743:S [main]
[com.android.chimpchat.adb.AdbChimpDevice] at java.
io.BufferedReader.readLine(Unknown Source)
120217 04:46:58.743:S [main]
[com.android.chimpchat.adb.AdbChimpDevice] at com.a
ndroid.chimpchat.ChimpManager.sendMonkeyEventAndGetResponse(ChimpManager.java:
18
7)
120217 04:46:58.743:S [main]
[com.android.chimpchat.adb.AdbChimpDevice] at com.a
ndroid.chimpchat.ChimpManager.sendMonkeyEvent(ChimpManager.java:234)
120217 04:46:58.743:S [main]
[com.android.chimpchat.adb.AdbChimpDevice] at com.a
ndroid.chimpchat.ChimpManager.press(ChimpManager.java:134)
120217 04:46:58.743:S [main]
[com.android.chimpchat.adb.AdbChimpDevice] at com.a
ndroid.chimpchat.adb.AdbChimpDevice.press(AdbChimpDevice.java:322)
120217 04:46:58.743:S [main]
[com.android.chimpchat.adb.AdbChimpDevice] at com.a
ndroid.monkeyrunner.MonkeyDevice.press(MonkeyDevice.java:193)
120217 04:46:58.743:S [main]
[com.android.chimpchat.adb.AdbChimpDevice] at sun.r
eflect.NativeMethodAccessorImpl.invoke0(Native Method)
120217 04:46:58.743:S [main]
[com.android.chimpchat.adb.AdbChimpDevice] at sun.r
eflect.NativeMethodAccessorImpl.invoke(Unknown Source)
120217 04:46:58.743:S [main]
[com.android.chimpchat.adb.AdbChimpDevice] at sun.r
eflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
120217 04:46:58.743:S [main]
[com.android.chimpchat.adb.AdbChimpDevice] at java.
lang.reflect.Method.invoke(Unknown Source)
120217 04:46:58.743:S [main]
[com.android.chimpchat.adb.AdbChimpDevice] at org.p
ython.core.PyReflectedFunction.__call__(PyReflectedFunction.java:175)
120217 04:46:58.743:S [main]
[com.android.chimpchat.adb.AdbChimpDevice] at org.p
ython.core.PyObject.__call__(PyObject.java:355)
120217 04:46:58.743:S [main]
[com.android.chimpchat.adb.AdbChimpDevice] at org.p
ython.core.PyMethod.__call__(PyMethod.java:215)
120217 04:46:58.743:S [main]
[com.android.chimpchat.adb.AdbChimpDevice] at org.p
ython.core.PyMethod.instancemethod___call__(PyMethod.java:221)
120217 04:46:58.743:S [main]
[com.android.chimpchat.adb.AdbChimpDevice] at org.p
ython.core.PyMethod.__call__(PyMethod.java:206)
120217 04:46:58.743:S [main]
[com.android.chimpchat.adb.AdbChimpDevice] at org.p
ython.core.PyObject.__call__(PyObject.java:414)
120217 04:46:58.743:S [main]
[com.android.chimpchat.adb.AdbChimpDevice] at org.p
ython.core.PyObject.__call__(PyObject.java:418)
120217 04:46:58.743:S [main]
[com.android.chimpchat.adb.AdbChimpDevice] at org.p
ython.pycode._pyx0.eventPress$2(C:\Android\QrCodeAutoMain.py:43)
120217 04:46:58.743:S [main]
[com.android.chimpchat.adb.AdbChimpDevice] at org.p

[android-developers] test cases are in a different package

2012-02-17 Thread Ray Tayek
having the test cases in a different package make it hard to test 
methods and classes with protected or the default visibility.


is there some reason why the test cases are put into a separate package?

placing them in the same package seems to work ok.

am going to run into trouble by doing this?

thanks

---
co-chair http://ocjug.org/

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


[android-developers] Android Source Code

2012-02-17 Thread LiTTle
Hello everyone,

I have downloaded (I think so) the source code from the built-in
applications of Android 4. I have already download the source code
from the appropriate branch Android 4.0.3_r1 (I cannot remember
exactly). I want to change a little bit the Home application! I took
the whole folder Launcher2 from the packages/apps/. I imported to
the eclipse as a new project! And a lot of errors appeared (undeclared
variables, undefined methods, etc). How the source is built? With
errors?

Is there any way to edit the applications that come with the Android
platform? I have started to believe that the Android project is not as
open as it is said to be!

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


Re: [android-developers] Android Source Code

2012-02-17 Thread Kristopher Micinski
On Fri, Feb 17, 2012 at 5:21 PM, LiTTle littlep...@gmail.com wrote:
 Hello everyone,

 I have downloaded (I think so) the source code from the built-in
 applications of Android 4. I have already download the source code
 from the appropriate branch Android 4.0.3_r1 (I cannot remember
 exactly). I want to change a little bit the Home application! I took
 the whole folder Launcher2 from the packages/apps/. I imported to
 the eclipse as a new project! And a lot of errors appeared (undeclared
 variables, undefined methods, etc). How the source is built? With
 errors?


This list isn't for the Android source, it's just for building apps
with the Android SDK.

 Is there any way to edit the applications that come with the Android
 platform? I have started to believe that the Android project is not as
 open as it is said to be!


If you don't know even know how the source is built, how can you
substantiate this conclusion?  You can change the apps, but you have
to release them on custom firmware: you can't take a firmware
distributed app and distribute it to users via the android market, for
example.

So basically: this question isn't for this list, you can to go
http://source.android.com to find a more appropriate list.

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


Re: [android-developers] Android Source Code

2012-02-17 Thread Harri Smått
On Feb 18, 2012, at 12:21 AM, LiTTle wrote:
 Is there any way to edit the applications that come with the Android
 platform?

I'm quite sure there is. Once you have made your changes to Launcher2, setup 
the build environment at Android source root level and simply call make 
Launcher2 and it should be built into out -dir 
(out/target/product/generic/system/app/Launcher2.apk in my environment).

How to use this apk goes well beyond my knowledge though  :)

--
H

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

2012-02-17 Thread exax
so i got logCat working (good thing to know about) and i got the this
actually working (think it had to be inside a method?) The real
problem, maybe from the start, is that whenever it calls
music.start(), music being the media player, it crashes. The
debugger shows that music is null and i'm assuming that it shouldn't
be. Any ideas?

On Feb 17, 4:53 pm, Mark Murphy mmur...@commonsware.com wrote:
 Use adb logcat, DDMS, or the LogCat view in Eclipse to examine LogCat
 and look at the stack trace associated with your error.









 On Fri, Feb 17, 2012 at 4:42 PM, exax evan.yeu...@gmail.com wrote:
  On Feb 17, 3:16 pm, Mark Murphy mmur...@commonsware.com wrote:
  On Fri, Feb 17, 2012 at 3:14 PM,exaxevan.yeu...@gmail.com wrote:
   So, I wanted to create a simple sound player that will just play a
   sound when I touch a button. I created it without errors but it
   crashes everytime i run it. I got rid of all the extra code and found
   that the error is coming from the media player initialization

   public MediaPlayer music = MediaPlayer.create
   (getApplicationContext(), R.raw.sound_1);

   I believe this is due to my lack of understanding context. i need some
   help figuring out what context to put into the first parameter.

  Try:

  public MediaPlayer music = MediaPlayer.create(this, R.raw.sound_1);

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

  Warescription: Three Android Books, Plus Updates, One Low Price!

  That's actually what I originally had before I added the
  getApplicationContext().
  The error message I get is that the application has stopped
  unexpectedly and that I have to force close it. not sure what's going
  on...

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

 Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Cursor Blinking Management (TabHost/ActivityGroup)

2012-02-17 Thread lbendlin
i guess you are not a good thinker, and are unwilling to try my suggestions 
because they don't seem to make sense. Fair enough.

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

2012-02-17 Thread fei ji
If test cases are put in the same package, then release version will
contain test project. This isn't customer want to see.
And you should only test public interface. Because other module can only
use the method declared public. If you insist on testing method other than
pubic, you can consider to use the reflection of java to test even private
method. But it violate common sense of TDD.
在 2012-2-18 上午6:21,Ray Tayek rta...@ca.rr.com写道:

 having the test cases in a different package make it hard to test methods
 and classes with protected or the default visibility.

 is there some reason why the test cases are put into a separate package?

 placing them in the same package seems to work ok.

 am going to run into trouble by doing this?

 thanks

 ---
 co-chair http://ocjug.org/

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

2012-02-17 Thread lbendlin
Would you care to name a device without external storage? I have yet to 
come across one. I know a few that have more than one external storage but 
that's an entirely different story.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 around restriction on Bluetooth major device class of 0?

2012-02-17 Thread DonFrench
Some Android devices are programmed by the manufacturer to skip over
devices with major device class of 0
(BluetoothClass.Device.Major.MISC).  This means that it is impossible
to use those Android devices to control many existing gadgets that
contain simple serial Bluetooth transceivers, most of which advertise
major device class 0.  Does anyone have any thoughts on how to get
around this unreasonable restriction?

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

2012-02-17 Thread exax
Now i get a source not found error for the android.jar file. it asks
me to attach source code. What does this mean??!

On Feb 17, 5:52 pm, exax evan.yeu...@gmail.com wrote:
 so i got logCat working (good thing to know about) and i got the this
 actually working (think it had to be inside a method?) The real
 problem, maybe from the start, is that whenever it calls
 music.start(), music being the media player, it crashes. The
 debugger shows that music is null and i'm assuming that it shouldn't
 be. Any ideas?

 On Feb 17, 4:53 pm, Mark Murphy mmur...@commonsware.com wrote:







  Use adb logcat, DDMS, or the LogCat view in Eclipse to examine LogCat
  and look at the stack trace associated with your error.

  On Fri, Feb 17, 2012 at 4:42 PM, exax evan.yeu...@gmail.com wrote:
   On Feb 17, 3:16 pm, Mark Murphy mmur...@commonsware.com wrote:
   On Fri, Feb 17, 2012 at 3:14 PM,exaxevan.yeu...@gmail.com wrote:
So, I wanted to create a simple sound player that will just play a
sound when I touch a button. I created it without errors but it
crashes everytime i run it. I got rid of all the extra code and found
that the error is coming from the media player initialization

public MediaPlayer music = MediaPlayer.create
(getApplicationContext(), R.raw.sound_1);

I believe this is due to my lack of understanding context. i need some
help figuring out what context to put into the first parameter.

   Try:

   public MediaPlayer music = MediaPlayer.create(this, R.raw.sound_1);

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

   Warescription: Three Android Books, Plus Updates, One Low Price!

   That's actually what I originally had before I added the
   getApplicationContext().
   The error message I get is that the application has stopped
   unexpectedly and that I have to force close it. not sure what's going
   on...

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

  Warescription: Three Android Books, Plus Updates, One Low Price!

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

2012-02-17 Thread Mark Murphy
On Fri, Feb 17, 2012 at 6:32 PM, exax evan.yeu...@gmail.com wrote:
 Now i get a source not found error for the android.jar file. it asks
 me to attach source code. What does this mean??!

This means you are trying to step into source code that is not yours.

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

Warescription: Three Android Books, Plus Updates, One Low Price!

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