[android-developers] Editable WebView or a reasonable facsimile thereof?

2012-04-25 Thread FractalBob
Anyone know if there is an editable WebView somewhere in the wild or
if Google has plans to make the standard WebView editable? I need such
a creature for an app I'm working on (my app is based on K9 Mail,
which uses an extension of WebView). Mozilla provides an editable
browser-type window to its developers, so does Microsoft, so I would
expect Android to have one, but no. My app doesn't even need full HTML
support, only a few tags, like what EditText supports, but for various
reasons I can't replace the WebView in K9 Mail with an EditText.

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

2012-04-25 Thread Simon Platten
Hi,

The RMC message contains a status parameter, this is either V=data not
valid or A=data valid.  You need to wait until you read an A in the RMC,
before this you will not get a ZDA message even if you have enabled it.

To enable RMC messages:

$PSRF103,04,00,01,01

Once you get an A in the RMC message you should then enable ZDA messages:

$PSRF103,08,00,01,01

You will need to calculate and append checksum to the enable messages which
I haven't done.  The ZDA message contains a UTC time, also day, month and
year, local time offsets to UCT are also included.  The time is the details
the 1PPS pulse that has just occurred.



On Wed, Apr 25, 2012 at 6:44 AM, StarTraX gpsanima...@gmail.com wrote:

 Yes I do and will give it a go. Ta.


 On Wednesday, April 25, 2012 3:01:33 PM UTC+10, andrewg_oz wrote:

 1300ms ahead sounds odd. If it was behind I'd say it was just a reporting
 delay as part of the usual message processing, but ahead is weird.

 It's not GPS, but if you have an Internet connection, what about querying
 an NTP server?

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




-- 
http://about.me/SPlatten

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

[android-developers] onSearchRequested() result in same activity

2012-04-25 Thread Live Happy
i have implement in my application the search method onSearchRequested()
via list and it work well and i create 2 activity one for list data and
another for the search result in that form

public class acitvity1 extends InterfaceBase {

@Override
ListAdapter makeMeAnAdapter(Intent intent) {

  return(new
ArrayAdapterString(this,android.R.layout.simple_list_item_1,items));

}
}

and the activity 2 who include the search result

public abstract class Acitvity2 extends InterfaceBase {

   @Override
ListAdapter makeMeAnAdapter(Intent intent) {

ListAdapter adapter=null;

if (intent.getAction().equals(Intent.ACTION_SEARCH)) {
String query=intent.getStringExtra(SearchManager.QUERY);
ListString results=searchItems(query);

adapter=new
ArrayAdapterString(this,android.R.layout.simple_list_item_1,results);
setTitle(Search : +query);
}
return(adapter);
}
private ListString searchItems(String query) {
SearchSuggestionProvider
.getBridge(this)
.saveRecentQuery(query, null);

ListString results=new ArrayListString();

for (String item : items) {
if (item.indexOf(query)-1) {
results.add(item);
}
}
return(results);
}

so its there a possible to make the search result appear in callback
activity mean in the activity1 and is there any change should do in the
manifest file too thx for help

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

Re: [android-developers] Re: How to get accurate time stamps from Android GPS location.

2012-04-25 Thread StarTraX
Further, here are the sentence types I do get:
GPGSA, GPGGA, GPGLL, GPRMC, GPGSV, GPVTG. The SiRF manual indicates the ZDA 
message is only provided to the GSW2 software versions 2.3.2 and above - 
maybe that's not being implemented on  the phones.

On Wednesday, April 25, 2012 3:43:34 PM UTC+10, StarTraX wrote:

 Hi Sy, Thanks for your input. If I understand you correctly, you are 
 suggesting I look for a $GPZDA NMEA sentence. I have just checked the SiRF 
 NMEA Manual and tried it. I'm getting RMC and GGA but no ZDA sentences on 
 either my SGS 11  or HTC , both running 2.3.3. Am I missing something here?


 On Wednesday, April 25, 2012 3:13:46 PM UTC+10, Sy wrote:

 You need to enable RMC messages and then wait for a GPS lock, then enable 
 ZDA messages these give a 1PPS message with a timestamp accurate to 1ms.
 On Apr 25, 2012 6:02 AM, Andrew Gregory andrew.greg...@gmail.com 
 wrote:
 
  1300ms ahead sounds odd. If it was behind I'd say it was just a 
 reporting delay as part of the usual message processing, but ahead is weird.
 
  It's not GPS, but if you have an Internet connection, what about 
 querying an NTP server?
 
