[android-beginners] How do I import to eclipse projects that come with the android source?

2010-04-08 Thread Chi Zhang
Hello
I downloaded the sourcecode of the android platform, and when I try to build
the sourcecode of projects, say, packages/apps/AlarmClock
I selected creating an Android project using existing code in Eclipse, but I
encountered the following problem:

Invalid project description.
  /home/eshock/android/workspace/AlarmClock overlaps the location of another
project: 'AlarmClock'

Any suggestions?

-- 
Sincerely Yours,
Chi Zhang

elecpa...@gmail.com
College of Computer Science and Technology, Zhejiang University

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using remove me as the subject.


[android-beginners] How to avoid jarring effect when launching an activity

2010-04-08 Thread vinu
Hi group,
When my app icon is clicked , a black screen is displayed  for a split
second before my main activity comes to foreground .After goggling i
found out to use Theme to avoid back screen or jarring effect .It
worked out fine.Here i can display the background of my home screen
for that split second
mainfest.xml
 activity android:name=.MainActivity
  android:label=@string/app_name
  android:screenOrientation=portrait
  android:theme=@style/Theme.LoadingPage
intent-filter
action android:name=android.intent.action.MAIN /
category
android:name=android.intent.category.LAUNCHER /
/intent-filter
 /activity

under theme.xml
resources
style name=Theme.LoadingPage parent=android:Theme
item name=android:windowBackground@drawable/
background_loading/item
item name=android:windowNoTitletrue/item
/style

style name=Theme.A1LoadingPage parent=android:Theme
item name=android:windowBackground@drawable/a1_loading/
item
item name=android:windowNoTitletrue/item
/style
/resource

under res/drawable/background_loading.xml

bitmap xmlns:android=http://schemas.android.com/apk/res/android;
android:src=@drawable/home_screen
android:tileMode=repeat /

But my problem is i wanted to do the same for other activity apart
from main activity ,but i couldn't get the desired result.For
explanation , considered i started an Activity A1 on a button click
from Main Activity screen.It takes few seconds for the activity A1 to
appear.I need to display the background screen of Activity A1 as soon
as the button is clicked, this is just to fill the intermittent time
gap before A1 actually  gets displayed ,thus avoiding a standstill
kind of appearance to the user . And i tried in vain .I wonder why the
same  that has worked on launch main activity   is not working with
other activities

 activity android:name=xx.com.A1
  android:label=@string/app_name
  android:screenOrientation=portrait
  android:theme=@style/Theme.A1LoadingPage

Note: I have used Threads and Handlers in activity  A1  to reduce the
load on onCreate.
Please help me to find a correct solution.

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using remove me as the subject.


[android-beginners] Re: How to display 'Column title' on the top of List ?

2010-04-08 Thread Javacoffee
Hi a2ronus,

I mean both cases.

Would it be possible?

Ciao,

On Apr 7, 10:33 pm, a2ronus aaron.jan...@gmail.com wrote:
 Do you mean a fixed header that always stays on top? Or a header that
 moves with the content?

 On 5 apr, 13:09, Javacoffee dear.jinhy...@gmail.com wrote:



  Hi guys,

  I'm  a new follower in android and facing the problem of displaying
  List data in android programming.

  Yes, I agree with that it is quite a easy to represent List data but
  don't know how to show thecolumntitlesuch as 'Name or Address' on
  the top of List. (Just like Table columns)

  Any idea regarding to the agony would be greatly appreciated.

  Kind Regards,
  Jin

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using remove me as the subject.


[android-beginners] Re: How do I import to eclipse projects that come with the android source?

2010-04-08 Thread Gibson
Is it caused by you have already create a project called AlarmClock
under your eclipse workspace.
From my experience that when import another Android project you cannot
put the project into eclipse workspace. It will cause this project.
You can try like this.
Put your project under folder
home/eshock/android/AlarmClock/
and try it again.
Hope this can help you.

On Apr 8, 8:13 am, Chi Zhang elecpa...@gmail.com wrote:
 Hello
 I downloaded the sourcecode of the android platform, and when I try to build
 the sourcecode of projects, say, packages/apps/AlarmClock
 I selected creating an Android project using existing code in Eclipse, but I
 encountered the following problem:

 Invalid project description.
   /home/eshock/android/workspace/AlarmClock overlaps the location of another
 project: 'AlarmClock'

 Any suggestions?

 --
 Sincerely Yours,
 Chi Zhang

 elecpa...@gmail.com
 College of Computer Science and Technology, Zhejiang University

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using remove me as the subject.


