[android-developers] Re: How could i check the android device is rooted or not?

2012-08-12 Thread Chris Stratton
On Aug 7, 4:02 am, Ali Ahmadi aliahmadi1...@gmail.com wrote:

 all i want to know is How could i check the android device is rooted or not?
 please give me a code to check that in my application and warn user if the
 device is not rooted!

It is ultimately not possible to do so with certainty.

You can obviously check for common characteristics such as android
properties, extra setuid executables or processes running as root, but
latent capability may not be visible in that way, and you are
implicitly assuming that the operating system is truthfully reporting
the facts you check, which is not necessarily the case.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-28 Thread Chris Stratton
On Jul 29, 12:18 am, Alex Pruss arpr...@gmail.com wrote:

 These kinds of things can provide a lot of value to users, and disabling
 log access forces users to have to root their devices to do these things.

That's not the real problem though.  Reading the logs was never the
right way to customize the behavior of the device to the current
running activity - it was at most a crude workaround.

The real problem is that android is designed with the idea that apps
should not alter the system's behavior on each other, and has
extremely limited mechanisms for recognizing special apps that would
be permitted to do so.

While a real solution for that is long overdue, it's also a much more
complicated design conversation than the topic at hand.

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

2012-07-21 Thread Chris Stratton
On Jul 21, 12:37 pm, matt matthias.gru...@gmail.com wrote:
 specifically i am writing a java program, that executes

 adb pull /dev/graphics/fb0

Don't do that.  While it works on some devices, it won't work on
others.  There's an executable program called screencap or something
like that, which is what adbd uses to provide screenshots to ddms.

You really should look at the ddms sources and figure out how they are
doing it; otherwise you can try running that program from the shell
and capturing the data it dumps to stdout (though the path back might
not be binary clean?)

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

2012-07-21 Thread Chris Stratton
On Jul 20, 11:07 am, Justin Anderson magouyaw...@gmail.com wrote:
  I know, i can disable it, so it will work, but i'd like to let the app can
  run many times again. So i disable the exit(), but when call the second
  times, it generates errors.

  Could you help?

 Debug your code, find the cause of the errors, and fix them...

This is most likely legacy code written with the idea that a process
equals an instance, something that isn't true on android.

Fixing it could require fairly substantial rework.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-12 Thread Chris Stratton
On Jul 12, 7:43 pm, Mark Murphy mmur...@commonsware.com wrote:

 I was able to get it working in a Galaxy Nexus running ICS, but only
 after several tries.

I think the actual issue is that it has a very long latency - during
which there is no indication that it is working.  And then gmail pops
up.  It really needs some visual feedback when the process starts.



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: READ_LOGS permission is not granted to 3rd party applications in Jelly Bean (api 16)

2012-07-12 Thread Chris Stratton
On Jul 12, 8:55 pm, Dianne Hackborn hack...@android.com wrote:

 So, it is now a development permission (a new concept introduced in JB),
 which will never be shown to users, but developers can enable through their
 development tools.

What is duration of effect of a pm grant or pm revoke command?  ie,
does it survive reboot?  What about re-install of the app in question?

Also,

pm grant, revoke: these commands either grant or revoke permissions
to applications.  Only optional permissions the application has
declared can be granted or revoked.

sort of implies that there is a way to declare a permission optional
in the manifest?  Or is that more on the drawing board than yet
implemented?

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

2012-07-09 Thread Chris Stratton
On Jul 9, 1:42 pm, Robert Greenwalt rgreenw...@google.com wrote:

 Does your application have internet permission?

If that were the problem, creating AF_INET sockets would fail, even
before trying to use them.

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


[android-developers] Re: slow. just a big complaint.

2012-07-05 Thread Chris Stratton
On Jul 5, 5:12 am, seveneves freeander...@gmail.com wrote:
 this post is just a big complaint and a little bit doubt about why they
 can't make android better.

 i'm using mac book pro and eclipse.
 by the way,
 android software emulator is really slow.

Yes, because it is emulating an arm processor.  Use one of the x86
emulation solutions that can benefit from virtualization (vs
emulation) instead.

Using a device is highly recommended though; the major reason not to
use one is when you need to test on an android version you don't have
on a device.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: HELP! Google removed my app with millions of users!

2012-07-05 Thread Chris Stratton
On Jul 5, 11:54 pm, John Coryat cor...@gmail.com wrote:
 I just searched
 Alarm Clock Plus click fraud
 and found this posting:
 http://r.bernsteinbear.com/r/Android/comments/v1htq/alarm_clock_plus_...
 I would say this could be the part or all of your problem.

Sounds likely... and familiar:  I had a device that liked to rotate
orientation when it vibrated itself on the stock alarm app, with the
result that the sleepy-finger-targeted snooze button became the
dismiss one.

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

2012-06-30 Thread Chris Stratton
On Jun 29, 8:35 am, Siva kumar sivakumar...@gmail.com wrote:

 I got s3c6410 Arm development Board. It has been ported with Android 2.3.
 This board has SIM300 GSM modem.When i tried to connect to internet through
 GPRS i found APN was missing.

This sounds more appropriate for android-porting, as its an issue with
the platform on non-standard hardware.

It does not directly concern SDK application development, which is the
topic of this group.

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

2012-06-29 Thread Chris Stratton
On Jun 29, 12:08 pm, Mihai Popescu mihai.m.pope...@gmail.com wrote:

 The client is not a seller, it is a large company and its activity involves
 mostly transporting goods throughout the country. The purpose of the
 software is to monitor truck driver location, thus enforcing some policies
 to save money. Can't have a truck driver get paid for telling lies about
 being stuck 2 hours in traffic, while watching TV at home, and getting paid
 for that, right?

Use a device bolted to the roof of the truck cab then; those have been
on the market for a long time.   Saves the privacy issue since you are
tracking the company asset (the vehicle), saves the reliability issue
since it gets vehicle power and isn't dependent on the employee
remembering to charge it.

 2. The custom OS solution
 I know this is the best option, but I'm not sure the customer will be
 interested in spending that much money.

Doing it via a customized android build would not be all that
complicated.  But it would also not be on topic for this group.

 3. More questions regarding Android and having the app run in background
 Android is based on Linux, so doesn't it have some low-level user
 management? You know, somewhat like a regular Linux distribution.
 I am thinking maybe my app/service can run as root, and require root
 permissions to be shut down (maybe password protected?).

Yes, but only in a customized android installation.  This group is
about creating apps, not about customizing android itself.

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

2012-06-29 Thread Chris Stratton
On Jun 29, 12:24 pm, M xuetao@gmail.com wrote:

 So, is there any way to montior all the communication channels between
 Android apps inside the devices?

No, because people can play dirty tricks like modulating and measuring
the system load to transmit information slowly.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Permissions for System Apps (not in /data/system/packages.xml?)

2012-06-24 Thread Chris Stratton
On Jun 24, 10:34 am, Jason Meyer jasonmeyer...@yahoo.de wrote:
 However, there are apps which do not have a shared user ID, but a user
 ID of their own - and still come without a perms block. One example
 is the /system/app/FileManager.apk package, which is preinstalled on
 my testing device.

That does not sound like a standard Android component - is it a vendor
app or are you using a custom ROM?

Can you post the full packages.xml block relating to 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: Permissions for System Apps (not in /data/system/packages.xml?)

2012-06-24 Thread Chris Stratton
On Jun 24, 8:26 pm, Dianne Hackborn hack...@android.com wrote:
 Why do you care if there is a perms tag? What is stored in packages.xml
 is an implementation detail;

Yes, but wanting to understand how things work is an endemic amongst
engineers (though this probably is the wrong group to discuss it)

 How much of this is cached in
 packages.xml or elsewhere across boots, or evaluated at each boot, is an
 implementation detail.

But an interesting one.  I've finally managed to find the code that
skips writing out the permissions for system apps.  So apparently the
effective permission database is actually held in memory and created
on each android runtime start by processing the apk's.  What remains
interesting is why permissions for any apps get written 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: Permissions for System Apps (not in /data/system/packages.xml?)

2012-06-24 Thread Chris Stratton
On Jun 24, 10:12 pm, Kristopher Micinski krismicin...@gmail.com
wrote:
  But an interesting one.  I've finally managed to find the code that
  skips writing out the permissions for system apps.

 Would you mind pointing out which portion of the codebase this is?

The following code within  void writePackageLPr() of
platform_frameworks_base / services / java / com / android / server /
pm / Settings.java  seems responsible for system packages not getting
their permissions dumped to the packages.xml file (unless they use a
shared userid, in which case a different function does dump those out)

   if ((pkg.pkgFlags  ApplicationInfo.FLAG_SYSTEM) == 0) {
serializer.startTag(null, perms);
if (pkg.sharedUser == null) {
// If this is a shared user, the permissions will
// be written there. We still need to write an
// empty permissions list so permissionsFixed will
// be set.
for (final String name : pkg.grantedPermissions) {
serializer.startTag(null, item);
serializer.attribute(null, name, name);
serializer.endTag(null, item);
}
}
serializer.endTag(null, perms);
}

(This code used to be located elsewhere, the pm/ directory seems to be
a reorganization)

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

2012-06-20 Thread Chris Stratton
On Jun 20, 10:32 am, Saurav to.saurav.mukher...@gmail.com wrote:
 Have you tried starting the media player in an activity, and overriding the
 on Back Button pressed function? Handling all the functions in the Activity
 Life Cycle?

 I am sure there is a way to keep it running programming it in this manner!

Certainly there is if you are free to modify the code of the activity
and/or service it uses.

The challenge of the question seems to be to get a default application
already on the device (which, incidentally, is often customized by
vendors) to do this.

An alternative might be to build a mini-player service and activity
into the app based on parts of the AOSP version of the default music
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] Re: Need Help Problem about socket communication between android smartphone and PC through WIFI