  -- 
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to 
 android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+unsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/group/android-developers?hl=en



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

[android-developers] Could not stat dex cache directory '/data/dalvik-cache': No such file or directory

2012-04-25 Thread Mamatha K
Dear All,
Kindly help me in solving the below problem.

I use sdcard for booting android on blaze.

When android boots, the below issue is seen.
The logcat is

logcat
- beginning of /dev/log/main
I/DEBUG   (  111): debuggerd: Apr 24 2012 17:35:29
E/installd(  118): Could not create directories; exiting.
E/keystore(  119): chdir: /data/misc/keystore: No such file or
directory
- beginning of /dev/log/system
I/Vold(  109): Vold 2.1 (the revenge) firing up
D/Vold(  109): Volume sdcard state changing -1 (Initializing) - 0
(No-Media)
I/Netd(  110): Netd 1.0 starting
D/Vold(  109): Volume sdcard state changing 0 (No-Media) - 2
(Pending)
D/Vold(  109): Volume sdcard state changing 2 (Pending) - 1 (Idle-
Unmounted)
I/(  115): ServiceManager: 0x1779910
D/AndroidRuntime(  114):
D/AndroidRuntime(  114):  AndroidRuntime START
com.android.internal.os.ZygoteInit 
D/AndroidRuntime(  114): CheckJNI is OFF
I/SurfaceFlinger(  113): SurfaceFlinger is starting
I/SurfaceFlinger(  113): SurfaceFlinger's main thread ready to run.
Initializing graphics H/W...
E/dalvikvm(  114): Could not stat dex cache directory '/data/dalvik-
cache': No such file or directory
I/dalvikvm(  114): Unable to open or create cache for /system/
framework/core.jar (/data/dalvik-cache/
system@framew...@core.jar@classes.dex)
D/dalvikvm(  114): Unable to pr[   23.368774] init: untracked pid 209
exited
ocess classpath element '/system/framework/core.jar'
I/(  116): ServiceManager: 0x913958
I/AudioFlinger(  116): Loaded primary audio interface from Default
audio HW HAL (audio)
I/AudioFlinger(  116): Using 'Default audio HW HAL' (audio.primary) as
the primary audio interface
E/dalvikvm(  114): Could not stat dex cache directory '/data/dalvik-
cache': No such file or directory
I/dalvikvm(  114): Unable to open or create cache for /system/
framework/core-junit.jar (/data/dalvik-cache/system@framework@core-
junit@classes.dex)
D/dalvikvm(  114): Unable to process classpath element '/system/
framework/core-junit.jar'
I/AudioFlinger(  116): Loaded a2dp audio interface from A2DP Audio HW
HAL (audio)
I/CameraService(  116): CameraService started (pid=116)
E/FramebufferNativeWindow(  113): couldn't open framebuffer HAL (Not a
typewriter)
E/FramebufferNativeWindow(  113): couldn't open gralloc HAL (Not a
typewriter)
E/SurfaceFlinger(  113): Display subsystem failed to initialize. check
logs. exiting...
E/dalvikvm(  114): Could not stat dex cache directory '/data/dalvik-
cache': No such file or directory
I/dalvikvm(  114): Unable to open or create cache for /system/
framework/bouncycastle.jar (/data/dalvik-cache/
system@framew...@bouncycastle.jar@classes.dex)
D/DOMX(  116): hardware/ti/domx/omx_core/src/OMX_Core.c:250
OMX_GetHandle()
D/DOMX(  116): ERROR: Can't open misc driver device 0xd
D/DOMX(  116):
D/DOMX(  116): hardware/ti/domx/domx/omx_rpc/src/omx_rpc.c:
140  RPC_InstanceInit()
D/DOMX(  116): ERROR: Can't open device, errorno from open = 13
D/DOMX(  116): hardware/ti/domx/domx/omx_rpc/src/omx_rpc_stub.c:
200 RPC_GetHandle()
D/DOMX(  116): ERROR: DOMX Write failed 0x -1
D/DOMX(  116): hardware/ti/domx/domx/omx_rpc/src/omx_rpc_stub.c:
200 RPC_GetHandle()
D/DOMX(  116): ERROR: failed check:status = 0  errno != ENXIO -
returning error: 0x81009 - Write failed due ducati in faulty state
D/DOMX(  116): hardware/ti/domx/domx/omx_proxy_common/src/
omx_proxy_common.c:1993   OMX_ProxyCommonInit()
D/DOMX(  116): ERROR: RPC function returned error 0x81009
D/DOMX(  116): hardware/ti/domx/domx/omx_proxy_common/src/
omx_proxy_common.c:1993   OMX_ProxyCommonInit()
D/DOMX(  116): ERROR: failed check:(eError == OMX_ErrorNone) -
returning error: 0x80001009 - Error returned from OMX API in ducati
D/DOMX(  116): hardware/ti/domx/domx/omx_rpc/src/omx_rpc.c:
261  RPC_InstanceDeInit()
D/DOMX(  116): ERROR: Close failed on omx fd
D/DOMX(  116): hardware/ti/domx/omx_proxy_component/omx_camera/src/
omx_proxy_camera.c:451   OMX_ComponentInit()
D/DOMX(  116): ERROR: ror in Initializing Proxy
E/CameraHal(  116): (400ea488)   hardware/ti/omap4xxx/camera/
OMXCameraAdapter/OMXCameraAdapter.cpp:3632 OMXCameraGetHandle -
OMX_GetHandle() failed, error: 9
D/AndroidRuntime(  146):
D/AndroidRuntime(  146):  AndroidRuntime START
com.android.internal.os.ZygoteInit 
D/AndroidRuntime(  146): CheckJNI is OFF
E/dalvikvm(  146): Could not stat dex cache directory '/data/dalvik-
cache': No such file or directory
I/dalvikvm(  146): Unable to open or create cache for /system/
framework/core.jar (/data/dalvik-cache/
system@framew...@core.jar@classes.dex)
D/dalvikvm(  146): Unable to process classpath element '/system/
framework/core.jar'
E/dalvikvm(  146): Could not stat dex cache directory '/data/dalvik-
cache': No such file or directory
I/dalvikvm(  146): Unable to open or create cache for /system/
framework/core-junit.jar (/data/dalvik-cache/system@framework@core-

Re: [android-developers] Re: How to get accurate time stamps from Android GPS location.

2012-04-25 Thread Simon Platten
If ZDA isn't implemented or supported then you are really out of luck as
the time from the GPS could be out significantly also add to that the lag
in sending and receiving the NMEA message.

We use the 1PPS pulse at work to synchronise remote devices in the field,
once we lock on with the RMC the 1PPS pulse is used to generate an
interrupt which ensures that devices are absolutely in sync.

On Wed, Apr 25, 2012 at 8:39 AM, StarTraX gpsanima...@gmail.com wrote:

 Further, here are the sentence types I do get:
 GPGSA, GPGGA, GPGLL, GPRMC, GPGSV, GPVTG. The SiRF manual indicates the
 ZDA message is only provided to the GSW2 software versions 2.3.2 and above
 - maybe that's not being implemented on  the phones.

 On Wednesday, April 25, 2012 3:43:34 PM UTC+10, StarTraX wrote:

 Hi Sy, Thanks for your input. If I understand you correctly, you are
 suggesting I look for a $GPZDA NMEA sentence. I have just checked the SiRF
 NMEA Manual and tried it. I'm getting RMC and GGA but no ZDA sentences on
 either my SGS 11  or HTC , both running 2.3.3. Am I missing something here?


 On Wednesday, April 25, 2012 3:13:46 PM UTC+10, Sy wrote:

 You need to enable RMC messages and then wait for a GPS lock, then
 enable ZDA messages these give a 1PPS message with a timestamp accurate to
 1ms.
 On Apr 25, 2012 6:02 AM, Andrew Gregory andrew.greg...@gmail.com
 wrote:
 
  1300ms ahead sounds odd. If it was behind I'd say it was just a
 reporting delay as part of the usual message processing, but ahead is weird.
 
  It's not GPS, but if you have an Internet connection, what about
 querying an NTP server?
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@**
 googlegroups.com android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+**unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/**group/android-developers?hl=enhttp://groups.google.com/group/android-developers?hl=en

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




-- 
http://about.me/SPlatten

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

2012-04-25 Thread StarTraX
Sy.
Now you've got me really confused! I don't understand ..*sending*... the 
NMEA message. In my code I'm just listening for the NMEA sentence in an 
NMEA listener. There's no sending involved here is there?
On what sort of device are your receiving the ZDA sentence?
 

On Wednesday, April 25, 2012 5:43:23 PM UTC+10, Sy wrote:

 If ZDA isn't implemented or supported then you are really out of luck as 
 the time from the GPS could be out significantly also add to that the lag 
 in sending and receiving the NMEA message.

 We use the 1PPS pulse at work to synchronise remote devices in the field, 
 once we lock on with the RMC the 1PPS pulse is used to generate an 
 interrupt which ensures that devices are absolutely in sync.

 On Wed, Apr 25, 2012 at 8:39 AM, StarTraX gpsanima...@gmail.com wrote:

 Further, here are the sentence types I do get:
 GPGSA, GPGGA, GPGLL, GPRMC, GPGSV, GPVTG. The SiRF manual indicates the 
 ZDA message is only provided to the GSW2 software versions 2.3.2 and above 
 - maybe that's not being implemented on  the phones.

 On Wednesday, April 25, 2012 3:43:34 PM UTC+10, StarTraX wrote:

 Hi Sy, Thanks for your input. If I understand you correctly, you are 
 suggesting I look for a $GPZDA NMEA sentence. I have just checked the SiRF 
 NMEA Manual and tried it. I'm getting RMC and GGA but no ZDA sentences on 
 either my SGS 11  or HTC , both running 2.3.3. Am I missing something here?


 On Wednesday, April 25, 2012 3:13:46 PM UTC+10, Sy wrote:

 You need to enable RMC messages and then wait for a GPS lock, then 
 enable ZDA messages these give a 1PPS message with a timestamp accurate to 
 1ms.
 On Apr 25, 2012 6:02 AM, Andrew Gregory andrew.greg...@gmail.com 
 wrote:
 
  1300ms ahead sounds odd. If it was behind I'd say it was just a 
 reporting delay as part of the usual message processing, but ahead is 
 weird.
 
  It's not GPS, but if you have an Internet connection, what about 
 querying an NTP server?
 
  -- 
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@**
 googlegroups.com android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+**unsubscr...@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/**group/android-developers?hl=enhttp://groups.google.com/group/android-developers?hl=en

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




 -- 
 http://about.me/SPlatten



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

2012-04-25 Thread Simon Platten
Sorry, you are quite correct, I'm working with lots of protocols, a lot of
which are polled, sorry for the confusion, you do just listen for and
receive an NMEA message.

The only sending involved is to enable specific messages.

Our GPS receivers are embedded devices, I'm not absolutely sure of the part
no.  but the ZDA message is well document in the NMEA specification.

On Wed, Apr 25, 2012 at 9:04 AM, StarTraX gpsanima...@gmail.com wrote:

 Sy.
 Now you've got me really confused! I don't understand ..*sending*... the
 NMEA message. In my code I'm just listening for the NMEA sentence in an
 NMEA listener. There's no sending involved here is there?
 On what sort of device are your receiving the ZDA sentence?


 On Wednesday, April 25, 2012 5:43:23 PM UTC+10, Sy wrote:

 If ZDA isn't implemented or supported then you are really out of luck as
 the time from the GPS could be out significantly also add to that the lag
 in sending and receiving the NMEA message.

 We use the 1PPS pulse at work to synchronise remote devices in the field,
 once we lock on with the RMC the 1PPS pulse is used to generate an
 interrupt which ensures that devices are absolutely in sync.

 On Wed, Apr 25, 2012 at 8:39 AM, StarTraX gpsanima...@gmail.com wrote:

 Further, here are the sentence types I do get:
 GPGSA, GPGGA, GPGLL, GPRMC, GPGSV, GPVTG. The SiRF manual indicates the
 ZDA message is only provided to the GSW2 software versions 2.3.2 and above
 - maybe that's not being implemented on  the phones.

 On Wednesday, April 25, 2012 3:43:34 PM UTC+10, StarTraX wrote:

 Hi Sy, Thanks for your input. If I understand you correctly, you are
 suggesting I look for a $GPZDA NMEA sentence. I have just checked the SiRF
 NMEA Manual and tried it. I'm getting RMC and GGA but no ZDA sentences on
 either my SGS 11  or HTC , both running 2.3.3. Am I missing something here?


 On Wednesday, April 25, 2012 3:13:46 PM UTC+10, Sy wrote:

 You need to enable RMC messages and then wait for a GPS lock, then
 enable ZDA messages these give a 1PPS message with a timestamp accurate to
 1ms.
 On Apr 25, 2012 6:02 AM, Andrew Gregory andrew.greg...@gmail.com
 wrote:
 
  1300ms ahead sounds odd. If it was behind I'd say it was just a
 reporting delay as part of the usual message processing, but ahead is 
 weird.
 
  It's not GPS, but if you have an Internet connection, what about
 querying an NTP server?
 
  --
  You received this message because you are subscribed to the Google
  Groups Android Developers group.
  To post to this group, send email to android-developers@**
 googlegroup**s.com android-developers@googlegroups.com
  To unsubscribe from this group, send email to
  android-developers+**unsubscribe**@googlegroups.comandroid-developers%2bunsubscr...@googlegroups.com
  For more options, visit this group at
  http://groups.google.com/**group**/android-developers?hl=enhttp://groups.google.com/group/android-developers?hl=en

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




 --
 http://about.me/SPlatten

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




-- 
http://about.me/SPlatten

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Why my phone must connet the power that the APP can work well?

2012-04-25 Thread deb-account

On 17/04/12 13:56, kaixinyang wrote:

Why my phone must connet the power that the APP can work well?

   

You should at least provide the following information:

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?


What version are you using?


Please provide any additional information below (code snippet, log...)

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


[android-developers] How to receive UDP packet in Java from a C structure ?

2012-04-25 Thread Bibu
Hi,

I would like to get back my object in my android application, this object 
is sent over udp from a native android application coded in C and running 
on the same device that the Android application.

Here what I've done :

*MyClass myData = new  MyClass();*
*byte[] buf = new byte[1];*
*DatagramSocket socket = new DatagramSocket(null);*
*socket.setReuseAddress(true);*
*socket.bind(new InetSocketAddress(127.0.0.1, SERVERPORT));*
*DatagramPacket packet = new DatagramPacket(buf, buf.length);*
*socket.receive(packet); *


I've also made the java class which fits the C structure that I send.
My question is, how to get back the data ? and how to set the correct size 
of the buffer ? because it changes on the time, so I would like to fix him 
with the max size  

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

2012-04-25 Thread Dusk Jockeys Android Apps
Thanks so much for spamming this group with exact details about how
you are spamming this group.


On Apr 23, 5:19 pm, Lelaina Pierce laney...@gmail.com wrote:
 Email marketing is one of the highly used medium to reach thousands of
 peoples through internet but it isn’t that much effective in most of
 the cases. Until and unless you have a good, established  reputable
 website with genuine client base, it doesn’t work well. Though it cost
 little but what is the use of paying if it doesn’t work especially
 when you are doing it first time or new to email marketing.

 Let me share you a free-of-cost approach to market your company, I’m
 sure most of you guys are already aware of it but in case if anyone
 isn’t.

 From couple of months, I have been marketing my blogs through GOOGLE
 GROUPS. Marketing blogs via groups is a good and free of cost idea but
 it will take a lot of time, you need to hire staff or otherwise you
 auto-posting bots to do so but auto-bots will make it spamming. Well,
 here is how I am doing it and driving instant traffic – I got 15 gmail
 accounts and each account has 200 groups. I use tools like iMacro/
 Robomaker to post a single message with spinning text at all of these
 groups, so how many members I approach, let’s say 15*200*150=450,000
 members. (Actually, there are more members than that!). I know your
 next question would be about moderated groups, well, yes some of
 groups are moderated and may allow the post to be published if they
 like it anyhow, who cares, at-least I am having 300k members in half-
 an-hour. Good enough for free!

 Is it spamming?

 Well, in first thought YES it is – spamming includes duplicate content
 in every single post but what IF it is UNIQUE or different every time?
 See, I use advanced spinning techniques every time before any post,
 making it look bit different or sometimes truly unique, just to make
 Google thinks I am not spamming.

 I have been using this approach from lots of month and I know how much
 effective it is, I am trying to add more and more groups in my lists
 with higher member base. If you guys out there aren’t using this
 technique yet, go ahead, I’m sure you will have better results like
 me. I won’t share my email but if you like, I got Robomaker bots
 available for sale – all you have to do is make emails, join groups
 and put them in a csv file at your desktop and let the bot now the
 path then put subject line and message in the bot and execute it.

 {If a|A}nyone {require my|want} {help|assistance}, do {tell me|let me
 know} – it would be my pleasure helping you out!

 Regards,

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

2012-04-25 Thread Andrew Gregory
Yeah, I'm pretty sure you can't send commands to the Android GPS device.
You'd probably need to be root and figure out the underlying 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] onSearchRequested() result in same activity

2012-04-25 Thread Kostya Vasilyev
If you're on API 11 and higher, you can use this to be notified when the 
user submits a query:


http://developer.android.com/reference/android/widget/SearchView.html#setOnQueryTextListener(android.widget.SearchView.OnQueryTextListener) 
http://developer.android.com/reference/android/widget/SearchView.html#setOnQueryTextListener%28android.widget.SearchView.OnQueryTextListener%29


For previous API levels, you may be able to use a singleTop activity and 
override its onNewIntent.


-- K

25.04.2012 11:15, Live Happy написал:


so its there a possible to make the search result appear in callback 
activity mean in the activity1 and is there any change should do in 
the manifest file too thx for help




--
Kostya Vasilyev

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


Re: [android-developers] AlphabetIndexer with Custom Adapter managed by LoaderManager

2012-04-25 Thread Kostya Vasilyev

How does it error out? A crash? What's the stack trace?

In general, the fast section indexer does not update its sections list 
automatically when you replace the cursor. There is no method to force 
this except turn it off and the back on after you've changed the data.


-- K

25.04.2012 11:02, Etienne написал:
And if I comment the setFastScrollEnabled() call, then it does not 
error out, but I do not see the AlphabetIndexer working. Does anyone 
have suggestions about how to make this all work?


--
Kostya Vasilyev

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


Re: [android-developers] Radio buttons in list - need only one selectable button

2012-04-25 Thread Mark Murphy
On Tue, Apr 24, 2012 at 9:22 PM, Farhan Tariq farhan@gmail.com wrote:
 Sadly, there isnt much customization that I can do with it. I googled that
 up, and all seem to use android.R.layout.simple_list_item_single_choice
 layout for the purpose.

Which is a CheckedTextView -- you can examine the copy of this layout
in your SDK.

 I also came across checkedTextView, but I couldn't
 understand the theory behind. Can anyone please explain a little.

At the end of the day, so long as your row View implements the
Checkable interface, android:choiceMode should work. See:

http://www.marvinlabs.com/2010/10/custom-listview-ability-check-items/

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

Android App Developer Books: http://commonsware.com/books

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

2012-04-25 Thread Mark Murphy
On Wed, Apr 25, 2012 at 2:11 AM, FractalBob ruom...@gmail.com wrote:
 Anyone know if there is an editable WebView somewhere in the wild or
 if Google has plans to make the standard WebView editable? I need such
 a creature for an app I'm working on (my app is based on K9 Mail,
 which uses an extension of WebView). Mozilla provides an editable
 browser-type window to its developers, so does Microsoft, so I would
 expect Android to have one, but no. My app doesn't even need full HTML
 support, only a few tags, like what EditText supports, but for various
 reasons I can't replace the WebView in K9 Mail with an EditText.

Use a JavaScript-based rich text editor.

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

Android App Developer Books: http://commonsware.com/books

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

2012-04-25 Thread Mark Murphy
On Wed, Apr 25, 2012 at 1:12 AM, 3c ccouno...@gmail.com wrote:
 Here is a crash report I received today while my app runs:
 pm.getInstalledPackages(PackageManager.GET_ACTIVITIES);
 Can someone tell me how to resolve this?

My interpretation of the crash is that either:

-- The user has too many applications installed, such that the list of
installed packages with the activity data exceeds 1MB, or
-- The user is running some flawed firmware

I do not see how you can recover from either scenario.

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

Android App Developer Books: http://commonsware.com/books

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