[android-beginners] Re: What does `adb install' do under the hood?

2010-04-08 Thread Gibson
No stupid questions. Everyone is from fresh man.
1, adb install will install your application under folder /data/app/
with your application package name. For example, you application is
MainApplication.apk and its package name is
com.android.mainapplication.
   After install it use this command, there will be an apk under
folder /data/app/ and its name is com.android.mainapplication.apk.

2, not sure about command adb shell  pm install . I have never
use that before.

3, adb push is to push the apk file directly into folder system/app/
and data/app/ and it is mostly like install. but with name different.
For example, adb push MainApplication.apk will create a file like /
data/app/MainApplication.apk.

On Apr 8, 5:01 am, Chi Zhang elecpa...@gmail.com wrote:
 Hi everybody, this is my first post ever. I hope this is not a stupid
 question :-)
 I noticed that there are three ways to install an app in an android device:
 1. adb install some-app
 2. adb shell  pm install some-app
 3. you can manually push the apk file to /system/app or /data/app
 Are there differences among these three methods?
 I used to believe that the android package manager keeps a list of apps
 installed on the device, and thus can quickly locate an app for intents.
 But option 3 above seems to suggest that it doesn't. So what does `adb
 install' really do?

 --
 Sincerely Yours,
 Chi Zhang

 elecpa...@gmail.com
 College of Computer Science and Technology, Zhejiang University

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using remove me as the subject.


[android-beginners] Re: Can you add buttons to dialogue?

2010-04-08 Thread Gibson
You can even create a custom view and set into the dialog.

On Apr 7, 11:05 pm, TimX ttb...@gmail.com wrote:
 I am trying to add an [add] button to dialog so I can save whatever
 the info that is shown on dialog to a list, but can't find much from
 API about buttons on dialog. Should I somehow modify the dialog layout
 for this?

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using remove me as the subject.


[android-beginners] Re: Registering a reciever for the BOOT_COMPLETE and android:exported attribute

2010-04-08 Thread alexk-il
Hi,

Thank you for your reply.

As for the reason for asking this question - I'm trying to find the
most robust (future proof) way to implement the BOOT_COMPLETE
receiver. And I am really muzzled by the two common ways of
implementing the service - one it to specify exported=false, the
second is to omit the specification at all.

I guess I will  go without the second option - not to specify this
attribute and to let Android to set the implicit/default value by
itself.

Best
Alex



On Apr 7, 3:23 pm, a2ronus aaron.jan...@gmail.com wrote:
 I guess there's no use for android:exported=false when you specify
 an intent filter. So it seems logical to me that specifying an intent
 filter overrules the android:exported=false.

 Do you need to know this for something more specific than just
 understanding?

 On 6 apr, 23:50, alexk-il alexk.il.subscripti...@gmail.com wrote:



  On Apr 6, 11:24 am, a2ronus aaron.jan...@gmail.com wrote:

   Maybe those examples use intent filters?

   The default value (of android:exported) depends on whether the
   broadcast receiver contains intent filters. The absence of any filters
   means that it can be invoked only by Intent objects that specify its

  ...

  Thanks for trying to help.

  My understanding of the documentation you quote, that it is related to
  the default value of the android:exported. In other words, it
  describes the default value of the android:exported when it is not
  explicitly specified by the Manifest.

  I am not sure this explains why explicitly specified
  android:exported=false works in case of the BOOT_COMPLETE. Or did I
  miss it again?

  Best
  Alex

   exact class name. This implies that the receiver is intended only for
   application-internal use (since others would not normally know the
   class name). So in this case, the default value is false. On the
   other hand, the presence of at least one filter implies that the
   broadcast receiver is intended to receive intents broadcast by the
   system or other applications, so the default value is true.

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using remove me as the subject.


[android-beginners] Re: eclipse problem

2010-04-08 Thread Neo