2012-06-18 Thread Chris Stratton
This suggests that either you are using an emulator-only alias
address, or are trying to contact a pc on a private network behind
firewall/nat from the device's mobile network rather than having the
device active on wifi at the time of the attempt..  Try something with
prebuilt software such as a web server on the pc and the device's
default browser.

On Jun 15, 7:56 am, neo shen.song...@googlemail.com wrote:
 Hello everyone,

 I have developed an application about socket communication between
 smartphone (as Client) and pc(as Server). und tested this application on
 Android Emulator and PC.It runs successfullly.But When I try to test the
 same application on the smartphone.It dosen't work.The error is 
 java.net.SocketException:No route to host.Could you tell me,why this error
 exist and how should I look through the reason of the error and amend it?

 Thanks a lot.

 neo

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Permissions for System Apps (not in /data/system/packages.xml?)

2012-06-18 Thread Chris Stratton
On Jun 17, 1:34 pm, Jason Meyer jasonmeyer...@yahoo.de wrote:
 after doing a bit of research I've gotten very curious:
 Where are the permissions stored which were granted to apps installed
 in /system/app?

 I checked out my phone's packages.xml file (located in /data/system/
 packages.xml). User apps stored in /data/app/ have perms, but none
 of the APK files stored in /system/app has a perms block.

I haven't checked exhaustively, but it would appear that they are
using the sharedUserID mechanism (even if only one app package is
doing the sharing).

The pemissions for shared user ID's are listed in their own sections,
probably found towards the end of packages.xml

Non-system apps which use a sharedUserID seem to also get their
permissions relocated to the shared UserID section of packages.xml
with none listed under the package itself - which is logical, since
the permissions then go with the userid rather than the individual app
package.

Permissions defined by system apps (for use by other apps) seem to be
in individual files under /etc/permissions

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Permissions for System Apps (not in /data/system/packages.xml?)

2012-06-18 Thread Chris Stratton
On Jun 18, 12:35 pm, Jason Meyer jasonmeyer...@yahoo.de wrote:
  Well, sure, if they request it, just like any other SDK app.

 I am not quite sure what you mean by request it.

The uses-permission is in their AndroidManifest.xml just as it would
be for a non-system app.
See for example:
https://github.com/android/platform_packages_apps_browser/blob/master/AndroidManifest.xml

 If by request you mean the requesting done on installation: nope, this
 does not apply, as apps in /system/app/ are usually preinstalled.
 Hence, no market app requesting permissions to be granted by the user.

They may be pre-installed, but they are still processed by something
at build and/or runtime.

  I have no idea what the perms block is. That sounds like a firmware
  detail, which is out of scope for this list.

 Nope, it's not a firmware detail.

From Mark's perspective it is an implementation detail of the android
system (what would be the 'firmware' on a simpler device, though
that's term is by custom used for simpler components such as a radio
driver on something with a full operating system like android) and
thus off topic for the androd-developers group, which, though not
obvious from the name, is defined to be for SDK-level development
only.

 Or do you mean by asking the Manifest file? It isn't checked on every
 app's start up, to my knowledge. That's what the packages.xml file is
 for.

The PackageManager creates the packages.xml file by processing the
information found in the app manifests.

  I haven't checked exhaustively, but it would appear that they are
  using the sharedUserID mechanism (even if only one app package is
  doing the sharing).

 However, every system app sharing the same user ID and thus getting
 extensive permissions seems a bit... risky.

They don't.  There are a number of distinct sharedUserIDs involved,
some having only one app package.

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

2012-06-17 Thread Chris Stratton
On Jun 16, 11:43 am, Mark Murphy mmur...@commonsware.com wrote:
 On Sat, Jun 16, 2012 at 11:33 AM, Terry terb...@gmail.com wrote:
  HOW do you get the preferred directory in internal storage?

 There is no preferred directory, insofar as the preferred
 directory concept implies that the user has access to the files, and
 they don't have access to internal storage except via your app (or
 except via rooting their phone).

As I've pointed out to you recently on another occasion, this is not
quite true.  The ability to access files in the private storage area
from another app is controlled by the access mode settings on those
files, which is something the owning application can choose.

It is true that it's a pain to find readable files in another app's
internal storage directory, since the parent /data directory is not
readable by apps, meaning that browsing needs to skip directly to a
directory which the app has made readable, or that the file's full
path needs to be known.

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

2012-06-17 Thread Chris Stratton
On Jun 17, 4:26 am, Terry terb...@gmail.com wrote:
 I checked on a new HTC One V.

 There the Environment method getExternalStoragePublicDirectory()
 returns /mnt/sdcard, which cannot be used for anything. Trying to
 write there fails.
 The external memory is also reported as unmounted.

 There IS about 1 GB memory however - at /mnt/emmc, (which is
 writeable) but that directory is NOT returned by any of the
 Environment methods. This seems to be the required external memory
 that you are referring to, but HOW does an app get to know that?

What happens if you try to download something (perhaps a PDF file)
with the built in browser?

Are you given the traditional error that this is not possible without
an sdcard?   Or does it go somewhere - if so, where?

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

2012-06-17 Thread Chris Stratton
On Jun 17, 10:23 am, Terry terb...@gmail.com wrote:
 You asked What happens if you try to download something (perhaps a
 PDF file)
 with the built in browser? 

 Good question.

 WIth an SDcard inserted, I tried to download a free ebook. That went
 well.
 Then i removed the SDcard, and tried again.
 This time I was informed (by the built in web browser) that an SDcard
 was required to be able to download that file.
 I.e. It seems that this browser had the same problem with this (HTC)
 device that I have.

Did the device ship with an sdcard included in the box (assuming you
bought it via an official source) ?

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


[android-developers] Re: Get Port for Pid

2012-06-12 Thread Chris Stratton
On Jun 7, 3:30 pm, Pinas silviorie...@gmail.com wrote:
 Is there maybe an arm port of lsof or any other possibility to get the
 ports belonging to an app ?

It wouldn't be terribly hard to port the idea of lsof, but it probably
would not be as useful on android as it is on a typical desktop linux
with a single human user.  That is because each android app runs as
its own userid, and the userid's have very limited visibility into
each other's files.  Another app (or even the adb shell) does not seem
to have read visibility into the /proc/pid##/fd directory for a
process owned by a different userid.

However, there does seem to be visibility into the /proc/pid##/net
directory, so for the specific purpose of network sockets you probably
can do this.

This might be of help in the interpretation:

http://lkml.indiana.edu/hypermail/linux/kernel/0409.1/2166.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


[android-developers] Re: usage of project folder inside android data/data

2012-06-12 Thread Chris Stratton
On Jun 10, 10:43 am, Mjava mri...@gmail.com wrote:
 I am thinking about the usage of project app folder inside data/data/
 com.myapp.main in android file system.

 For examples like CACHE folder, database folder, lib folder etc...
 inside data/data/com.ayppp.main.

 Do people like samsung/htc change or edit those folders and files
 inside according to their requirement or is it promised that it wont
 change and will remain as its in all android versions and devices ?

I would think this should be fairly straightforward:

- A folder whose location you obtain at runtime from one of the formal
java API's should continue to have a functional equivalent, unless
there is a published change in a future API documentation deprecating
the method you used to obtain it.

- but if you assume what the APIs are going to return, or assume
something beyond the scope of the APIs, you are taking a risk

- a folder you create within a folder returned by one of the APIs
should probably continue to work, though some of its possible
properties (mode bits, etc) could conceivably change.

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

2012-06-11 Thread Chris Stratton
On Jun 11, 10:40 am, Kristopher Micinski krismicin...@gmail.com
wrote:
 On Mon, Jun 11, 2012 at 7:39 AM, Live Happy livehap...@gmail.com wrote:
  it is there a tools  or way to know what is the unused permission in the
  application

 http://www.android-permissions.orgdoes exactly this.

Perhaps in some cases.  But not every means of using something is
detectable by static analysis.

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

2012-06-11 Thread Chris Stratton
On Jun 11, 2:30 pm, TreKing treking...@gmail.com wrote:
 On Mon, Jun 11, 2012 at 2:11 AM, Reddy devireddy@gmail.com wrote:
  I have a requirement that i need to download a jar file dynamically at
  runtime and use a function present in the jar.

 I would expect that this would not be possible, for what should be obvious
 security concerns.

It would be extremely difficult to prevent an application from
executing externally-obtained native code, and as a result there's not
really any reason to go to great lengths to make it impossible to do
so with dalvik code. How tricky it is to do this with dalvik code is a
valid question, but it is probably possible.

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

2012-06-11 Thread Chris Stratton
On Jun 12, 1:00 am, Reddy devireddy@gmail.com wrote:
 1. Jar files contains some encryption/decryption algorithms.
 2. Algorithms should not present in the application.

I really hope you aren't hoping that will prevent others from seeing
those algorithms.

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


[android-developers] Re: App talking to native ARM binary via sockets

2012-06-06 Thread Chris Stratton
On Jun 6, 8:34 am, Tony Houghton h...@realh.co.uk wrote:

 10.0.2.2 is a special address so that apps in an emulator can connect to
 services on the host running the emulator. AIUI your service is running
 on the same Android device as the client so I think you want 127.0.0.1.

Yes.  Not only is the special address the wrong computer, it's unique
to emulators and not available on real devices.  If using a network
socket, loopback is the answer.

However, unless you absolutely have to emulate IP networking, it may
be preferable to use a unix-domain socket rather than a network one.
This will remove the requirement that any apk using it carry internet
permission, while keeping many of the semantics comparable.

While unix domain sockets aren't the first choice for IPC within
android (that would be Binder) they definitely are used within android
itself, for example the connection between the adb daemon and a
debuggable app process which makes java debugging possible is done via
a unix socket.

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


[android-developers] Re: Is there a way to get a WAN IP address from a phone based on its phone number?

