[android-developers] android home screen app in source code...

2012-02-20 Thread jitesh adnani
hi, ive been working on a project and i wanted to knw that wer in
android source code would i find the code for home screen nd how to
change it...

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


[android-developers] Re: Hello Everyone, i just have a quick question:

2012-02-20 Thread moktarul anam
Hi Soyer,
All your activity class has to be there in your Manifest.xml file


if you call your activity class from other activity then that class
has to be main( internt filter main) Please check these two point and
i think this will solve ur problem.
I am sure some problem in ur Manifest.xml file


Moktarul


On Feb 20, 11:24 pm, Mohamed Gougam  wrote:
> Hi Moktarul, What is in the the manifest file, you mean i have to remove
> the "." ? i don't think that's it, the "." has to be there.
>
> Thanks guys for the help, Kris is it wrong if somebody try to learn
> something different, out of his field !! Thanks for the help though i
> really appreciate it.
>
>
>
>
>
>
>
> On Mon, Feb 20, 2012 at 3:44 PM, moktarul anam  wrote:
> > Hi
> > BTDdetecetwithV7Activity in ur android  Manifest file
> > \
>
> > Enjoy
> > moktarul
>
> > On Feb 20, 12:26 am, Soyer  wrote:
> > > Hello everyone, Can anyone explain to me what this following error
> > > means? have anyone faced the same?
>
> > > ERROR:
>
> > > 02-19 18:10:41.321: E/AndroidRuntime(319): java.lang.RuntimeException:
> > > Unable to start activity ComponentInfo{android.mgo.helloandroid/
> > > android.mgo.helloandroid.BTDdetecetwithV7Activity}:
> > > java.lang.NullPointerException
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, 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] displaying face book albums and photos

2012-02-20 Thread chowdary nani
Hi All,
I have integrated face book in to my app
i am able to post status messages on the wall
i am able to post photos on the wall
Please any one help me to display face book photos and albums

Thanks
Naveen

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

2012-02-20 Thread xi xia
I thought May be due to my phone room.
I do not have root privileges.

On 2月17日, 下午1时12分, xi xia  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


[android-developers] Re: Get the PCM data of the songs currently playing in the android phone

2012-02-20 Thread dev_alb
Thanks Doug.

On Feb 19, 9:59 am, Doug  wrote:
> On Feb 16, 11:10 pm, dev_alb  wrote:
>
> > 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?
>
> No.
>
> > Meanwhile it would be really helpful if any one of you could suggest
> > me an audio decoder in java.
>
> Try Google.  I don't think you will find much that is not JavaSound
> native, though.
>
> Doug

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

2012-02-20 Thread B.Arunkumar
Hi,

  It is adb logcat -c. This link would also be useful for you:

https://sites.google.com/site/androidhowto/how-to-1/save-logcat-to-a-text-file

Thank you,
B.Arunkumar

On Feb 21, 9:33 am, bob  wrote:
> What is the adb command to tell a device to clear its log?

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

2012-02-20 Thread vivek elangovan
Hi members,
   I am developing a login application,whereas on
registering user details i am getting data of their name,mobile
no,email address.After registering i have to send the password to the
corresponding email address,so what function i have to use and is it
possible to send mail from emulator?

- 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] adb logclear?

2012-02-20 Thread bob
What is the adb command to tell a device to clear its log?

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


[android-developers] Invoking web service from android.

2012-02-20 Thread indumathy raju
Hi all,
I am new to android development. I am trying to invoke webservice from
android using Ksoap2- 2.5 version. Below is the snippet of code I'm using.
Getting SOAP-ENV: server faultstring excception. I couldt understand this
error. help me to fix this.

*ERROR*
SoapFault - faultcode: 'SOAP-ENV:Server' faultstring: 'Castor unmarshalling
exception; nested exception is org.exolab.castor.xml.MarshalException: The
namespace associated with the prefix 'c' could not be resolved.'
faultactor: 'null' detail: null

*Code Snippet*

protected void getWsUsingSoap() {
 final String NAMESPACE = "http://com/ctdc/service";;
 final String URL =
"
http://10.0.2.2:8080/mySpringPro/itemservice/services/ServiceImpl.wsdl";;
 final String SOAP_ACTION = "ServiceImpl";
 final String METHOD_NAME = "message";

SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);

SoapSerializationEnvelope envelope =
new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);

try {
androidHttpTransport.call(SOAP_ACTION, envelope);
 //SoapPrimitive result =
(SoapPrimitive)envelope.getResponse();
 //System.out.println("res"+result.toString());

//Object response= envelope.getResponse();
Object resultsRequestSOAP = envelope.bodyIn;
//SoapObject resultsRequest = (SoapObject) resultsRequestSOAP;
System.out.println("Received ===:" +resultsRequestSOAP);
} catch (Exception e) {
e.printStackTrace();
}

}


-- 
Regards,

INDU






-- 
Cheers,

INDU






-- 
Cheers,

INDU

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

Re: [android-developers] How to get total call duration of last call as well as all call duration

2012-02-20 Thread jagruti.sangani
Thanks

On Sun, Feb 19, 2012 at 7:05 AM, fei ji  wrote:

> Have you ever move cursor to next?
> Since the orginal cursor is reference to -1, so if you get the data
> directly before moving one step next, it will always give this error.
>
> I found there is  
> getLastOutgoingCall.
> I think you can use this method to get the last call number. And use this
> number to query duration .
>
>
> On Wed, Feb 15, 2012 at 2:22 PM, Jagruti Sangani <
> jagruti.sang...@inextrix.com> wrote:
>
>> Hello,
>> I want to get the total call duration.I am using the posted code but
>> in that I am getting something error like cursor index -1 requested
>> with total records 10.How can i  get the call duration of last
>> call.Basically i want the timer system like when call will start then
>> timer will start and when call end then timer will stop.But that is
>> not occur with me so i am trying to get total call duration.If anybody
>> know then plz reply me.
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@googlegroups.com
>> To unsubscribe from this group, send email to
>> android-developers+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: Limit the decimal numbers in a numberDecimal

2012-02-20 Thread RMDub
There are probably numerous ways to do this. One way is using
NumberFormat in code as follows:

  NumberFormat nf;
  nf = NumberFormat.getInstance();
  nf.setMaximumFractionDigits(2);

and an example of the use of the number formatter in an assignment is
as follows:

  editText.setText(nf.format(number));

or

  String str = nf.format(number);

Hope this helps.

On Feb 19, 2:36 pm, rmg  wrote:
> Hi!
>
> I'm starting to developing android applications with eclipse. I have a
> doubt about how I can limit de decimal numbers in a EditText.
> For example, I have this EditText:
>          android:id="@+id/euroEditText"
>         android:layout_width="match_parent"
>         android:layout_height="wrap_content"
>         android:inputType="numberDecimal">
>          
>     
>
> I'd like to put a limit in the decimal part of the number, ie, 2
> number maximum, so the user only can put a number like this: 3.78
> and not: 3.788999
> because the euro only accept two decimal numbers.
>
> I don't know if there is an attribute that specify this or I need a
> function to solve it.
>
> Can anyone help me??
>
> 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] Re: The service restart but not retaining socket

2012-02-20 Thread Gene
I am not an expert on this, but am pretty sure you will have to
implement onDestroy() and do an orderly close on the sockets you are
using.

On Feb 18, 2:30 am, Nitin Gaikwad  wrote:
> Hi Friends,
> 1 I am developing one application where i write one service using
> broadcast receiver.
> 2 In this service i use the socket programing where i communicate with
> client.
> 3 the application works like after the device boot the service will
> start and listen the port to get the data.
> 4 this will work normally but problem come when the service restart
> means when there the memory low (multiple application open that time)
> service will restart automatically.
> 5 Here when service again goes to try to connect to socket this not
> working
>
> so is there any thing missing or should i need to do anything in code
> please let me know.
>
> thanks
> Nitin Gaikwad

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

2012-02-20 Thread Ted Scott

On 2/20/2012 2:26 PM, Thomas wrote:

I'll make another request then.  Please post the code and manifest for
a simple something that will start the "helloworld" app at bootup.
The helloworld app is just a test case to see if things are working at
bootup. I have a far more complicated embedded application to test
after that.
Best,
Tom B



You know I explained where to get the information you were missing is 
at, I even explained what you were confused about.  If indeed you have a 
far more complicated embedded app to test, judging by the level of your 
questions and failure to understand or even explore the material given 
to you, I predict you will be bricking that device.


Nonetheless for the comedic value I give you Pies Of Cod, or at least 
the parts you asked for. Yes this code executes and launches the app 
Pies Of Cod when it is in a proper app environment. It took me about 
half an hour to cobble together. Of course you'll want to adjust the 
imports and packages to fit your environment so I omitted them. The view 
is the main.xml you get from an eclipse generated hello world app.


First make a new android app named PiesOfCod in your workspace. Launch 
it and make sure it runs.


Then you need to create a receiver class:
public class RxBcast extends BroadcastReceiver {

private static final String TAG = "RxBcast";
private static final int NOTE_ID = 1;

@Override
public void onReceive(Context c, Intent i) {
// check and handle registerable actions
String act = i.getAction();
Log.d(TAG, "Rxd "+ act );
if( act.equals(i.ACTION_BOOT_COMPLETED) ) {
Intent si = new Intent(c, PiesOfCodActivity.class);
si.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
c.startActivity(si);
}
} // onReceive

}

Then change the strings:



Pies Of Cod!
PiesOfCod



Then adjust the manifest, yes you will have to use your package names, 
etc. mine won't work for you:


























Build it, launch it, then restart the AVD that you have it installed on 
and it should be open when you unlock the AVD.


Good luck with your very complicated embedded application, and please 
keep us informed on how that is going.


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

2012-02-20 Thread TreKing
On Mon, Feb 20, 2012 at 1:26 PM, Thomas  wrote:

> Please post the code and manifest for a simple something that will start
> the "helloworld" app at bootup.
>

Have you tried a Google search for something like "Android start at boot
example"?
I would guess there is plenty of information on this topic readily
available.

-
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: Hello Everyone, i just have a quick question:

2012-02-20 Thread Mohamed Gougam
Alright will do that.thanks.


On Tue, Feb 21, 2012 at 1:51 AM, Kristopher Micinski  wrote:

> On Mon, Feb 20, 2012 at 2:06 PM, Mohamed Gougam 
> wrote:
> > This is included in the program...
> > PS: i am not a student i am a hardware person, this is a parallel
> program i
> > am getting into, and yes i did java programming and web designing using
> > javaservlet and JSP by using MySQL...you maybe didn't get my question in
> the
> > post or i dint express my self properly but that doesn't allow you to
> > be hasty and judge anyone.
> >
> > Eventhough i honestly can see that your intentions are good.
> >
> > If you can give me hand in how to fix this problem, that would be more
> > than appreciated :)
> >
>
> Okay,
>
> You're using Eclipse right?  Run your program in debug mode.  It will
> crash.  Then you will get a backtrace, you can google how to do that.
> The backtrace will tell you *where* your code failed.  Also post your
> manifest here so we can make sure this isn't some silly thing with
> your activity not being included in the manifest.  (Though typically
> that raises a different exception, iirc.)
>
> kris
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

Re: [android-developers] Re: Hello Everyone, i just have a quick question:

2012-02-20 Thread Kristopher Micinski
On Mon, Feb 20, 2012 at 2:06 PM, Mohamed Gougam  wrote:
> This is included in the program...
> PS: i am not a student i am a hardware person, this is a parallel program i
> am getting into, and yes i did java programming and web designing using
> javaservlet and JSP by using MySQL...you maybe didn't get my question in the
> post or i dint express my self properly but that doesn't allow you to
> be hasty and judge anyone.
>
> Eventhough i honestly can see that your intentions are good.
>
> If you can give me hand in how to fix this problem, that would be more
> than appreciated :)
>

Okay,

You're using Eclipse right?  Run your program in debug mode.  It will
crash.  Then you will get a backtrace, you can google how to do that.
The backtrace will tell you *where* your code failed.  Also post your
manifest here so we can make sure this isn't some silly thing with
your activity not being included in the manifest.  (Though typically
that raises a different exception, iirc.)

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


[android-developers] VIZIO VTAB1008 on Windows 7?

2012-02-20 Thread bob
Has anyone gotten the VIZIO VTAB1008 to work for development on
Windows 7?

Thanks.

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


[android-developers] Re: Manifest Not Building : android:configChanges="screenOrientation"

2012-02-20 Thread Matt Clark
Thanks for that. Now i am feeling pretty stupid. xD

On Feb 20, 3:50 pm, Kostya Vasilyev  wrote:
> It's
>
>   "orientation"
>
> not "screenOrientation"
>
> http://developer.android.com/guide/topics/manifest/activity-element.h...
>
> -- K
>
> 21.02.2012 0:47, Matt Clark ?:
>
> > I
> > found that to get the app to do this I need to add
> > android:configChanges="screenOrientation"
> > however the Manifest will no longer build giving me this error:
> > error: Error: String types not allowed (at 'configChanges' with value
> > 'screenOrientation').
>
> --
> Kostya Vasilyev

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

2012-02-20 Thread Kostya Vasilyev

It's

 "orientation"


not "screenOrientation"

http://developer.android.com/guide/topics/manifest/activity-element.html#config

-- K

21.02.2012 0:47, Matt Clark ?:

I
found that to get the app to do this I need to add
android:configChanges="screenOrientation"
however the Manifest will no longer build giving me this error:
error: Error: String types not allowed (at 'configChanges' with value
'screenOrientation').


--
Kostya Vasilyev

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

2012-02-20 Thread Matt Clark
I am trying to get my app to handle its own Screen Orientation
changing as opposed to the app reloading the activity every time. I
found that to get the app to do this I need to add
android:configChanges="screenOrientation"
however the Manifest will no longer build giving me this error:
error: Error: String types not allowed (at 'configChanges' with value
'screenOrientation').
I found in Google's Android docs that this is the correct method of
use, and the only support i was able to fin on this is that i need to
set my project target to 13+, which it is currently  at 15. Any and
all help is greatly appreciated!

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


Re: [android-developers] get adapter from OnItemSelectedListener?

2012-02-20 Thread Ray Tayek

At 07:06 AM 2/20/2012, you wrote:
On Sun, Feb 19, 2012 at 11:28 PM, Ray Tayek 
<rta...@ca.rr.com> wrote:
can one discover the array adapter for the spinner from the 
OnItemSelectedListener class? ...


http://developer.android.com/reference/android/widget/AdapterView.OnItemSelectedListener.html#onItemSelected(android.widget.AdapterView, 
android.view.View, int, long)


See the first parameter? If you follow that:

http://developer.android.com/reference/android/widget/AdapterView.html#getAdapter() 



yes, SpinnerAdapter 
spinnerAdapter=(SpinnerAdapter)parent.getAdapter(); works like a charm!


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] Re: start at boot app gives instantiationException:

2012-02-20 Thread Thomas
I'll make another request then.  Please post the code and manifest for
a simple something that will start the "helloworld" app at bootup.
The helloworld app is just a test case to see if things are working at
bootup. I have a far more complicated embedded application to test
after that.
Best,
Tom B

On Feb 20, 12:05 pm, Ted Scott  wrote:
> Review the components section 
> herehttp://developer.android.com/guide/topics/fundamentals.html
>
> You are confusing a BroadcastReceiver with an Activity, and there's
> nothing you can add to the manifest to correct that since an activity
> tag can't describe or invoke a receiver. If you want to launch something
> at boot, then code a receiver that launches the app.
>
> On 2/20/2012 10:34 AM, Thomas wrote:
>
>
>
>
>
>
>
> > Actually, I don't.  What should the manifest be in this case?
> > Tom B
>
> > On Feb 20, 10:05 am, TreKing  wrote:
> >> You have the following:
>
> >> public abstract class StartAtBootActivity extends *BroadcastReceiver*{
>
> >>> <*activity *android:name=".StartAtBootActivity"
> >> See the problem with this scenario?
>
> >> -
> >> 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: Cursor Blinking Management (TabHost/ActivityGroup)

2012-02-20 Thread Jan Burse

Jan Burse schrieb:


 tabHost.addSpec(spec1);
 tabHost.clearAllTabs();
 tabHost.addSpec(spec1);
 tabHost.addSpec(spec2);


More precisely:

tabHost.addSpec(spec1);
tabHost.clearAllTabs();
tabHost.addSpec(spec1);
tabHost.addSpec(spec2);
tabHost.setCurrentTab(1);

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Hello Everyone, i just have a quick question:

2012-02-20 Thread Mohamed Gougam
This is included in the program...
PS: i am not a student i am a hardware person, this is a parallel program i
am getting into, and yes i did java programming and web designing using
javaservlet and JSP by using MySQL...you maybe didn't get my question in
the post or i dint express my self properly but that doesn't allow you to
be hasty and judge anyone.

Eventhough i honestly can see that your intentions are good.

If you can give me hand in how to fix this problem, that would be more
than appreciated :)

On Mon, Feb 20, 2012 at 10:41 PM, Kristopher Micinski <
krismicin...@gmail.com> wrote:

> > Thanks guys for the help, Kris is it wrong if somebody try to learn
> > something different, out of his field !! Thanks for the help though i
> really
> > appreciate it.
>
> If a NullPointerException is out of your field, then your field
> certainly isn't programming Java.  Students learn about this extremely
> quickly in even their first few classes of any introductory Java
> course.
>
> If your problem is that you haven't programmed in Java a lot, there
> are many resources available for learning Java development, and it
> would be best to learn this before trying to learn Android
> development.
>
> kris
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

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

2012-02-20 Thread Jan Burse

Jan Burse schrieb:

+-+--+
| Tab 1   | Tab 2|
+-


P.S.: The tabs do not stretch to the screen
width, since I have placed the tabwidget
inside a HorizontalScrollView.

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

Here is a picture what happens:

The two tabs were made via:

tabHost.addSpec(spec1);
tabHost.clearAllTabs();
tabHost.addSpec(spec1);
tabHost.addSpec(spec2);

Situation 1: The TabHost:

+-+--+
| Tab 1   | Tab 2|
+---+
|   |
| Text 2|
|   |
+---+

Tab 1.isSelected = false
Tab 2.isSelected = true
Text 1.isFocused = false
Text 2.isFocused = true
Text 2.cursor blinking visible  !OK!

Situation 2: The TabHost:

+-+--+
| Tab 1   | Tab 2|
+---+
|   |
| Text 1|
|   |
+---+

Tab 1.isSelected = true
Tab 2.isSelected = false
Text 1.isFocused = true
Text 2.isFocused = false
Text 1. no cursor blinking visible  !NOK!

What is going wrong?

Bye

Kostya Vasilyev schrieb:

Ruled 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=en


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

2012-02-20 Thread Jan Burse

Hi,

Farhan Tariq schrieb:

quiet irrelevant though but ... can you please cut out on your 'bye's
... don't know about others but, i'm sure its irritating to them too


You should see a mental health professional.
Maybe your epilepsy medication doesn't work.

Bye

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


[android-developers] Why doesn't this delete method work to vacuum the Database?