On Apr 8, 5:45 am, davemac davemac...@gmail.com wrote:
 Did you install the JDK? Did you modify your PATH to include not only
 the JDK bin directory but also the Android SDK tools directory? I'm
 assuming you've installed the Android ADT into Eclipse. Our new book
 Pro Android 2 covers setup of Eclipse for Android development in
 chapter 2 and goes over all of this stuff to get you up and running.
 But you can also refer to the Android web site 
 too:http://developer.android.com/sdk/index.html

 - davewww.androidbook.com

 On Apr 6, 11:35 pm, Neo pudum...@gmail.com wrote:

  whenever i create a new project i encounter this problem
  help pls

  i use linux ubuntu 9.10
  project name hi

  Description
  Resource   Path Location        Type
  Project 'hi' is missing required source folder:
  'gen'                          hi                       Build path      
  Build Path Problem
  The project cannot be built until build path errors are
  resolved               hi                       Unknown Java Problem


the jdk and anroid are all installed properly
i am able to build java application well

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using remove me as the subject.


[android-beginners] Re: Having some trouble with ADT

2010-04-08 Thread g1
Hi Xavier,

Thanks for the help. Here's the log file (let me know if you need
older entries):

!SESSION 2010-04-06 22:05:45.174
---
eclipse.buildId=M20090917-0800
java.version=1.6.0_18
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_ZA
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os win32 -ws win32 -arch x86 -product
org.eclipse.epp.package.java.product

!ENTRY org.eclipse.osgi 4 0 2010-04-07 02:05:09.487
!MESSAGE An error occurred while automatically activating bundle
org.eclipse.equinox.p2.core (85).
!STACK 0
org.osgi.framework.BundleException: The state indicates the bundle is
resolved
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:
1296)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:
309)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:
280)
at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:
408)
at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:
111)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:
449)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:
211)
at
org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:
381)
at
org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:
33)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:
445)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:
410)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:
398)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:
105)
at java.lang.ClassLoader.loadClass(Unknown Source)
at
org.eclipse.equinox.internal.p2.touchpoint.eclipse.LazyManipulator.loadDelegate(LazyManipulator.java:
56)
at
org.eclipse.equinox.internal.p2.touchpoint.eclipse.LazyManipulator.getConfigData(LazyManipulator.java:
108)
at
org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.UninstallBundleAction.uninstallBundle(UninstallBundleAction.java:
74)
at
org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.UninstallBundleAction.execute(UninstallBundleAction.java:
29)
at
org.eclipse.equinox.internal.p2.engine.ParameterizedProvisioningAction.execute(ParameterizedProvisioningAction.java:
35)
at
org.eclipse.equinox.internal.provisional.p2.engine.Phase.mainPerform(Phase.java:
129)
at
org.eclipse.equinox.internal.provisional.p2.engine.Phase.perform(Phase.java:
72)
at
org.eclipse.equinox.internal.provisional.p2.engine.PhaseSet.perform(PhaseSet.java:
44)
at
org.eclipse.equinox.internal.provisional.p2.engine.Engine.perform(Engine.java:
54)
at
org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningUtil.performProvisioningPlan(ProvisioningUtil.java:
389)
at
org.eclipse.equinox.internal.provisional.p2.ui.operations.ProfileModificationOperation.doExecute(ProfileModificationOperation.java:
61)
at
org.eclipse.equinox.internal.provisional.p2.ui.operations.ProvisioningOperation.execute(ProvisioningOperation.java:
37)
at
org.eclipse.equinox.internal.provisional.p2.ui.ProvisioningOperationRunner
$1.run(ProvisioningOperationRunner.java:94)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

!ENTRY org.eclipse.osgi 4 0 2010-04-07 02:05:09.490
!MESSAGE An error occurred while automatically activating bundle
org.eclipse.equinox.p2.engine (89).
!STACK 0
org.osgi.framework.BundleException: The state indicates the bundle is
resolved
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.getResolutionFailureException(AbstractBundle.java:
1296)
at
org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:
309)
at
org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:
280)
at
org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:
408)
at
org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:
111)
at
org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:
449)
at
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:
211)
at
org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:
381)
at
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:
457)
at

[android-beginners] Re: XML Parser example problems

2010-04-08 Thread MartinM
OK, got SAX working nicely thanks.

All I need to do now is work out how to loop for multiple tags the
same, e.g. all the 'name's

startoffile
  namebob/name
  namejim/name
  namejon/name
  namefrank/name
/startoffile


as I'm only getting bob.