2012-06-06 Thread Chris Stratton
On Jun 6, 2:49 am, Akki akshay.iitr@gmail.com wrote:
 Is there any way by which I can get the IP address of
 the other device by just using the phone no.

No.  Not only is there no way to obtain such information by lookup
from the phone number, in most cases the information doesn't exist.

Most consumers use little router / wifi access point boxes with a
feature called network address translation (NAT) which allows all of
the devices in their home, business, or cafe to share the same
external IP address.  These boxes implicitly reject incoming
connections, unless  a special forwarding rule has been set up, or
there is a clear relationship between the incoming traffic and an
existing connection or recent outbound transmission.  They do that not
only for reasons of security, but for the simple reason that without
correlation to something sent outbound or a configured forwarding
rule, the router would not know which local device the traffic was
intended for.

For reasons of both economy and security, the majority of mobile
network providers do basically the same thing within their network
infrastructure - your mobile device simply does not have a unique,
routable external IP address on which it can accept incoming
connections or unsolicited incoming traffic.

 Could you please post some other suggestions for setting up a P2P
 connections??

You will probably end up having to have an intermediate server on the
publicly visible Internet which both mobile devices can connect to.
It may be possible, with a lot of effort to set things up so that the
server can give each device enough dynamic information about the other
that they can subsequently trade packets directly for the remainder of
that session, but server help in setting things up will be needed.
And in many cases with mobiles, I suspect the ultimate data flow
remains mobile-server-mobile rather than directly mobile-mobile.

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

2012-06-05 Thread Chris Stratton
On Jun 5, 5:23 pm, michael xuetao@gmail.com wrote:

 Is there any way to retrieve the Intents used by intalled apps on the
 phone? For example, how do I know that one app could send an Intent to
 invoke Camera app or Email app or Text Message app?

No.  Not only is there no way to query the information, the
information may not even deterministically exist.

For example, it would be trivial to write an application which
presented the user with a few EditText widgets into which they could
manually type the various required pieces to create an Intent object,
and a button to dispatch the result.  This app would then be capable
of dispatching truly arbitrary intents.

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

2012-06-05 Thread Chris Stratton
On Jun 5, 7:29 pm, Kristopher Micinski krismicin...@gmail.com wrote:
  Is there any way to retrieve the Intents used by intalled apps on the
  phone? For example, how do I know that one app could send an Intent to
  invoke Camera app or Email app or Text Message app?

 But you could track this in the system, of course, which is what I
 assume the OP wanted to do..

Well, you can't really detect the potential (how do I know that one
app could) due to the potential crossovers between inputs, data, and
code represented by things like intent objects and reflection.

You can however detect the actual attempt as it occurs, to a degree by
watching the logs, and more substantially by modifying the platform to
in effect breakpoint Intent sending.

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

2012-06-04 Thread Chris Stratton
On Jun 3, 8:34 pm, Roger Li roger...@gmail.com wrote:
 I am struggling to find a solution for the project.
 The project is used to record the operations in mobile and then play back.

This is not really supported by stock android devices.

You can use the ddms screenshot capability to record a low-frame rate
video of what the user is seeing, though you will have to guess at
what touch and button events prompted changes.  There's a pc-side java
app floating around on the web for doing that.

Or you can modify (as in custom rom, or at least root) the device and
have it report things that are not normally visible to 3rd party code,
such as touch events to arbitrary applications.  Doing so would not be
on topic for this (sdk) developer group - the only variation that
would be would be instrumenting applications you yourself develop to
report input events.

If the applications of interest will run reasonably on the emulator,
you might do that and configuring the hosting machine to do
recording.  The emulator is also rooted by default if you want to
try safely modifying the platform.

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

2012-06-04 Thread Chris Stratton
On Jun 1, 1:07 am, Brian Van Der Wagt mathista...@gmail.com wrote:
 The reason I
 ask that (excuse my ignorance, I am just started with NDK), is because
 A: Octave includes Fortran code and my book about the NDK says it
 supports C and C++ only

The NDK is basically a build of GCC and some android-specific
libraries.

GNU Fortran is an optional component of GCC, and some Fortran support
libraries.

So it's possible that someone determined enough could rebuild the
android NDK gcc from source with configuration to include the fortran
front end.  They would also have to port the support libraries, which
might be a little more challenging if they assume a typical libc
rather than android's bionic libc.

Mark's mention of the fortran-to-C translator, and the idea of asking
them, may be more likely cases.

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

2012-06-04 Thread Chris Stratton
On Jun 1, 2:23 am, Jim Morris jim.mor...@lecere.com wrote:

 I believe this is a bug introduced into Android 4.0.3. The software
 works fine on Android 3.2 on a Galaxy P-6210.
 I have traced the problem to the statement
 mmSocket.connect();
 When this statement is executed, a dialog box pops up on the Galaxy
 P-3113. This dialog box asks for the user to input a pin code for
 pairing, BUT THE DEVICE IS ALREADY PAIRED. I type in the correct code
 and I get an invalid exchange exception.

It might be useful if you could find, by experiment or by web
searching, if there are:

1) bluetooth devices (non-earpiece) usable by applications with your
4.0.3 phone (or any 4.x phone)

2) other bluetooth devices which experience the same error

Also, if you end up posting a bug report, doing a dump of all the
interface characteristics of the bluetooth printer (perhaps by
connecting it from a desktop/laptop linux and using some of the
bluetooth tools) would be helpful.  You might also want to contact the
printer manufacturer.

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


[android-developers] Re: how to get the name of external card

2012-06-04 Thread Chris Stratton
On Jun 1, 7:45 am, RLScott fixthatpi...@yahoo.com wrote:
 As Mark Murphy said, there is no API for that.  So what I did in my
 app was very messy.  I invited the user to find out on his own,
 perhaps using a file explorer app on the Android device, what path he
 would like to use for the external memory.  Then I had him enter that
 path in an EditText.

Putting the edit text somewhere in a second level menu, and pre-
filling it on first run with the path suggested by the api might be a
reasonable compromise between having it just work for the majority of
users, while giving advanced users or those on oddball builds an
opportunity to adjust.

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

2012-06-04 Thread Chris Stratton
On Jun 4, 12:32 pm, roger roger...@gmail.com wrote:
 I am trying to start a service in the application, and then get the top
 foreground activity, get the UI from the activity and the position for
 each UI element.
 Then parse the log and getevent
 is it possible to get the ui operation with the above three conditions.

This line of questioning is only on topic for this group if it is your
own application which you want to do this to.

Likely the most straightforward way of doing this to your own
application is to place calls to a reporting subsystem throughout your
code (and have a way to nullify them in the release version, where you
turn all of this off).

Another way to do this would be to wrap all of the common android
widgets you use with your own versions which report what they are
asked to do then invoke the superclass method.

Or you can try to build non-cooperative monitoring into your
application where you do something like find the top of the view
hierarchy and then iterate down through the tree, but you are likely
to find places in the overall task where you need information that is
not exposed by an sdk api.  You might be able to learn how to find
that information by reading the sources for a particular platform
version, but doing so would be non-portable and off-topic for this
group.

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


[android-developers] Re: is there a way to explore directory structure in assets/?

2012-06-04 Thread Chris Stratton
On Jun 4, 12:08 pm, Latimerius l4t1m3r...@googlemail.com wrote:
 On Mon, Jun 4, 2012 at 2:03 AM, lbendlin l...@bendlin.us wrote:
  Aren't you the one who put stuff into the asset folder structure? So you
  should know what's there, and where.

 Seriously - I'm writing code that has to work with multiple APKs with
 different assets/ areas.  Even if it weren't for that, I don't like to
 hardcode paths, names and directory structures into my code.

It seems like it has been discussed a bit, with people having various
degrees of success:

http://stackoverflow.com/questions/3631370/list-assets-in-a-subdirectory-using-assetmanager-list

Or the ugly way to do it would be to assume that your apk is a zip
file, figure out it's path, and process it with the zip file apis.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Debugging code that cause's a hardware restart of the phone :?

2012-04-30 Thread Chris Stratton
On Apr 30, 11:34 am, ThomasWrobel darkfl...@gmail.com wrote:
 I also use the JPCT 3D library in my app, as well as using the camera
 preview as a background, so the app is pretty heavy overall.

My first hunch would be issues in the platform openGL implementation
that probably uses.

It would be worth doing some web searching on the phone model - it's
possible others have found the same issue.

Also you may want to figure out if you are getting a kernel reboot, or
an android runtime framework crash  restart while the kernel
continues running.  Once you get adb working, look in /proc/uptime
shortly after a crash - if it's a low number of seconds, your kernel
rebooted, if it's a high number likely just the framework crashed and
restarted.  (You'll probably also see a bootloader splash screen after
a power-on or kernel reboot, before the more lengthy startup animation
that runs while the android runtime framework gets itself going.)

It goes without saying, that if the platform is working as intended,
there is nothing an app can do to cause a reboot, so the fact that it
is happening means something is broken with the device/android build.

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

2012-04-25 Thread Chris Stratton
On Tuesday, April 17, 2012 11:59:42 AM UTC-4, Anatoliy Lysenko wrote:

 Hi, 
 In my NDK project I have two global variables, int and pointer. 

 When I install my app and run it for first time, all global variables 
 are empty. 
 When I exit app and start it again, in both variables stored values 
 from previous run. 


This is actually not strictly an NDK issue, rather then NDK is making a 
universal aspect of Android apps a bit more easy to see.

On an ordinary system, programmers think in terms of a process.  These 
exist on android too, but there is not a 1-1 correspondence with 
activities.  Even when all activities and services hosted by a process 
entirely finish, android will try to keep the process around for a faster 
restart of that app, killing it off only if the system becomes memory 
constrained.  In the ordinary case, when a user re-enters a recent 
activity, it runs in the old process that is still around from the last 
time.  But that is of course not always the case - sometimes the old 
process has been reaped (or it has crashed, or was never previously run) 
and a new one must be created.