2012-02-20 Thread Jeresam515
I have a datbase with the following method:
public void deleteNote(long rowId) {
mDb.delete(DATABASE_TABLE, KEY_REALROWID + "=" + rowId, null);
int x = (int) rowId;
int y = testCount();
while(xhttp://groups.google.com/group/android-developers?hl=en


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

2012-02-20 Thread Jan Burse

Hi,

Kostya Vasilyev schrieb:

IIRC, view focusing is only applied if the enclosing window is in
"activated" state (not sure about the exact name), you might want to
look into this.


Well I checked the state of isFocused() of the text view I am
interested in and which should blink.

I don't see false - false. I see true - false or false - true.
So what are you talking about?

Bye



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


[android-developers] Re: How should one make an SQL database correctly send/receive booleans

2012-02-20 Thread Jeresam515
Thanks

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


[android-developers] Re: RPC failed with status 1

2012-02-20 Thread Markos Fragkakis
Although I never found out what caused the problem, I "guarded" my code 
like this:

if(isOnline()) {
// dangerous code here
...
} else {
// handle showing a message
...
}

and this is the isOnline method:

 private boolean isOnline() {

 ConnectivityManager cm = (ConnectivityManager) 
getSystemService(Context.CONNECTIVITY_SERVICE);

return cm.getActiveNetworkInfo() == null ? false : 
cm.getActiveNetworkInfo().isConnected();

}

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Hello Everyone, i just have a quick question:

2012-02-20 Thread Kristopher Micinski
> Thanks guys for the help, Kris is it wrong if somebody try to learn
> something different, out of his field !! Thanks for the help though i really
> appreciate it.

If a NullPointerException is out of your field, then your field
certainly isn't programming Java.  Students learn about this extremely
quickly in even their first few classes of any introductory Java
course.

If your problem is that you haven't programmed in Java a lot, there
are many resources available for learning Java development, and it
would be best to learn this before trying to learn Android
development.

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] Re: Cursor Blinking Management (TabHost/ActivityGroup)

2012-02-20 Thread Farhan Tariq
quiet irrelevant though but ... can you please cut out on your 'bye's ...
don't know about others but, i'm sure its irritating to them too

2012/2/20 Kostya Vasilyev 

> Ruled out?
>
> Is seems your log output shows the opposite.
>
> IIRC, view focusing is only applied if the enclosing window is in
> "activated" state (not sure about the exact name), you might want to look
> into this.
>  20.02.2012 14:26 пользователь "Jan Burse"  написал:
>
> The blinker runs in the UI thread. And it is kept alive and
>> it keeps itself aliver in posting delayed messages. You
>> find the source code here:
>>
>> http://grepcode.com/file/**repository.grepcode.com/java/**
>> ext/com.google.android/**android/2.2_r1.1/android/**
>> widget/TextView.java#TextView.**Blink
>>
>> There is a condition isFocused() inside the Blink. I have
>> checked my application, the TextView I am using gets correctly
>> focused. There shouldn't be a problem with focusing. Here
>> is the result of some debugging code:
>>
>>   02-20 10:21:47.362: WARN/System.err(579): text =
>>   xxx.TerminalArea@412f8368 text.isFocused = false
>>   02-20 10:21:47.362: WARN/System.err(579): text =
>>   xxx.TerminalArea@414044c8 text.isFocused = true
>>
>>   414044c8 Blinks! OK
>>
>> After switching the tab:
>>
>>   02-20 10:22:57.445: WARN/System.err(579): text =
>>   xxx.TerminalArea@412f8368 text.isFocused = true
>>   02-20 10:22:57.445: WARN/System.err(579): text =
>>   xxx.TerminalArea@414044c8 text.isFocused = false
>>
>>   412f8368 Does not Blink! NOK
>>
>> So I guess a problem with focusing can be ruled out. What
>> other cause could be identified for the frozen cursor?
>>
>> Bye
>>
>> lbendlin schrieb:
>>
>>> 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
>>>
>>
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to android-developers@**
>> googlegroups.com 
>> To unsubscribe from this group, 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: Hello Everyone, i just have a quick question:

2012-02-20 Thread Mohamed Gougam
Hi Moktarul, What is in the the manifest file, you mean i have to remove
the "." ? i don't think that's it, the "." has to be there.

Thanks guys for the help, Kris is it wrong if somebody try to learn
something different, out of his field !! Thanks for the help though i
really appreciate it.

On Mon, Feb 20, 2012 at 3:44 PM, moktarul anam  wrote:

> Hi
> BTDdetecetwithV7Activity in ur android  Manifest file
> \
>
> Enjoy
> moktarul
>
> On Feb 20, 12:26 am, Soyer  wrote:
> > Hello everyone, Can anyone explain to me what this following error
> > means? have anyone faced the same?
> >
> > ERROR:
> >
> > 02-19 18:10:41.321: E/AndroidRuntime(319): java.lang.RuntimeException:
> > Unable to start activity ComponentInfo{android.mgo.helloandroid/
> > android.mgo.helloandroid.BTDdetecetwithV7Activity}:
> > java.lang.NullPointerException
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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: Cursor Blinking Management (TabHost/ActivityGroup)

2012-02-20 Thread Kostya Vasilyev
Ruled out?

Is seems your log output shows the opposite.

IIRC, view focusing is only applied if the enclosing window is in
"activated" state (not sure about the exact name), you might want to look
into this.
 20.02.2012 14:26 пользователь "Jan Burse"  написал:

> The blinker runs in the UI thread. And it is kept alive and
> it keeps itself aliver in posting delayed messages. You
> find the source code here:
>
> http://grepcode.com/file/**repository.grepcode.com/java/**
> ext/com.google.android/**android/2.2_r1.1/android/**
> widget/TextView.java#TextView.**Blink
>
> There is a condition isFocused() inside the Blink. I have
> checked my application, the TextView I am using gets correctly
> focused. There shouldn't be a problem with focusing. Here
> is the result of some debugging code:
>
>   02-20 10:21:47.362: WARN/System.err(579): text =
>   xxx.TerminalArea@412f8368 text.isFocused = false
>   02-20 10:21:47.362: WARN/System.err(579): text =
>   xxx.TerminalArea@414044c8 text.isFocused = true
>
>   414044c8 Blinks! OK
>
> After switching the tab:
>
>   02-20 10:22:57.445: WARN/System.err(579): text =
>   xxx.TerminalArea@412f8368 text.isFocused = true
>   02-20 10:22:57.445: WARN/System.err(579): text =
>   xxx.TerminalArea@414044c8 text.isFocused = false
>
>   412f8368 Does not Blink! NOK
>
> So I guess a problem with focusing can be ruled out. What
> other cause could be identified for the frozen cursor?
>
> Bye
>
> lbendlin schrieb:
>
>> 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
>>
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to 
> android-developers@**googlegroups.com
> To unsubscribe from this group, 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 should one make an SQL database correctly send/receive booleans

2012-02-20 Thread Kostya Vasilyev
Sqlite implements data typing somewhat differently from "big" sql
databases, you can find the details on their site.

For a boolean,  you typically use:

cursor.getInt(column) != 0
20.02.2012 20:20 пользователь "Jeresam515" 
написал:

> I created a database with the following variables:
> public static final String KEY_VALUE = "x";
>public static final String KEY_ISROOT = "y";
>public static final String KEY_ROWID = "_id";
>public static final String KEY_REALROWID = "_ids";
>public static final String KEY_ISPOWER = "z";
>public static final String KEY_POWERORROOTNUMBER = "b";
>public static final String KEY_ISDIVISOR = "a";
>public static final String KEY_ISMULTIPLIER = "c";
>public static final String KEY_ISADD = "d";
>public static final String KEY_ISSUBTRACT = "e";
>public static final String KEY_ISPS = "f";
>public static final String KEY_ISPE = "g";
>private static final String TAG = "NotesDbAdapter";
>private DatabaseHelper mDbHelper;
>private SQLiteDatabase mDb;
>private static final String DATABASE_NAME = "data";
>private static final String DATABASE_TABLE = "notes";
>private static final int DATABASE_VERSION =1;
>private static final String DATABASE_CREATE =
>  " create table " +DATABASE_TABLE+ " ("
> +KEY_VALUE+ " double,  "
> +KEY_REALROWID+ " integer,  "
> +KEY_ROWID+ " integer primary key autoincrement,  "
> +KEY_ISPOWER+ " boolean,  "
> +KEY_ISDIVISOR+ " boolean,  "
> +KEY_ISMULTIPLIER+ " boolean,  "
> +KEY_ISADD+ " boolean,  "
> +KEY_ISSUBTRACT+ " boolean,  "
> +KEY_ISPS+ " boolean,  "
> +KEY_ISPE+ " boolean,  "
> +KEY_POWERORROOTNUMBER+ " double,  "
> +KEY_ISROOT+ " boolean);";
> The insert row ID code is:
> public void createNote(double value, boolean isroot, boolean ispower,
> boolean ismultiply, boolean isdivisor, boolean add,
>boolean issubtract, double roototpowerval, boolean
> paranthaseesend, boolean paranthaseesstart) {
>ContentValues initialValues = new ContentValues();
>initialValues.put(KEY_VALUE, value);
>initialValues.put(KEY_ISROOT, isroot);
>initialValues.put(KEY_ISPOWER, ispower);
>initialValues.put(KEY_ISMULTIPLIER, ismultiply);
>initialValues.put(KEY_ISDIVISOR, isdivisor);
>initialValues.put(KEY_ISADD, add);
>initialValues.put(KEY_ISSUBTRACT, issubtract);
>initialValues.put(KEY_POWERORROOTNUMBER, roototpowerval);
>initialValues.put(KEY_ISPE, paranthaseesend);
>initialValues.put(KEY_ISPS, paranthaseesstart);
>  long r= mDb.insert(DATABASE_TABLE, null, initialValues);
>  int a = testCount();
>  ContentValues argsa = new ContentValues();
>  argsa.put(KEY_VALUE, value);
>  argsa.put(KEY_ISROOT, isroot);
>  argsa.put(KEY_ISPOWER, ispower);
>  argsa.put(KEY_ISMULTIPLIER, ismultiply);
>  argsa.put(KEY_ISDIVISOR, isdivisor);
>  argsa.put(KEY_ISADD, add);
>  argsa.put(KEY_ISSUBTRACT, issubtract);
>  argsa.put(KEY_POWERORROOTNUMBER, roototpowerval);
>  argsa.put(KEY_REALROWID, a);
>  argsa.put(KEY_ISPE, paranthaseesend);
>  argsa.put(KEY_ISPS, paranthaseesstart);
>  mDb.update(DATABASE_TABLE, argsa, KEY_ROWID + "=" + r, null);
>}
> The fetchRow code is:
>public Cursor fetchNote(long rowId) throws SQLException {
>Cursor mCursor =
>mDb.query(true, DATABASE_TABLE, new String[]
> {KEY_ISPS,KEY_ISPE,KEY_VALUE,KEY_ISROOT,KEY_REALROWID,KEY_ISPOWER,KEY_POWER
> ORROOTNUMBER,KEY_ISDIVISOR,KEY_ISMULTIPLIER,KEY_ISADD,KEY_ISSUBTRACT},
> KEY_REALROWID + "=" + rowId, null,
>null, null, null, null);
>if (mCursor != null) {
>mCursor.moveToFirst();
>}
>return mCursor;
>}
> It can change views here:
>public void onClick(View v) {
>double d = 3;
>mDbHelper.deleteAllNotes();
>mDbHelper.createNote(d, false, false, false,
> false, false,
> false, 0, false, false);
>mDbHelper.createNote(0, false, false,
> true,false, false,
> false, 0, false, false);
>Cursor c = mDbHelper.fetchNote(1);
> if(d==Double.valueOf(c.getString(c.getColumnIndexOrThrow(NotesDbAdapter.KEY
> _VALUE
> {setContentView(R.layout.works);}
>}
> However, It doesn't here:
>public void onClick(View v) {
>double d = 3;
>mDbHelper.deleteAllNotes();
>mDbHelper.createNote(d, false, false, false,
> false, false,
> false, 0, false, false);
>mDbHelper.createNote(0, false, false,
> true,false, false,
> false, 0, false, false);
>Cursor c = mDbHelper.fetchNote(2);
> if(Boolean.parseBoolean(c.getString(c.getColumnIndexOrThrow(NotesDbAdapter.
> KEY_ISMULTIPLIER
> 

[android-developers] Re: VideoView

2012-02-20 Thread skink


bob wrote:
> If you need to draw some custom controls on top of a VideoView playing
> a video, what would be the most sensible way to achieve this?
>
> Thank you.


put a VideoView and your custom controls inside a FrameLayout

pskink

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


[android-developers] VideoView

2012-02-20 Thread bob
If you need to draw some custom controls on top of a VideoView playing
a video, what would be the most sensible way to achieve this?

Thank you.

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


[android-developers] Re: Enabling both normal wifi and wifi hotspot to get RSSI values of wi-fi hotspots

2012-02-20 Thread SyncMaster
thanks. :)

On Feb 15, 5:23 pm, lbendlin  wrote:
> AFAIK only one mode is possible at a time. I think Wireless Hotspot is just
> a glorified version of Ad Hoc.

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


[android-developers] Re: problem android and eclipse

2012-02-20 Thread KKoenen
Solution (workaround) : turn off Teredo Tunneling Pseudo-Interface.

This probably converts IP4 to IPv6 addresses or something, resulting in an IPv6
address for your localhost (strange though, that a PING still results in IP4).
Anyway, turning it off (Device manager > View > Show hidden devices > right
click on Teredo > disable) solves the problem!

I found that my Win7 install re-enables my Teredo device after each boot. Even
when I deinstall. So I made a batchfile (run as Administrator) which issues the
following commands : >netsh interface teredo set state disabled >"D:\Program
Files (x86)\Eclipse\eclipse.exe"

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

2012-02-20 Thread ramya
Does anybody know a workaround.I am using localstorage,but what
happens is,inside loop,the variables gets overridden:( and only last
value is set.

On Feb 16, 9:07 am, ramya  wrote:
> bounce...
>
> On Feb 15, 5:49 pm, ramya  wrote:
>
>
>
>
>
>
>
> > I am usingandroid3.0and phonegap for my development,when ever I
> > pass the url with query string(parameters) ,I geterrormessage
> > "Applicationerror-ThewebPagecontainserror".I tried to bypass it
> > using local storage ;
> > But for search form,I need to retrieve the search inout from the
> > user .I am not able use GET method as query string is appended to
> > url.Any suggestions how to workaround this

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


Re: [android-developers] Re: start at boot app gives instantiationException:

2012-02-20 Thread Ted Scott
Review the components section here 
http://developer.android.com/guide/topics/fundamentals.html


You are confusing a BroadcastReceiver with an Activity, and there's 
nothing you can add to the manifest to correct that since an activity 
tag can't describe or invoke a receiver. If you want to launch something 
at boot, then code a receiver that launches the app.


On 2/20/2012 10:34 AM, Thomas wrote:

Actually, I don't.  What should the manifest be in this case?
Tom B

On Feb 20, 10:05 am, TreKing  wrote:

You have the following:

public abstract class StartAtBootActivity extends *BroadcastReceiver*{




<*activity *android:name=".StartAtBootActivity"

See the problem with this scenario?

-
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: Inserting Recorded Audio file (AMR) in another one

2012-02-20 Thread Raneez
Anyone there to help me?

I am stuck with this part and I really need some help. Please


On Feb 19, 3:05 pm, Raneez  wrote:
> My Android app records audio in both AMR and WAV format. And my
> application needs to insert second recorded audio file inside the
> first one at a position where it is paused. I did it right with WAV
> files, but the AMR file after insertion is not able to be played in
> Android MediaPlayer, it gives some error when it reaches the inserted
> position.But the same file plays fine in AMR players.
>
> The steps i followed are:
>
>     1. Writing the data from file1 upto pause position:
>
>     raf3=new RandomAccessFile(result,"rw");
>     raf3.setLength(0);
>
>     int d=0;
>    //Write data from record1 upto the pause position *
>    while(d!=pos)
>    { raf3.write(bytes[d]); d++; }
>
>    2.  Writing the data to be inserted from file2
>
>     //write all the data from record 2 *
>       int l=0;
>       raf3.writeBytes(" ");
>        while(l!=bytesread1)
>        { raf3.write(bytes1[l]); l++; }
>
>    3.  Writing the remaining data from file1 after pause position
>
>     while(d!=size) { raf3.write(bytes[d]); d++; }
>
> Is there anything wrong with what i have done?

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

2012-02-20 Thread YuviDroid
Yep I played with the xml attributes (such as scaleType)...but none would
change the density being used. Or did I miss that?

On Mon, Feb 20, 2012 at 7:36 AM, Dusk Jockeys Android Apps <
duskjock...@gmail.com> wrote:

> Could you not play with the xml settings of the ImageView itself? I
> think there are some attributes there that control how the image is
> displayed, whether or not it is scaled, centred etc.
>
> On Feb 18, 4:56 am, YuviDroid  wrote:
> > 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  >wrote:
> >
> >
> >
> >
> >
> > > 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  (a
> widget
> > to quickly access your favorite apps and contacts!)
> http://android.yuvalsharon.net- Hide quoted text -
> >
> > - Show quoted text -
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
YuviDroid
Check out Launch-X  (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] How should one make an SQL database correctly send/receive booleans

2012-02-20 Thread Jeresam515
I created a database with the following variables:
public static final String KEY_VALUE = "x";
public static final String KEY_ISROOT = "y";
public static final String KEY_ROWID = "_id";
public static final String KEY_REALROWID = "_ids";
public static final String KEY_ISPOWER = "z";
public static final String KEY_POWERORROOTNUMBER = "b";
public static final String KEY_ISDIVISOR = "a";
public static final String KEY_ISMULTIPLIER = "c";
public static final String KEY_ISADD = "d";
public static final String KEY_ISSUBTRACT = "e";
public static final String KEY_ISPS = "f";
public static final String KEY_ISPE = "g";
private static final String TAG = "NotesDbAdapter";
private DatabaseHelper mDbHelper;
private SQLiteDatabase mDb;
private static final String DATABASE_NAME = "data";
private static final String DATABASE_TABLE = "notes";
private static final int DATABASE_VERSION =1;
private static final String DATABASE_CREATE =
  " create table " +DATABASE_TABLE+ " ("
 +KEY_VALUE+ " double,  "
 +KEY_REALROWID+ " integer,  "
 +KEY_ROWID+ " integer primary key autoincrement,  "
+KEY_ISPOWER+ " boolean,  "
+KEY_ISDIVISOR+ " boolean,  "
+KEY_ISMULTIPLIER+ " boolean,  "
+KEY_ISADD+ " boolean,  "
+KEY_ISSUBTRACT+ " boolean,  "
+KEY_ISPS+ " boolean,  "
+KEY_ISPE+ " boolean,  "
+KEY_POWERORROOTNUMBER+ " double,  "
 +KEY_ISROOT+ " boolean);";
The insert row ID code is:
public void createNote(double value, boolean isroot, boolean ispower,
boolean ismultiply, boolean isdivisor, boolean add,
boolean issubtract, double roototpowerval, boolean
paranthaseesend, boolean paranthaseesstart) {
ContentValues initialValues = new ContentValues();
initialValues.put(KEY_VALUE, value);
initialValues.put(KEY_ISROOT, isroot);
initialValues.put(KEY_ISPOWER, ispower);
initialValues.put(KEY_ISMULTIPLIER, ismultiply);
initialValues.put(KEY_ISDIVISOR, isdivisor);
initialValues.put(KEY_ISADD, add);
initialValues.put(KEY_ISSUBTRACT, issubtract);
initialValues.put(KEY_POWERORROOTNUMBER, roototpowerval);
initialValues.put(KEY_ISPE, paranthaseesend);
initialValues.put(KEY_ISPS, paranthaseesstart);
  long r= mDb.insert(DATABASE_TABLE, null, initialValues);
  int a = testCount();
  ContentValues argsa = new ContentValues();
  argsa.put(KEY_VALUE, value);
  argsa.put(KEY_ISROOT, isroot);
  argsa.put(KEY_ISPOWER, ispower);
  argsa.put(KEY_ISMULTIPLIER, ismultiply);
  argsa.put(KEY_ISDIVISOR, isdivisor);
  argsa.put(KEY_ISADD, add);
  argsa.put(KEY_ISSUBTRACT, issubtract);
  argsa.put(KEY_POWERORROOTNUMBER, roototpowerval);
  argsa.put(KEY_REALROWID, a);
  argsa.put(KEY_ISPE, paranthaseesend);
  argsa.put(KEY_ISPS, paranthaseesstart);
  mDb.update(DATABASE_TABLE, argsa, KEY_ROWID + "=" + r, null);
}
The fetchRow code is:
public Cursor fetchNote(long rowId) throws SQLException {
Cursor mCursor =
mDb.query(true, DATABASE_TABLE, new String[]
{KEY_ISPS,KEY_ISPE,KEY_VALUE,KEY_ISROOT,KEY_REALROWID,KEY_ISPOWER,KEY_POWER
ORROOTNUMBER,KEY_ISDIVISOR,KEY_ISMULTIPLIER,KEY_ISADD,KEY_ISSUBTRACT},
KEY_REALROWID + "=" + rowId, null,
null, null, null, null);
if (mCursor != null) {
mCursor.moveToFirst();
}
return mCursor;
}
It can change views here:
public void onClick(View v) {
double d = 3;
mDbHelper.deleteAllNotes();
mDbHelper.createNote(d, false, false, false,
false, false,
false, 0, false, false);
mDbHelper.createNote(0, false, false,
true,false, false,
false, 0, false, false);
Cursor c = mDbHelper.fetchNote(1);
if(d==Double.valueOf(c.getString(c.getColumnIndexOrThrow(NotesDbAdapter.KEY
_VALUE
{setContentView(R.layout.works);}
}
However, It doesn't here:
public void onClick(View v) {
double d = 3;
mDbHelper.deleteAllNotes();
mDbHelper.createNote(d, false, false, false,
false, false,
false, 0, false, false);
mDbHelper.createNote(0, false, false,
true,false, false,
false, 0, false, false);
Cursor c = mDbHelper.fetchNote(2);
if(Boolean.parseBoolean(c.getString(c.getColumnIndexOrThrow(NotesDbAdapter.
KEY_ISMULTIPLIER
{setContentView(R.layout.awesome);}
}
How should I make an SQL database correctly send/receive booleans?

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

[android-developers] How should one make an SQL database correctly send/receive booleans. How should one make an SQL database correctly send/receive booleans. How should one make an SQL database corre

2012-02-20 Thread Jeresam515
I created a database with the following variables:

public static final String KEY_VALUE = "x";
public static final String KEY_ISROOT = "y";
public static final String KEY_ROWID = "_id";
public static final String KEY_REALROWID = "_ids";
public static final String KEY_ISPOWER = "z";
public static final String KEY_POWERORROOTNUMBER = "b";
public static final String KEY_ISDIVISOR = "a";
public static final String KEY_ISMULTIPLIER = "c";
public static final String KEY_ISADD = "d";
public static final String KEY_ISSUBTRACT = "e";
public static final String KEY_ISPS = "f";
public static final String KEY_ISPE = "g";
private static final String TAG = "NotesDbAdapter";
private DatabaseHelper mDbHelper;
private SQLiteDatabase mDb;
private static final String DATABASE_NAME = "data";
private static final String DATABASE_TABLE = "notes";
private static final int DATABASE_VERSION =1;
private static final String DATABASE_CREATE =
  " create table " +DATABASE_TABLE+ " ("
 +KEY_VALUE+ " double,  "
 +KEY_REALROWID+ " integer,  "
 +KEY_ROWID+ " integer primary key autoincrement,  "
+KEY_ISPOWER+ " boolean,  "
+KEY_ISDIVISOR+ " boolean,  "
+KEY_ISMULTIPLIER+ " boolean,  "
+KEY_ISADD+ " boolean,  "
+KEY_ISSUBTRACT+ " boolean,  "
+KEY_ISPS+ " boolean,  "
+KEY_ISPE+ " boolean,  "
+KEY_POWERORROOTNUMBER+ " double,  "
 +KEY_ISROOT+ " boolean);";

The insert row ID code is:

public void createNote(double value, boolean isroot, boolean ispower,
boolean ismultiply, boolean isdivisor, boolean add,
boolean issubtract, double roototpowerval, boolean
paranthaseesend, boolean paranthaseesstart) {
ContentValues initialValues = new ContentValues();
initialValues.put(KEY_VALUE, value);
initialValues.put(KEY_ISROOT, isroot);
initialValues.put(KEY_ISPOWER, ispower);
initialValues.put(KEY_ISMULTIPLIER, ismultiply);
initialValues.put(KEY_ISDIVISOR, isdivisor);
initialValues.put(KEY_ISADD, add);
initialValues.put(KEY_ISSUBTRACT, issubtract);
initialValues.put(KEY_POWERORROOTNUMBER, roototpowerval);
initialValues.put(KEY_ISPE, paranthaseesend);
initialValues.put(KEY_ISPS, paranthaseesstart);
  long r= mDb.insert(DATABASE_TABLE, null, initialValues);
  int a = testCount();
  ContentValues argsa = new ContentValues();
  argsa.put(KEY_VALUE, value);
  argsa.put(KEY_ISROOT, isroot);
  argsa.put(KEY_ISPOWER, ispower);
  argsa.put(KEY_ISMULTIPLIER, ismultiply);
  argsa.put(KEY_ISDIVISOR, isdivisor);
  argsa.put(KEY_ISADD, add);
  argsa.put(KEY_ISSUBTRACT, issubtract);
  argsa.put(KEY_POWERORROOTNUMBER, roototpowerval);
  argsa.put(KEY_REALROWID, a);
  argsa.put(KEY_ISPE, paranthaseesend);
  argsa.put(KEY_ISPS, paranthaseesstart);
  mDb.update(DATABASE_TABLE, argsa, KEY_ROWID + "=" + r, null);
}

The fetchRow code is:

public Cursor fetchNote(long rowId) throws SQLException {

Cursor mCursor =

mDb.query(true, DATABASE_TABLE, new String[]
{KEY_ISPS,KEY_ISPE,KEY_VALUE,KEY_ISROOT,KEY_REALROWID,KEY_ISPOWER,KEY_POWERORROOTNUMBER,KEY_ISDIVISOR,KEY_ISMULTIPLIER,KEY_ISADD,KEY_ISSUBTRACT},
KEY_REALROWID + "=" + rowId, null,
null, null, null, null);
if (mCursor != null) {
mCursor.moveToFirst();
}
return mCursor;

}

It can change views here:
public void onClick(View v) {
double d = 3;
mDbHelper.deleteAllNotes();
mDbHelper.createNote(d, false, false, false, false, 
false,
false, 0, false, false);
mDbHelper.createNote(0, false, false, true,false, false,
false, 0, false, false);
Cursor c = mDbHelper.fetchNote(1);
if(d==Double.valueOf(c.getString(c.getColumnIndexOrThrow(NotesDbAdapter.KEY_VALUE
{setContentView(R.layout.works);}
}
However, It doesn't here:
public void onClick(View v) {
double d = 3;
mDbHelper.deleteAllNotes();
mDbHelper.createNote(d, false, false, false, false, 
false,
false, 0, false, false);
mDbHelper.createNote(0, false, false, true,false, false,
false, 0, false, false);
Cursor c = mDbHelper.fetchNote(2);
if(Boolean.parseBoolean(c.getString(c.getColumnIndexOrThrow(NotesDbAdapter.KEY_ISMULTIPLIER
{setContentView(R.layout.awesome);}
}

How should I make an SQL database correctly send/receive booleans?

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

Re: [android-developers] Re: start at boot app gives instantiationException:

2012-02-20 Thread TreKing
On Mon, Feb 20, 2012 at 9:34 AM, Thomas  wrote:

> Actually, I don't.


That's what you posted 

-
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] How to create a polygon with the dimensions of a texture?

2012-02-20 Thread saex
i'm trying to develop a simple opengl ES 1.1 app that must show a
square polygon with a texture. The texture haves a rectangular
resolution of 1536x2048 pixels.

I'm learning opengl with the NEHE tutorials, but they didn't eplain
how to create a polygon with the dimensions of the textures.

This is my actual square.java code, it is doing it by the wrong way.
It receives a bitmap as parameter, and it creates a new scaled bitmap
with square form with POT dimensions, but with square proportions,
this code uses a square polygon, and i dont need that.

what i need to modify to create this polygon with the dimensions of
the texture?

public class Square {
//Buffer de vertices
private FloatBuffer vertexBuffer;
//Buffer de coordenadas de texturas
private FloatBuffer textureBuffer;
//Puntero de texturas
private int[] textures = new int[3];
//El item a representar
private Bitmap image;
//Definición de vertices

private float vertices[] =
{
-1.0f, -1.0f, 0.0f, //Bottom Left
1.0f, -1.0f, 0.0f,  //Bottom Right
-1.0f, 1.0f, 0.0f,  //Top Left
1.0f, 1.0f, 0.0f//Top Right
};

private float texture[] =
{
//Mapping coordinates for the vertices
0.0f, 1.0f,
1.0f, 1.0f,
0.0f, 0.0f,
1.0f, 0.0f
};

// Image ratio
float ratio;

//Inicializamos los buffers
public Square(Bitmap image) {
ByteBuffer byteBuf = ByteBuffer.allocateDirect(vertices.length
* 4);
byteBuf.order(ByteOrder.nativeOrder());
vertexBuffer = byteBuf.asFloatBuffer();
vertexBuffer.put(vertices);
vertexBuffer.position(0);

byteBuf = ByteBuffer.allocateDirect(texture.length * 4);
byteBuf.order(ByteOrder.nativeOrder());
textureBuffer = byteBuf.asFloatBuffer();
textureBuffer.put(texture);
textureBuffer.position(0);

this.image=image;

ratio = (float)image.getWidth() / image.getHeight();
}
//Funcion de dibujado
public void draw(GL10 gl) {
gl.glFrontFace(GL10.GL_CCW);
//gl.glEnable(GL10.GL_BLEND);
//Bind our only previously generated texture in this case
gl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]);
//Point to our vertex buffer
gl.glVertexPointer(3, GL10.GL_FLOAT, 0, vertexBuffer);
gl.glTexCoordPointer(2, GL10.GL_FLOAT, 0, textureBuffer);
//Enable vertex buffer
gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
//Draw the vertices as triangle strip
gl.glDrawArrays(GL10.GL_TRIANGLE_STRIP, 0, vertices.length /
3);
//Disable the client state before leaving
gl.glDisableClientState(GL10.GL_VERTEX_ARRAY);
gl.glDisableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
//gl.glDisable(GL10.GL_BLEND);
}
//Carga de texturas
public void loadGLTexture(GL10 gl, Context context) {
//Generamos un puntero de texturas
gl.glGenTextures(1, textures, 0);
//y se lo asignamos a nuestro array
gl.glBindTexture(GL10.GL_TEXTURE_2D, textures[0]);
//Creamos filtros de texturas
gl.glTexParameterf(GL10.GL_TEXTURE_2D,
GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_NEAREST);
gl.glTexParameterf(GL10.GL_TEXTURE_2D,
GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR);
//Diferentes parametros de textura posibles
GL10.GL_CLAMP_TO_EDGE
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_S,
GL10.GL_REPEAT);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_WRAP_T,
GL10.GL_REPEAT);

//Get the texture from the Android resource directory
InputStream is=null;


Bitmap bitmap =image;
//con el siguiente código redimensionamos las imágenes que
sean mas grandes de 256x256.
int newW=bitmap.getWidth();
int newH=bitmap.getHeight();
float fact;
if (newH>256 || newW>256)
{
if (newH>256)
{
fact=(float)255/(float)newH; //porcentaje por el que
multiplicar para ser tamaño 256
newH=(int)(newH*fact); //altura reducida al porcentaje
necesario
newW=(int)(newW*fact); //anchura reducida al
porcentaje necesario
}
if (newW>256)
{
fact=(float)255/(float)newW; //porcentaje por el que
multiplicar para ser tamaño 256
newH=(int)(newH*fact); //altura reducida al porcentaje
necesario
newW=(int)(newW*fact); //anchura reducida al
porcentaje necesario
}
bitmap=Bitmap.createScaledBitmap(bitmap, newW, newH,
true);
}
//con el siguiente código transformamos imágenes no potencia
de 2 en imágenes potencia de 2 (pot)
//meto el bitmap NOPOT en un bitmap POT para que no aparezcan
texturas blancas.
int nextPot=256;
int h = bitmap.getHeight();

[android-developers] Android Game Developement

2012-02-20 Thread suresh
Hi Friends

I would like to learn android gaming development. is there any tools
available in market to develop games on android.


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


[android-developers] Re: start at boot app gives instantiationException:

2012-02-20 Thread Thomas
Actually, I don't.  What should the manifest be in this case?
Tom B

On Feb 20, 10:05 am, TreKing  wrote:
> You have the following:
>
> public abstract class StartAtBootActivity extends *BroadcastReceiver*{
>
>
>
> > <*activity *android:name=".StartAtBootActivity"
>
> See the problem with this scenario?
>
> -
> 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] Apparatus force close Logcats

2012-02-20 Thread TreKing
On Mon, Feb 20, 2012 at 3:20 AM, Josh Downey wrote:

> I really wanna be able to play on PC (win7 x64) the app works fine on
> phone but force closes in emulator
>

This forum is for developing apps against the Android SDK. You're not going
to get much help debugging a specific app on an emulator. However, the
stack trace would indicate that the Emulaor simply does not support some
required OpenGL functionality.

-
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] [Google Map] Handle click on route

2012-02-20 Thread TreKing
Tip: Don't post a giant blob of unformatted, unreadable code. Post the
least bit of code that will get the point across. No one is going to read
through all that, it makes your post hard to read, and increases the
chances of people ignoring your post because they never get to the bottom
where the real substance is.

Cool? Cool. Now then:

On Mon, Feb 20, 2012 at 1:40 AM, Benjamin DJAHANDIDEH <
d.djahandi...@gmail.com> wrote:

> But how could I handle click events on those drawn routes ?
>
> For information, I was thinking about something which would probably
> be inefficient, but I'll tell it, we never knows :)
>

Try it. See how fast it is. Profile it. Optimize it, if necessary.


> Since the route establishement is basicaly a succession of drawings
> beetween two geopoints (segments), we could prehaps handle route
> clicking this way :
>
>  - Using the `onTouchEvent` method of the map overlay, we can get the
> geopoint associated to a click.
>  - Then we try to establish if the clicked geopoint is part of a route
> segment.
>

You probably want to determine if the clicked geopoint is "close enough" to
a route segment, as it's unlikely the user will always perfectly tap on a
route segment or point on said segment.


> One last information : Several routes will be drawn on the map at the same
> instant, so the click must be associated to a unique route and not all of
> them.
>

Then stop processing the tap event after you find one valid route.

-
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] Quiz Application

2012-02-20 Thread TreKing
On Sun, Feb 19, 2012 at 9:19 AM, subramaniam.sanka...@googlemail.com <
subramaniam.sanka...@googlemail.com> wrote:

>  @Override
>public void onClick(View v) {
>finish();
>Bundle tempbundle = new Bundle();
>onCreate(tempbundle);
>}
>

Why are you doing the above? That is all kinds of wrong.

-
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] Eeagarding teating app

2012-02-20 Thread TreKing
On Sun, Feb 19, 2012 at 11:54 PM, Dhaval Varia wrote:

> Is it required to test my app by making test project ...?


No.

-
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] get adapter from OnItemSelectedListener?

2012-02-20 Thread TreKing
On Sun, Feb 19, 2012 at 11:28 PM, Ray Tayek  wrote:

> can one discover the array adapter for the spinner from the
> OnItemSelectedListener class?


http://developer.android.com/reference/android/widget/AdapterView.OnItemSelectedListener.html#onItemSelected(android.widget.AdapterView,
android.view.View, int, long)

See the first parameter? If you follow that:

http://developer.android.com/reference/android/widget/AdapterView.html#getAdapter()


-
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] start at boot app gives instantiationException:

2012-02-20 Thread TreKing
You have the following:

public abstract class StartAtBootActivity extends *BroadcastReceiver*{
>


> <*activity *android:name=".StartAtBootActivity"
>

See the problem with this scenario?

-
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] Contact Manager Sample Code

2012-02-20 Thread Michael Ennovium
I appreciate your response but the answer is yes.  It also fails to show
contacts on a (real) tablet with nearly 100 contacts.

On Mon, Feb 20, 2012 at 4:02 AM, poncho  wrote:

> Hi,
>
> Since the code worked on a real device and not on emulators, I just have
> to ask:
> Did you try to add any contact to the emulator before running the sample
> code?
>
> /Poncho
>
>
> On 02/19/2012 10:59 PM, Michael Ennovium wrote:
>
>> The Contact Manager Sample code has given me hours of frustration.
>> The sample code displays all the contacts in a List View and also
>> provides for adding new contacts.  I have no difficulty with the Add
>> Contact portion.  The listing of the contact gives different results
>> for the list on diffent platforms.
>>
>> 1. Using my Samsumg Infuse 2.2 phone, the sample works correctly.
>>
>> 2. Using an emulator configured for Level 8, no contacts are
>> displayed*.
>>
>> 3. Using an Acer Iconia tablet, no contacts are displayed*.
>>
>> 4. Using an emulator confgured for 3.2, no contacts are displayed*.
>>
>> * In all cases where no contacts are displayed, the cursor.getCount()
>> returns a zero.
>>
>> The same source code is used without modification on each platform.
>>
>> I know it has to be "cockpit" error on my side but I am stumped.  Any
>> direction is graciously appreciated.
>>
>> My goal is to develop for the tablet and this has become a gating
>> issue for me.
>>
>>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to 
> android-developers@**googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+**unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/**group/android-developers?hl=en

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

2012-02-20 Thread Chris Mawata
Your onClick() is empty so one would expect nothing to happen. What
was the expected behavior?


On Feb 18, 8:59 am, furkan katman  wrote:
>  here is the code ..
>
> package com.android.KickOffPro;
>
> import java.util.Random;
>
> import android.app.Activity;
> import android.os.Bundle;
> import android.view.View;
> import android.view.View.OnClickListener;
> import android.view.ViewGroup.LayoutParams;
> import android.widget.Button;
> import android.widget.TextView;
>
> public class KickOffActivity extends Activity implements
> OnClickListener {
>         private Button GenerB;
>         private Units e, e1, e2, e3, e4;
>         private static int turn;
>         private final LayoutParams Lpx = new LayoutParams(
>                         LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
>
>         /** Called when the activity is first created. */
>         @Override
>         public void onCreate(Bundle savedInstanceState) {
>                 super.onCreate(savedInstanceState);
>                 setContentView(R.layout.main);
>                 // GenerB=(Button)findViewById(R.id.Generate);
>                 // GenerB.setOnClickListener(this);
>                 // turn=0;
>                 e = new Units(this, 100, 100);
>                 e1 = new Units(this, 100, 150);
>                 e2 = new Units(this, 100, 200);
>                 e3 = new Units(this, 100, 250);
>                 e4 = new Units(this, 100, 300);
>
>                 e.setOnClickListener(this);
>                 e1.setOnClickListener(this);
>                 e2.setOnClickListener(this);
>                 e3.setOnClickListener(this);
>                 e4.setOnClickListener(this);
>                 this.addContentView(e, Lpx);
>                 this.addContentView(e1, Lpx);
>                 this.addContentView(e2, Lpx);
>                 this.addContentView(e3, Lpx);
>                 this.addContentView(e4, Lpx);
>
>         }
>
>         public void onClick(View v) {
>                 // TODO Auto-generated method stub
>
>         }
>
> }
>
> -onclicklistener doesnt acccept all elements
> package com.android.KickOffPro;
>
> import android.R.color;
> import android.content.Context;
> import android.graphics.Canvas;
> import android.graphics.Color;
> import android.graphics.Paint;
> import android.graphics.Rect;
> import android.view.KeyEvent;
> import android.view.MotionEvent;
> import android.view.View;
> import android.view.View.OnClickListener;
> import android.widget.Button;
>
> public class Units  extends View
> {
>  public  int ypoint;
>  public  int xpoint;
>  String txt;
>  private Canvas canos;
>  private Paint RedPen;
>  public Units(Context context, int Xp,int Yp) {
>                 super(context);
>
>                 ypoint=Yp;
>                 xpoint=Xp;
>                 txt="";
>                 // TODO Auto-generated constructor stub
>
>  }
>
>         @Override
>         protected void onDraw(Canvas canvas) {
>                 // TODO Auto-generated method stub
>                 super.onDraw(canvas);
>
>         Rect unitSquare=new Rect();
>         unitSquare.union(xpoint, ypoint, xpoint+30, ypoint+30);
>
>     RedPen=new Paint();
>         RedPen.setColor(Color.RED);
>         RedPen.setStyle(Paint.Style.STROKE);
>         canvas.drawRect(unitSquare, RedPen);
>         canos=canvas;
>         canos.drawText(txt, xpoint, ypoint+10,RedPen);
>
>         }
>
>         public void TxtToDraw(String txtx)
>         {
>                 txt=txtx;
>                 invalidate();
>
>         }
>
>
>
> }- Hide quoted text -
>
> - Show quoted text -

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