2012-04-25 Thread StarTraX
I've been reading up on the GPS signal structure, and it's true that it 
takes 12 1/2 minutes for the full sequence, but... and this is a big but... 
the GPS time and GPS/UTC offset are sent with every sub frame, and they 
come by every six seconds. 
So you can forget about waiting 12 1/2 minutes. before being certain of the 
time! It's synchronized every 6 seconds. Its all well explained 
in Wikipedia http://en.wikipedia.org/wiki/GPS_signals



On Monday, April 23, 2012 5:47:21 PM UTC+10, andrewg_oz wrote:

 Some of the time confusion arises because GPS units can report a variety 
 of GPS Time, UTC and semi-corrected GPS Time. I discovered this when 
 building a precision timer for an industrial corrosion monitoring device.

 On startup the GPS would report UTC plus one second. Within 12.5 minutes 
 it would report exactly UTC, i.e. after reception of the GPS/UTC correction 
 factor. I could only assume that the GPS developers had pre-programmed in 
 the UTC/GPS clock offset that was current when the device was manufactured. 
 Since then a UTC leap second had been added.

 Importantly, there is no way to tell which of those times the GPS is 
 reporting. No doubt the precise behavior varies from chipset to chipset. 
 For my project I was using a SiRF III receiver and could switch on the raw 
 50bps data steam and watch for the GPS/UTC correction to be sure when I had 
 UTC time.

 AFAIK, there is no way of doing that on Android, so for truly accurate 
 times your best bet is to leave the GPS on for 12.5 minutes before reading 
 the time, and hope that it has successfully received the clock correction.

 -- 
 Andrew

  
On Monday, April 23, 2012 5:47:21 PM UTC+10, andrewg_oz wrote:

 Some of the time confusion arises because GPS units can report a variety 
 of GPS Time, UTC and semi-corrected GPS Time. I discovered this when 
 building a precision timer for an industrial corrosion monitoring device.

 On startup the GPS would report UTC plus one second. Within 12.5 minutes 
 it would report exactly UTC, i.e. after reception of the GPS/UTC correction 
 factor. I could only assume that the GPS developers had pre-programmed in 
 the UTC/GPS clock offset that was current when the device was manufactured. 
 Since then a UTC leap second had been added.

 Importantly, there is no way to tell which of those times the GPS is 
 reporting. No doubt the precise behavior varies from chipset to chipset. 
 For my project I was using a SiRF III receiver and could switch on the raw 
 50bps data steam and watch for the GPS/UTC correction to be sure when I had 
 UTC time.

 AFAIK, there is no way of doing that on Android, so for truly accurate 
 times your best bet is to leave the GPS on for 12.5 minutes before reading 
 the time, and hope that it has successfully received the clock correction.

 -- 
 Andrew

  

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

2012-04-25 Thread Kostya Vasilyev

Another way probably worth looking into is to use spans.

For example:

http://developer.android.com/reference/android/text/style/UnderlineSpan.html

http://developer.android.com/reference/android/text/style/TextAppearanceSpan.html

... and so on.

-- K

25.04.2012 15:05, Mark Murphy написал:

On Wed, Apr 25, 2012 at 2:11 AM, FractalBobruom...@gmail.com  wrote:

Anyone know if there is an editable WebView somewhere in the wild or
if Google has plans to make the standard WebView editable? I need such
a creature for an app I'm working on (my app is based on K9 Mail,
which uses an extension of WebView). Mozilla provides an editable
browser-type window to its developers, so does Microsoft, so I would
expect Android to have one, but no. My app doesn't even need full HTML
support, only a few tags, like what EditText supports, but for various
reasons I can't replace the WebView in K9 Mail with an EditText.

Use a JavaScript-based rich text editor.



--
Kostya Vasilyev

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


Re: [android-developers] onSearchRequested() result in same activity

2012-04-25 Thread Live Happy
may u give more details pls coz is not much clear till now
and if i plan to put the activity one in tab host and  mak tthe result
search activity2
 appear in same  tab host how  make  that coz i try the group acitvity but
didnt work with me

On Wed, Apr 25, 2012 at 12:50 PM, Kostya Vasilyev kmans...@gmail.comwrote:

 If you're on API 11 and higher, you can use this to be notified when the
 user submits a query:

 http://developer.android.com/**reference/android/widget/**SearchView.html#
 **setOnQueryTextListener(**android.widget.SearchView.**
 OnQueryTextListener)http://developer.android.com/reference/android/widget/SearchView.html#setOnQueryTextListener%28android.widget.SearchView.OnQueryTextListener%29
 http://developer.android.com/**reference/android/widget/**SearchView.html#
 **setOnQueryTextListener%**28android.widget.SearchView.**
 OnQueryTextListener%29http://developer.android.com/reference/android/widget/SearchView.html#setOnQueryTextListener%28android.widget.SearchView.OnQueryTextListener%29
 

 For previous API levels, you may be able to use a singleTop activity and
 override its onNewIntent.

 -- K

 25.04.2012 11:15, Live Happy написал:


 so its there a possible to make the search result appear in callback
 activity mean in the activity1 and is there any change should do in the
 manifest file too thx for help


 --
 Kostya Vasilyev

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

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

[android-developers] Single report after rerunning CTS failures

2012-04-25 Thread srikanth
Hi All,

Is there a way in CTS 4.0.3R2 to produce a single report after
rerunning CTS failures instead of creating a new report after
rerunning all failures from previous CTS report.

Thanks in advance.

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


[android-developers] admob in android sdk 2.2

2012-04-25 Thread Narendra Singh Rathore
Hi all,
Can anybody please tell if it is possible to use adView with android sdk
2.2.
I have recently upgraded adView library from Admob Sdk 4.0 to sdk 6.0, so
it is giving the error as follows:

*you must have AdActivity declared in AndroidManifest.xml with
configChanges.*

which later, after having research, giving me the suggestion to upgrade my
android Sdk version to 3.2 or above.

So, I just want to know that, if this is the only solution.
May I not able to use AdView using android Sdk 2.2?

Waiting for reply...plz help.


With Regards,
Narendra.

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

[android-developers] Contact UI Question

2012-04-25 Thread Mark Phillips
In my application, I need to collect information about (most likely) new
people for the phone's contact database (eg players on a sports team). I
see how to add the information using the Contacts API (
http://developer.android.com/resources/articles/contacts.html). I was
thinking of adding the contact with a new group name, so I can easily find
them again and display just those the names in a ListActivity.

What about the ui for creating and editing contacts? Do I have to create my
own contact editing ui, or is there a way to drop the user in the native
edit contact ui to enter the information about the contact, and then bring
them back to my app's ui when they are done?

Thanks,

Mark

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

2012-04-25 Thread FractalBob
I know about spanned text and I'm prepared to use EdiText only if I
have to, but my question is about a true editable WebView, which would
facilitate my app immensely.

On Apr 25, 4:32 am, Kostya Vasilyev kmans...@gmail.com wrote:
 Another way probably worth looking into is to use spans.

 For example:

 http://developer.android.com/reference/android/text/style/UnderlineSp...

 http://developer.android.com/reference/android/text/style/TextAppeara...

 ... and so on.

 -- K

 25.04.2012 15:05, Mark Murphy написал:

  On Wed, Apr 25, 2012 at 2:11 AM, FractalBobruom...@gmail.com  wrote:
  Anyone know if there is an editable WebView somewhere in the wild or
  if Google has plans to make the standard WebView editable? I need such
  a creature for an app I'm working on (my app is based on K9 Mail,
  which uses an extension of WebView). Mozilla provides an editable
  browser-type window to its developers, so does Microsoft, so I would
  expect Android to have one, but no. My app doesn't even need full HTML
  support, only a few tags, like what EditText supports, but for various
  reasons I can't replace the WebView in K9 Mail with an EditText.
  Use a JavaScript-based rich text editor.

 --
 Kostya Vasilyev

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


Re: [android-developers] Scan Slider action be applied on a view.

2012-04-25 Thread tarun sablok
Ok I got it   one last thing  lets suppose I have my handle  as
LinearLayout in horizontal fashion with 3 images  on which i have to handle
 the animations like  swipe animations left and right  ..is it possible
...(IN this screnario my content is hidden and  only my handle  is visible )

and when i drag the handle  the images which was there in the handle ( 3
images ) should automatically  get stacked in the content  dynamically
which i will take care in the code.

regards

tarun




On Wed, Apr 25, 2012 at 12:55 AM, Justin Anderson magouyaw...@gmail.comwrote:

 Sliding drawer will be hidden which i will  have to drag out to the srceen
  but as I explained  that I want a view to be displayed at the bottom of
 the screen which will be any layout ... and when i click that view it
 should come out as a drawer.

 Unless I'm not understanding your requirement, that is EXACTLY how
 SlidingDrawer works...

 Here is the sample XML file on the SlidingDrawer docs...

  SlidingDrawer
  android:id=@+id/drawer


  android:layout_width=match_parent
  android:layout_height=match_parent


  android:handle=@+id/handle
  android:content=@+id/content


  ImageView
  android:id=@id/handle


  android:layout_width=88dip
  android:layout_height=44dip /


  GridView
  android:id=@id/content


  android:layout_width=match_parent
  android:layout_height=match_parent /


  /SlidingDrawer

 The content is hidden... The handle is always visible.  And the handle can
 be any layout, just as you wanted.  And when you click that handle, it will
 come out as a drawer, just like you want.


 Thanks,
 Justin Anderson
 MagouyaWare Developer
 http://sites.google.com/site/magouyaware


 On Tue, Apr 24, 2012 at 1:12 PM, tarun sablok tarun.sab...@gmail.comwrote:

 Sliding drawer will be hidden which i will  have to drag out to the
 srceen  but as I explained  that I want a view to be displayed at the
 bottom of the screen which will be any layout ... and when i click that
 view it should come out as a drawer.



 On Tue, Apr 24, 2012 at 7:07 PM, Justin Anderson 
 magouyaw...@gmail.comwrote:

 Use SlidingDrawer...
 http://developer.android.com/reference/android/widget/SlidingDrawer.html

 Thanks,
 Justin Anderson
 MagouyaWare Developer
 http://sites.google.com/site/magouyaware


 On Tue, Apr 24, 2012 at 6:54 AM, tarun sablok tarun.sab...@gmail.comwrote:

 I have a Relative Layout view with layout_gravity = bottom...
 and it has 3 images one on the left , one middle and one on the right
 and it occupies approximately  1\6 th of the screen in the bottom .

 Now i want  that  when the user clicks on the RelativeLayout
 anywhere  the  layout should open  up as a slider  which opens up  and
 occupies  approx 3/4th  of the screen  and have images arranged in
 them  like in a grid.

 Any pointers  for this how this can be done

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


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


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


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


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

[android-developers] Total Available memory for Memory Management logic.

2012-04-25 Thread Anieeh
Hi all
I am having problem with releasing memory problem, i have a
Hashmap in which i am adding Bitmap object, and the no. of bitmaps are
quite large. for this reason i am getting OutOfMemoryError. So for
this i have decided to release Bitmap whic is least used from
Collection, on memory crunch or system getting low heap memory.
  For getting current memory available i used
ActivityManager.MemoryInfo.availMem but it gives total RAM size
memory, not Available Heap memory. And i found that this memory is not
getting updated on releasing  Bitmap from collection.

Then i have used these three method
Debug.getNativeHeapAllocatedSize()
Debug.getNativeHeapFreeSize()
Debug.getNativeHeapSize()

but found the NativeHeapSize goes on increasing upto some certain say
16MB changing after that an outOfMemoryError occur. In this also i
found that the NativeHeapAllocatedSize and getNativeHeapSize not
decreasing on releasing  Bitmap from collection.

So please help me for solving the problem if anyone facing the same
problem and fixed earlier it.

My problem is i want to calculate Max Available application memory
allocated and currently available memory, for such that if
currently available memory goes beyond the Threshold memory i will
release some Bitmap from the collection and GC will reclaim the memory
and free it without generating error.

Thanks in advance
Anieeh

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

2012-04-25 Thread Latimerius
I asked a similar question recently:

http://groups.google.com/group/android-developers/browse_thread/thread/5c26876b19de1a4d/d843121085218de7?lnk=gstq=bitmap.recycle#d843121085218de7

Check it out, Romain gave some good explanations there.

If you'd just like to free some memory on out-of-memory condition you
shouldn't need exact numbers (those are hard to get as explained in
the linked topic).  Why don't you just catch OutOfMemoryError and
handle it by freeing your least recently used bitmaps, then perhaps
restart the operation that caused the fault?  Do you need an early
warning (even before you actually run out of heap) for some reason?