The NDK is not unique in having certain things that can survive with the 
process, irrespective of the component activities or services - that can 
happen with the java code too.  However, appropriate practices for handling 
this for ndk code might indeed be better on the ndk group.

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

2012-04-24 Thread Chris Stratton
On Tuesday, April 24, 2012 7:08:06 AM UTC-4, Mark Murphy (a Commons Guy) 
wrote:

 On Tue, Apr 24, 2012 at 6:40 AM, Bunty syed  wrote:
  But there are no APIS available in the WifiInfo  to check the security

 -- WifiConfiguration tells you what was possible, not what was
 negotiated for this connection

Unless there is something that I am missing, this feels like a hole in the 
 API.

A fairly strong argument could be made that application programs should not 
care about the difference, ie, if they need secure communication they 
should implement encryption at application level, rather than relying on 
the network.  Consider for example that the wifi network being encrypted 
says nothing about the security of the wired network it is connected to.
 

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

2012-04-23 Thread Chris Stratton
On Monday, April 23, 2012 7:54:50 AM UTC-4, JP wrote:

 Didn't find anything unfortunately. Is this really impossible to do?


Open an adb shell, type getprop and look at the result.

Some entries which may be of interest:
ro.build.fingerprint
ro.build.version.*
ro.product.version
 
These should be readable by apps; what I don't know off the top of my head 
is which (if any) are stable API's and which are private and thus subject 
to change without notice.

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

2012-04-23 Thread Chris Stratton
Update: none of these are stable APIs and you will need to use the call the 
native function property_get() or invoke the getprop routine to retrieve 
them.  
That makes this method off topic for this group.

On Monday, April 23, 2012 10:53:25 AM UTC-4, Chris Stratton wrote:

 On Monday, April 23, 2012 7:54:50 AM UTC-4, JP wrote:

 Didn't find anything unfortunately. Is this really impossible to do?


 Open an adb shell, type getprop and look at the result.

 Some entries which may be of interest:
 ro.build.fingerprint
 ro.build.version.*
 ro.product.version
  
 These should be readable by apps; what I don't know off the top of my head 
 is which (if any) are stable API's and which are private and thus subject 
 to change without notice.


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

2012-04-21 Thread Chris Stratton
On Saturday, April 21, 2012 1:28:39 AM UTC-4, ashish wrote:

 Hi guys i am getting a problem on uploading large video files to ftp 
 server,files are uploading but the data got courrpted and when we 
 download that file,it is not playable and showing file is 
 courrpted,could anyone please help me how to achieve this and why this 
 is going on


If you are trying to do this over a mobile network (or one that is 
otherwise unreliable over the timescale of transferring one of your files), 
you may want to come up with a scheme where you can do the upload in pieces 
and have them recombined on the server.  You would probably want this to 
include means of later resuming to upload additional segments if the 
original attempt fails, and of validating received segments and causing a 
re-send of any that are broken.  This may need to handle re-attempts over 
substantially longer delays (potentially hours or days) than what is built 
into basic network protocols.

I doubt it's necessary to build this from scratch; some web searching would 
probably find an appropriate existing scheme.

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

2012-04-20 Thread Chris Stratton
On Friday, April 20, 2012 4:21:48 AM UTC-4, Jxn wrote:

  then, how can i send smiley to the particular receiver using this url??? 

 You can't, as mail (SMTP) is strictly ASCII plain text. It was 
 developed before HTML and the web. 


I was under the impression that smiley's _are_ plain text.  Or at least a 
markup language intended to be interpreted by humans.  Humans using plain 
text email...

Though I know at least one android device which in some cases interprets 
them and turns them into pictures.

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

2012-04-20 Thread Chris Stratton
On Friday, April 20, 2012 11:55:42 AM UTC-4, barrett wrote:

 Does that help? See how this has NOTHING to do with Android? 


Presumably the poster wants to send the message from an android device, or 
something like that.

Or they are just clueless...


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

2012-04-20 Thread Chris Stratton
On Friday, April 20, 2012 11:55:42 AM UTC-4, barrett wrote:

 Does that help? See how this has NOTHING to do with Android? 


Presumably the poster wants to send the message from an android device, or 
something like that.

But then again, it's a poorly stated question so we can only speculate as 
to what they want.

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

2012-04-20 Thread Chris Stratton
On Friday, April 20, 2012 1:30:45 PM UTC-4, MagouyaWare wrote:

 Presumably the poster wants to send the message from an android device, or 
 something like that.


 Just because they are developing for Android doesn't mean the question has 
 anything at all to do with Android development... 


The real problem is that there isn't really an answerable question yet.

I jumped in not to deal with that, but to object what looked like an 
historically mistaken assumption (that smileys are non-textual) in one of 
the replies.

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

2012-04-19 Thread Chris Stratton
On Wednesday, April 18, 2012 2:19:35 AM UTC-4, Sam wrote:

 Therefore, it needs to be granted the root privilege to run some 
 native functions. 


That would not be possible on a secured android device, ie, it is off topic 
for this group

The code has been built to be a .so by NDK. 


The code to be run as root must be a stand alone executable rather than a 
jni library, so it can run in a new process.  The su hack on some 
unofficial roms does not and can not be made to elevate an application to 
root, all it can do is launch a new process from a stand alone executable 
and have that process run as root and perhaps do things on behalf of your 
app. 

It's not really on topic here as its outside of the capabilities of the 
android sdk but it's been covered numerous times on stack overflow.

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