The code I'm using :

URL url;
try {
url = new URL(strURL);

//BufferedReader rd = new BufferedReader(new
InputStreamReader(url.openStream()));

SAXParserFactory spf = SAXParserFactory.newInstance();
SAXParser sp = spf.newSAXParser();
XMLReader xr = sp.getXMLReader();
ExampleHandler myExampleHandler = new ExampleHandler();
xr.setContentHandler(myExampleHandler);
xr.parse(new InputSource(url.openStream()));
ParsedExampleDataSet parsedExampleDataSet =
myExampleHandler.getParsedData();
return parsedExampleDataSet.toString();

} catch (Exception e) {
return e.getMessage();
}

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using remove me as the subject.


[android-beginners] Re: Bluetooth on/off in Android 1.5+

2010-04-08 Thread DonFrench
Try this:

 Intent enableIntent = new
Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
 startActivityForResult(enableIntent, REQUEST_ENABLE_BT);


On Apr 7, 11:46 am, NoImJosh josh.n.willi...@gmail.com wrote:
 I have been searching for weeks for a way to turn on and off the
 bluetooth for any Android version from 1.5 onward.  I know it must be
 possible, since there are widgets in the marketplace that do just
 this, however I have never found any answers to my questions.  I do
 know that I can make it work for Android 1.x using reflection.  I also
 know it should be possible to use reflection on Android 2.x, but by
 retrieving the methods for a different class since the official
 bluetooth API was added in 2.0.  The code I've got so far is:

 private static void BT_Enable(Context context, boolean enable){
                 String V = android.os.Build.VERSION.RELEASE;
                 int ver = Integer.valueOf(V.substring(0, 1));
                 String eMethod = enable;
                 if (!enable) {
                         eMethod = disable;
                 }
                 try{
                         Object manager = 
 context.getSystemService(bluetooth);
                         Class? c = manager.getClass();
                         if (ver  1){c =
 Class.forName(android.bluetooth.BluetoothAdapter);}
                         Method method = c.getMethod(eMethod);
                         method.setAccessible(true);
                         method.invoke(manager);
                 }
                 catch (Exception e){
                         Toast.makeText(context, Error:  + e, 1).show();
                 }
         }

 One of the issues that exists in 2.x is that the call
 getSystemService(bluetooth) returns null, so to obtain the
 appropriate class I've added the following:

                         if (ver  1){c =
 Class.forName(android.bluetooth.BluetoothAdapter);}

 however, since there is no system Bluetooth service, there is no
 receiver object to invoke to, causing a failure.  Any help is greatly
 appreciated.

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using remove me as the subject.


[android-beginners] Re: Bluetooth on/off in Android 1.5+

2010-04-08 Thread NoImJosh
While this does work for Android 2.x, since there is no
BluetoothAdapter class in the 1.5 API, it does not compile correctly.
Also, this pops up an alert dialog that asks if the user wants to turn
bluetooth on or off, but it does nothing without user interaction,
which is what I'm trying to accomplish.  Thank you for the response,
I'm just do not think it will do what I need it to.

On Apr 8, 12:34 pm, DonFrench dcfre...@gmail.com wrote:
 Try this:

  Intent enableIntent = new
 Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
  startActivityForResult(enableIntent, REQUEST_ENABLE_BT);

 On Apr 7, 11:46 am, NoImJosh josh.n.willi...@gmail.com wrote:



  I have been searching for weeks for a way to turn on and off the
  bluetooth for any Android version from 1.5 onward.  I know it must be
  possible, since there are widgets in the marketplace that do just
  this, however I have never found any answers to my questions.  I do
  know that I can make it work for Android 1.x using reflection.  I also
  know it should be possible to use reflection on Android 2.x, but by
  retrieving the methods for a different class since the official
  bluetooth API was added in 2.0.  The code I've got so far is:

  private static void BT_Enable(Context context, boolean enable){
                  String V = android.os.Build.VERSION.RELEASE;
                  int ver = Integer.valueOf(V.substring(0, 1));
                  String eMethod = enable;
                  if (!enable) {
                          eMethod = disable;
                  }
                  try{
                          Object manager = 
  context.getSystemService(bluetooth);
                          Class? c = manager.getClass();
                          if (ver  1){c =
  Class.forName(android.bluetooth.BluetoothAdapter);}
                          Method method = c.getMethod(eMethod);
                          method.setAccessible(true);
                          method.invoke(manager);
                  }
                  catch (Exception e){
                          Toast.makeText(context, Error:  + e, 1).show();
                  }
          }

  One of the issues that exists in 2.x is that the call
  getSystemService(bluetooth) returns null, so to obtain the
  appropriate class I've added the following:

                          if (ver  1){c =
  Class.forName(android.bluetooth.BluetoothAdapter);}

  however, since there is no system Bluetooth service, there is no
  receiver object to invoke to, causing a failure.  Any help is greatly
  appreciated.

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using remove me as the subject.