On Wed, Apr 25, 2012 at 5:57 PM, Anieeh animesh.andr...@gmail.com wrote:
 Hi all
    I am having problem with releasing memory problem, i have a
 Hashmap in which i am adding Bitmap object, and the no. of bitmaps are
 quite large. for this reason i am getting OutOfMemoryError. So for
 this i have decided to release Bitmap whic is least used from
 Collection, on memory crunch or system getting low heap memory.
  For getting current memory available i used
 ActivityManager.MemoryInfo.availMem but it gives total RAM size
 memory, not Available Heap memory. And i found that this memory is not
 getting updated on releasing  Bitmap from collection.

 Then i have used these three method
 Debug.getNativeHeapAllocatedSize()
 Debug.getNativeHeapFreeSize()
 Debug.getNativeHeapSize()

 but found the NativeHeapSize goes on increasing upto some certain say
 16MB changing after that an outOfMemoryError occur. In this also i
 found that the NativeHeapAllocatedSize and getNativeHeapSize not
 decreasing on releasing  Bitmap from collection.

 So please help me for solving the problem if anyone facing the same
 problem and fixed earlier it.

 My problem is i want to calculate Max Available application memory
 allocated and currently available memory, for such that if
 currently available memory goes beyond the Threshold memory i will
 release some Bitmap from the collection and GC will reclaim the memory
 and free it without generating error.

 Thanks in advance
 Anieeh

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

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


Re: [android-developers] setPreviewCallback - onPreviewFrame returning byte array

2012-04-25 Thread Justin Anderson
Seems to me everything you need is nicely documented...
http://developer.android.com/reference/android/hardware/Camera.PreviewCallback.html#onPreviewFrame%28byte[],%20android.hardware.Camera%29

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Tue, Apr 24, 2012 at 11:57 PM, Taylor Niver tniver1...@gmail.com wrote:

 I have a code that opens the camera and displays it to a SurfaceHolder. I
 then call onPreviewFrame which grabs the displayed image and stores the
 data as a byte array. I then TCPIP the info over to my computer which is
 where I hope to decode the array back into an image so I can do some
 off-processor vision processing. My only issue is that the byte array isn't
 in any logical format. Does anybody know how to decode the byte array from
 an 'onPreviewFrame' to become an image again?

 Thanks, Taylor

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

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

[android-developers] Re: sensor data logging to SD card 6x to 10x slower after Nexus S gets update to ICS

2012-04-25 Thread greg
For the record, rebooting with a momentary battery removal restored the 
sensor data acquisition rate to the previous rate. (In other words, I 
thankfully do not have to revert back to a prior OS version in order to 
acquire sensor data at the rate my application requires.)

On Monday, April 9, 2012 2:31:35 PM UTC-4, greg wrote:

 Last year, I slightly modified the SDK's samples/ApiDemos/OS/Sensors.java 
 code to log the acquired sensor data to the Nexus S internal SD card in CSV 
 format. Last week, after updating the Nexus S from OS 2.3.3 to 4.0.4, the 
 number of logged samples per second plummeted from about 50 samples per 
 second (accelerometer, magnetometer, and gyroscope) to between 5 to 8 
 samples per second. In addition, the application's real time display of 
 data is no longer smooth and continuous but now has lags of several 
 seconds. Also, the TextToSpeech voice saying starting that I added to the 
 beginning of my modified sample application now has about a dozen audible 
 gaps in the output of that one word (e.g., 
 s...s...st...t...ah...ar...rr...rrt..tti...ining). Given that the 
 unmodified ApiDemos/OS/Sensors.java runs smoothly on OS 4.0.4, I suspect 
 the decrease in sampling speed is related to some change in the OS's 
 efficiency of writing to the SD card.

 Has anyone else noticed problems related to SD card write speed after 
 updating to OS 4.0.4 (Ice Cream Sandwich)? If I don't hear from anyone, 
 I'll try to isolate the problem with a simpler application and 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

[android-developers] BitmapFactory.Options inTempStorage

2012-04-25 Thread Jim Graham
While working on trying to squeeze in as much space for processing
bitmaps in my app, I noticed this method, and from what I've read,
believe it might help.  What I have not found, however, is a real (and
clear) description of what it does, and how to best use it.

The dev guide page suggests using it to create about 15 kB of temp
space.  Examples I've seen from this list in the past suggest the
same, even for as much as 9 MB bitmaps.  15 kB temp space for 9 MB
bitmaps makes no sense to me, so I'm clearly missing something.

Can someone please either explain it, or point me to a page that
does?

Thanks,
   --jim

-- 
THE SCORE:  ME:  2  CANCER:  0
73 DE N5IAL (/4)MiSTie #49997   Running FreeBSD 7.0 
spooky1...@gmail.com ICBM/Hurricane: 30.44406N 86.59909W

  'Wrong' is one of those concepts that depends on witnesses.
 --Catbert:  Evil Director of Human Resources (Dilbert, 05Nov09)

Android Apps Listing at http://www.jstrack.org/barcodes.html

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


Re: [android-developers] BitmapFactory.Options inTempStorage

2012-04-25 Thread Justin Anderson
I don't know for sure, but I would assume that is because it doesn't decode
the entire 9 MB image at once...

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Wed, Apr 25, 2012 at 11:15 AM, Jim Graham spooky1...@gmail.com wrote:

 While working on trying to squeeze in as much space for processing
 bitmaps in my app, I noticed this method, and from what I've read,
 believe it might help.  What I have not found, however, is a real (and
 clear) description of what it does, and how to best use it.

 The dev guide page suggests using it to create about 15 kB of temp
 space.  Examples I've seen from this list in the past suggest the
 same, even for as much as 9 MB bitmaps.  15 kB temp space for 9 MB
 bitmaps makes no sense to me, so I'm clearly missing something.

 Can someone please either explain it, or point me to a page that
 does?

 Thanks,
   --jim

 --
 THE SCORE:  ME:  2  CANCER:  0
 73 DE N5IAL (/4)MiSTie #49997   Running FreeBSD 7.0 
 spooky1...@gmail.com ICBM/Hurricane: 30.44406N 86.59909W

  'Wrong' is one of those concepts that depends on witnesses.
 --Catbert:  Evil Director of Human Resources (Dilbert, 05Nov09)

 Android Apps Listing at http://www.jstrack.org/barcodes.html

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

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

Re: [android-developers] Unknown Android Packaging Problem: java.lang.ArrayIndexOutOfBoundsException: 13

2012-04-25 Thread Rohit Lagu
Hi Shantanu,

I have check Create Test Project option  run application it works. :) :) 
:) :) :) 



https://lh3.googleusercontent.com/-nB3iCOiCgV0/T5g0pb4BbxI/AXY/j-AAAIHKUQQ/s1600/2012-04-25_22-32-49.jpg

Now New problem arise. While Testing on Device i got many instance of my 
attached device in Choose running Android Device.

Any ways now can code  run android application on new laptop :)
Thanks again.


-Rohit.



On Friday, April 13, 2012 4:35:20 PM UTC+5:30, Androidic wrote:

 Hi Rohit

 Your project is getting associated with some Test Project which you are 
 not mapping with your newly created project. When you are creating any new 
 project check carefully whether you are including the Create Test Project 
 option or not.

 Thanks,
 Shantanu Mitra. 

 On Fri, Apr 13, 2012 at 12:00 AM, Rohit Lagu laguro...@gmail.com wrote:

 Hi All,
 I have installed all latest version software in my machine ( 
 eclipse-java-indigo-SR2-win32-x86_64, ADT V18 , Android Latest version)

 When i create a new android application  build it all works fine. but 
 when i try to run application in simulator i got this error 

 Description 
ResourcePath Location 
  Type
 Error generating final archive: java.lang.ArrayIndexOutOfBoundsException: 
 13TestProject Unknown Android Packaging Problem

 I have search on net for this but did not got anything. same error found 
 on stack-overflow 
 http://stackoverflow.com/questions/8835258/android-packaging-error-arrayindexoutofboundsexception
 .

 please help,

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



On Friday, April 13, 2012 4:35:20 PM UTC+5:30, Androidic wrote:

 Hi Rohit

 Your project is getting associated with some Test Project which you are 
 not mapping with your newly created project. When you are creating any new 
 project check carefully whether you are including the Create Test Project 
 option or not.

 Thanks,
 Shantanu Mitra. 

 On Fri, Apr 13, 2012 at 12:00 AM, Rohit Lagu laguro...@gmail.com wrote:

 Hi All,
 I have installed all latest version software in my machine ( 
 eclipse-java-indigo-SR2-win32-x86_64, ADT V18 , Android Latest version)

 When i create a new android application  build it all works fine. but 
 when i try to run application in simulator i got this error 

 Description 
ResourcePath Location 
  Type
 Error generating final archive: java.lang.ArrayIndexOutOfBoundsException: 
 13TestProject Unknown Android Packaging Problem

 I have search on net for this but did not got anything. same error found 
 on stack-overflow 
 http://stackoverflow.com/questions/8835258/android-packaging-error-arrayindexoutofboundsexception
 .

 please help,

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



On Friday, April 13, 2012 4:35:20 PM UTC+5:30, Androidic wrote:

 Hi Rohit

 Your project is getting associated with some Test Project which you are 
 not mapping with your newly created project. When you are creating any new 
 project check carefully whether you are including the Create Test Project 
 option or not.

 Thanks,
 Shantanu Mitra. 

 On Fri, Apr 13, 2012 at 12:00 AM, Rohit Lagu laguro...@gmail.com wrote:

 Hi All,
 I have installed all latest version software in my machine ( 
 eclipse-java-indigo-SR2-win32-x86_64, ADT V18 , Android Latest version)

 When i create a new android application  build it all works fine. but 
 when i try to run application in simulator i got this error 

 Description 
ResourcePath Location 
  Type
 Error generating final archive: java.lang.ArrayIndexOutOfBoundsException: 
 13TestProject Unknown Android Packaging Problem

 I have search on net for this but did not got anything. same error found 
 on stack-overflow 
 http://stackoverflow.com/questions/8835258/android-packaging-error-arrayindexoutofboundsexception
 .

 please help,

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

[android-developers] Re: Total Available memory for Memory Management logic.

2012-04-25 Thread Anieeh

Thanks Latimerius
   For your quick reply, yes i need an early warning (even before you
actually run out of heap)
because after an error occur OutOfMemory and then if i release some
memory and restart the
same operation it will give the same error since the GC wont collect
the free memory as soon as
we released some bitmap memory. And the same will happen over and
over, and it increase the
overhead of re-Starting the same task.

Thanks in Advance
Anieeh


On Apr 25, 9:12 pm, Latimerius l4t1m3r...@googlemail.com wrote:
 I asked a similar question recently:

 http://groups.google.com/group/android-developers/browse_thread/threa...

 Check it out, Romain gave some good explanations there.

 If you'd just like to free some memory on out-of-memory condition you
 shouldn't need exact numbers (those are hard to get as explained in
 the linked topic).  Why don't you just catch OutOfMemoryError and
 handle it by freeing your least recently used bitmaps, then perhaps
 restart the operation that caused the fault?  Do you need an early
 warning (even before you actually run out of heap) for some reason?







 On Wed, Apr 25, 2012 at 5:57 PM, Anieeh animesh.andr...@gmail.com wrote:
  Hi all
     I am having problem with releasing memory problem, i have a
  Hashmap in which i am adding Bitmap object, and the no. of bitmaps are
  quite large. for this reason i am getting OutOfMemoryError. So for
  this i have decided to release Bitmap whic is least used from
  Collection, on memory crunch or system getting low heap memory.
   For getting current memory available i used
  ActivityManager.MemoryInfo.availMem but it gives total RAM size
  memory, not Available Heap memory. And i found that this memory is not
  getting updated on releasing  Bitmap from collection.

  Then i have used these three method
  Debug.getNativeHeapAllocatedSize()
  Debug.getNativeHeapFreeSize()
  Debug.getNativeHeapSize()

  but found the NativeHeapSize goes on increasing upto some certain say
  16MB changing after that an outOfMemoryError occur. In this also i
  found that the NativeHeapAllocatedSize and getNativeHeapSize not
  decreasing on releasing  Bitmap from collection.

  So please help me for solving the problem if anyone facing the same
  problem and fixed earlier it.

  My problem is i want to calculate Max Available application memory
  allocated and currently available memory, for such that if
  currently available memory goes beyond the Threshold memory i will
  release some Bitmap from the collection and GC will reclaim the memory
  and free it without generating error.

  Thanks in advance
  Anieeh

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

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