2012-04-19 Thread Chris Stratton
On Thursday, April 12, 2012 11:50:55 PM UTC-4, priya abc wrote:

 Hello,
  
 I run application from eclipse .it installed directly on tablet internal 
 memory storage.that` why it memory is almost full.
 Then I am trying to uninstall it but it is not removing.
 So i just power off the tablet and did power on..but it is not going into 
 home screen ...it showing only starting logo.
 Now What should i do?
  
 It is china tablet 7inch ...model is crane v1.4 somthing like that.


Maybe see if ADB happens to be up?  If so you could open a shell and 
crudely rm some apps (using run-as to remove only debuggable apps if it's a 
secured device) 

You could see if you can boot to a recovery partition which might 
(depending on the recovery author) either give you ADB, or give you the 
choice of wiping the data partition and starting over.

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

2012-04-19 Thread Chris Stratton
On Thursday, April 12, 2012 9:59:30 AM UTC-4, MagouyaWare wrote:

 Is there any way I can do it, without going through the chooser?

  
 That goes directly against the core of Android.  You get a chooser if 
 the user has not specified an email app to use as the default.  If they 
 have chosen an email app to use as the default then they will not get a 
 chooser, just like Johan said.


This may be the stock answer, but there's a fairly annoying usability 
oversight in it.  Consider the case where I (as the user) don't want to 
have a default system-wide, but I (still as the user) have decided that I 
always want to use a particular choice when the intent is coming from this 
particular staring application. 

AFAIK, the workaround would be to obtain a list of the possible choices and 
then target one of them with an explicit intent.  As with most attempts to 
patch oversights in the system design, there's some risk in doing this.

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

[android-developers] Re: How can I implement AB repeat function using mediaplayer

2012-04-19 Thread Chris Stratton
On Wednesday, April 18, 2012 10:46:21 PM UTC-4, SH wrote:

 Hi all. 

 I try to develop an audio player and would like to have A-B repeat 
 function. When a user click A button while playing, it memorise 
 starting position and clicking B button, it will save ending position. 
 So it repeat A to B points until the user clear repeat position. 
 It is easy to go back to the starting position B but not easy for 
 endping position B because there is not listener to track when it 
 arrived to the marked point. 
 I look forward to your idea. 
 Thanks in advance.


It's been a couple months since I was working on something similar, but 
your options would likely be something along the lines of either 
piggybacking off of the progress bar updates (if possible) or using a 
thread to poll the position of the player.  When either of those methods 
indicates you are at or past your end point, seek to the desired start 
point again.  

Unfortunately, I'm not aware of a play until interface.

 

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

2012-04-19 Thread Chris Stratton
On Thursday, April 19, 2012 1:07:22 PM UTC-4, Android Developer wrote:

 Hi All
  
 Can we able to display homescreen after kill all the background process.
  
 android.os.Process.killProcess(android.os.Process.myPid());


Try doing it in the other order - send the intent for the home screen and 
then die.  

You do realize android apps shouldn't normally kill their process, right 
(though there are situations _during development_ when that or exiting 
might be efficient)



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

2012-04-06 Thread Chris Stratton
You should, with work, be able to do input digital audio with one of the 
more recent devices that has the USB host mode option and an appropriate 
USB dongle.

You could also do so via the data network, especially if you can use wifi 
or do not need to transfer in real time.

If you do not strictly need a digital audio input, it should be possible to 
build an analog matching network to couple line audio into the microphone 
channel of the headset jack (most likely a resistor for attenuation and a 
capacitor to AC couple).  This may however be mono, and might require 
optimization for device model to get best performance. 

On Thursday, April 5, 2012 8:35:35 PM UTC-4, droid-stricken wrote:

 Hi All,

 I was wondering if i could feed digital audio input or line input [either 
 using HDMI or USB or any such interface] into any of the android devices 
 currently out there [phones or tablets does not matter]. AFAIK, built-in 
 microphone is the only means of getting audio [analog at that] into the 
 android system. Correct me if i am wrong pls.

 TIA.


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

2012-04-06 Thread Chris Stratton
On Thursday, April 5, 2012 5:29:48 PM UTC-4, Yan wrote:
 

 [10056.276022] usb 2-7: device descriptor read/64, error -62 
 [10056.560024] usb 2-7: device descriptor read/64, error -62 
 [10056.840019] usb 2-7: new full speed USB device using ohci_hcd and 
 address 96 


Could be either an electrical failure or a low level usb software failure, 
on either the device or pc end, or the cable.

If the device is running ordinary software, you might try it on another 
computer or even another USB port on the same computer (especially 
switching between front and rear panel ports).  For an 
marginal-electrical-performance issue putting a hub in between can get you 
a different roll of the dice.

On the software side, IIRC even with USB debugging not enabled in settings 
you would still see something of a USB interface, but that could be 
something to check as well.  To try a different software environment you 
could boot the device to recovery and see if you have USB there. 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Video Sharing to Facebook from Android App using share intent FAIL :( .

2012-04-05 Thread Chris Stratton
On Thursday, April 5, 2012 5:41:37 AM UTC-4, softy wrote:

 The exception is coming form inside the  
 *com.facebook.katana.service.method.VideoUpload.getRealPathFromURI 

 that is a part of android.jar I guess.
 *


No, it's part of a facebook client application which is launched in 
response to your share Intent.  

It's failing either due to incorrect information in the intent (which you 
can do something about, but it still looks bad on their part that they 
don't validate the Intent and handle errors), or due to some sort of 
internal failure in the facebook client app or issue in communicating with 
facebook's server - again, something they should have trapped.

 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Can we use Android on embedded device without LCD?Are there any devices in the market with this option?

2012-04-05 Thread Chris Stratton
On Wednesday, April 4, 2012 4:32:23 AM UTC-4, the_edge123 wrote:

 On 31/03/12 23:34, AndroidGuy wrote:
  Hello Friends,
 
  Android is mainly designed for phones and Tablets. But lot of embedded
  devices doesn't have LCD display or in fact any user input device.Can
  we use Android on embedded system without LCD?
 
 Can't you use a standard embedded OS instead ?


Someone who felt like it could presumably use android features such as 
Dalvik, Binder, Intents, wakelocks etc - perhaps even the unmodified 
android sdk in an embedded system.

However the system itself could not be standard android, because android is 
designed to give certain system-management-decision powers only to the live 
interacting user.  Without a way to interface to a live, interacting user, 
you would have to design an alternate system management interface.  And 
unless you do your real world I/O via the limited USB host capabilities in 
later android versions or something like bluetooth, you will probably need 
a lot of customizations to interface your headless embedded android to 
peripherals. Discussion of those customizations would be more appropriate 
on android-porting or even more specialized lists - especially if you are 
starting with an existing embedded style platform like a beagleboard, there 
may be specifically applicable discussion groups.

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

2012-04-05 Thread Chris Stratton
On Thursday, April 5, 2012 10:45:55 AM UTC-4, MagouyaWare wrote:

 I need to retrieve the minSdkVersion value from AndroidManifest.xml from a 
 java class.

 AFAIK there is no way to get that...


If you really want to you can find your own apk, open it, and decompile the 
binary manifest (there's code for interpreting it floating around the web).

However there's no guarantee the format (or possibly visibility) might not 
change at some point.  

There's probably a better way to solve your problem - perhaps a build 
script that sets this and also a more accessible flag?  

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

[android-developers] Re: ANDROID NET - Create a new parallel and open source network via mobile device for data and voice communication

2012-04-03 Thread Chris Stratton
On Monday, April 2, 2012 4:30:48 AM UTC-4, jacopo.tolja wrote:

 Here the Idea, I was out in the sea about 5 miles from the coast and I 

could connect to the internet without problem. 

 

 Android OS in the phone is designed to connect ONLY to the backbone 
 grid. WHAT IF THE BACKBONE GRID IS MADE BY CELLPHONES IN A DYNAMIC 
 WAY? 

Al Android phones should have a dual connecting feature, to the 
 carrier backbone and to the ANDROID NET backbone. 


The mobile radio in android devices is just about entirely separate from 
android - it's done with the radio firmware running on the radio processor, 
mostly out of sight/detail control from android.

If you wanted to do something in the way of a peer-to-peer mesh, you could 
look at what was tried with the wifi on the OLPC machines.  My impression 
is it did not work as well as hoped.  One major issue would be battery life 
- you are spending your battery to move someone else's traffic.  Granted 
wifi isn't designed to be as careful of power as cellular radios are, but 
it's an area where you can probably make the changes to get some 
functionality with merely a rooted device, instead of hacking undocumented 
radio firmware.

To really build this system, you'll probably have better luck with 
specialized hardware - perhaps some of the long range zigbee stuff, or get 
an amateur radio license (not hard these days) and either do something 
really custom, or extend existing ideas.

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

2012-04-02 Thread Chris Stratton
On Monday, April 2, 2012 9:35:28 AM UTC-4, Dan wrote:

 the question is what do you do to get the device to try to go to a 
 state 
 of CPU/SCREEN/KEYBOARD all Off. 


You (as an application developer) don't.  You merely insure that your code 
isn't what is keeping it from doing so.   

You have no control over what other installed apps might be doing, or how 
rapidly the particular system software will descend into suspend states 
once no application is preventing it from doing so.

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

2012-04-02 Thread Chris Stratton
On Tuesday, April 3, 2012 12:03:02 AM UTC-4, Put_tiMe wrote:

 So according to Dianne's post, CPU is indeed completely switched off.
 And in Android, there is no CPU under clock mode.
 And it can be woken up only by external interrupts. Got that.
  
 But then how does Alarm-manager timers work?
 Is it some kind of delayed interrupt or something like that? i.e an 
 interrupt that will be raised after some time???
 I thought at least the alarm-manager will need the CPU running.


Most embedded chips, especially those intended for battery powered systems, 
have various peripherals such as timers external to the cpu core which can 
continue to operate even when the cpu core is powered down.

In the chips used in most contemporary smartphones, one of those 
peripherals is actually an entire additional arm processor core, charged 
with running the radio and other things such as low level audio and button 
I/O.  The power state of that processor is quite independent of the power 
state of the application arm processor which runs the Linux kernal, android 
stack, and SDK apps, so checking in with the mobile network infrastructure 
does not involve waking up the application processor.  (Depending on your 
perspective, the argument could be made that the radio processor is 
actually the heart of the system, with the application processor just being 
a fancy peripheral charged with entertaining the user...)

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

2012-03-30 Thread Chris Stratton
Since devices on mobile networks generally can't be reached by incoming 
connections, you will probably have to have a server somewhere which all 
the mobile clients check in with so it can forward traffic between them 
(possible using C2DM to get their attention).

You will have to build functionality into the app running on each device so 
that it can accept requests for db operations from the server.

Do think about the privacy, battery life, and data plan limit/charges 
implications of what you are building.

On Friday, March 30, 2012 4:15:09 AM UTC-4, Kirupa wrote:

 I want to access database of an application(I know the structure of 
 database) from the another android phone.(every android phone has same 
 application same database).

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

2012-03-30 Thread Chris Stratton
On Friday, March 30, 2012 2:41:29 PM UTC-4, Mark Murphy (a Commons Guy) 
wrote:

 I am fairly certain that, by definition, this is impossible.

 On Fri, Mar 30, 2012 at 2:23 PM, bob  wrote:
  Does anyone know of a reasonable way to play Flash files in an Android 
 app
  that does not require the installation of the Adobe Flash Player plug-in?

There have been some attempts at open source alternative players for flash 
content on the desktop, the porting of which might be attempted.  How 
workable they currently are, I'm not sure, but their existence would seem 
to invalidate the by definition claim.  

One might still conclude it is not pragmatically possible to achieve 
sufficient compatibility for general use, or even if it were that it would 
not be worth the effort.



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

2012-03-28 Thread Chris Stratton
Yes, you can't.  You have three choices:

1) Build extra functionality into your app to copy the database to the 
sdcard or make it world-readable

2) Make your apk debuggable and use run-as your.package.name from the adb 
shell to copy the database.  You may need to use cat and a redirect if your 
device does not have a cp command.

3) Root the device or do your testing on the emulator which as your 
discovered is 'rooted' by default.

On Tuesday, March 27, 2012 6:05:04 AM UTC-4, ashiq sayyad wrote:

 Hi,

 Hope all doing well.

 My application created on database programatically.. On emulator,I can
 see the created database using File Explorer under data folder ..

 But on device I cant see my app data..

 Thanks  Regards,
 Ashiq Sayyad



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

2012-03-28 Thread Chris Stratton
On Tuesday, March 27, 2012 5:09:21 PM UTC-4, adr990 wrote:

 I would like to change the layout of a website on the fly, with just an 
 andriod app.
 Like removing images and change divs elements etc.


You are going to have to do quite a bit of work, the real question is 
where.  Some possibilities:

- Use a bookmarklet to pre-load some javascript code which will reprocess 
subsequent web pages (heard rumors this is supported now, haven't tried it)

- Use some other extension mechanism present in the browser of interest

- Use a custom web browser

- Make a proxy server that runs on the phone and reprocesses web pages and 
point the browser at that

- Setup a proxy server somewhere on the internet that reprocesses web pages 
and point the browser at that

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

[android-developers] Re: Driver in Linux to access the IOCTL from JNI application. It is failed with error code 13(Permission denied).

2012-03-27 Thread Chris Stratton
ioctl works in the NDK, but Android SDK applications are by design unable 
to acquire permission to do most of what a driver would probably need to. 
 Android driver-level programming belongs in the discussion of making 
builds for custom hardware, which would be found on android-porting rather 
than here or on the ndk group.

On Tuesday, March 27, 2012 12:05:39 AM UTC-4, GSelvaraj wrote:

 A) I am writing an eMMC driver in Linux to access the IOCTL from 
 Linux application. It is working. 

 B) I am writing an eMMC driver in Linux to access the IOCTL from JNI 
 application. It is failed with error code 13(Permission denied). 

 1) Where to set the permission in android application? 

 2) Is it possible to access IOCTL from JNI Application? 

 3) Is there any settings in Android.mk file for permission (in JNI)? 

 Regards, 
  GSK

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Force opening web URLs YouTube videos in Android phone's DEFAULT browser using Intent.

2012-03-26 Thread Chris Stratton
On Saturday, March 24, 2012 8:27:15 PM UTC-4, MagouyaWare wrote:

 AFAIK you can't... 
 On Mar 23, 2012 12:40 AM, Shajahan wrote:

 I am trying to launch browser with the specified URL. It works fine if
 it's web URL, but when the URL detected to be a video(say YouTube
 video) then it come up with choices to make between the browser 
 YouTube App installed in the device. Instead of this how to force this
 behavior to have the URL to open in DEFAULT Android phone's browser.


There are probably ways you can figure out what the default browser (for 
generic URLs) is.

Wouldn't it then be possible to launch an explicit intent with that as the 
target?



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

2012-03-23 Thread Chris Stratton
On Friday, March 23, 2012 6:45:37 AM UTC-4, Mark Murphy (a Commons Guy) 
wrote:

 This is not possible via the Android SDK at this time.

 On Thu, Mar 22, 2012 at 3:50 PM, MadihaKhalid wrote:
  i just want to know that how i could develop an android application who 
 give
  remote access to other Android mobile.

Yes, stock Android purposely lacks the hooks for the device being 
controlled, though the controller side should be possible.  There are some 
possibilities with modified android which are discussed in appropriate 
places (ie, not here).  Try some web searches, I think there's at least one 
open source project for remote controlling a modified (rooted) android 
device from a PC, which could presumably be adapted to do so from another 
android device.

Additionally, it's probably not possible on most mobile networks - either a 
server would be needed somewhere to pass traffic between the two devices, 
or they'd need to be on mutually routable wifi network(s).
 

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

2012-03-23 Thread Chris Stratton
On Thursday, March 22, 2012 10:55:00 PM UTC-4, exiquio wrote:

 My intent is to write and app that pulls the targetSdkVersion from all of 
 a user's installed apps in order to present them with a clear picture of 
 what should and should not run on their device in the event that they 
 update to a newer build of Android. This in response to a user's question 
 on XDA. I did a cursory search and decided it wasn't impossible and that I 
 should just write something like that as I continue to learn the platform.


Non-portably, at least as of the last time I tried something similar you 
can get the apk code paths out of packages.xml, open the apk's as zip 
files, demangle the binary manifests (there's code for that on the net) and 
pull out the information you seek.  Doing so becomes marginally off topic 
for this group, but probably still of interest to your chosen target 
audience.

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

2012-03-23 Thread Chris Stratton
Oh, sorry, didn't see that the specific information you need is part of 
what is available from stable APIs.

On Friday, March 23, 2012 2:26:44 PM UTC-4, Chris Stratton wrote:

 On Thursday, March 22, 2012 10:55:00 PM UTC-4, exiquio wrote:

 My intent is to write and app that pulls the targetSdkVersion from all of 
 a user's installed apps in order to present them with a clear picture of 
 what should and should not run on their device in the event that they 
 update to a newer build of Android. This in response to a user's question 
 on XDA. I did a cursory search and decided it wasn't impossible and that I 
 should just write something like that as I continue to learn the platform.


 Non-portably, at least as of the last time I tried something similar you 
 can get the apk code paths out of packages.xml, open the apk's as zip 
 files, demangle the binary manifests (there's code for that on the net) and 
 pull out the information you seek.  Doing so becomes marginally off topic 
 for this group, but probably still of interest to your chosen target 
 audience.


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Can an Android app have exclusive access to the audio h/w?

2012-03-23 Thread Chris Stratton
Presumably your sound can be as loud as any sound any other SDK application 
is producing.  Do you have to play an intelligible sound file, or might it 
be enough to mix in enough klaxon or buzzer of various sorts that the 
user realizes *something* atypical is happening, picks up the device, and 
is then able to see notifications?

If your users listen to unusual tracks, you may want to cycle through an 
assortment of alarm types until you get user interaction.  You could 
perhaps start with something fairly mild and informative intended to work 
in quiet times, and escalate to the this should bother you enough to pick 
up the device sounds. 

On Friday, March 23, 2012 3:09:17 PM UTC-4, dmv wrote:

 I am tryingto build an app that will alert the user in case of an 
 emergency by playing an audio file. To override situations where the 
 user may be playing loud music and the emergency announcement may not 
 be heard by the user (due to sharing of audio h/w with multiple apps), 
 can I get exclusive access to audio output so only my audio stream is 
 audible and rest all are stopped/killed/muted? I have tried a lot of 
 googling and studied the sdk documentation but did not find anything 
 that can solve my problem. Thanks for your time. 


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

2012-03-23 Thread Chris Stratton
On Friday, March 23, 2012 2:50:13 PM UTC-4, Kostya Vasilyev wrote:

 Perhaps a better test would be to check for undocumented APIs that are 
 known to have disappeared in a particular Andorid version, but just 
 collecting the data for this type of checking is going to be a large task.


Statically cataloging the utilized APIs sounds difficult.  Or impossible, 
if reflection is used (as it sometimes has been for hidden APIs).  Then 
there are native code issues, places where developers have resorted to 
underlying linuxisms to accomplish things that are poorly or intentionally 
unsupported by the platform, etc.  In total, predicting if a given APK will 
fail on a given version (/build/device) sounds pretty hard.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Redirect my app to network setting if the device is not connected to any Network??

2012-03-22 Thread Chris Stratton
You could probably do it by sending an intent, for example 
ACTION_WIRELESS_SETTINGShttp://developer.android.com/reference/android/provider/Settings.html#ACTION_WIRELESS_SETTINGS

On Thursday, March 22, 2012 4:20:50 AM UTC-4, muhamma...@hotmail.com wrote:

 Hi, 
Please help me, my application is network base. So if my 
 app not found any network connection it will go to network settings. 
 how? 

 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

[android-developers] Re: Android adb permision error

2012-03-22 Thread Chris Stratton
On Thursday, March 22, 2012 3:22:50 AM UTC-4, liuyix wrote:

 Have the same problem on one of my android phones.But the other android 
 phone I got doesn't have this problelm.


Your udev rules file probably does not contain a rule matching the VID of 
that device. 

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

Re: [android-developers] Re: How to use cp (Copy) command in system function in native C code on Android

2012-03-22 Thread Chris Stratton
On Thursday, March 22, 2012 1:02:20 AM UTC-4, Saurabh Patel wrote:

 Hi all

 Its resolved some problem of read write permission of my mounted directory

Launching a process is still a very bad way to solve a problem on Android, 
which should only be resorted to when there is no alternative (for example, 
trying to do something as superuser on a device modified to marginally 
support that).

Dianne gave you a very good alternative. Use it, as it will be more 
portable across devices, allow you to more easily detect failures, will not 
require a busybox install, and will be more likely to continue working on 
future Android versions.
 
 

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

[android-developers] Re: Instalation of FDTI Driver in Android

2012-03-22 Thread Chris Stratton
It's not on topic for this group as it is far outside the bounds of the 
SDK.  Either contact FTDI and ask them to improve their terribly inadequate 
documentation, or do some searching as I think the question has come up on 
in other android forums and may have a solution.

On Wednesday, March 21, 2012 12:45:13 PM UTC-4, JB wrote:

 I'm working with FTDI driver FT232R to comunicate with my pc, but now 
 I want to comunicate with my android tablet (sony table S). I already 
 red the technical note (TN_134 FTDI Android D2XX Driver) and I already 
 did all step less change de ueventd.rc file in the line dev/bus/usb/* 
 0660 root usb because I don't know how to do that. 

 I know that we need root acess to change this file, but I can't change 
 it. 

 Someone have any idea? 

 Thanks, 

 JB 


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

[android-developers] Re: android crash while installing .apk

2012-03-21 Thread Chris Stratton
On Wednesday, March 21, 2012 12:47:09 AM UTC-4, kiran nayak wrote:

 hi all 

 i have booted android on my beagleboard.. but when i try to install a 
 simple helloworld.apk android crashes. 


This question doesn't belong on android-developers since it's a system 
problem with a custom build; it might fit on android-porting or better on 
something beagleboard android specific.

Nonetheless 

E/PackageManager( 1041): Couldn't create temp file for downloaded package 
file. 

Might be something to look into.  But please take followups to an 
appropriate forum.

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

[android-developers] Re: Android adb permision error

2012-03-21 Thread Chris Stratton
Is the content of your udev rules file correct, and will it match the 
device you are connecting?  Ie, post the content of your rules file.

On Tuesday, March 20, 2012 7:59:49 AM UTC-4, Hera wrote:

 Hello, 

 I have installed the android SDK but I’m getting an error when using a 
 hardware device, executing “./adb device$ I get this error: 

 List of devices attached 
 no permissions 

 While if I execute “sudo ./adb device” there is no error: 

 List of devices attached 
 HT019P80XXX device 

 Adb must work for all users (also when eclipse starts it) but It only 
 works as root. The permissions of the related files are: 

 -rwxr-xr-x 1 root root 72 2012-03-20 09:53 /etc/udev/rules.d/51- 
 android.rules 
 -rwxr-xr-x 1 ariadna ariadna 159620 2012-03-19 13:45 adb 

 I have googled and tried different solutions but none off then works 
 on my Ubuntu, any idea? 

 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: icecream emulator adb push to sdcard, gallery fails to update

2012-03-16 Thread Chris Stratton
On Friday, March 16, 2012 5:43:57 AM UTC-4, extrapedestrian wrote:

 when I push image to icecream emulator sdcard, it doesn't appear in 
 gallery. I have to restart emulator to see image in gallery.


That's been true on every android emulator or device I've ever seen.  You 
have to trigger the media scan functionality for the change to show up in 
the gallery (or apparently also, the new MTP view).  ADB pull or shell, as 
well as a file manager app which looks at the actual file system should be 
able to see the file immediately, though many file managers are coded such 
that you have to refresh or re-open the folder in question to see a change 
in its contents. 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Galaxy Nexus is not properly implementing getExternalStorageDirectory; can anyone confirm?

2012-03-16 Thread Chris Stratton
On Thursday, March 15, 2012 12:07:30 PM UTC-4, Ted S. wrote:

  mkdirs(app/dir) fails; mkdirs(app) followed by mkdirs(app/dir) 
  works. This is extremely unusual.

 That's pretty much standard *nix behavior, Android being a modified 
 linix kernal it's what I would expect.

If you were dealing with the raw operating system, yes.  But the java 
method being used is mkdirs() rather than mkdir(), and the docs say it is 
supposed to create missing parents, somewhat like 'mkdir -p' would.

mkdir() 
  Creates the directory named by this abstract pathname.
mkdirs() 
  Creates the directory named by this abstract pathname, including 
any necessary but nonexistent parent directories.

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

2012-03-14 Thread Chris Stratton
On Wednesday, March 14, 2012 7:44:03 AM UTC-4, Spooky wrote:

 You didn't mention your sampling frequency  Remember Nyquist?  To
 reproduce any digital signal, you MUST sample at twice the frequency of
 the highest frequency you want to reproduce.  In this case, you'd have to
 sample at a minimum of 34,000 samples/second.  HOWEVER.

Not exactly true.  What is true is that frequency components above the 
threshold appear like, and cannot be distinguished from, frequencies below 
it.  To avoid this confusion, it is common to remove them with a low pass 
filter before sampling.  However, this is not the only way of doing things. 
 It is also quite common to use a filter with selects frequencies above the 
threshold, and take advantage of the sampling folding them down to a 
frequency range where they are easier to deal with computationally. 
 Obviously that's more common in communications equipment where you are 
only interested in a narrow range of frequencies, rather than baseband 
voice or music.
 

  When I analyze the recorded sound, 17kHz frequencies aren't there, its
  like the phone has a low pass filter that eliminates these
  frequencies.

 Yes, the *PHONE* certainly does...but where?  The question is, does the
 non-phone portion of the Android device have access to the raw audio, or
 has the low-pass filter already been applied?  Check to see if you can
 record frequencies above 5 kHz (DS0[1] is 300--3400 Hz, but since there
 are no brick-wall filters, it usually extends to about 4000 Hz, and
 then we allow a bit extra to make sure).  If you can access up to 5000 Hz
 or higher, you're getting audio before the low-pass filter.  


Before *which* low pass filter?   A device intended to be used for both 
telephony and higher quality audio likely has several.  There is probably 
something in front of the actual ADC (likely on chip) which prevents 
aliasing in the sampling itself.  There may be an intermediate filter in 
the audio system if any resampling is done, and this may depend on the 
sample rate requested by the program.  And then there's probably one in the 
GSM or SIP or whatever encoding system to limit to the narrower voice 
bandwidth of those channels.

 



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

2012-03-14 Thread Chris Stratton
On Wednesday, March 14, 2012 1:18:00 PM UTC-4, Randil wrote:

 I need to change the excising package name to my own package name. I 
 am trying to rebuild the Soft Keyboard to our own language keyboard. 
 Also is there any tutorials about developing a predictive input 
 systems? 


If you are using eclipse right click on the package that you wish to rename 
and do refactor-rename.

You may have to clean the project, or even close  re-open eclipse if you 
have trouble with some of the auto-generated pieces (especially R.java) not 
initially changing to match.

Or you can do it the hard way with find, xargs, mv, and sed ;-)

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Is there a way for an android app to know which web sites you are accesing?

2012-03-13 Thread Chris Stratton
On Monday, March 12, 2012 2:51:39 PM UTC-4, MagouyaWare wrote:

Let's say I open a browser on my phone and go into my favorite site 
(facebook, for example) and spend an hour there. Is there a way for an 
external application to register the fact that you've been 
there, and how long? 

AFAIK that is not possible...

Not reliably, but the remote address of currently connected sockets can be 
polled from information in /proc as the netstat command does.

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

2012-03-13 Thread Chris Stratton
On Monday, March 12, 2012 9:37:36 AM UTC-4, Ali wrote:

 Process p = Runtime.getRuntime().exec(su);
 p = Runtime.getRuntime().exec(sync);
 p = Runtime.getRuntime().exec(echo 3  
 /proc/sys/vm/drop_caches);


Regardless if these commands would or would not work with sufficient 
permission, your most obvious problem is a fundamental misunderstanding of 
the su command sometimes available on custom roms, and on unix-like 
systems in general.

This command does not (and fundamentally could not) change the userid of 
the process requesting its execution.  It can only result in a new process 
running as a different userid.  If you want to do something as root, you 
have to get the process (typically a shell) created by su to do the thing 
you want to do.  Typically people do that either by specifying the command 
as an argument to su (which in many cases is not supported) or more 
portably by piping further commands into the stdin of the su process.   

A quick web search will show that the details of how to do this have been 
covered numerous times in all of the usual help forums.

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

2012-03-13 Thread Chris Stratton
On Tuesday, March 13, 2012 5:26:57 AM UTC-4, rachana govilkar wrote:
On Monday, March 12, 2012 11:55:21 PM UTC+5:30, hooman os wrote:

 Maybe start recording in onResume() and stop recording in onPause()

nope.it did not work.


What didn't work?   Was onPause() not called when you lock the device?  Or 
did your onPause() code fail to stop recording?

Is your recording being done by an activity or a service?

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

2012-03-07 Thread Chris Stratton
On Wednesday, March 7, 2012 6:01:41 AM UTC-5, Kostya Vasilyev wrote:

 Instead, there are countless sites r recommending this setting to end 
 users to make things run faster.

Can you come up with code to detect it, and point out to the user that this 
setting is incompatible with your application? 

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

2012-03-06 Thread Chris Stratton
On Tuesday, March 6, 2012 12:00:57 AM UTC-5, moktarul anam wrote:

 *
 *
 *in android each application runs in separate process. for data sharing u 
 look in to service and contentProvider *


The question was probably supposed to be about how to make two apk's share 
the same userid, something which is supported (if they have the same 
signature) and allows them to share files, etc.

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

2012-03-06 Thread Chris Stratton
On Sunday, February 5, 2012 12:26:09 PM UTC-5, guruk wrote:

 hi there, 
 the experimental developer options on the new Galaxy Nexus cause 
 lots of confusion and problems with my users (as the FORCE CPU 
 RENDERING) do not work with my app (and as i heard from lots of other 
 developers, even has probs with their apps. 
 Will this feature even be available in the next Firmwares. i hope 
 not.. it should only be available for Developers. 


Harder to turn on perhaps, but overall you should be very glad that Google 
requires that any consumer-destined Android device that wants their seal of 
approval fully support use *for* development.  Getting into a situation 
where developers have to buy 'special' devices would be very unfortunate.

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

[android-developers] Re: sqlite database on phone creash

2012-03-05 Thread Chris Stratton
On Monday, March 5, 2012 4:20:12 AM UTC-5, Jagruti Sangani wrote:

 i have use the sqlite databse for storing and retrive the value during 
 application run.It is work perfectly when i run my apllication on 
 emulator but when i run my application on phone then when try to get 
 data from database then it will crash the application.So anybody know 
 hot to use the sqlit database on phone work.


Most likely your code is not correct, but you are getting away with it on 
the emulator for some fairly random reason.

Look in the log avaiable from logcat or DDMS, find the error message, and 
investigate the indicated line of code. 

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

2012-03-04 Thread Chris Stratton
On Sunday, March 4, 2012 8:26:39 AM UTC-5, zasaz wrote:

 hi everyone! how can i set password on shutdown device or on press power 
 button?


Head on over to android-porting or xda-developers and build you own version 
of android itself - this isn't something SDK apps would be permitted to 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] Re: Approved/recommended/best way to write to GENUINE external storage

2012-03-03 Thread Chris Stratton
On Friday, March 2, 2012 8:06:47 PM UTC-5, Grunthos wrote:

 Is there a recommended way to identify a list of real *external* storage
 media?

Reading /proc/mounts and discarding anything obviously ineligible would 
produce a list, at least on devices where it's an actual filesystem and not 
some sort of emulation.  

You could use some combination of presenting the resulting list to the 
user, with a database based on device models/versions.  Having a place to 
textually edit the path buried deep in an options menu would help as a last 
resort.

Would not be surprised if it's usually the last eligible entry, but not 
recommending you rely on that.



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

Re: [android-developers] put application in background run

2012-03-03 Thread Chris Stratton
On Friday, March 2, 2012 4:35:37 AM UTC-5, Jagruti Sangani wrote:

 hello but i had never use the service and also i want to comeback on front 
 the application when call will come in my application.


The part that can be in front is an Activity.  The part that keeps working 
even when hidden is a Service.   The part you see in the status bar is a 
Notification.  Your application will apparently need all three.  Build the 
API demos from the SDK samples (in eclipse, do new project, create from 
sample), try it, and examine the code - this will show you how you can use 
a lot of different android mechanisms.
 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Please guide me how to send data(datastream, not files) from a PC to a real android phone via USB.

2012-03-02 Thread Chris Stratton
On Friday, March 2, 2012 3:16:12 AM UTC-5, vvis wrote:

 That is, 
 when I tried to send data stream from Simulator to PC, as PC's address 
 being 10.0.2.2, the PC can receive data stream from 
 Simulator(10.0.2.2). I just guess there is somewhat THREAD running on 
 the Simulator. 


The 10.0.2.2 etc capabilities are unique to the emulator and not ordinarily 
shared by real devices.

The adb port forwards you were trying to use earlier do work on real 
devices, but you have to make the phone the server and the pc the client, 
ie, the PC can initiate a connection to the phone, but the phone cannot 
initiate a connection to the pc.  When using port forwards you do indeed 
use the loopback address, since you are actually contact a local port, 
which gets forwarded to a remote one by adb.
 

 And you said that I should setup a network between the PC and the 
 android phone, I tried the Internet Tethering. And now, it works! 

 I don't get what is reverse tethering yet, but I will go in deeper 
 steps. 


Various tether capabilities may enable this, or have the side effect of 
putting the phone and computer on a network segment.  Just be sure you 
don't accidentally route all the pc's network traffic through the phone's 
mobile network (unless you mean to)

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

2012-03-02 Thread Chris Stratton
On Friday, March 2, 2012 8:24:33 PM UTC-5, Josh Brown wrote:

 There's the 
 ACTION_PACKAGE_ADDEDhttp://developer.android.com/intl/de/reference/android/content/Intent.html#ACTION_PACKAGE_ADDED
  broadcast 
 you could use to see when it's installed.  I don't think there's one for if 
 it was declined, but you could use some trickery in your onResume().  The 
 only problem is if they hit the home button when the installer is showing 
 and then somehow navigate back to your app in such a way that they can 
 still get back to the installer.


Can't you just ask the package manager if it's (already) installed ?  If 
not you fire off another view intent to begin a new installation attempt. 
 You can't force the user to agree, but then your app doesn't have to go 
beyond that point if they don't.

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

[android-developers] Re: Performance issue executing native code on ICS

2012-03-01 Thread Chris Stratton

On Thursday, March 1, 2012 12:08:31 PM UTC-5, Michael wrote:

 Good tip! This is a print from top running the test application on a Nexus 
 S with Gingerbread:

 User 89%, System 3%, IOW 0%, IRQ 0%
 User 282 + Nice 0 + Sys 12 + Idle 22 + IOW 0 + IRQ 0 + SIRQ 0 = 316
   PID   TID CPU% S VSS RSS PCY UID  Thread  Proc
   771   771  86% R 104220K  27216K  fg app_54   PerformanceTest 
 com.ICSPerformanceTest

 

 And this is the exact same application on a Nexus S with Ice Cream 
 Sandwich:

 User 87%, System 9%, IOW 0%, IRQ 0%
 User 287 + Nice 0 + Sys 32 + Idle 9 + IOW 0 + IRQ 0 + SIRQ 0 = 328
   PID   TID PR CPU% S VSS RSS PCY UID  Thread  Proc
  2849  2849  0  57% R 278568K  35372K  fg app_66   PerformanceTest 
 com.ICSPerformanceTest
81  2867  0  28% S  56408K   9196K  fg mediaCameraPreviewTh 
 /system/bin/mediaserver

 

 We still don't know why this is happening, though. It's not an active face 
 detection - we double-checked that. A quick look through the Android source 
 code didn't give any insight either. Though my suspicion is that either 
 something is wrong with the ICS implementation or the camera driver. It 
 would be nice to get more info on that, and potential solutions to fix the 
 issue.


You could try and see if you can get git to give up a diff of the relevant 
files in mediaserver between the two versions of Android, but that may be a 
lengthy path to follow.

It would be interesting if you could reproduce the same difference in 
mediaserver CPU usage with someone else's code that doesn't do any (even 
dummy) native processing.  Could you try the CamerPreview in the ApiDemos 
of the sdk samples?   If you can reproduce the mediaserver CPU load 
reflected by top with that you'd clearly be in a position to file a bug 
report.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] application unable to access internet on device while working properly on android emulator?

2012-03-01 Thread Chris Stratton
On Thursday, March 1, 2012 5:41:40 AM UTC-5, Jagruti Sangani wrote:

 Hello,
 the Internet connection is on in the device but still not work.


First I assume you have tested that the internet connection of the device 
works (using the web browser or something) .

What type of internet connection does the device have - mobile or wifi?

If mobile, your traffic might be being blocked by the provider.

If wifi, you have some options for locally monitoring the traffic at the 
router (or to some extent from another machine on the wifi network).  

Most android devices seem to have netstat.

Most effectively, you could load up your code with logging messages to get 
an idea of where the failure is, or even use the java-level debugger.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Differences in USB Host support between Embedded Linux and Android phone

2012-02-29 Thread Chris Stratton
On Tuesday, February 28, 2012 1:40:18 AM UTC-5, David Henning wrote:

 I'm looking for some help understanding the current USB Host capabilities 
 of the latest Android smartphones versus an embedded processor running a 
 standard Linux build.  I've done quite a bit of driver-level Linux 
 development, but I'm totally new to Android.  


If you are in a position to install a customized kernel and alter the 
system partition of the devices, you can use ordinary embedded linux 
methods.  Your main hiccup is figuring out how to give an android 
application user id - which is usually allocated by the package manager - 
access to the device files, though if you are okay with giving all user 
id's access that's a non issue.  What android itself typically does for 
hardware is give ownership of them to semi-privileged GIDs which some 
system apps are able to acquire via matching android permissions.  Many of 
even first generation android devices are able to be USB hosts in this 
manner (see thread on the android kernel group, and on xda developers), 
though most of them would require custom wiring as they are unable to power 
usb peripherals.

I believe Honeycomb and later introduce some android-style APIs for talking 
to USB peripherals from userspace without per-device kernel drivers - 
something akin to libusb, though obviously not libusb.  It's not something 
I've yet had cause to try it personally, but the docs are at h
ttp://developer.android.com/guide/topics/usb/host.htmlhttp://developer.android.com/guide/topics/usb/host.html
.

As a general comment, working on a USB host project (using either linux or 
android methods) on and android device will be an exercise in extreme 
frustration unless you have a uid-shell (or better) shell session running 
on it via some non-usb channel that remains available while testing your 
USB host project.  That likely means either getting ADB's daemon listening 
on TCP (if you have root) or else launching an ssh server from the adb 
shell before unplugging from the pc and switching to host mode. 


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: USB serial with D2XXSamplefrom FTDI doesn't detect my device.

2012-02-29 Thread Chris Stratton
On Monday, February 27, 2012 4:28:46 PM UTC-5, Gett wrote:

 I'm trying to use an FTDI USB chip on Android following the 
 instructions at: 

 http://www.ftdichip.com/Android.htm 

 http://www.ftdichip.com/Support/Documents/TechnicalNotes/TN_134_FTDI_Android_D2XX_Driver.pdf
  

 

 The problem is that when I launch the D2XXSample app, the number of 
 devices detected when I click the Info button is always 0. 

 

 I'm working with Android 2.3.4. 


Are you working on an android device that is known to have usb host 
capability, and has a host (or OTG) driver in its kernel and has decided to 
go into usb host mode?

Some thing you could try:
 

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: USB serial with D2XXSamplefrom FTDI doesn't detect my device.

2012-02-29 Thread Chris Stratton


 On Monday, February 27, 2012 4:28:46 PM UTC-5, Gett wrote:

 I'm trying to use an FTDI USB chip on Android following the 
 instructions at: 

 http://www.ftdichip.com/Android.htm 

 http://www.ftdichip.com/Support/Documents/TechnicalNotes/TN_134_FTDI_Android_D2XX_Driver.pdf
  

  

 The problem is that when I launch the D2XXSample app, the number of 
 devices detected when I click the Info button is always 0. 

  

 I'm working with Android 2.3.4. 


 Are you working on an android device that is known to have usb host 
 capability, and has a host (or OTG) driver in its kernel and has decided to 
 go into usb host mode?


The most important thing you haven't mentioned is the android device you 
are testing on.
 
Some thing you could try:

- first search to see if anyone else has done usb host work with the 
android device in question
- use a voltmeter to verify the FTDI chip is powered - many 
pre-official-usb-host-support android devices aren't capable of providing 
this
- adb pull, uncompress, and examine /proc/config.gz  to see what options 
your kernel was compiled with
- run dmesg from the adb shell shortly after a host usage attempt (or even 
during it with a terminal app) and see if there's any mention of a new usb 
device

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

Re: [android-developers] Re: How to get the DB File from real android device

2012-02-29 Thread Chris Stratton
On Friday, February 24, 2012 5:52:51 AM UTC-5, Sridhar Reddy wrote:
Hi.. Only in emulator we can able to access the db files, but it is not 
possible on Real devices? How to access the db file on real device?

If you have non-root ADB but your app is debug-able you have to use the 
run-as command (or apparently as Dianne notes on later version, su) 

It would be something like 

adb shell
run-as your.package.name /system/bin/sh
whatever shell commands you were trying to do

if you try the ps command after the run-as command, you should see that 
there is now a second copy of /system/bin/sh running as uid app_## in 
addition to the parent copy running as uid 'shell'

If you have neither root nor a debug-able app nor the ability to rebuild it 
as debug-able or with a built-in export capability, you are out of luck.

Beware the adb shell on stock devices is primitive - it seems 'permission 
denied' is the only error message it knows, and it uses it as a synonym for 
command not found, and just about anything else that can go wrong.

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

2012-02-29 Thread Chris Stratton
On Wednesday, February 22, 2012 5:12:21 PM UTC-5, Bret Foreman wrote:

 I'm considering running ADB over a WiFi connection rather than via the 
 USB cable. I've read a lot of blog posts about it but I want to verify 
 a few things: 

 1) Is it true that the phone must be rooted? If so, is SuperOneClick 
 the preferred tool to use for rooting? 


If it's not a built in option as others have mentioned, then yes, you 
normally need root to switch on adb-over-tcp.  There may be some 
workarounds you could set up per-boot by first connecting on wired adb. 
 Launching an ssh server from wired adb after boot would give you shell 
capabilities as the usual shell userid, but not a jdwp debugger or 
integration with adb-based host-side tools.
 

 2) Once I can connect with command-line ADB over WiFi, is it a simple 
 process to enable download/debugging over WiFi from within Eclipse? 


Yes it basically just works.
 

 3) Are there any gotchas that I should look out for? 


ADB over TCP likes to timeout without realizing it, at which point you have 
to manually disconnect and reconnect.  The -s parameter to adb must be in 
the form of ipaddress:port when specifying a tcp target.  

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

  1   2   3   4   >