Re: [android-beginners] What does `adb install' do under the hood?

2010-04-08 Thread Xavier Ducrohet
adb install does the equivalent of:

  adb push yourapp.apk /some/temp/location/yourapp.apk
  adb shell pm install /some/temp/location/yourapp.apk
  adb shell rm /some/temp/location/yourapp.apk

regarding (3), I think the package Manager monitor changes in those
folder and is able to automatically install apps pushed there. But
this pre-dates pm install I think and is not guaranteed to keep
working, and should not be used.

Xav

On Wed, Apr 7, 2010 at 8:01 PM, Chi Zhang elecpa...@gmail.com wrote:
 Hi everybody, this is my first post ever. I hope this is not a stupid
 question :-)
 I noticed that there are three ways to install an app in an android device:
 1. adb install some-app
 2. adb shell  pm install some-app
 3. you can manually push the apk file to /system/app or /data/app
 Are there differences among these three methods?
 I used to believe that the android package manager keeps a list of apps
 installed on the device, and thus can quickly locate an app for intents.
 But option 3 above seems to suggest that it doesn't. So what does `adb
 install' really do?

 --
 Sincerely Yours,
 Chi Zhang

 elecpa...@gmail.com
 College of Computer Science and Technology, Zhejiang University

 --
 You received this message because you are subscribed to the Google
 Groups Android Beginners group.

 NEW! Try asking and tagging your question on Stack Overflow at
 http://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-beginners?hl=en




-- 
Xavier Ducrohet
Android SDK Tech Lead
Google Inc.

Please do not send me questions directly. Thanks!

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using remove me as the subject.


[android-beginners] Re: Bluetooth on/off in Android 1.5+

2010-04-08 Thread DonFrench
Right, I am only familiar with Bluetooth in 2.x.  Do you know of any
apps in 2.x that can turn on the BT radio without displaying this
dialog?  I have a feeling that it might not be possible.


On Apr 8, 9:44 am, NoImJosh josh.n.willi...@gmail.com wrote:
 While this does work for Android 2.x, since there is no
 BluetoothAdapter class in the 1.5 API, it does not compile correctly.
 Also, this pops up an alert dialog that asks if the user wants to turn
 bluetooth on or off, but it does nothing without user interaction,
 which is what I'm trying to accomplish.  Thank you for the response,
 I'm just do not think it will do what I need it to.

 On Apr 8, 12:34 pm, DonFrench dcfre...@gmail.com wrote:

  Try this:

   Intent enableIntent = new
  Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
   startActivityForResult(enableIntent, REQUEST_ENABLE_BT);

  On Apr 7, 11:46 am, NoImJosh josh.n.willi...@gmail.com wrote:

   I have been searching for weeks for a way to turn on and off the
   bluetooth for any Android version from 1.5 onward.  I know it must be
   possible, since there are widgets in the marketplace that do just
   this, however I have never found any answers to my questions.  I do
   know that I can make it work for Android 1.x using reflection.  I also
   know it should be possible to use reflection on Android 2.x, but by
   retrieving the methods for a different class since the official
   bluetooth API was added in 2.0.  The code I've got so far is:

   private static void BT_Enable(Context context, boolean enable){
                   String V = android.os.Build.VERSION.RELEASE;
                   int ver = Integer.valueOf(V.substring(0, 1));
                   String eMethod = enable;
                   if (!enable) {
                           eMethod = disable;
                   }
                   try{
                           Object manager = 
   context.getSystemService(bluetooth);
                           Class? c = manager.getClass();
                           if (ver  1){c =
   Class.forName(android.bluetooth.BluetoothAdapter);}
                           Method method = c.getMethod(eMethod);
                           method.setAccessible(true);
                           method.invoke(manager);
                   }
                   catch (Exception e){
                           Toast.makeText(context, Error:  + e, 1).show();
                   }
           }

   One of the issues that exists in 2.x is that the call
   getSystemService(bluetooth) returns null, so to obtain the
   appropriate class I've added the following:

                           if (ver  1){c =
   Class.forName(android.bluetooth.BluetoothAdapter);}

   however, since there is no system Bluetooth service, there is no
   receiver object to invoke to, causing a failure.  Any help is greatly
   appreciated.

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using remove me as the subject.