[android-developers] Re: SDK for Augmented Reality for real world objects Android ?

2012-02-20 Thread JP

Depending how serious you are, I'd recommend a trip to Santa Clara for
the are 2012 conference, here:
http://augmentedrealityevent.com/
Beyond my professional angle I'm a huge fan. Find out where things are
at; there's also a vendor floor where you can chat with the creators
of SDKs and tools.


On Feb 20, 6:47 am, sagare  wrote:
> Hi,
>      Thanks for reply so what are the alternatives. What i want to do
> is when the user opens my application and launches the camera preview
> mode and sees a real car wheel i want to display him information about
> the wheel when user sees the car head light through camera preview i
> want to show him information about car head light. how can i achieve
> this.
>
> Thanks a lot,
> Sagar
>
> On Feb 10, 7:30 pm, Raghav Sood 
> wrote:
>
>
>
>
>
>
>
> > Nothing like this exists for Android yet, sorry.
>
> > Thanks
>
> > On Fri, Feb 10, 2012 at 7:56 PM, sagare  wrote:
> > >      Is there any third party sdk for Argumented reality of real word
> > > objects ? know a few like QCAR from qualcomm and AndAR but these are
> > > tag based I am looking at an sdk which is not tag based and can find
> > > real world object. Any pointer will be appreciated.
>
> > > Thanks,
> > > Sagar
>
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en
>
> > --
> > Raghav 
> > Soodhttp://www.androidactivist.org/-Authorhttp://www.appaholics.in/-Founder

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