[android-developers] Re: 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] getInstalledPackages(PackageManager.GET_ACTIVITIES) - PackageManager has died!?

2012-04-25 Thread 3c
Well, I reverted the call to getInstalledPackages(0);

Then manually retrieved the activity I was interested in, as I knew in 
advance which one to look for.

A flawed firmware why not, but just exceeding 1MB of activity data seems 
unreasonable? My kids have installed 300+ games on their tablets and 
there's still like 70% free space! Though not such issue on those tablets. 
So 1MB of activity data would mean how many apps installed, any rough idea?

Thanks for your prompt reply.




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

2012-04-25 Thread Mark Murphy
On Wed, Apr 25, 2012 at 3:06 PM, 3c ccouno...@gmail.com wrote:
 A flawed firmware why not, but just exceeding 1MB of activity data seems
 unreasonable? My kids have installed 300+ games on their tablets and there's
 still like 70% free space! Though not such issue on those tablets. So 1MB of
 activity data would mean how many apps installed, any rough idea?

Beats me. I have never tried counting bytes of getInstalledPackages()
output. The 1MB limit is a known barrier on IPC transactions.

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

Android App Developer Books: http://commonsware.com/books

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

2012-04-25 Thread Latimerius
On Wed, Apr 25, 2012 at 8:16 PM, Anieeh animesh.andr...@gmail.com wrote:

 Thanks Latimerius
   For your quick reply, yes i need an early warning (even before you
 actually run out of heap)
 because after an error occur OutOfMemory and then if i release some
 memory and restart the
 same operation it will give the same error since the GC wont collect
 the free memory as soon as
 we released some bitmap memory. And the same will happen over and
 over, and it increase the
 overhead of re-Starting the same task.

I see - makes sense I guess.  What if you ran System.gc() after you
release some bitmaps?  I know it makes no guarantees and using it is
generally frowned upon, but I would probably at least give it a try.
I suspect none of the ways you could possibly handle this will be very
solid, it's mostly more or less dodgy techniques as far as I know.
The very presence of a GC makes it rather hard to tell how much memory
is left.

Depending on your situation I'd probably still stick with my earlier
suggestion.  Make your operations explicit in your program (package
them up in classes behind an interface like Runnable) and queue them.
Iterate through the queue running the operations and catching
OutOfMemoryError.  If it occurs free some bitmaps and perhaps try
running System.gc() afterwards.  Leave the operation that threw in the
queue.  Repeat until no more OutOfMemoryError.

I can imagine a lot of unwelcome corner cases that would complicate
the scenario, however this way at least you get the restarting pretty
much for free.

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

2012-04-25 Thread Dianne Hackborn
Why are you doing this?  This is a terrible way to find out about an
activity.

What are you actually trying to do?  Usually people use
PackageManager.getIntentActivities() to get the set of activities they are
interested in.

On Wed, Apr 25, 2012 at 12:06 PM, 3c ccouno...@gmail.com wrote:

 Well, I reverted the call to getInstalledPackages(0);

 Then manually retrieved the activity I was interested in, as I knew in
 advance which one to look for.

 A flawed firmware why not, but just exceeding 1MB of activity data seems
 unreasonable? My kids have installed 300+ games on their tablets and
 there's still like 70% free space! Though not such issue on those tablets.
 So 1MB of activity data would mean how many apps installed, any rough idea?

 Thanks for your prompt reply.


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




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

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

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

[android-developers] Newbie Java question

2012-04-25 Thread g...@deanblakely.com
I'm a C# developer porting my app to Android.  The method pasted below
has a throws clause in the method signature.  Although I've looked
at the docs, I don't understand what it is doing.  There is no throw
in the method code.  There is no Try Catch so it's not trying to quiet
an exception.  I might guess that it is saying that if any kind of
exception occurs, quiet that exception and throw an SQL Exception??
Thanks,
Gary


public NotesDbAdapter open() throws SQLException {
mDbHelper = new DatabaseHelper(mCtx);
mDb = mDbHelper.getWritableDatabase();
return this;
}

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


Re: [android-developers] Newbie Java question

2012-04-25 Thread Kostya Vasilyev

Google for java checked exceptions.

-- K

On 04/26/2012 01:24 AM, g...@deanblakely.com wrote:

I'm a C# developer porting my app to Android.  The method pasted below
has a throws clause in the method signature.  Although I've looked
at the docs, I don't understand what it is doing.  There is no throw
in the method code.  There is no Try Catch so it's not trying to quiet
an exception.  I might guess that it is saying that if any kind of
exception occurs, quiet that exception and throw an SQL Exception??
Thanks,
Gary


 public NotesDbAdapter open() throws SQLException {
 mDbHelper = new DatabaseHelper(mCtx);
 mDb = mDbHelper.getWritableDatabase();
 return this;
 }



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


RE: [android-developers] getInstalledPackages(PackageManager.GET_ACTIVITIES) - PackageManager has died!?

2012-04-25 Thread Cedric Counotte
Why am I doing what ? getInstalledPackages(0), because I'm interested in
specific package names with a predefined prefix, those may include a
specific activity to configure the package.

 

All the packages I'm looking for are app extension that I develop myself. So
using getIntentActivities() is of no interest in this situation.

 

In other words I'm searching for packages with predefined named (eg
prefix.name) and then out of those I need to know which one have an
activity named settings.

 

Now the getInstalledPackages(PackageManager.GET_ACTIVITIES) is a valid API
call, and nothing in the documentation says not to use it, but nevertheless
it doesn't seem to be a good idea.

 

Some users got FCs while others didn't get any results out of it.

 

From: android-developers@googlegroups.com
[mailto:android-developers@googlegroups.com] On Behalf Of Dianne Hackborn
Sent: mercredi 25 avril 2012 23:24
To: android-developers@googlegroups.com
Subject: Re: [android-developers]
getInstalledPackages(PackageManager.GET_ACTIVITIES) - PackageManager has
died!?

 

Why are you doing this?  This is a terrible way to find out about an
activity.

 

What are you actually trying to do?  Usually people use
PackageManager.getIntentActivities() to get the set of activities they are
interested in.

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

[android-developers] newbie SQL Light Question

2012-04-25 Thread g...@deanblakely.com
I'm learning SQLLite using the NotePad tutorial appication.  The code
pasted below is very strange to me.  I'm used to using SQL i.e. Select
KEY_ROWID, KEY_TITLE, KEY_BODY from DATABASE_TABLE
WHERE BLAH BLAH BLAH.

One of the nice things about SQL is that it is pretty much the same
between the platforms so when a developer has to learn a new platform,
such as Android, the SQL is the same.

What's going on?  Why don't you use SQL?
Thanks,
Gary

   public Cursor fetchNote(long rowId) throws SQLException {

Cursor mCursor =

mDb.query(true, DATABASE_TABLE, new String[] {KEY_ROWID,
KEY_TITLE, KEY_BODY}, KEY_ROWID + = + rowId,
null,
null, null, null, null);
if (mCursor != null) {
mCursor.moveToFirst();
}
return mCursor;

}

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

2012-04-25 Thread Justin Anderson
This is an abstraction so you don't have to build the SQL query yourself.
If you want more flexibility you can use the rawQuery() method:
http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html#rawQuery%28java.lang.String,%20java.lang.String[]%29

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Wed, Apr 25, 2012 at 3:38 PM, g...@deanblakely.com
g...@deanblakely.comwrote:

 I'm learning SQLLite using the NotePad tutorial appication.  The code
 pasted below is very strange to me.  I'm used to using SQL i.e. Select
 KEY_ROWID, KEY_TITLE, KEY_BODY from DATABASE_TABLE
 WHERE BLAH BLAH BLAH.

 One of the nice things about SQL is that it is pretty much the same
 between the platforms so when a developer has to learn a new platform,
 such as Android, the SQL is the same.

 What's going on?  Why don't you use SQL?
 Thanks,
 Gary

   public Cursor fetchNote(long rowId) throws SQLException {

Cursor mCursor =

mDb.query(true, DATABASE_TABLE, new String[] {KEY_ROWID,
KEY_TITLE, KEY_BODY}, KEY_ROWID + = + rowId,
 null,
null, null, null, null);
if (mCursor != null) {
mCursor.moveToFirst();
}
return mCursor;

}

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


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

[android-developers] market:// scheme change to play://?

2012-04-25 Thread Karthz
Hello,

WIll the market:// custom scheme be always supported? Or, will that be 
changed to play:// anytime soon?

Thanks.


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

Re: [android-developers] Newbie Java question

2012-04-25 Thread Lindsay Mathieson
On Wed, 25 Apr 2012 02:24:28 PM g...@deanblakely.com wrote:
 
 public NotesDbAdapter open() throws SQLException {
 mDbHelper = new DatabaseHelper(mCtx);
 mDb = mDbHelper.getWritableDatabase();
 return this;
 }

One or both of the function calls (getWritableDatabase etc) throws the 
exception in question. That means the enclosing function either has to catch 
the exception or indicate it will be passed out of it.
-- 
Lindsay

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