[android-beginners] Android applications monitoring and profiling

2010-04-08 Thread prajakta choudhari
Dear All:
I need to write a tool that will monitor all the applications on the phone
and record its usage times.

I am thinking of using Activity Monitor.

Please send me some suggestions.

Thank you,
Prajakta

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Any on-phone help?

2010-04-08 Thread Alan Gauld

I've been through the fairly pathetic user manual provided by Samsung but
there are a few things still puzzling me about my phone and Android. Is 
there

an online (ie on phone) help facility or tutorial that I can use?

Failing that, any recommended user oriented Android help web pages
or as a last resort a dead-tree book? (I prefer not to buy a book since
it will likely never be used after the first read!)

There are dozens of sites for iPhone users but most Android sites seem
to be either developer focused or just app download/support sites.

eg.
I'm looking for info on how to monitor/manage resources (battery/memory 
etc)

and switch between apps other than just using the back button - and
is there a corresponding forward button? In other words can I toggle
between two runnng apps? )

Alan G. 



--
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


Re: [android-beginners] Any on-phone help?

2010-04-08 Thread Justin Anderson
One particular app I am fond of for switching between running apps is
AppSwipe! on the market...  The guy who wrote the app is a beginner (me!)
but still I think it does the job well.

--
There are only 10 types of people in the world...
Those who know binary and those who don't.
--


On Thu, Apr 8, 2010 at 4:25 PM, Mark Murphy mmur...@commonsware.com wrote:

 ~ TreKing wrote:
  On Thu, Apr 8, 2010 at 4:32 PM, Alan Gauld alan.ga...@btinternet.com
  mailto:alan.ga...@btinternet.com wrote:
 
  Is there an online (ie on phone) help facility or tutorial that I
  can use?
 
 
  I don't know of any, though that would be handy. I hope someone does
  know of one. It does blow my mind that there is no official user
  manual to the Android system.
 
 
  Failing that, any recommended user oriented Android help web
  pages or as a last resort a dead-tree book?
 
 
  Again, I got nothing ...

 There are several books on the market for Android device users. With
 luck, one is available in EPUB.

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

 _The Busy Coder's Guide to *Advanced* Android Development_
 Version 1.4 Available!

 --
 You received this message because you are subscribed to the Google
 Groups Android Beginners group.

 NEW! Try asking and tagging your question on Stack Overflow at
 http://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-beginners?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] Re: Any on-phone help?

2010-04-08 Thread Alan Gauld

Mark Murphy mmur...@commonsware.com wrote


There are several books on the market for Android device users. With
luck, one is available in EPUB.


Maybe I'm searching with the wrong keywords but I could 
only find one user focused book on Amazon.co.uk and it 
was very basic.


Thanks to TreKing BTW, I didn't know about the hold on Home 
for the app list, that's solved one problem at least! :-)


Alan G.

--
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using remove me as the subject.


Re: [android-beginners] Re: Any on-phone help?

2010-04-08 Thread Mark Murphy
Alan Gauld wrote:
 Mark Murphy mmur...@commonsware.com wrote
 
 There are several books on the market for Android device users. With
 luck, one is available in EPUB.
 
 Maybe I'm searching with the wrong keywords but I could only find one
 user focused book on Amazon.co.uk and it was very basic.

I count five on the US market:

http://www.amazon.com/Web-Geeks-Guide-Android-Enabled-Phone/dp/0789739720/ref=sr_1_13?ie=UTF8s=booksqid=1270771546sr=1-13
http://www.amazon.com/Google-Go-Using-Android-Powered-Mobile/dp/0789739534/ref=sr_1_30?ie=UTF8s=booksqid=1270771566sr=1-30
http://www.amazon.com/T-Mobile-G1-Dummies-Chris-Ziegler/dp/0470393408/ref=sr_1_34?ie=UTF8s=booksqid=1270771566sr=1-34
http://www.amazon.com/Droid-Pocket-Guide-Jason-OGrady/dp/0321711939/ref=sr_1_1?ie=UTF8s=booksqid=1270771641sr=1-1
http://www.amazon.com/Motorola-Droid-Tricks-Shortcuts-ebook/dp/B002ZCYAVQ/ref=sr_1_2?ie=UTF8m=AG56TWVU5XWC2s=booksqid=1270771641sr=1-2

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

Android Online Training: 10-14 May 2010: http://onlc.com

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using remove me as the subject.


Re: [android-beginners] Android applications monitoring and profiling

2010-04-08 Thread prajakta choudhari
The tool will monitor the number of times the application was used and the
duration of time the application was used by the user. Is activity monitor
used only as a part of test case or can i use activity monitor  in my
application. I am not getting a good example of use of Activity Monitor
apart from its use in InstrumentTestcase  class.

I don't want to use it in an InstrumentTestCase class. I want it in my
regular applications.  Could anyone please share with me a nice example of
actvity monitor.

Any Help will be highly appreciated.
Thank you
Prajakta

On Thu, Apr 8, 2010 at 5:01 PM, ~ TreKing treking...@gmail.com wrote:

 On Thu, Apr 8, 2010 at 3:07 PM, prajakta choudhari 
 prajaktachoudh...@gmail.com wrote:

 I need to write a tool that will monitor all the applications on the phone
 and record its usage times.


 What usage? CPU? Battery? Memory? All of the above?

 I am thinking of using Activity Monitor.


  OK

 Please send me some suggestions.


 I suggest you eat healthy and exercise regularly. Seriously ... suggestions
 for WHAT?


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

 --
 You received this message because you are subscribed to the Google
 Groups Android Beginners group.

 NEW! Try asking and tagging your question on Stack Overflow at
 http://stackoverflow.com/questions/tagged/android

 To unsubscribe from this group, send email to
 android-beginners+unsubscr...@googlegroups.comandroid-beginners%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-beginners?hl=en


-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using remove me as the subject.


[android-beginners] Need suggestions about testing Android applications using JPF

2010-04-08 Thread Amruta
Hello,

I would be grateful if I get any suggestions about the feasibility of
a project that I am trying.

I am trying to test a sample android application using another tool,
namely, Java Path Finder(JPF), which is a open source model checker
for verifying programs and detecting errors in the program. (http://
babelfish.arc.nasa.gov/trac/jpf). What JPF does is that it explores
all the interesting paths of execution of a program, and checks
whether taking any of those paths would produce an error. To be able
to test a program in JPF, the program must be stand-alone program
having a main method.

Since I cannot run an android application as a stand-alone program, I
need to have another program that calls the application. I have doubts
about how this can be done.

I read that one can invoke an android application by calling
startActivity() on the right intent, but this is possible only for
applications that interact with other applications. Is there any way
to call any application (even those that do not interact with other
applications) from a stand-alone java program? Or in other words, is
it possible to start running an application other than on an emulator?

If the only way to run an android application in a tool like JPF would
be, by first running emulator in JPF, this is totally different from
what I am trying to achieve. Running an emulator in JPF would mean,
verifying whether the emulator code is producing any errors. But what
I am trying to achieve is much simpler : testing a single android
application to detect any errors. I hope there is some way out here!

Thank you for your inputs.

Amruta

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en


[android-beginners] disabling GMail access ... changing GMail password doesn't

2010-04-08 Thread Richard Schilling
I have GMail synched up with my Android.  When I change my password in
GMail, how come the Android continues to get access?

How do I tell GMail to stop giving my Android access to my GMail
account without using the Android phone ... that is, log into
mail.google.com on the website and tell GMail to stop giving access to
Android without changing settings on the Android phone?

It would make sense to do so in case someone steals my Android
phone .

Thanks.

Richard

-- 
You received this message because you are subscribed to the Google
Groups Android Beginners group.

NEW! Try asking and tagging your question on Stack Overflow at
http://stackoverflow.com/questions/tagged/android

To unsubscribe from this group, send email to
android-beginners+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en

To unsubscribe, reply using remove me as the subject.