2012-02-20 Thread sagare
Hi,
 Thanks for reply so what are the alternatives. What i want to do
is when the user opens my application and launches the camera preview
mode and sees a real car wheel i want to display him information about
the wheel when user sees the car head light through camera preview i
want to show him information about car head light. how can i achieve
this.

Thanks a lot,
Sagar

On Feb 10, 7:30 pm, Raghav Sood 
wrote:
> Nothing like this exists for Android yet, sorry.
>
> Thanks
>
>
>
>
>
>
>
>
>
> On Fri, Feb 10, 2012 at 7:56 PM, sagare  wrote:
> >      Is there any third party sdk for Argumented reality of real word
> > objects ? know a few like QCAR from qualcomm and AndAR but these are
> > tag based I am looking at an sdk which is not tag based and can find
> > real world object. Any pointer will be appreciated.
>
> > Thanks,
> > Sagar
>
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Android Developers" group.
> > To post to this group, send email to android-developers@googlegroups.com
> > To unsubscribe from this group, send email to
> > android-developers+unsubscr...@googlegroups.com
> > For more options, visit this group at
> >http://groups.google.com/group/android-developers?hl=en
>
> --
> Raghav Soodhttp://www.androidactivist.org/- Authorhttp://www.appaholics.in/- 
> Founder

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

2012-02-20 Thread Chris
Kristopher Micinski  gmail.com> writes:

> 
> Additionally, it's not even possible to "lock" the phone at all, by
> code, in any ways that can't be easily defeated and are essentially
> nothing more than parlor tricks.
> 
> kris


It's possible. Download the Toddler Lock App.
There are uses for these kinds of control other than malware...

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

2012-02-20 Thread dEEPESH PPM
Hi,

   Use this code;

 final Intent emailIntent = new Intent(
android.content.Intent.ACTION_SEND);
emailIntent.setType("plain/text");
startActivity(emailIntent);

Deepesh

On Sun, Feb 19, 2012 at 8:43 PM, Jim Graham  wrote:

> On Sun, Feb 19, 2012 at 06:55:34AM -0800, Siddharth Chopra wrote:
>
> > get a code by clicking on button which is having text as "Via Email"
> > that will open inbuilt email application of android...
>
> No, I think I'll stick with the e-mail app I already use.
>
> Later,
>   --jim
>
> --
> THE SCORE:  ME:  2  CANCER:  0
> 73 DE N5IAL (/4)| Tux (E Cat):  DS B+Wd Y 6 Y L+++ W++ C++/C++ I+++
> spooky1...@gmail.com| T++ A E H+ S V- F++ Q+++ P/P+ B++ PA+ PL SC---
> < Running FreeBSD 7.0 > |
> ICBM / Hurricane:   | Tiggerbelle:  DS W+S+Bts % 1.5 X L-- W- C+++/C+
>   30.44406N 86.59909W  | I+++  T A E++ H S++ V+++ Q+++ P  B++ PA++ PL+ SC
>
> Android Apps Listing at http://www.jstrack.org/barcodes.html
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>

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

2012-02-20 Thread dEEPESH PPM
Hi,

Please refer the following links

https://code.google.com/apis/console/#project:58720998082:access
http://eagle.phys.utk.edu/guidry/android/mapOverlayDemo.html
http://blog.pocketjourney.com/2008/03/19/tutorial-2-mapview-google-map-hit-testing-for-display-of-popup-windows/
http://www.nutiteq.com/system/files/Hello%20Map%20tutorial%20-%20Android_1_0_2.pdf

Deepesh

On Sun, Feb 19, 2012 at 11:00 PM, Krishna Kumaar Natarajan <
nikrish...@gmail.com> wrote:

> Hi All,
>
> I am new to android development.
> Can I get some links where I can learn using google Maps API ?
>
> Thanks in advance
>
> --
> Regards,
>
> Krishna Kumaar N.I.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Customizing Button

2012-02-20 Thread TreKing
On Mon, Feb 20, 2012 at 1:09 AM, shihab shiha wrote:

> But what kind of condtion i can give for activate the visible part ?


I'm not sure what you're asking.

-
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] Android: How Can you send/receive data along a phone call ?

2012-02-20 Thread Ganesh Kumar R.
Hi All.,