2012-04-25 Thread g...@deanblakely.com
Kostya,
thanks.  I will never use a checked exception (being a C# programmer).
Gary

On Apr 25, 2:31 pm, Kostya Vasilyev kmans...@gmail.com wrote:
 Google for java checked exceptions.

 -- K

 On 04/26/2012 01:24 AM, g...@deanblakely.com wrote:



  I'm a C# developer porting my app to Android.  The method pasted below
  has a throws clause in the method signature.  Although I've looked
  at the docs, I don't understand what it is doing.  There is no throw
  in the method code.  There is no Try Catch so it's not trying to quiet
  an exception.  I might guess that it is saying that if any kind of
  exception occurs, quiet that exception and throw an SQL Exception??
  Thanks,
  Gary

       public NotesDbAdapter open() throws SQLException {
           mDbHelper = new DatabaseHelper(mCtx);
           mDb = mDbHelper.getWritableDatabase();
           return this;
       }- Hide quoted text -

 - Show quoted text -

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


Re: [android-developers] newbie SQL Light Question

2012-04-25 Thread A. Elk
It's an abstraction, to be sure, but it also protects you from malicious 
SQL injection. Forming raw SQL statements, especially from user input, 
allows users to hack the sense of your statement in truly evil ways.

Using query() avoids this. All of the parameters of the query are passed in 
as arguments. No strings are concatenated, and no statement compilation is 
done. There's no way for the user to inject malicious SQL.

Notice the ContentResolver.query() method. It has both a selection and 
selectionArgs parameter. To be safe, use the selection argument for 
column names and operators, and put the values to compare to in 
selectionArgs. The values are inserted into the selection clause 
without concatenation, so no SQL injection can occur.

On Wednesday, April 25, 2012 2:44:39 PM UTC-7, MagouyaWare wrote:

 This is an abstraction so you don't have to build the SQL query yourself.  
 If you want more flexibility you can use the rawQuery() method:

 http://developer.android.com/reference/android/database/sqlite/SQLiteDatabase.html#rawQuery%28java.lang.String,%20java.lang.String[]%29

 Thanks,
 Justin Anderson
 MagouyaWare Developer
 http://sites.google.com/site/magouyaware


 On Wed, Apr 25, 2012 at 3:38 PM, g...@deanblakely.com 
 g...@deanblakely.com wrote:

 I'm learning SQLLite using the NotePad tutorial appication.  The code
 pasted below is very strange to me.  I'm used to using SQL i.e. Select
 KEY_ROWID, KEY_TITLE, KEY_BODY from DATABASE_TABLE
 WHERE BLAH BLAH BLAH.

 One of the nice things about SQL is that it is pretty much the same
 between the platforms so when a developer has to learn a new platform,
 such as Android, the SQL is the same.

 What's going on?  Why don't you use SQL?
 Thanks,
 Gary

   public Cursor fetchNote(long rowId) throws SQLException {

Cursor mCursor =

mDb.query(true, DATABASE_TABLE, new String[] {KEY_ROWID,
KEY_TITLE, KEY_BODY}, KEY_ROWID + = + rowId,
 null,
null, null, null, null);
if (mCursor != null) {
mCursor.moveToFirst();
}
return mCursor;

}

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




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

[android-developers] Re: newbie SQL Light Question

2012-04-25 Thread g...@deanblakely.com
Justin,
Ahhh, RawQuery.  I can use good ole simple SQL.
thanks,
Gary

On Apr 25, 2:44 pm, Justin Anderson magouyaw...@gmail.com wrote:
 This is an abstraction so you don't have to build the SQL query yourself.
 If you want more flexibility you can use the rawQuery() 
 method:http://developer.android.com/reference/android/database/sqlite/SQLite...[]%29

 Thanks,
 Justin Anderson
 MagouyaWare Developerhttp://sites.google.com/site/magouyaware

 On Wed, Apr 25, 2012 at 3:38 PM, g...@deanblakely.com
 g...@deanblakely.comwrote:



  I'm learning SQLLite using the NotePad tutorial appication.  The code
  pasted below is very strange to me.  I'm used to using SQL i.e. Select
  KEY_ROWID, KEY_TITLE, KEY_BODY from DATABASE_TABLE
  WHERE BLAH BLAH BLAH.

  One of the nice things about SQL is that it is pretty much the same
  between the platforms so when a developer has to learn a new platform,
  such as Android, the SQL is the same.

  What's going on?  Why don't you use SQL?
  Thanks,
  Gary

    public Cursor fetchNote(long rowId) throws SQLException {

         Cursor mCursor =

             mDb.query(true, DATABASE_TABLE, new String[] {KEY_ROWID,
                     KEY_TITLE, KEY_BODY}, KEY_ROWID + = + rowId,
  null,
                     null, null, null, null);
         if (mCursor != null) {
             mCursor.moveToFirst();
         }
         return mCursor;

     }

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

 - Show quoted text -

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


Re: [android-developers] newbie SQL Light Question

2012-04-25 Thread Mark Murphy
On Wed, Apr 25, 2012 at 7:03 PM, A. Elk lancaster.dambust...@gmail.com wrote:
 Using query() avoids this. All of the parameters of the query are passed in
 as arguments. No strings are concatenated, and no statement compilation is
 done. There's no way for the user to inject malicious SQL.

Nonsense. Heck, I'll even throw in balderdash.

On SQLiteDatabase, query() eventually calls queryWithFactory(), which
creates the full SQL statement via
SQLiteQueryBuilder.buildQueryString()... which does concatenation.

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

Android App Developer Books: http://commonsware.com/books

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

2012-04-25 Thread A. Elk
You don't have to create your own contact editing UI. You can send an 
intent to the contacts app, which will bring the app to the foreground, 
displaying the Add Contacts screen. You can send extras that will populate 
the screen with data. See the javadoc for ContactsContract.Intents.Insert. 
If you send the intent with startActivityForResult(), you'll get a callback 
to onActivityResult(), which has an intent argument. The data field for the 
intent contains a content URI for the newly-added contact.

On Wednesday, April 25, 2012 7:48:13 AM UTC-7, Mark Phillips wrote:

 In my application, I need to collect information about (most likely) new 
 people for the phone's contact database (eg players on a sports team). I 
 see how to add the information using the Contacts API (
 http://developer.android.com/resources/articles/contacts.html). I was 
 thinking of adding the contact with a new group name, so I can easily find 
 them again and display just those the names in a ListActivity.

 What about the ui for creating and editing contacts? Do I have to create 
 my own contact editing ui, or is there a way to drop the user in the 
 native edit contact ui to enter the information about the contact, and 
 then bring them back to my app's ui when they are done?

 Thanks,

 Mark


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

2012-04-25 Thread A. Elk


On Wednesday, April 25, 2012 7:48:13 AM UTC-7, Mark Phillips wrote:

 In my application, I need to collect information about (most likely) new 
 people for the phone's contact database (eg players on a sports team). I 
 see how to add the information using the Contacts API (
 http://developer.android.com/resources/articles/contacts.html). I was 
 thinking of adding the contact with a new group name, so I can easily find 
 them again and display just those the names in a ListActivity.

 What about the ui for creating and editing contacts? Do I have to create 
 my own contact editing ui, or is there a way to drop the user in the 
 native edit contact ui to enter the information about the contact, and 
 then bring them back to my app's ui when they are done?

 Thanks,

 Mark


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

2012-04-25 Thread TreKing
On Wed, Apr 25, 2012 at 5:39 PM, Karthz zkar...@gmail.com wrote:

 WIll the market:// custom scheme be always supported? Or, will that be
 changed to play:// anytime soon?


You're never going to get an official response to that, but I can't imagine
they would break existing apps by removing that functionality.

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

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

Re: [android-developers] Fragment.onActivityResult is not called

2012-04-25 Thread Casvah
Has this issue been fixed? The bug report on the issue tracker says it's 
closed, but there are new comments from people having this issue. I am also 
having this issue. I might be doing it wrong though, since I can't get it 
to work with any request code.

On Thursday, March 10, 2011 12:15:12 PM UTC-6, Dianne Hackborn wrote:

 Whoops, yeah that is a bug.  Thanks for finding it.  I'll fix it in the 
 next update.

 On Thu, Mar 10, 2011 at 1:55 AM, Pete Doyle  wrote:

 Ran into this issue tonight on my Droid (2.2).  I think there's an issue 
 in FragmentActivity.startActivityFromFragment(...).

 YMMV, but this seems to fix it for me:

 https://github.com/petedoyle/android-support-v4-googlemaps/commit/06307de35a9de0a89ff52bb42a358ba6740e542c

 Basically there are two issues:
   1) (fragment.mIndex+1)16 should be in parentheses since + has 
 precedence over  in Java
   2) requestCode*0x should be requestCode0x.  (I think the goal 
 is to strip all but the first 16 bits of the request code).

 To understand the fix, assume you have a fragment index of 0 and a 
 requestCode of 1.

 With the current code:
 (fragment.mIndex+1)16 + (requestCode*0x)
  = (0+1)16 + (1*0x)
  = (1) (16 + 0x) // since + has precedence over 
  = 165551
  = 32768 // according to my debugger
  = 1000    // fragment index is lost, request code changes 
 from 1 to 32768

 With this change:
 ((fragment.mIndex+1)16) + (requestCode0x)
  = ((0+1)16) + (10x)
  = (116) + 1
  = 65536 + 1
  = 65537
  = 1    0001

 Thanks,
 Pete

 On Wed, Mar 9, 2011 at 9:20 AM, Dianne Hackborn hack...@android.comwrote:

 Does the API demo for this work wherever you are running it?  I have 
 tested it on 3.0, 2.3, and 1.6, and it works in those places, not would I 
 expect it to have any trouble elsewhere.   (How this works is very simple, 
 it just masks out the top X bits of the request code to determine which 
 fragment to deliver the result to.)

 Also of course if you are overriding 
 FragmentActivity.onActivityResult(), you *do* need to be sure to call the 
 inherited version.  The behavior here is slightly different than the HC 
 implementation; the activity method will always be called first.


 On Wed, Mar 9, 2011 at 8:14 AM, drasticp drast...@gmail.com wrote:

 I have an application that targets 2.1. I'm using the Android
 Compatibility Package to migrate the code in my Activities to
 Fragments. I had an Activity which was launching a contact picker as
 follows:

 Intent contactPickerIntent = new Intent(Intent.ACTION_PICK,
 Contacts.CONTENT_URI);
 startActivityForResult(contactPickerIntent, CONTACT_PICKER_RESULT);

 The result was appropriately handled in the onActivityResult for the
 Activity:

 @Override
 public void onActivityResult(int requestCode, int resultCode, Intent
 data) {
if (resultCode != Activity.RESULT_OK) return;
switch (requestCode) {
case CONTACT_PICKER_RESULT:
handleResult(data);
break;
}
 }

 Now, I've migrated both the startActivityForResult call and the
 onActivityResult into a Fragment. I have also extended
 FragmentActivity in the hosting Activity.

 The contact picker still launches correctly, but onActivityResult in
 the fragment is never called. If I override onActivityResult in the
 FragmentActivity, it *IS* called. However, I don't want to handle the
 result there because it breaks the encapsulation philosophy of the new
 fragments.

 Shouldn't onActivityResult in the fragment be called? Am I missing
 something? Thanks for your assistance!

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




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

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

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


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

Re: [android-developers] BitmapFactory.Options inTempStorage

2012-04-25 Thread Jim Graham
On Wed, Apr 25, 2012 at 11:25:51AM -0600, Justin Anderson wrote:
 On Wed, Apr 25, 2012 at 11:15 AM, Jim Graham spooky1...@gmail.com wrote:
 
  While working on trying to squeeze in as much space for processing
  bitmaps in my app, I noticed this method, and from what I've read,
  believe it might help.  What I have not found, however, is a real (and
  clear) description of what it does, and how to best use it.
 
  The dev guide page suggests using it to create about 15 kB of temp
  space.  Examples I've seen from this list in the past suggest the
  same, even for as much as 9 MB bitmaps.  15 kB temp space for 9 MB
  bitmaps makes no sense to me, so I'm clearly missing something.

 I don't know for sure, but I would assume that is because it doesn't decode
 the entire 9 MB image at once...

Ok, I could assume that as well (and I more or less did).  But I prefer
actual documentation over assumptions.  And that was only one part of my
question.  Every post I read where this was used involved using it to
avoid out of memory errors from creating huge bitmaps.  But the huge
bitmap is still being created, right?  So ultimately, how does this help
prevent that?  Does it process and then release (free, etc.) the memory
used by the byte[] array one chunk at a time?  Is that one reason why the
temp space size is set so low?  How much (in terms of the relative size
of the bitmaps and the data[] array) extra memory does this make
available---memory that I can use in processing the bitmap(s)?

Or should I just *assume* that it'll do whatever I want it to do,
whenever I want it to do it?

So once again, I ask:

  Can someone please either explain it, or point me to a page that
  does?

Thanks,
   --jim

-- 
THE SCORE:  ME:  2  CANCER:  0
73 DE N5IAL (/4)MiSTie #49997   Running FreeBSD 7.0 
spooky1...@gmail.comICBM/Hurr.: 30.44406N 86.59909W

 No, I'm not going to explain it.  If you can't figure it
 out, you didn't want to know anyway...  --Larry Wall

Android Apps Listing at http://www.jstrack.org/barcodes.html

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


Re: [android-developers] Fragment.onActivityResult is not called

2012-04-25 Thread Zsolt Vasvari
I am sure it will be fixed in whatever the next version of Android is and 
if they back port the fix and the phones get updated (likelihood: 0.0001%).

So unless you are targeting ONLY the non-yet public next version of the 
SDK, you might as well just not even assume this fix exists and code around 
it somehow.



On Thursday, April 26, 2012 9:24:59 AM UTC+8, Casvah wrote:

 Has this issue been fixed? The bug report on the issue tracker says it's 
 closed, but there are new comments from people having this issue. I am also 
 having this issue. I might be doing it wrong though, since I can't get it 
 to work with any request code.

 On Thursday, March 10, 2011 12:15:12 PM UTC-6, Dianne Hackborn wrote:

 Whoops, yeah that is a bug.  Thanks for finding it.  I'll fix it in the 
 next update.

 On Thu, Mar 10, 2011 at 1:55 AM, Pete Doyle  wrote:

 Ran into this issue tonight on my Droid (2.2).  I think there's an issue 
 in FragmentActivity.startActivityFromFragment(...).

 YMMV, but this seems to fix it for me:

 https://github.com/petedoyle/android-support-v4-googlemaps/commit/06307de35a9de0a89ff52bb42a358ba6740e542c

 Basically there are two issues:
   1) (fragment.mIndex+1)16 should be in parentheses since + has 
 precedence over  in Java
   2) requestCode*0x should be requestCode0x.  (I think the goal 
 is to strip all but the first 16 bits of the request code).

 To understand the fix, assume you have a fragment index of 0 and a 
 requestCode of 1.

 With the current code:
 (fragment.mIndex+1)16 + (requestCode*0x)
  = (0+1)16 + (1*0x)
  = (1) (16 + 0x) // since + has precedence over 
  = 165551
  = 32768 // according to my debugger
  = 1000    // fragment index is lost, request code changes 
 from 1 to 32768

 With this change:
 ((fragment.mIndex+1)16) + (requestCode0x)
  = ((0+1)16) + (10x)
  = (116) + 1
  = 65536 + 1
  = 65537
  = 1    0001

 Thanks,
 Pete

 On Wed, Mar 9, 2011 at 9:20 AM, Dianne Hackborn hack...@android.comwrote:

 Does the API demo for this work wherever you are running it?  I have 
 tested it on 3.0, 2.3, and 1.6, and it works in those places, not would I 
 expect it to have any trouble elsewhere.   (How this works is very simple, 
 it just masks out the top X bits of the request code to determine which 
 fragment to deliver the result to.)

 Also of course if you are overriding 
 FragmentActivity.onActivityResult(), you *do* need to be sure to call the 
 inherited version.  The behavior here is slightly different than the HC 
 implementation; the activity method will always be called first.


 On Wed, Mar 9, 2011 at 8:14 AM, drasticp drast...@gmail.com wrote:

 I have an application that targets 2.1. I'm using the Android
 Compatibility Package to migrate the code in my Activities to
 Fragments. I had an Activity which was launching a contact picker as
 follows:

 Intent contactPickerIntent = new Intent(Intent.ACTION_PICK,
 Contacts.CONTENT_URI);
 startActivityForResult(contactPickerIntent, CONTACT_PICKER_RESULT);

 The result was appropriately handled in the onActivityResult for the
 Activity:

 @Override
 public void onActivityResult(int requestCode, int resultCode, Intent
 data) {
if (resultCode != Activity.RESULT_OK) return;
switch (requestCode) {
case CONTACT_PICKER_RESULT:
handleResult(data);
break;
}
 }

 Now, I've migrated both the startActivityForResult call and the
 onActivityResult into a Fragment. I have also extended
 FragmentActivity in the hosting Activity.

 The contact picker still launches correctly, but onActivityResult in
 the fragment is never called. If I override onActivityResult in the
 FragmentActivity, it *IS* called. However, I don't want to handle the
 result there because it breaks the encapsulation philosophy of the new
 fragments.

 Shouldn't onActivityResult in the fragment be called? Am I missing
 something? Thanks for your assistance!

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




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

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

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

Re: [android-developers] Fragment.onActivityResult is not called

2012-04-25 Thread Zsolt Vasvari
Oh, I see this is from 2011, not this March.  Never mind -- the fix should 
certainly be part of 3.2 and ICS.

On Thursday, April 26, 2012 10:09:38 AM UTC+8, Zsolt Vasvari wrote:

 I am sure it will be fixed in whatever the next version of Android is and 
 if they back port the fix and the phones get updated (likelihood: 0.0001%).

 So unless you are targeting ONLY the non-yet public next version of the 
 SDK, you might as well just not even assume this fix exists and code around 
 it somehow.



 On Thursday, April 26, 2012 9:24:59 AM UTC+8, Casvah wrote:

 Has this issue been fixed? The bug report on the issue tracker says it's 
 closed, but there are new comments from people having this issue. I am also 
 having this issue. I might be doing it wrong though, since I can't get it 
 to work with any request code.

 On Thursday, March 10, 2011 12:15:12 PM UTC-6, Dianne Hackborn wrote:

 Whoops, yeah that is a bug.  Thanks for finding it.  I'll fix it in the 
 next update.

 On Thu, Mar 10, 2011 at 1:55 AM, Pete Doyle  wrote:

 Ran into this issue tonight on my Droid (2.2).  I think there's an 
 issue in FragmentActivity.startActivityFromFragment(...).

 YMMV, but this seems to fix it for me:

 https://github.com/petedoyle/android-support-v4-googlemaps/commit/06307de35a9de0a89ff52bb42a358ba6740e542c

 Basically there are two issues:
   1) (fragment.mIndex+1)16 should be in parentheses since + has 
 precedence over  in Java
   2) requestCode*0x should be requestCode0x.  (I think the 
 goal is to strip all but the first 16 bits of the request code).

 To understand the fix, assume you have a fragment index of 0 and a 
 requestCode of 1.

 With the current code:
 (fragment.mIndex+1)16 + (requestCode*0x)
  = (0+1)16 + (1*0x)
  = (1) (16 + 0x) // since + has precedence over 
  = 165551
  = 32768 // according to my debugger
  = 1000    // fragment index is lost, request code changes 
 from 1 to 32768

 With this change:
 ((fragment.mIndex+1)16) + (requestCode0x)
  = ((0+1)16) + (10x)
  = (116) + 1
  = 65536 + 1
  = 65537
  = 1    0001

 Thanks,
 Pete

 On Wed, Mar 9, 2011 at 9:20 AM, Dianne Hackborn hack...@android.comwrote:

 Does the API demo for this work wherever you are running it?  I have 
 tested it on 3.0, 2.3, and 1.6, and it works in those places, not would I 
 expect it to have any trouble elsewhere.   (How this works is very 
 simple, 
 it just masks out the top X bits of the request code to determine which 
 fragment to deliver the result to.)

 Also of course if you are overriding 
 FragmentActivity.onActivityResult(), you *do* need to be sure to call the 
 inherited version.  The behavior here is slightly different than the HC 
 implementation; the activity method will always be called first.


 On Wed, Mar 9, 2011 at 8:14 AM, drasticp drast...@gmail.com wrote:

 I have an application that targets 2.1. I'm using the Android
 Compatibility Package to migrate the code in my Activities to
 Fragments. I had an Activity which was launching a contact picker as
 follows:

 Intent contactPickerIntent = new Intent(Intent.ACTION_PICK,
 Contacts.CONTENT_URI);
 startActivityForResult(contactPickerIntent, CONTACT_PICKER_RESULT);

 The result was appropriately handled in the onActivityResult for the
 Activity:

 @Override
 public void onActivityResult(int requestCode, int resultCode, Intent
 data) {
if (resultCode != Activity.RESULT_OK) return;
switch (requestCode) {
case CONTACT_PICKER_RESULT:
handleResult(data);
break;
}
 }

 Now, I've migrated both the startActivityForResult call and the
 onActivityResult into a Fragment. I have also extended
 FragmentActivity in the hosting Activity.

 The contact picker still launches correctly, but onActivityResult in
 the fragment is never called. If I override onActivityResult in the
 FragmentActivity, it *IS* called. However, I don't want to handle the
 result there because it breaks the encapsulation philosophy of the new
 fragments.

 Shouldn't onActivityResult in the fragment be called? Am I missing
 something? Thanks for your assistance!

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




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

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

  -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to 
 

[android-developers] Dynamic loading of components

2012-04-25 Thread Hemant Chaudhari
Hello,

I have requirement just like PRISM framework in .Net.

We want to develop Android Native app such that when it starts it will 
query to internet for any additional component updates.
Once android app find updates it will download ONLY that component. It will 
not update the WHOLE app again.

Example:-

Suppose in Android App, i have 1 Tab with some functionality.
On update it should automatically show the new Tab with functionality 
downloaded from the updates.

All in all i want my application be *Dynamic*

-Thanks
Hemant

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

2012-04-25 Thread Etienne
Here is the stack trace:

04-25 01:37:23.280: E/AndroidRuntime(711): FATAL EXCEPTION: main
04-25 01:37:23.280: E/AndroidRuntime(711): java.lang.RuntimeException: 
Unable to start activity 
ComponentInfo{com.sendit/com.sendit.ContactManager}: 
java.lang.NullPointerException
04-25 01:37:23.280: E/AndroidRuntime(711): at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956)
04-25 01:37:23.280: E/AndroidRuntime(711): at 
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
04-25 01:37:23.280: E/AndroidRuntime(711): at 
android.app.ActivityThread.access$600(ActivityThread.java:123)
04-25 01:37:23.280: E/AndroidRuntime(711): at 
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
04-25 01:37:23.280: E/AndroidRuntime(711): at 
android.os.Handler.dispatchMessage(Handler.java:99)
04-25 01:37:23.280: E/AndroidRuntime(711): at 
android.os.Looper.loop(Looper.java:137)
04-25 01:37:23.280: E/AndroidRuntime(711): at 
android.app.ActivityThread.main(ActivityThread.java:4424)
04-25 01:37:23.280: E/AndroidRuntime(711): at 
java.lang.reflect.Method.invokeNative(Native Method)
04-25 01:37:23.280: E/AndroidRuntime(711): at 
java.lang.reflect.Method.invoke(Method.java:511)
04-25 01:37:23.280: E/AndroidRuntime(711): at 
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
04-25 01:37:23.280: E/AndroidRuntime(711): at 
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
04-25 01:37:23.280: E/AndroidRuntime(711): at 
dalvik.system.NativeStart.main(Native Method)
04-25 01:37:23.280: E/AndroidRuntime(711): Caused by: 
java.lang.NullPointerException
04-25 01:37:23.280: E/AndroidRuntime(711): at 
com.sendit.ContactsCursorAdapter.getSections(ContactsCursorAdapter.java:222)
04-25 01:37:23.280: E/AndroidRuntime(711): at 
android.widget.FastScroller.getSectionsFromIndexer(FastScroller.java:507)
04-25 01:37:23.280: E/AndroidRuntime(711): at 
android.widget.FastScroller.init(FastScroller.java:269)
04-25 01:37:23.280: E/AndroidRuntime(711): at 
android.widget.FastScroller.init(FastScroller.java:155)
04-25 01:37:23.280: E/AndroidRuntime(711): at 
android.widget.AbsListView.setFastScrollEnabled(AbsListView.java:1144)
04-25 01:37:23.280: E/AndroidRuntime(711): at 
com.sendit.LoaderCursor$ContactsCursorLoaderListFragment.onActivityCreated(LoaderCursor.java:107)
04-25 01:37:23.280: E/AndroidRuntime(711): at 
android.app.FragmentManagerImpl.moveToState(FragmentManager.java:847)
04-25 01:37:23.280: E/AndroidRuntime(711): at 
android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1032)
04-25 01:37:23.280: E/AndroidRuntime(711): at 
android.app.BackStackRecord.run(BackStackRecord.java:622)
04-25 01:37:23.280: E/AndroidRuntime(711): at 
android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1382)
04-25 01:37:23.280: E/AndroidRuntime(711): at 
android.app.Activity.performStart(Activity.java:4474)
04-25 01:37:23.280: E/AndroidRuntime(711): at 
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1929)
04-25 01:37:23.280: E/AndroidRuntime(711): ... 11 more

after the setFastScrollEnabled() method gets called it calls the custom 
adapter's getSections() method which is where it crashes.

On Wednesday, April 25, 2012 3:04:44 AM UTC-7, Kostya Vasilyev wrote:

 How does it error out? A crash? What's the stack trace?

 In general, the fast section indexer does not update its sections list 
 automatically when you replace the cursor. There is no method to force 
 this except turn it off and the back on after you've changed the data.

 -- K

 25.04.2012 11:02, Etienne написал:
  And if I comment the setFastScrollEnabled() call, then it does not 
  error out, but I do not see the AlphabetIndexer working. Does anyone 
  have suggestions about how to make this all work?

 -- 
 Kostya Vasilyev



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

[android-developers] Backporting stagefright and NuPlayer to Android 2.2?

2012-04-25 Thread Kiran Rao