I created one sample phone app to dial a entered number  by " *Intent 
callIntent = new Intent(Intent.ACTION_CALL,Uri.parse("tel:"+9090909090);*" 
Am able to call the dialed number.

I have create one service to get the phone state [Ringing or idle or 
offhook]. Am able to receive the state properly.

I need to send/receive data along a phone call ? How can i do this ?

I tried with "intent.putExtra("CALL_KEY", "CALL_VALUE");" but am unable to 
receive a value :

*intent.getStringExtra("CALL_KEY");
Bundle bundle = intent.getExtras();
bundle.getString("CALL_KEY");*

Both returns the NULL value.

I Tried by sending DTMF tones with my URI [*
http://stackoverflow.com/questions/5989591/android-can-you-send-receive-data-along-a-phonecall]
*

*Intent mIntent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + 
phoneNumber + ";" + dtmfSequence));
*
But unable to identify sent data on receiver side ?  

How can do this ? Please help me !

Thanks.,
Ganesh Kumar 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] Contact Manager Sample Code

2012-02-20 Thread poncho

Hi,

Since the code worked on a real device and not on emulators, I just have 
to ask:
Did you try to add any contact to the emulator before running the sample 
code?


/Poncho

On 02/19/2012 10:59 PM, Michael Ennovium wrote:

The Contact Manager Sample code has given me hours of frustration.
The sample code displays all the contacts in a List View and also
provides for adding new contacts.  I have no difficulty with the Add
Contact portion.  The listing of the contact gives different results
for the list on diffent platforms.

1. Using my Samsumg Infuse 2.2 phone, the sample works correctly.

2. Using an emulator configured for Level 8, no contacts are
displayed*.

3. Using an Acer Iconia tablet, no contacts are displayed*.

4. Using an emulator confgured for 3.2, no contacts are displayed*.

* In all cases where no contacts are displayed, the cursor.getCount()
returns a zero.

The same source code is used without modification on each platform.

I know it has to be "cockpit" error on my side but I am stumped.  Any
direction is graciously appreciated.

My goal is to develop for the tablet and this has become a gating
issue for me.



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


[android-developers] Re: What is the significance of main.xml.out file?

2012-02-20 Thread moktarul anam
Hi,
Manually just delete this file

Moktarul

On Feb 18, 9:27 am, Kedar  wrote:
> What is the  significance of main.xml.out file?
>
> Sometimes while debugging the application, I am getting an error in
> the main.xml file

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Hello Everyone, i just have a quick question:

2012-02-20 Thread moktarul anam
Hi
BTDdetecetwithV7Activity in ur android  Manifest file
\

Enjoy
moktarul

On Feb 20, 12:26 am, Soyer  wrote:
> Hello everyone, Can anyone explain to me what this following error
> means? have anyone faced the same?
>
> ERROR:
>
> 02-19 18:10:41.321: E/AndroidRuntime(319): java.lang.RuntimeException:
> Unable to start activity ComponentInfo{android.mgo.helloandroid/
> android.mgo.helloandroid.BTDdetecetwithV7Activity}:
> java.lang.NullPointerException

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


[android-developers] java.net.SocketException: sendto failed: ETIMEDOUT (Connection timed out)

2012-02-20 Thread ankit singh
Hi All,

I am facing java.net.SocketException: sendto failed: ETIMEDOUT
(Connection timed out) exception in ICS.
After above exception, I am not able to do data transfer through
sslSocket, which i created. Please help me on this.

I have some doubts and correct me if i am wrong :
Steps:
1. Make a socket connection
2.Start transfering data using sslSocket.
3.Data connectivity goes down and come up.

Doubts:
1. DO we need to again make a socket connection.
2. DO RIL or Framework will do that for up.
3. There is SSLSocket interface which is exposed as API, user only
need to use that, and need not bother about data connectivity lost or
gain, framework will do polling, once data connectivity is up and
provice new socket to Application.

Please help me on this... for GB we never face thesetype of problem.

Thanks,
Ankit

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

2012-02-20 Thread Krishna Kumaar Natarajan
Hi All,

I am new to android development.
Can I get some links where I can learn using google Maps API ?

Thanks in advance

-- 
Regards,

Krishna Kumaar N.I.

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

2012-02-20 Thread Future Leaders
Is it possible to put a sprite animation from the same sheet (starting
only when that finger touches) under each finger and have it follow
your fingers until lifted? Thanks in advance.

Jesse

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

2012-02-20 Thread Michael Ennovium
The Contact Manager Sample code has given me hours of frustration.
The sample code displays all the contacts in a List View and also
provides for adding new contacts.  I have no difficulty with the Add
Contact portion.  The listing of the contact gives different results
for the list on diffent platforms.

1. Using my Samsumg Infuse 2.2 phone, the sample works correctly.

2. Using an emulator configured for Level 8, no contacts are
displayed*.

3. Using an Acer Iconia tablet, no contacts are displayed*.

4. Using an emulator confgured for 3.2, no contacts are displayed*.

* In all cases where no contacts are displayed, the cursor.getCount()
returns a zero.

The same source code is used without modification on each platform.

I know it has to be "cockpit" error on my side but I am stumped.  Any
direction is graciously appreciated.

My goal is to develop for the tablet and this has become a gating
issue for me.

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


[android-developers] Problem with Android 4.x OS

2012-02-20 Thread KingKong
Hi Android Guru's,

I am currently facing an issue with my application(via PhoneGap) and 
Android 4.x os Device. the app frequently crashes, its working fine in 
general with old android operating system. I tried running the application 
through Android Simulator and its working fine. but when i tried to run the 
application through nexus it crashes. the app downloads and it installs.

Hoping for your respond.

Thank you.

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

[android-developers] [Google Map] Handle click on route

2012-02-20 Thread Benjamin DJAHANDIDEH
I'm trying to validate a clickable route functionality using google
map API.

I established route display between two coordinates using the map API.

To realize this, I used the following tutorial
http://csie-tw.blogspot.com/2009/06/android-driving-direction-route-path.html
,
which basically parse a KML file (the response of a google map
direction request) and use a custom map overlay to draw a route.

**Custom Overlay :**

package com.test.route;

import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Point;
import android.graphics.RectF;
import android.util.Log;
import android.view.MotionEvent;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapView;
import com.google.android.maps.Overlay;
import com.google.android.maps.Projection;

public class MyOverLay extends Overlay
{
  private GeoPoint gp1;
  private GeoPoint gp2;
  private int mRadius=6;
  private int mode=0;
  private int defaultColor;
  private String text="";
  private Bitmap img = null;


  public MyOverLay(GeoPoint gp1,GeoPoint gp2,int mode) //
GeoPoint is a int. (6E)
  {

this.gp1 = gp1;
this.gp2 = gp2;
this.mode = mode;
defaultColor = 999; // no defaultColor

  }


  public MyOverLay(GeoPoint gp1,GeoPoint gp2,int mode, int
defaultColor)
  {
this.gp1 = gp1;
this.gp2 = gp2;
this.mode = mode;
this.defaultColor = defaultColor;
  }

  public void setText(String t)
  {
  this.text = t;
  }

  public void setBitmap(Bitmap bitmap)
  {
  this.img = bitmap;
  }

  public int getMode()
  {
  return mode;
  }

  @Override
  public boolean draw
  (Canvas canvas, MapView mapView, boolean shadow, long when)
  {

Projection projection = mapView.getProjection();
if (shadow == false)
{

  Paint paint = new Paint();
  paint.setAntiAlias(true);


  Point point = new Point();
  projection.toPixels(gp1, point);
  // mode=1¡Gstart
  if(mode==1)
  {
if(defaultColor==999)
paint.setColor(Color.BLUE);
else
paint.setColor(defaultColor);


RectF oval=new RectF(point.x - mRadius, point.y - mRadius,
 point.x + mRadius, 
point.y + mRadius);
// start point
canvas.drawOval(oval, paint);
  }
  // mode=2¡Gpath
  else if(mode==2)
  {
if(defaultColor==999)
paint.setColor(Color.RED);
else
paint.setColor(defaultColor);

Point point2 = new Point();
projection.toPixels(gp2, point2);
paint.setStrokeWidth(5);
paint.setAlpha(120);
canvas.drawLine(point.x, point.y, point2.x,point2.y,
paint);
  }
  /* mode=3¡Gend */
  else if(mode==3)
  {
/* the last path */

if(defaultColor==999)
paint.setColor(Color.GREEN);
else
paint.setColor(defaultColor);

Point point2 = new Point();
projection.toPixels(gp2, point2);
paint.setStrokeWidth(5);
paint.setAlpha(120);
canvas.drawLine(point.x, point.y, point2.x,point2.y, paint);


RectF oval=new RectF(point2.x - mRadius,point2.y - mRadius,
 point2.x + 
mRadius,point2.y + mRadius);
/* end point */
paint.setAlpha(255);
canvas.drawOval(oval, paint);
  }
  /* mode=4¡Gcar */
  else if(mode==4)
  {

if(defaultColor==999)
paint.setColor(Color.GREEN);
else
paint.setColor(defaultColor);

Point point2 = new Point();
projection.toPixels(gp2, point2);
paint.setTextSize(20);
paint.setAntiAlias(true);
canvas.drawBitmap(img, point2.x, point2.y,paint);
canvas.drawText(this.text, point2.x, point2.y, paint);
  }

  else if(mode==5)
  {

if(defaultColor==999)
paint.setColor(Color.GREEN);
else
paint.setColor(defaultColor);

Point point2 = new Point();
projection.toPixels(gp2, point2);
paint.setTextSize(20);
paint.setAntiAlias(true);
canvas.drawBitmap(img, p

[android-developers] Re: HTTP Post Json to IIS Service

2012-02-20 Thread T
So it looks like your trying to connect to a server What remote
web services are you using.
For a scanner project I created last semester, I used XAMPP
locally(just to see code work correctly), then I used Teamviewer when
I went live.
On the remote server file, I placed a php file with the JSON object to
reference in the android code. Your code looks fine, however, I've
learn it's not just this code that you may need. I connected my code
using a button called my SQL... I'll post the code below... hope this
helps...
Also, something I didn't find out until the end, but make sure your
server PHP and code are up to date...I ran into a last minute issue I
had to correct on the server side...

This is the button code (click button, sends data to mySQL server from
anywhere)
 case R.id.buttonSQL1:

try {

JSONObject json = new JSONObject();
json.put("barcode", mbarcodeEdit.getText());
json.put("description", description.getText());
json.put("make", make.getText());
json.put("serial", serial.getText());

HttpParams httpParams = new BasicHttpParams();

HttpConnectionParams.setConnectionTimeout(httpParams,
TIMEOUT_MILLISEC);
HttpConnectionParams.setSoTimeout(httpParams,
TIMEOUT_MILLISEC);
HttpClient client = new 
DefaultHttpClient(httpParams);

String url = 
"http://10.0.2.2:8080/webservice4.php";; //
needed for the php file pass over

HttpPost request = new HttpPost(url);
request.setEntity(new
ByteArrayEntity(json.toString().getBytes(
"UTF8")));
request.setHeader("json", json.toString());
HttpResponse response = client.execute(request);
HttpEntity entity = response.getEntity();
// If the response does not enclose an entity, 
there is no
need
if (entity != null) {
InputStream instream = 
entity.getContent();

String result =
RestClient.convertStreamToString(instream);
Log.i("Read from server", result);
Toast.makeText(this,  result,

Toast.LENGTH_LONG).show();
}
} catch (Throwable t) {
Toast.makeText(this, "Request failed: " + 
t.toString(),
Toast.LENGTH_LONG).show();
}

   // showDialog(DIALOG_ID);

break;
}
}

Also you need to insert this code (a separate java file called
RestClient)

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.HttpClient;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.impl.client.DefaultHttpClient;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

import android.util.Log;
public class RestClient {

public static String convertStreamToString(InputStream is) {

BufferedReader reader = new BufferedReader(new
InputStreamReader(is));
StringBuilder sb = new StringBuilder();

String line = null;
try {
while ((line = reader.readLine()) != null) {
sb.append(line + "\n");
}
} catch (IOException e) {
e.printStackTrace();
} finally {
try {
is.close();
} catch (IOException e) {
e.printStackTrace();
}
}
return sb.toString();
}


public static void connect(String url)
{

HttpClient httpclient = new DefaultHttpClient();

// Prepare a request object
HttpGet httpget = new HttpGet(url);

// Execute the request
HttpResponse response;
try {
response = httpclient.execute(httpget);
// Examine the response status
Log.i("Praeda",response.getStatusLine().toString());

// Get hold of the response entity
HttpEntity entity = response.getEntity();
// If the response does not enclose an entity, there is no
need
// to worry about connection release

if (entity != null) {

// A Simple JSON Response Read
InputStream instream = entity.getContent();
Stri

[android-developers] Limit the decimal numbers in a numberDecimal

2012-02-20 Thread rmg
Hi!

I'm starting to developing android applications with eclipse. I have a
doubt about how I can limit de decimal numbers in a EditText.
For example, I have this EditText:

 


I'd like to put a limit in the decimal part of the number, ie, 2
number maximum, so the user only can put a number like this: 3.78
and not: 3.788999
because the euro only accept two decimal numbers.

I don't know if there is an attribute that specify this or I need a
function to solve it.

Can anyone help me??

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] The project target (Android 2.2) was not properly loaded.

2012-02-20 Thread Tejas
I have install eclipse helios on windows 7. And imported existing
project .
In that project when I open Xml file I got this error message "The
project target (Android 2.2) was not properly loaded".
Can any one help me on this plz.

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

2012-02-20 Thread Josh Downey
I really wanna be able to play on PC (win7 x64)
the app works fine on phone but force closes in emulator
any help would be great, ive searched and searched but cant find an
answer
Thanx in advance

I/ActivityManager(   70): Starting: Intent
{ act=android.intent.action.MAIN cat=
[android.intent.category.LAUNCHER] flg=0x1020
cmp=com.bithack.apparatus/.App
aratusApplication } from pid 216
I/WindowManager(   70): Setting rotation to 1, animFlags=1
I/ActivityManager(   70): Config changed: { scale=1.0 imsi=310/260
loc=en_US tou
ch=3 keys=2/1/2 nav=3/1 orien=2 layout=34 uiMode=17 seq=12}
D/dalvikvm(  464): Trying to load lib /data/data/com.bithack.apparatus/
lib/libgd
x.so 0x40512f58
D/dalvikvm(  464): Added shared lib /data/data/com.bithack.apparatus/
lib/libgdx.
so 0x40512f58
D/dalvikvm(  464): No JNI_OnLoad found in /data/data/
com.bithack.apparatus/lib/l
ibgdx.so 0x40512f58, skipping init
D/AndroidInput(  464): sensor listener setup
I/ActivityManager(   70): Displayed
com.bithack.apparatus/.ApparatusApplication:
 +1s751ms
D/libEGL  (  464): egl.cfg not found, using default config
D/libEGL  (  464): loaded /system/lib/egl/libGLES_android.so
W/dalvikvm(  464): threadid=9: thread exiting with uncaught exception
(group=0x4
0015560)
E/AndroidRuntime(  464): FATAL EXCEPTION: GLThread 10
E/AndroidRuntime(  464): java.lang.IllegalArgumentException
E/AndroidRuntime(  464):at
com.google.android.gles_jni.EGLImpl._eglCreat
eContext(Native Method)
E/AndroidRuntime(  464):at
com.google.android.gles_jni.EGLImpl.eglCreate
Context(EGLImpl.java:50)
E/AndroidRuntime(  464):at android.opengl.GLSurfaceView
$DefaultContextFa
ctory.createContext(GLSurfaceView.java:685)
E/AndroidRuntime(  464):at android.opengl.GLSurfaceView
$EglHelper.start(
GLSurfaceView.java:925)
E/AndroidRuntime(  464):at android.opengl.GLSurfaceView
$GLThread.guarded
Run(GLSurfaceView.java:1264)
E/AndroidRuntime(  464):at android.opengl.GLSurfaceView
$GLThread.run(GLS
urfaceView.java:1118)
W/ActivityManager(   70):   Force finishing activity
com.bithack.apparatus/.Appa
ratusApplication
W/InputManagerService(   70): Starting input on non-focused client
com.android.i
nternal.view.IInputMethodClient$Stub$Proxy@405375f8 (uid=10034
pid=464)
W/InputManagerService(   70): Client not active, ignoring focus gain
of: com.and
roid.internal.view.IInputMethodClient$Stub$Proxy@40815a18
W/ActivityManager(   70): Activity pause timeout for
HistoryRecord{40659350 com.
bithack.apparatus/.ApparatusApplication}
D/dalvikvm(   70): GC_EXPLICIT freed 100K, 57% free 4474K/10375K,
external 3906K
/4385K, paused 177ms
I/WindowManager(   70): Setting rotation to 0, animFlags=1
I/ActivityManager(   70): Config changed: { scale=1.0 imsi=310/260
loc=en_US tou
ch=3 keys=2/1/2 nav=3/1 orien=1 layout=34 uiMode=17 seq=13}
I/Process (  464): Sending signal. PID: 464 SIG: 9
W/InputManagerService(   70): Window already focused, ignoring focus
gain of: co
m.android.internal.view.IInputMethodClient$Stub$Proxy@406aedd0
I/ActivityManager(   70): Process com.bithack.apparatus (pid 464) has
died.
I/WindowManager(   70): WIN DEATH: Window{40743748
com.bithack.apparatus/com.bit
hack.apparatus.ApparatusApplication paused=false}
I/WindowManager(   70): WIN DEATH: Window{4084bf10 SurfaceView
paused=false}
D/dalvikvm(   70): GC_EXPLICIT freed 34K, 58% free 4459K/10375K,
external 3897K/
4385K, paused 152ms
I/ActivityManager(   70): Starting: Intent
{ act=android.intent.action.MAIN cat=
[android.intent.category.LAUNCHER] flg=0x1020
cmp=com.bithack.apparatus/.App
aratusApplication } from pid 216
I/ActivityManager(   70): Start proc com.bithack.apparatus for
activity com.bith
ack.apparatus/.ApparatusApplication: pid=477 uid=10034 gids={1015,
3003}
I/WindowManager(   70): Setting rotation to 1, animFlags=1
I/ActivityManager(   70): Config changed: { scale=1.0 imsi=310/260
loc=en_US tou
ch=3 keys=2/1/2 nav=3/1 orien=2 layout=34 uiMode=17 seq=14}
W/ActivityManager(   70): Activity destroy timeout for
HistoryRecord{40659350 co
m.bithack.apparatus/.ApparatusApplication}
D/dalvikvm(  477): Trying to load lib /data/data/com.bithack.apparatus/
lib/libgd
x.so 0x405133b8
D/dalvikvm(  477): Added shared lib /data/data/com.bithack.apparatus/
lib/libgdx.
so 0x405133b8
D/dalvikvm(  477): No JNI_OnLoad found in /data/data/
com.bithack.apparatus/lib/l
ibgdx.so 0x405133b8, skipping init
D/AndroidInput(  477): sensor listener setup
I/ActivityManager(   70): Displayed
com.bithack.apparatus/.ApparatusApplication:
 +2s241ms
D/libEGL  (  477): egl.cfg not found, using default config
D/libEGL  (  477): loaded /system/lib/egl/libGLES_android.so
W/dalvikvm(  477): threadid=9: thread exiting with uncaught exception
(group=0x4
0015560)
E/AndroidRuntime(  477): FATAL EXCEPTION: GLThread 10
E/AndroidRuntime(  477): java.lang.IllegalArgumentException
E/AndroidRuntime(  477):at
com.google.android.gles_jni.EGLImpl._eglCreat
eContext(Native Method)
E/AndroidRuntime(  477):at

[android-developers] I would need some help with regard to sample projects in Eclipse

2012-02-20 Thread GABRIEL
Hello everyone,

This is my first post, I usually find everything on the web but this
one is just impossible to find (for me at least)

I am trying to open the Sample Project (or sample code) : "NewsReader"
into Eclipse.

First, it does not appear in the File/New project/Sample project.
I tried updating through Window/SDK Manager ... but still it does not
appear under Sample Projects (updated 4.0 and 4.0.3)

Second, I tried downloading and unzipping the file from "Designing for
Multiple Screens" from android developers (i.e. NewsReader.zip) but I
cannot import this project in any way I tried. It creates an empty
project with empty /src/. Tried different names, directories to no
avail.

Thirdly, I created an empty project, and added each class by hand and
each resource in the right directory. In the end, I still could not
compile the project since project.properties was "out of sync". "Fix
project properties" did not fix the problem.


I'm doing something wrong and I just cannot figure what that is.

Can anyone help me out with this? (I am debugging directly on the
galaxy nexus).

Thanks in advance.
Best Regards,
Gabriel.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 make a separate tablet HD version or an Universal one?

2012-02-20 Thread sly
abandon it.

On 2月20日, 上午10时48分, opok  wrote:
> I have an App support Android 1.5+
>
> I want to extend this app to add Fragment for supporting tablet. The
> Android Compatibility library only starts from Android 1.6, that means if I
> want to build an Universal one, I need to abandon my 1.5 users.
>
> What should I do?

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

2012-02-20 Thread pvans
I need to use the speech-to-text functionality of Google Voice Input /
Google Voice Search, but I need to provide it with pre-recorded audio
files stored on the phone (currently using .3gp format) instead of
having the user generate the files on the spot when the service is
invoked.  I have seen some 2-3 year old discussions about this issue
(for example, here: http://tinyurl.com/7vphhk7), but haven't seen
anything indicating that this input method has been incorporated.  Has
it?

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


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

2012-02-20 Thread Jan Burse

The blinker runs in the UI thread. And it is kept alive and
it keeps itself aliver in posting delayed messages. You
find the source code here:

http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/2.2_r1.1/android/widget/TextView.java#TextView.Blink

There is a condition isFocused() inside the Blink. I have
checked my application, the TextView I am using gets correctly
focused. There shouldn't be a problem with focusing. Here
is the result of some debugging code:

   02-20 10:21:47.362: WARN/System.err(579): text =
   xxx.TerminalArea@412f8368 text.isFocused = false
   02-20 10:21:47.362: WARN/System.err(579): text =
   xxx.TerminalArea@414044c8 text.isFocused = true

   414044c8 Blinks! OK

After switching the tab:

   02-20 10:22:57.445: WARN/System.err(579): text =
   xxx.TerminalArea@412f8368 text.isFocused = true
   02-20 10:22:57.445: WARN/System.err(579): text =
   xxx.TerminalArea@414044c8 text.isFocused = false

   412f8368 Does not Blink! NOK

So I guess a problem with focusing can be ruled out. What
other cause could be identified for the frozen cursor?

Bye

lbendlin schrieb:

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



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

2012-02-20 Thread Nitin Gaikwad
Hi Friends,
1 I am developing one application where i write one service using
broadcast receiver.
2 In this service i use the socket programing where i communicate with
client.
3 the application works like after the device boot the service will
start and listen the port to get the data.
4 this will work normally but problem come when the service restart
means when there the memory low (multiple application open that time)
service will restart automatically.
5 Here when service again goes to try to connect to socket this not
working

so is there any thing missing or should i need to do anything in code
please let me know.

thanks
Nitin Gaikwad

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


[android-developers] OpenGL: Big values of verticies coordinates on Android emulator

2012-02-20 Thread Zveroid
Hello!

Sometimes I'm need to draw my objects with pretty hight coordinates
(more than 20). But when I trying to render even objects with
coordinates about 1, there's nothing on my emulator. But on my
Samsung Galaxy S2 there's all ok!
I tried to change coordinates and found highest coodinates - there's
about 7000. If we use bigger values, we willn't see any objects.
There's parts of my code:
Initialization:
ByteBuffer vbb = ByteBuffer.allocateDirect(VERTS * 3 * 4);
vbb.order(ByteOrder.nativeOrder());
mFVertexBuffer = vbb.asFloatBuffer();

float[] coords = {
6985.5f, 6985.5f, 0,
6984.5f, 6985.5f, 0,
6985.0f, 6984.5f, 0,
6985.5f, 6985.5f,0,
6984.5f, 6985.5f, 0,
6985.0f, 6984.5f, 0
}; //there's all ok with such coords. With >7000 triangle doesn't
rendered.

for (int i = 0; i < VERTS; i++) {
for (int j = 0; j < 3; j++) {
mFVertexBuffer.put(coords[i * 3 + j]);
}
}

mFVertexBuffer.rewind();

Render loop:
gl.glClear(GL10.GL_COLOR_BUFFER_BIT | GL10.GL_DEPTH_BUFFER_BIT);
gl.glMatrixMode(GL10.GL_MODELVIEW);
gl.glLoadIdentity();

GLU.gluLookAt(gl, 6985, 6985, 4, 6985, 6985, 0, 0f, 1f, 0f);

gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
gl.glColor4f(1.0f, 0.0f, 0.0f, 0.0f);

gl.glVertexPointer(3, GL10.GL_FLOAT, 0, mFVertexBuffer);//
gl11.glBindBuffer(GL11.GL_ELEMENT_ARRAY_BUFFER, 0);
gl.glDrawArrays(GL10.GL_TRIANGLES, 0,
mFVertexBuffer.capacity() / 3);

gl.glDisableClientState(GL10.GL_VERTEX_ARRAY);


Is there emulator bug or there's my mistake somewhere?
How I can solve this problem? I really need it - lots of chinense
devices has pretty same bugs as emulator :(

Thanks!

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


[android-developers] Android emulator does not show any thing

2012-02-20 Thread Muhammad sohail
when i run an android app the emulator starts but does not show
anything. there is a black screen on it.. and the following messages
are showed in the console section.
[2012-02-18 11:51:37 - LunchList] --
[2012-02-18 11:51:37 - LunchList] Android Launch!
[2012-02-18 11:51:37 - LunchList] adb is running normally.
[2012-02-18 11:51:37 - LunchList] Performing apt.tutorial.LunchList
activity launch
[2012-02-18 11:51:37 - LunchList] Automatic Target Mode: launching new
emulator with compatible AVD 'secondAVD'
[2012-02-18 11:51:37 - LunchList] Launching a new emulator with
Virtual Device 'secondAVD'
[2012-02-18 11:51:49 - Emulator] Warning: No DNS servers found
[2012-02-18 11:51:54 - Emulator] emulator: WARNING: Unable to create
sensors port: Unknown error
[2012-02-18 11:51:54 - LunchList] New emulator found: emulator-5554
[2012-02-18 11:51:54 - LunchList] Waiting for HOME
('android.process.acore') to be launched...
[2012-02-18 11:53:56 - LunchList] emulator-5554 disconnected!
Cancelling 'apt.tutorial.LunchList activity launch'!

plz guide me

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


[android-developers] Reading encrypted video data from mediaplayer

2012-02-20 Thread Sid
According to the link 
http://developer.android.com/guide/appendix/media-formats.html
android media player can support RTSP for all versions of android. My
server will transmit the encrypted data to the client (android device
here) as it has propriety content. I want to know whether media player
can read the encrypted data. If yes, how to prepare the media player
so that it can read the encrypted data. If not, what is the preferred
way (or protocol) to read encrypted data on android native media
player?

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

2012-02-20 Thread santy
I'm trying to access the emulator camera but the only thing I see is
this image 
http://s2.subirimagenes.com/imagen/previo/thump_7449264captura-de-pantalla.png

I've tried different codes but I always get the same result. The
strange thing is that I can access the default camera application and
make photos, but not from my own applications. I use the camera
permissions.

Please I need help. Thank you

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


[android-developers] parental control

2012-02-20 Thread muhammed haris
hey there i m new to android i wanted to create a parental control app
which could block some apps from starting specified by user.. can any1
suggest me where to start with i know that eventlog could be of help
but cant find 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


Re: [android-developers] Re: Help! Monkeyrunner Press and Touch event

2012-02-20 Thread Mahesh Sankeshwar
hey plz send me the code for the android app. text to speech and speech to
text .

On Sun, Feb 19, 2012 at 4:28 AM, Diego Torres Milano wrote:

> I couldn't reproduce the problem with either 2.3 and 4.0 emulators.
> Perhaps there's something in the part you removed from your code.
> And move the line
>HV = D.getHierarchyViewer()
> outside of the loop.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, 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] Working code for getting frame from video

2012-02-20 Thread Valentin Rogovskiy
Hi everyone,

Here that I have -
I need to get a frame from the specific time in the video.
my application should work on all SDK starting from 1.6 (so
MediaMetadataRetriever is
not an option for me)

As far as I understand the only way is to use ffmpeg with everything
related to it, is that right?

I am wondering, if it is a quite popular operation, is there any
working solution for it? I mean just some
code that I can simply grab and use? Maybe some open source
application?

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] Re: Please provide me the Mediarecorder documentation?

2012-02-20 Thread Mahesh Sankeshwar
i hav jst installed the android software tats itplz send me the code
for the application speech to text and text to speech.

On Sun, Feb 19, 2012 at 7:41 PM, Chris Mawata wrote:

> What do you have so far? Are you sure that such a document exists?
> (e.g. Do you have a citation or do you know who was supposed to write
> the report). The term "theoretical implementation" seems to be a
> contradiction.
>
> On Feb 19, 8:27 am, Muhammad UMER  wrote:
> > hi shris,
> > Thanks for your reply. I search Android Mediarecorder in
> Google that tells me how to programatically implemention, but i want the
> theoretical implementation (report on mediarecorder). I have to  add this
> in my app project report.
> >
> > Thanks and Regards,
> >
> > umer
> >
> >
> >
> > > Date: Sun, 19 Feb 2012 05:15:34 -0800
> > > Subject: [android-developers] Re: Please provide me the Mediarecorder ?
> > > From: chris.maw...@gmail.com
> > > To: android-developers@googlegroups.com
> >
> > > Google Android MediaRecorder
> >
> > > On Feb 18, 9:46 am, "muhammad.ume...@hotmail.com"
> > >  wrote:
> > > > hi all,
> > > >Please give me the Mediarecorder documentation or The report
> on
> > > > Mediarecorder. Please please i really need it.
> >
> > > > Thanks and Regards,
> >
> > > > umer
> >
> > > --
> > > You received this message because you are subscribed to the Google
> > > Groups "Android Developers" group.
> > > To post to this group, send email to
> android-developers@googlegroups.com
> > > To unsubscribe from this group, send email to
> > > android-developers+unsubscr...@googlegroups.com
> > > For more options, visit this group at
> > >http://groups.google.com/group/android-developers?hl=en- Hide quoted
> text -
> >
> > - Show quoted text -
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] ActivityManager: Can't dispatch DDM chunk.. And more

2012-02-20 Thread Soeholm
Hi there

I'm new to Android development, and I'm having trouble with a simple
Hello World app..
It worked yesterday on the emulator, on a virtual device with Android
1.5
When I run the app a day after, it's stuck at the android startup
screen continuously outputting the following:

[2012-02-17 23:40:03 - HelloWorldAndroid] Starting activity
com.mathias.HelloWorldAndroidActivity on device emulator-5554
[2012-02-17 23:40:05 - HelloWorldAndroid] ActivityManager: Can't
dispatch DDM chunk 46454154: no handler defined
[2012-02-17 23:40:05 - HelloWorldAndroid] ActivityManager: Can't
dispatch DDM chunk 4d505251: no handler defined
[2012-02-17 23:40:06 - HelloWorldAndroid] Device not ready. Waiting 3
seconds before next attempt.
[2012-02-17 23:40:06 - HelloWorldAndroid] ActivityManager: INTENT is
described with:
[2012-02-17 23:40:06 - HelloWorldAndroid] ActivityManager: [-a
] [-d ] [-t ]
[2012-02-17 23:40:06 - HelloWorldAndroid] ActivityManager: [-c
 [-c ] ...]
[2012-02-17 23:40:06 - HelloWorldAndroid] ActivityManager: [-e|--es
  ...]
[2012-02-17 23:40:06 - HelloWorldAndroid] ActivityManager: [--ez
  ...]
[2012-02-17 23:40:06 - HelloWorldAndroid] ActivityManager: [-e|--ei
  ...]
[2012-02-17 23:40:06 - HelloWorldAndroid] ActivityManager: [-n
] [-f ] []

Looking forward to more app development, when I get this working :-)
Thanks in advance!

/Mathias

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Subject: emulator: WARNING: Unable to create sensors port: Unknown error

2012-02-20 Thread Artemix22
have you ever try to klik and drag "locked" on the screen to the right
side ("unlocked")

On Dec 27 2011, 11:37 am, OpaSmurf  wrote:
> Responding to post from:
> From: snowgoon 
> Date: Thu, 22 Dec 2011 00:05:43 -0800 (PST)
> Local: Thurs, Dec 22 2011 2:05 am
>
> Because my error is almost identical with snowgoon's this seems the
> right place to request a hint.  I also removed and reinstalled the ADK
> and replaced eclipse 3.7.0 with 3.7.1 on Ubuntu 11.10.  HelloWorld
> from the eclipse cheatsheet works to the console.  When I attempt
> “Hello, World” from “http://developer.android.com/resources/tutorials/
> hello-world.html”
> I get the run log below.  I also get a virtual device displayed on my
> desktop but the “Hello, World” text does not appear.
>
> I have the file 51-android.rules to define usb ports but have no
> physical device attached.
>
> Any hints will be much appreciated by a rusty former programmer.
> Thanks.
>
> [2011-12-26 20:38:32 - MyAp] Android Launch!
> [2011-12-26 20:38:32 - MyAp] adb is running normally
> [2011-12-26 20:38:32 - MyAp] Performing HelloWorld.Droid.MyApActivity
> activity launch
> [2011-12-26 20:38:32 - MyAp] Automatic Target Mode: launching new
> emulator with compatible AVD 'my_avd'
> [2011-12-26 20:38:32 - MyAp] Launching a new emulator with Virtual
> Device 'my_avd'
> [2011-12-26 20:38:36 - Emulator] emulator: WARNING: Unable to create
> sensors port: Connection refused
> [2011-12-26 20:38:36 - MyAp] New emulator found: emulator-5554
> [2011-12-26 20:38:36 - MyAp] Waiting for HOME
> ('android.process.acore') to be launched...
>
> P.S.  I would be happy to know how I should have added to snowgoon's
> post rather than creating a new one. TNX

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

2012-02-20 Thread subramaniam.sanka...@googlemail.com
Hi,

I am a beginner and I am stuck whilst developing a simple quiz
application in android. The code is below. onClick next button is not
displaying the next random question. Any help?

package com.quiz;

import java.util.Random;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.RadioButton;
import android.widget.RadioGroup;
import android.widget.TextView;

public class Quiz2Activity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
Random r = new Random();
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
final String[] Countries =
{"India","U.S","Singapore","Malaysia","Sri
Lanka","Thailand","Indonesia","China","Japan","Korea","Vietnam"};
final String[] Capitals = {"Delhi","Washington D.C","Singapore
City","Kaula lampur", "Colombo",
"Bangkok","Jakarta","Beiing","Tokyo","Seoul","Ho Chi Min City"};
String question;
RadioGroup rg1 = (RadioGroup)findViewById(R.id.rg1);
Button but1 = (Button) findViewById(R.id.but1);
for(int i=0;i<4;i++){
int num = r.nextInt(10);
question = "Whats the capital of the country " +
Countries[num];
TextView Question = (TextView) findViewById(R.id.ques);
Question.setText(question);
RadioButton ans1 = (RadioButton) findViewById(R.id.ans1);
RadioButton ans2 = (RadioButton) findViewById(R.id.ans2);
RadioButton ans3 = (RadioButton) findViewById(R.id.ans3);
RadioButton ans4 = (RadioButton) findViewById(R.id.ans4);
ans1.setText(Capitals[num+1]);
ans2.setText(Capitals[num]);
ans3.setText(Capitals[num+2]);
ans4.setText(Capitals[num-2]);

}
but1.setOnClickListener(new View.OnClickListener() {

@Override
public void onClick(View v) {
finish();
Bundle tempbundle = new Bundle();
onCreate(tempbundle);
}
});
}
}

I suspect but1.setOnClickListener method.

Regards,
Subbu

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

2012-02-20 Thread WASEEM
Hi Android Developers
I am facing problem to save my images in database from android
drawable folder if you know the solution of this problem please tell
me with source code thanks

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


[android-developers] Set state list drawable as a background is getting resized

2012-02-20 Thread acidcromaticle
Hello, I am having a TextView and in xml I am setting its background
to a state list drawable. After I inflate the view everything is
working well but if I want to change it's background drawable to other
state list drawable after the invalidate, the TextView shrinks and the
background drawable is getting smaller too.

I tried to set the background color instead just for testing and it
works.. but I really need to change the drawable not just the color of
the background.
The two state list drawables are 4(2 for each one) nine patch images
and are of the same size, just the color is changed.

Does anybody know what could be the problem?

Thank you!

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


[android-developers] get meminfo using NDK

2012-02-20 Thread paula castellanos
Hi everybody!!

I'm new in development using NDK, but I need get all information about
virtual and physical memory of my smartphone. I find that's possible
use the command "/proc/meminfo", but I don't know how use itCan
you help 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


[android-developers] Re: Handling a Checkbox Click Event

2012-02-20 Thread davemeetsworld
Ok, Thank you.

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


[android-developers] Re: Troubles with Utils.matToBitmap

2012-02-20 Thread adiel ashrov
nevermind,got it./


Thanks

On Feb 19, 6:18 pm, adiel ashrov  wrote:
> Hey everyone,
>
> I have s small app which takes a picture and i want to threshold it.
> for some reason the function Utils.matToBitmap crashes when I use it
> after the threshold, any thoughts on how to solve this?
>
> the Code:
> protected void onActivityResult(int requestCode, int resultCode,
> Intent data) {
>             if (requestCode == CAMERA_PIC_REQUEST) {
>                         try {
>                                 Bitmap bitmap = (Bitmap) 
> data.getExtras().get("data");
>                                 this._Gray = Utils.bitmapToMat(bitmap);
>                                 Mat tMat = thresholdPicture();
>                                 Bitmap tOutBitmap =
> Bitmap.createBitmap(tMat.cols(),tMat.rows(),Bitmap.Config.ARGB_);
>                                 if (Utils.matToBitmap(tMat, 
> tOutBitmap))//Crash here
>                                 {
>                                         
> this.setContentView(R.layout.picture_display);
>                                         Drawable drawable =new 
> BitmapDrawable(getResources(),tOutBitmap);
>                                         SurfaceView tSurfaceView = 
> (SurfaceView)
> findViewById(R.id.surfaceView1);
>                                 
> tSurfaceView.setBackgroundDrawable(drawable);//TODO: not
> working if we picture vertically
>                                 }
>                                 else{
>                                         Log.i("OpenCV", "Failed convert mat 
> to bitmap");
>                                 }
>                         }
>                         catch (Exception e) {
>                                 Log.i("OpenCV", "Failed to Use OpenCV" + 
> e.getMessage());
>                         }
>             }
>         }
>
>         private Mat thresholdPicture(){
>                 Mat tMatThreshed = new Mat();
>                 Imgproc.cvtColor(this._Gray, this._Gray, 
> Imgproc.COLOR_RGB2GRAY);
>                 Imgproc.threshold(this._Gray, tMatThreshed, 100,
> 100,Imgproc.THRESH_BINARY);
>                 return tMatThreshed;
>
>         }
>
> }
>
> Thank you

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


[android-developers] Re: is Card Emulation supported in Android with NFC?

2012-02-20 Thread Michael Roland
Hallo Anatoly,

> I Suppose SE is Secure Element am i Right?

Right.

> Is there any way to communicate with reader, without modyfing
> firmware?

No. Android has no support for card emulation from software. From an
external ISO 14443 reader you can only access the secure element. With
a reader that supports peer-to-peer (ISO 18092) you could, however,
communicate with the phone using NPP/SNEP (Android Beam).

> Or may be i can get access to secure element from native code (C) ?

Access to the secure element is restricted in multiple ways: For one,
Android applications need to have permission to access the secure
element API (controlled through Android's permission system in 2.3.7
and controlled by a file in 4.0.3). A second barrier is the secure
element itself. You would need to install your applet to the SE. But
in order to do that, you would need to have the keys for
GlobalPlatform card management.

br
Michael

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