I mistakenly posted this question on the Android-Platform group 
(linkhttps://groups.google.com/d/topic/android-platform/sBYyDKOoFWg/discussion).
 
I think it really belongs here in this group. 

My requirement is to be able to play a live video stream in my Android app. 
The stream will be over RTSP/RTP. 
I have no control over the source; and it looks like the RTP payload does 
not meet the requirements outlined in the Developers Guide Video encoding 
recommendationshttp://developer.android.com/guide/appendix/media-formats.html#recommendations.
 
Specifically, the following requirement seems to be violated by the video 
source:

For 3GPP and MPEG-4 containers, the moov atom must precede any mdat atoms, 
 but must succeed the ftyp atom


Basically, it looks like we get raw H264 data (not wrapped in a container).

Now, 

 1. I was *not* able to play this stream using the MediaPlayer class on an 
Android 2.2 Samsung Galaxy Tab.
 2. However, I was able to play it on an Android 2.3 Samsung Galaxy S.
 3. Some third-party apps (MX Player) were able to play the same stream on 
the 2.2 Galaxy Tab as well.

In both cases 2 and 3 above, the DDMS logs pointed to the fact that 
StageFright framework was being used internally, while in case 1, PVP (i.e, 
OpenCore) was being used. All this leads me to conclude that:

 1. My stream cannot be played by OpenCore framework.
 2. My stream can be played using Stagefright - even on Android 2.2

Which brings me to my question:

*What does porting stagefright to Android 2.2 involve? *


Further, I noticed in the AOSP source that the newer NuPlayer is 
responsible for playing RTSP streams now. Question:


   1. Is it possible at all to port NuPlayer back to older versions of 
   Android (2.2 or 2.3)?
   2. If so, what do I need to do to be able to use it in my app?
   

I am aware that I can check out the sources and use NDK to build 
stagefright and NuPlayer (although I have never worked at the NDK level). 
What I don't know is how my app can then use this NuPlayer.

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

2012-04-25 Thread Justin Anderson
You ALWAYS need to guard against SQL injection attacks if you are forming
your query based on user input...

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Wed, Apr 25, 2012 at 5:15 PM, Mark Murphy mmur...@commonsware.comwrote:

 On Wed, Apr 25, 2012 at 7:03 PM, A. Elk lancaster.dambust...@gmail.com
 wrote:
  Using query() avoids this. All of the parameters of the query are passed
 in
  as arguments. No strings are concatenated, and no statement compilation
 is
  done. There's no way for the user to inject malicious SQL.

 Nonsense. Heck, I'll even throw in balderdash.

 On SQLiteDatabase, query() eventually calls queryWithFactory(), which
 creates the full SQL statement via
 SQLiteQueryBuilder.buildQueryString()... which does concatenation.

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

 Android App Developer Books: http://commonsware.com/books

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


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

Re: [android-developers] BitmapFactory.Options inTempStorage

2012-04-25 Thread Justin Anderson
Sorry Jim, I don't know the answer... Maybe Dianne or Romain will come
across this post and they can shed some light on the subject.

And I just can't resist... I HAVE to comment on this... I find it extremely
amusing that the random quote in the signature of your last email happened
to be this:

No, I'm not going to explain it.  If you can't figure it
 out, you didn't want to know anyway...  --Larry Wall


When you just got finished asking this:

Can someone please either explain it, or point me to a page that does?


That is just way too awesome...  :-)

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Wed, Apr 25, 2012 at 7:39 PM, Jim Graham spooky1...@gmail.com wrote:

 On Wed, Apr 25, 2012 at 11:25:51AM -0600, Justin Anderson wrote:
  On Wed, Apr 25, 2012 at 11:15 AM, Jim Graham spooky1...@gmail.com
 wrote:
 
   While working on trying to squeeze in as much space for processing
   bitmaps in my app, I noticed this method, and from what I've read,
   believe it might help.  What I have not found, however, is a real (and
   clear) description of what it does, and how to best use it.
  
   The dev guide page suggests using it to create about 15 kB of temp
   space.  Examples I've seen from this list in the past suggest the
   same, even for as much as 9 MB bitmaps.  15 kB temp space for 9 MB
   bitmaps makes no sense to me, so I'm clearly missing something.

  I don't know for sure, but I would assume that is because it doesn't
 decode
  the entire 9 MB image at once...

 Ok, I could assume that as well (and I more or less did).  But I prefer
 actual documentation over assumptions.  And that was only one part of my
 question.  Every post I read where this was used involved using it to
 avoid out of memory errors from creating huge bitmaps.  But the huge
 bitmap is still being created, right?  So ultimately, how does this help
 prevent that?  Does it process and then release (free, etc.) the memory
 used by the byte[] array one chunk at a time?  Is that one reason why the
 temp space size is set so low?  How much (in terms of the relative size
 of the bitmaps and the data[] array) extra memory does this make
 available---memory that I can use in processing the bitmap(s)?

 Or should I just *assume* that it'll do whatever I want it to do,
 whenever I want it to do it?

 So once again, I ask:

   Can someone please either explain it, or point me to a page that
   does?

 Thanks,
   --jim

 --
 THE SCORE:  ME:  2  CANCER:  0
 73 DE N5IAL (/4)MiSTie #49997   Running FreeBSD 7.0 
 spooky1...@gmail.comICBM/Hurr.: 30.44406N 86.59909W

 No, I'm not going to explain it.  If you can't figure it
 out, you didn't want to know anyway...  --Larry Wall

 Android Apps Listing at http://www.jstrack.org/barcodes.html

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


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

Re: [android-developers] Dynamic loading of components

2012-04-25 Thread Justin Anderson

 Once android app find updates it will download ONLY that component. It
 will not update the WHOLE app again.

Good luck with that...

Thanks,
Justin Anderson
MagouyaWare Developer
http://sites.google.com/site/magouyaware


On Wed, Apr 25, 2012 at 9:35 PM, Hemant Chaudhari 
hemant.newslet...@gmail.com wrote:

 Hello,

 I have requirement just like PRISM framework in .Net.

 We want to develop Android Native app such that when it starts it will
 query to internet for any additional component updates.
 Once android app find updates it will download ONLY that component. It
 will not update the WHOLE app again.

 Example:-

 Suppose in Android App, i have 1 Tab with some functionality.
 On update it should automatically show the new Tab with functionality
 downloaded from the updates.

 All in all i want my application be *Dynamic*

 -Thanks
 Hemant

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

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

Re: [android-developers] Dynamic loading of components

2012-04-25 Thread Kristopher Micinski
This is impossible...

Unless what you mean by 'component' is some sort of code that is
interpreted by your system (such as a configuration file).

So basically, this is impossible..

kris

On Wed, Apr 25, 2012 at 11:35 PM, Hemant Chaudhari
hemant.newslet...@gmail.com wrote:
 Hello,

 I have requirement just like PRISM framework in .Net.

 We want to develop Android Native app such that when it starts it will query
 to internet for any additional component updates.
 Once android app find updates it will download ONLY that component. It will
 not update the WHOLE app again.

 Example:-

 Suppose in Android App, i have 1 Tab with some functionality.
 On update it should automatically show the new Tab with functionality
 downloaded from the updates.

 All in all i want my application be Dynamic

 -Thanks
 Hemant

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

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


[android-developers] onPreviewFrame returning wrong information?

2012-04-25 Thread Taylor Niver
The code below works but it is returning images like this 
:IMGhttps://lh5.googleusercontent.com/-Tg7Yq8UzcmI/T5jYONjgOVI/BIU/L1prL75Y-VU/s800/hhh1335413774934.jpg
 .  
Is there something wrong with my code where it is not receiving the correct 
byte array from the surface holder?

-Taylor
 


 public void surfaceChanged(SurfaceHolder holder, int format, int width, 
 int height) {
 Camera.Parameters parameters = camera.getParameters();
 parameters.setPictureFormat(ImageFormat.YUY2);
 //parameters.setPreviewFormat(ImageFormat.JPEG);
 camera.setParameters(parameters);
 camera.startPreview();

 camera.setPreviewCallback(new PreviewCallback(){ 
 @Override
 public void onPreviewFrame(byte[] _data, Camera camera){
 YuvImage im = new YuvImage(_data, ImageFormat.YUY2, 540,
 884, null);
 Rect r = new Rect(0,0,540,884);
 ByteArrayOutputStream baos = new ByteArrayOutputStream();
 im.compressToJpeg(r, 100, baos);
 try{
 FileOutputStream output = new FileOutputStream(String.format(
 /sdcard/%s%d.jpg, strPrevCBType, System.currentTimeMillis()));
 output.write(baos.toByteArray());
 output.flush();
 output.close();
 }catch(FileNotFoundException e){
 Log.d(ERROR, e.toString());
 }catch(IOException e){
 }
 }
 });

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

2012-04-25 Thread Dallas Gutauckis
This might lead you in the right direction...

http://developer.android.com/reference/dalvik/system/DexClassLoader.html
http://stackoverflow.com/questions/3022454/how-to-load-a-java-class-dynamically-on-android-dalvik

On Wed, Apr 25, 2012 at 11:35 PM, Hemant Chaudhari 
hemant.newslet...@gmail.com wrote:

 Hello,

 I have requirement just like PRISM framework in .Net.

 We want to develop Android Native app such that when it starts it will
 query to internet for any additional component updates.
 Once android app find updates it will download ONLY that component. It
 will not update the WHOLE app again.

 Example:-

 Suppose in Android App, i have 1 Tab with some functionality.
 On update it should automatically show the new Tab with functionality
 downloaded from the updates.

 All in all i want my application be *Dynamic*

 -Thanks
 Hemant

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

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

[android-developers] Re: onPreviewFrame returning wrong information?

2012-04-25 Thread Taylor Niver
Also, much of the code has been copied from various sources online, it is 
not 100% mine
On Thursday, April 26, 2012 1:09:23 AM UTC-4, Taylor Niver wrote:

 The code below works but it is returning images like this 
 :IMGhttps://lh5.googleusercontent.com/-Tg7Yq8UzcmI/T5jYONjgOVI/BIU/L1prL75Y-VU/s800/hhh1335413774934.jpg
  .  
 Is there something wrong with my code where it is not receiving the correct 
 byte array from the surface holder?

 -Taylor
  


 public void surfaceChanged(SurfaceHolder holder, int format, int width, 
 int height) {
 Camera.Parameters parameters = camera.getParameters();
 parameters.setPictureFormat(ImageFormat.YUY2);
 //parameters.setPreviewFormat(ImageFormat.JPEG);
 camera.setParameters(parameters);
 camera.startPreview();

 camera.setPreviewCallback(new PreviewCallback(){ 
 @Override
 public void onPreviewFrame(byte[] _data, Camera camera){
 YuvImage im = new YuvImage(_data, ImageFormat.YUY2, 540,
 884, null);
 Rect r = new Rect(0,0,540,884);
 ByteArrayOutputStream baos = new ByteArrayOutputStream();
 im.compressToJpeg(r, 100, baos);
 try{
 FileOutputStream output = new FileOutputStream(String.format(
 /sdcard/%s%d.jpg, strPrevCBType, System.currentTimeMillis()));
 output.write(baos.toByteArray());
 output.flush();
 output.close();
 }catch(FileNotFoundException e){
 Log.d(ERROR, e.toString());
 }catch(IOException e){
 }
 }
 });



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

2012-04-25 Thread Dallas Gutauckis
This might lead you in the right direction...

http://developer.android.com/reference/dalvik/system/DexClassLoader.html
http://stackoverflow.com/questions/3022454/how-to-load-a-java-class-dynamically-on-android-dalvik

On Wednesday, April 25, 2012 11:35:03 PM UTC-4, Hemant Chaudhari wrote:

 Hello,

 I have requirement just like PRISM framework in .Net.

 We want to develop Android Native app such that when it starts it will 
 query to internet for any additional component updates.
 Once android app find updates it will download ONLY that component. It 
 will not update the WHOLE app again.

 Example:-

 Suppose in Android App, i have 1 Tab with some functionality.
 On update it should automatically show the new Tab with functionality 
 downloaded from the updates.

 All in all i want my application be *Dynamic*

 -Thanks
 Hemant


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

[android-developers] Multitouch for two button

2012-04-25 Thread shihab shiha
Hi all,

I need one help. i have two buttons for playing two sound file. i can play
the sound easily but my requirement is holding one button and pressing
another for getting the second button sound .i cannot access second
buttton's id.
Any help appreciated

Thanks

i mentioned all the links which i refered.

http://stackoverflow.com/questions/2528160/multiple-button-presses-for-android-2-x

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

2012-04-25 Thread Kristopher Micinski
You *really* shouldn't be doing this.. however...,

kri

On Thu, Apr 26, 2012 at 1:10 AM, Dallas Gutauckis dall...@gmail.com wrote:
 This might lead you in the right direction...

 http://developer.android.com/reference/dalvik/system/DexClassLoader.html
 http://stackoverflow.com/questions/3022454/how-to-load-a-java-class-dynamically-on-android-dalvik

 On Wed, Apr 25, 2012 at 11:35 PM, Hemant Chaudhari
 hemant.newslet...@gmail.com wrote:

 Hello,

 I have requirement just like PRISM framework in .Net.

 We want to develop Android Native app such that when it starts it will
 query to internet for any additional component updates.
 Once android app find updates it will download ONLY that component. It
 will not update the WHOLE app again.

 Example:-

 Suppose in Android App, i have 1 Tab with some functionality.
 On update it should automatically show the new Tab with functionality
 downloaded from the updates.

 All in all i want my application be Dynamic

 -Thanks
 Hemant

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


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

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


[android-developers] GPS Location returns zero speed always

2012-04-25 Thread David Ross
Asked this over on Stackoverflow as well...

I have code that successfully gets location updates from multiple
providers and filters them to give a current best estimate.

I added code to check for the returned Location.hasSpeed()
and .hasBearing() values to do some bearing related calculations when
the user is actually moving.

It all works fine on a Huawei Sonic running 2.3.3, but on the Google
Nexus S running 4.0.4 the GPS provider's Location always returns false
for .hasSpeed() and 0 for .getSpeed().

When I register my location listener, the GPS provider returns true
for .supportsSpeed() but it never returns the speed in a Location even
when the accuracy is down to 30m and it is physically moving (in a
car, on the dashboard for max reception, screen on).

Is there some difference from 2.3.x to ICS 4.x? Do I have to implement
my own speed calculation even when the provider reports support?

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