Re: [android-developers] Alaram Manager after 5 min

2012-07-07 Thread TreKing
On Fri, Jul 6, 2012 at 5:21 AM, Rahul Kaushik rahulkaushi...@gmail.comwrote:

 I need to call AlarmReceiver Call after evry 5 min but it is getting
 caaled after every sec pls tell wt am doing wrong


You are not calculating 5 minutes in milliseconds correctly.

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

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

Re: [android-developers] Re: Android 4.1 Jelly Bean GIF Images Not Showing?

2012-07-07 Thread Zsolt Vasvari
If this happens on hardware but not on the emulator, my guess is that this 
is not really a PNG/GIF issue.  I couldn't get Google I/O tickets either, 
so I cannot help.

On Friday, July 6, 2012 11:50:43 PM UTC+8, Josh F. wrote:

 I will create the bug report as soon as I can get a development device 
 with this actual build on it as it does not happen in the emulator.  As it 
 stands right now you had to be at Google I/O to get one and tickets sold so 
 fast I was not able to get one.  To test this issue and the fix I have had 
 to rely on my users who were there and have a Galaxy 7, which is not going 
 to work to create a sample project example of the issue required to post an 
 official bug report.  Hopefully in a few weeks I'll get my Galaxy 7 and do 
 just that.

 If someone in the community has a device that they would be willing to 
 test with me on, I can send sample files/etc. to create the bug report 
 sooner.

 On Friday, July 6, 2012 8:27:14 AM UTC-7, Mark Murphy (a Commons Guy) 
 wrote:

  This is a bug in 
  Android 4.1 Jelly Bean as released on current devices and I hope that 
 they 
  fix it before full retail devices ship or this thread will get very 
 busy. 

 Please feel free to file a bug report on http://b.android.com, with a 
 sample project demonstrating the issue. 

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

 _The Busy Coder's Guide to Android Development_ Version 3.7 Available! 



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

2012-07-07 Thread ala hammad
hello all ,
i want to ask how much time need to confirm my app from google store ??


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] UPD packets doesn't arrive on a Samsung Galaxy Tab 7.7 but they arrive on a HTC Desire

2012-07-07 Thread VansFannel
And, what do you recommend me?

Is there a way to configure UDP broadcast that I'm not using?

On Saturday, July 7, 2012 2:15:40 AM UTC+2, Harri Smått wrote:

 Are you sure 255.255.255.255 is the correct broadcast address you want to 
 use? It might be a good idea to give other private IP broadcast addresses a 
 go too. This won't fix your problem with packet bundling though.

 --
 H

 I'm developing an Android 3.1 Tablet application. I'm going to use this 
 app to listen to UDP packets send by a device which is sending UDP packets 
 to 255.255.255.255:8001 every 5 seconds.

 Using desktop program Docklight scripting v1.9, I see that this device 
 sends a 11 bytes packet every 5 seconds, by my app doesn't receive every 
 packet: sometimes it receives one, and sometimes it receives 5 or 6 packets 
 at the same time. 

 This is my Activity: http://pastebin.com/5knkgWkT

 UDP Listener Thread: http://pastebin.com/vggdhV9D

 AndroidManifest.xml: http://pastebin.com/iM29NBCE

 If I send a UDP packet to Tablet's IP, e.g. UDP:192.168.1.135:8001, 
 sometimes it receives the packet. And sometimes it receives three or four 
 at the same time.

 But if I send direct UDP packet to an *HTC Desire 2.2.2 *it receives all 
 of them, but my HTC doesn't receive broadcast packets. And I'm using the 
 same code.

 This how I am receiving UDP broadcast packets (look at the time):
 07-06 12:08:56.580: V/UDServerThread(6449): Mensaje recibido.
 07-06 12:08:59.655: V/UDServerThread(6449): Mensaje recibido.
 07-06 12:09:02.410: V/UDServerThread(6449): Mensaje recibido.
 07-06 12:09:03.230: V/UDServerThread(6449): Mensaje recibido.
 07-06 12:09:03.435: V/UDServerThread(6449): Mensaje recibido.
 07-06 12:09:03.745: V/UDServerThread(6449): Mensaje recibido.
 07-06 12:09:03.945: V/UDServerThread(6449): Mensaje recibido.
 07-06 12:09:04.460: V/UDServerThread(6449): Mensaje recibido.
 07-06 12:09:04.770: V/UDServerThread(6449): Mensaje recibido.
 07-06 12:09:04.975: V/UDServerThread(6449): Mensaje recibido.
 07-06 12:09:46.855: V/UDServerThread(6449): Mensaje recibido.
 07-06 12:10:06.005: V/UDServerThread(6449): Mensaje recibido.
 07-06 12:10:06.310: V/UDServerThread(6449): Mensaje recibido.
 07-06 12:10:06.515: V/UDServerThread(6449): Mensaje recibido.
 07-06 12:10:06.825: V/UDServerThread(6449): Mensaje recibido.
 07-06 12:10:07.335: V/UDServerThread(6449): Mensaje recibido.
 07-06 12:10:07.640: V/UDServerThread(6449): Mensaje recibido.
 07-06 12:10:07.845: V/UDServerThread(6449): Mensaje recibido.
 07-06 12:10:10.415: V/UDServerThread(6449): Mensaje recibido.
 07-06 12:10:17.065: V/UDServerThread(6449): Mensaje recibido.

 What am I doing wrong? Maybe I need some custom configuration.

 By the way, I am testing it on a Samsung Galaxy Tab 7.7 with Android 3.1.
 *
 * 

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



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

2012-07-07 Thread gjs
Hi,

And by that logic device might be null as well...

Maybe check the source code.

Regards

On Jul 7, 5:12 am, bob b...@coolfone.comze.com wrote:
 I'm looking at the Bluetooth chat example:

             // When discovery finds a device
             if (BluetoothDevice.ACTION_FOUND.equals(action)) {
                 // Get the BluetoothDevice object from the Intent
                 BluetoothDevice device =
 intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
                 // If it's already paired, skip it, because it's been
 listed already
                 if (device.getBondState() != BluetoothDevice.BOND_BONDED) {
                     mNewDevicesArrayAdapter.add(device.getName() + \n +
 device.getAddress());
                 }
             // When discovery is finished, change the Activity title
             }

 I think there is a bug here because it assumes device.getName() does not
 return null, when in fact it might.

 What do you guys think?

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

2012-07-07 Thread VansFannel
I'm trying to develop an Android 2.2 application but I'm having a lot of 
problems with UDP sockets. 

I have two phones, and HTC Desire 2.2.2 and Samsung Galaxy S. I'm 
developing a program that will wait to receive UDP Broadcast packets send 
by a device that sends UDP broadcast packets to 255.255.255.255:8001 every 
0.5 seconds.

To test my application I'm using Docklight scripting v1.9. With this 
program I send broadcast packet to UDP:255.255.255.255:8001.

This is my problem:

With the same code I don't receive broadcast packets in the HTC, but I 
receive UDP unicast packets if I send those packets to phone's IP.

But, if I try with Samsung Galaxy S, I don't receive every packet in both 
cases (unicast and broadcast). With this phone I receive one packet or two, 
and one or two seconds later I receive four or five at the same time.

I'm wondering if I need a special configuration to make it work.

May I need a special configuration?

You can find more details here: UPD packets doesn't arrive on a Samsung 
Galaxy Tab 7.7 but they arrive on a HTC 
Desirehttp://stackoverflow.com/questions/11358552/upd-packets-doesnt-arrive-on-a-samsung-galaxy-tab-7-7-but-they-arrive-on-a-htc

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

2012-07-07 Thread gjs
Hi,

It is unlikely you would need all 1000 loaded at the same time, try a
different approach perhaps load on demand as needed.

Regards

On Jul 7, 2:51 am, RichardC richard.crit...@googlemail.com wrote:
 How large are your images (not file size, but width*hight*bits-per-pixel)
 images are uncompressed when loaded so you need to budget your memory on
 the expanded size?
 How many do you load the same time?
 Do you unload bitmaps that you have finished using?







 On Friday, July 6, 2012 5:16:17 PM UTC+1, Android Developer wrote:

  Hi,

  I am working in a avatar like application that has lots of images more
  than 1000 where user can change any image at runtime. But its frequently
  running out of heap space and then crashed.

  I checked this.
 http://developer.android.com/training/displaying-bitmaps/index.html

  But it didnt solve my problem. Even i have worker thread to update the
  image to UI.

  *Stack Trace :

  07-06 21:54:45.707: E/AndroidRuntime(14405): java.lang.OutOfMemoryError
  07-06 21:54:45.707: E/AndroidRuntime(14405):     at
  android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
  07-06 21:54:45.707: E/AndroidRuntime(14405):     at
  android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:483)
  07-06 21:54:45.707: E/AndroidRuntime(14405):     at
  android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:351)
  07-06 21:54:45.707: E/AndroidRuntime(14405):     at
  android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:7 
  73)
  07-06 21:54:45.707: E/AndroidRuntime(14405):     at
  android.content.res.Resources.loadDrawable(Resources.java:1935)
  07-06 21:54:45.707: E/AndroidRuntime(14405):     at
  android.content.res.Resources.getDrawable(Resources.java:664)
  07-06 21:54:45.707: E/AndroidRuntime(14405):     at
  android.widget.ImageView.resolveUri(ImageView.java:542)
  07-06 21:54:45.707: E/AndroidRuntime(14405):     at
  android.widget.ImageView.setImageResource(ImageView.java:315)
  07-06 21:54:45.707: E/AndroidRuntime(14405):     at
  android.os.AsyncTask.finish(AsyncTask.java:602)
  07-06 21:54:45.707: E/AndroidRuntime(14405):     at
  android.os.AsyncTask.access$600(AsyncTask.java:156)
  07-06 21:54:45.707: E/AndroidRuntime(14405):     at
  android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:615)
  07-06 21:54:45.707: E/AndroidRuntime(14405):     at
  android.os.Handler.dispatchMessage(Handler.java:99)
  07-06 21:54:45.707: E/AndroidRuntime(14405):     at
  android.os.Looper.loop(Looper.java:137)
  07-06 21:54:45.707: E/AndroidRuntime(14405):     at
  android.app.ActivityThread.main(ActivityThread.java:4424)
  07-06 21:54:45.707: E/AndroidRuntime(14405):     at
  java.lang.reflect.Method.invokeNative(Native Method)
  07-06 21:54:45.707: E/AndroidRuntime(14405):     at
  java.lang.reflect.Method.invoke(Method.java:511)
  07-06 21:54:45.707: E/AndroidRuntime(14405):     at
  com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java: 
  784)
  07-06 21:54:45.707: E/AndroidRuntime(14405):     at
  com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
  07-06 21:54:45.707: E/AndroidRuntime(14405):     at
  dalvik.system.NativeStart.main(Native Method)

  *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] detect home screen arrival

2012-07-07 Thread Narendra Singh Rathore
Hello all,
My requirement is to detect the home screen arrival in two cases -

1) After closing any application,
2) unlocking the home screen lock.

Further, on home screen detection, I want to capture the time and save it
for my use.
I am using service (containing thread) for this purpose.

I am just feeling troublesome in catching the event as soon as the home
screen appears from any other screen.
Guide me the way to achieve this.


Thank you all.
NSR

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

[android-developers] Images storage

2012-07-07 Thread pinicius
It is recommended in any situation save images in a database? Or it is 
always best done in the sd card?

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] detect home screen arrival

2012-07-07 Thread Mark Murphy
Write your own home screen.

On Sat, Jul 7, 2012 at 4:20 AM, Narendra Singh Rathore
nsr.curi...@gmail.com wrote:
 Hello all,
 My requirement is to detect the home screen arrival in two cases -

 1) After closing any application,
 2) unlocking the home screen lock.

 Further, on home screen detection, I want to capture the time and save it
 for my use.
 I am using service (containing thread) for this purpose.

 I am just feeling troublesome in catching the event as soon as the home
 screen appears from any other screen.
 Guide me the way to achieve this.


 Thank you all.
 NSR

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



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

_The Busy Coder's Guide to Android Development_ Version 3.7 Available!

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

2012-07-07 Thread sven
Hi,

I am totally impressed: The implementation works like a charme! Many many 
thanks for providing this.

Best regards

  Sven




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

2012-07-07 Thread Nasir Aftab
Same thing I face in past . . .it looks it is due to cache of bluetooth
something like this ..
What Happend according to me  Bluetooth 1st search for devices then get
its name . .
After searching devices when android bluetooth API try to get its name it
goes out of range . . that gives null .. .
if anyone explain more on this ?




On Sat, Jul 7, 2012 at 11:58 AM, gjs garyjamessi...@gmail.com wrote:

 Hi,

 And by that logic device might be null as well...

 Maybe check the source code.

 Regards

 On Jul 7, 5:12 am, bob b...@coolfone.comze.com wrote:
  I'm looking at the Bluetooth chat example:
 
  // When discovery finds a device
  if (BluetoothDevice.ACTION_FOUND.equals(action)) {
  // Get the BluetoothDevice object from the Intent
  BluetoothDevice device =
  intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
  // If it's already paired, skip it, because it's been
  listed already
  if (device.getBondState() !=
 BluetoothDevice.BOND_BONDED) {
  mNewDevicesArrayAdapter.add(device.getName() + \n +
  device.getAddress());
  }
  // When discovery is finished, change the Activity title
  }
 
  I think there is a bug here because it assumes device.getName() does not
  return null, when in fact it might.
 
  What do you guys think?

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




-- 
---
*Regards :*
   *Muhammad Nasir Aftab*
---

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

2012-07-07 Thread Raymond Rodgers

On 07/06/2012 11:31 AM, Justin Anderson wrote:

Please post the relevant code...

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

public class MyActivity extends FragmentActivity {
SectionsPagerAdapter mSectionsPagerAdapter;
ViewPager mViewPager;
static final String PREFS_FILE = InstallLog.prefs;
static final boolean  DEBUG_MODE = true;
public static final int SCAN_UPDATE = 0xdeadbeef;
public static final int SCAN_DONE = 0xdeaddead;
static MyActivity MA = null;
TextView statusTextItem = null;
Handler scanDialogUpdateHandler = new Handler() {

@Override
public void handleMessage(Message msg) {
switch(msg.what)
{
case MyActivity.SCAN_UPDATE:
{
if(statusTextItem == null)
statusTextItem = 
(TextView)MyActivity.MA.findViewById(R.id.statusTextItem);

Log.e(myapp, detected  + (String)msg.obj);
if(statusTextItem != null)
{
Log.e(myapp,Changing the status text to ' + 
(String)msg.obj +');

statusTextItem.setText((String)msg.obj);
statusTextItem.invalidate();
}
}break;
case MyActivity.SCAN_DONE:
{
//kill the dialog
MA.scanFrag.dismiss();
}break;
default:
super.handleMessage(msg);
}
}

};
FragmentTransaction fragTran;
FragmentManager fragMan;
ScanDialogFragment scanFrag;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
MyActivity.MA = this;
setContentView(R.layout.build_layout);
this.statusTextItem = (TextView)findViewById(R.id.statusTextItem);

   // Create the adapter that will return a fragment for each of 
the three primary sections

// of the app.
mSectionsPagerAdapter = new 
SectionsPagerAdapter(getSupportFragmentManager());



// Set up the ViewPager with the sections adapter.
mViewPager = (ViewPager) findViewById(R.id.pager);
mViewPager.setAdapter(mSectionsPagerAdapter);
int entries = this.countEntries();
if( entries == 0 )
{
fragMan = getSupportFragmentManager();
fragTran = fragMan.beginTransaction();
scanFrag = new ScanDialogFragment();
scanFrag.setCancelable(false);
scanFrag.show(fragTran, progress);
Intent serviceIntent = new Intent(this, 
RecordActivityService.class);

serviceIntent.setAction(RecordActivityService.PERFORM_SCAN);
startService(serviceIntent);
//fragTran.commit(); // commented out due to crash on startup 
when present

}
}

}

public class RecordActivityService extends Service implements
UncaughtExceptionHandler {
private Thread thread;
private Runnable doStartScan = new Runnable() {
public void run() {
performScan();
}
};
private void performScan()
{
Log.i(myapp, Perform scan);
ListMyInfo myInfo = new ListMyInfo();
// getContentResolver().insert(Uri.parse(MyContentProvider.AC_URI), values);
Uri uri = Uri.parse(MyContentProvider.AC_URI);
ContentValues values = new ContentValues();
Message msg = null;
MyInfo info = null;
for(int index = 0 ; index  myInfo.size(); index++)
{
info = myInfo.get(index);
//populate ContentProvider; MyActivity.countEntries() 
counts these entries

values.put(data_1,info.getName() );
values.put(data_2,info.getData(2) );
values.put(data_3,info.getData(3) );
getContentResolver().insert(uri, values);
values.clear();
msg = new Message();
msg.what = MyActivity.SCAN_UPDATE;
msg.obj = info.getName();
MyActivity.scanDialogUpdateHandler.sendMessage(msg);
msg = null;
}
MyActivity.scanDialogUpdateHandler.sendEmptyMessage(MyActivity.SCAN_DONE);
this.stopSelf();
}
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
// TODO Auto-generated method stub
int retval = super.onStartCommand(intent, flags, startId);
thread = new Thread(null,doStartScan,perform_scan);
thread.start();
}
}

The following is the ScanDialogFragment.

public class ScanDialogFragment extends DialogFragment
{
public ScanDialogFragment()
{

}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup 
container,

Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.scanningdialogview, 
container);

return view;
}

}

This is the XML for the scanningdialogview 

Re: [android-developers] Can't get AVD to run my noddy app!

2012-07-07 Thread Doug Ponsford
Ok, I waited for about 10 minutes the first time around - I would have 
thought that would be long enough?
 
I have to reinstall it again anyway, so I'll try Java 1.6.  I'll also go 
for Eclipse Helios and have a go with that.
 
Thanks.
 

On Tuesday, 3 July 2012 00:23:42 UTC+1, TreKing wrote:

 On Wed, Jun 27, 2012 at 11:29 AM, Doug Ponsford wrote:

 Eclipse says that my app is loding, but it never runs.  All I get
 is the simulator window with ANDROID on the screen and the buttons
 on the righ-hand side.


 Is this the first time you've set up the Emulator? It's slow as mol-asses, 
 particularly the first time around. You might just have to wait it out. 


 I also have Java 1.7.


 You probably want 1.6.


 -
 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] Defining custom drawables in XML

2012-07-07 Thread Y2i
Hi Romain,

Has this been changed or are the docs incorrect?

http://developer.android.com/guide/topics/graphics/2d-graphics.html#drawables-from-xml
Any Drawable subclass that supports the inflate() method can be defined in 
XML and instantiated by your application. 

Thank you!

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

[android-developers] Re: How to improve performance for drawing with background image?

2012-07-07 Thread Nobu Games
I assume you are using a custom view for drawing. First of all you need to set 
up a Bitmap object 
http://developer.android.com/reference/android/graphics/Bitmap.html#createBitmap%28int,%20int,%20android.graphics.Bitmap.Config%29of
 
the size of your drawing view. This is possible after the view has been 
measured:

drawingCanvasBmp = Bitmap.createBitmap(getWidth(), getHeight(), 
 Config.ARGB_);


Then you create a 
Canvashttp://developer.android.com/reference/android/graphics/Canvas.htmlobject
 that is able to draw into that bitmap:

Canvas drawingCanvas = new Canvas(drawingCanvasBmp);


After that you'll need to prepare that canvas by drawing your background 
image into it. Depending on the size of that background image you probably 
need to draw 
ithttp://developer.android.com/reference/android/graphics/Canvas.html#drawBitmap%28android.graphics.Bitmap,%20float,%20float,%20android.graphics.Paint%29repeatedly
 as a tile to cover the whole canvas.

Example code:

final int bgTileWidth = backgroundImage.getWidth();
 final int bgTileHeight = backgroundImage.getHeight();
 final int viewWidth = getWidth();
 final int viewHeight = getHeight();

 for(int x = 0; x  viewWidth; x += bgTileWidth) {
 for(int y = 0; y  viewHeight; y += bgTileHeight) {
 drawingCanvas.drawBitmap(backgroundImage, x, y, null);
 }
 }


Then you need to modify your drawing view's 
onDrawhttp://developer.android.com/reference/android/view/View.html#onDraw%28android.graphics.Canvas%29method
 and make use of 
drawingCanvas instead of the canvas argument for drawing the brush stroke. 
When the brush stroke is drawn, you finally need to draw drawingCanvasBmpto the 
canvas argument object:

protected void onDraw(Canvas canvas) {
 // 1. Draw brush stroke to drawingCanvas
 
 // 2. Draw result to canvas:
 canvas.drawBitmap(drawingCanvasBmp, 0, 0, null);
 }


You may run into trouble though when you are using the code from the 
FingerPaint SDK demo project, because it repeatedly paints the same brush 
stroke path until the finger is lifted. With above approach you will 
probably get unwanted, alias artifacts around the edges of the brush 
stroke. But that would be a different problem and question.

Another important side note: You need to call the 
recyclehttp://developer.android.com/reference/android/graphics/Bitmap.html#recycle%28%29method
 on all your Bitmap objects when you are done using them. That's 
usually the case when your Activity stops. Otherwise you will run into an 
out of memory exception problem after switching activities a few times.


On Thursday, July 5, 2012 9:21:18 PM UTC-5, limtc wrote:

 Hi,

 Can you points me to any codes I can read regarding setting up background 
 this way?

 Thanks!

 On Friday, July 6, 2012 10:09:08 AM UTC+8, Nobu Games wrote:

 Did you also try drawing directly into the background image bitmap? Make 
 it a mutable bitmap, wrap that bitmap into a Canvas object and use that 
 instead. Maybe that speeds things up a bit, because Android doesn't need to 
 blend two views / layers all the time.



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

[android-developers] Re: In App Billing V2: Item not found, but purchase OK

2012-07-07 Thread John
Appreciate your help !!

-John

On Friday, July 6, 2012 8:15:56 PM UTC-7, fibercode wrote:

 This is a bug in the sample Dungeons application in the onClick method for 
 the purchase button.

 I posted a solution here:
 http://stackoverflow.com/a/11371927/625030

 The supplied method has a bug in the if {} else if {} statement where it 
 causes the mBillingService.requestPurchase to be called twice, when the 
 selected item is not a subscription item (mManagedType != 
 Managed.SUBSCRIPTION). So the same item will be requested twice, once with 
 an item type of inapp (which is the valid request) and immediately after 
 that with an item type of subs (which is incorrect and it shows item not 
 found).

 Here is the buggy code:

 if (mManagedType != Managed.SUBSCRIPTION 
 !mBillingService.requestPurchase(mSku, 
 Consts.ITEM_TYPE_INAPP, mPayloadContents)) {
 showDialog(DIALOG_BILLING_NOT_SUPPORTED_ID);
 } else if (!mBillingService.requestPurchase(mSku, 
 Consts.ITEM_TYPE_SUBSCRIPTION, mPayloadContents)) {
 // Note: mManagedType == Managed.SUBSCRIPTION
 showDialog(DIALOG_SUBSCRIPTIONS_NOT_SUPPORTED_ID);
 }

 To fix this, add mManagedType == Managed.SUBSCRIPTION to the else if above.

 Here is how the function should look:

 @Override
 public void onClick(View v) {
 if (v == mBuyButton) {
 if (Consts.DEBUG) {
 Log.d(TAG, buying:  + mItemName +  sku:  + mSku);
 }

 if (mManagedType != Managed.SUBSCRIPTION 
 !mBillingService.requestPurchase(mSku, 
 Consts.ITEM_TYPE_INAPP, mPayloadContents)) {
 showDialog(DIALOG_BILLING_NOT_SUPPORTED_ID);
 } else if (mManagedType == Managed.SUBSCRIPTION  
 !mBillingService.requestPurchase(mSku, Consts.ITEM_TYPE_SUBSCRIPTION, 
 mPayloadContents)) {
 // Note: mManagedType == Managed.SUBSCRIPTION
 showDialog(DIALOG_SUBSCRIPTIONS_NOT_SUPPORTED_ID);
 }
 } else if (v == mEditPayloadButton) {
 showPayloadEditDialog();
 } else if (v == mEditSubscriptionsButton) {
 editSubscriptions();
 }
 }


 On Saturday, 16 June 2012 00:23:02 UTC-4, John wrote:

 Have In App Billing V2 incorporated into my code and be able to buy 
 one-time purchase item and yearly subscription item. But when 
 purchasing one-time purchase item, always get the message Item not found. 
 Is this a Google bug? Any help? Thanks in advance.

 -John



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

2012-07-07 Thread Jim Graham
Just wondering, how are Android devices with cameras 8 MP or higher
supported in Java, when just taking the photo is either enough to
violate the memory limits, or is close to it (particularly for
10+ MP cameras)?

And how would I, in my camera app, provide that same support?

Thanks,
   --jim

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

Do not look into waveguide with remaining eye.

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] how are Android cameras 8 MP and up supported in Java?

2012-07-07 Thread Mark Murphy
On Sat, Jul 7, 2012 at 3:13 PM, Jim Graham spooky1...@gmail.com wrote:
 Just wondering, how are Android devices with cameras 8 MP or higher
 supported in Java, when just taking the photo is either enough to
 violate the memory limits, or is close to it (particularly for
 10+ MP cameras)?

The heap sizes are generally larger for such devices.

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

Android Training in DC: http://marakana.com/training/android/

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


[android-developers] media controller

2012-07-07 Thread Sadhna Upadhyay
Hi everybody,
can some one tell me how to add volume controller in android as
it (volume controller)is in youtube.please help me if any one has any idea
about this.

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

[android-developers] Image Morphing

2012-07-07 Thread Sadhna Upadhyay
Hi everybody,
   can some one tell me that how to do image morphing in android,is it
possible or not if yes then how ? pls help me.

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

Re: [android-developers] how are Android cameras 8 MP and up supported in Java?

2012-07-07 Thread Jim Graham
On Sat, Jul 07, 2012 at 03:15:38PM -0400, Mark Murphy wrote:
 On Sat, Jul 7, 2012 at 3:13 PM, Jim Graham spooky1...@gmail.com wrote:
  Just wondering, how are Android devices with cameras 8 MP or higher
  supported in Java, when just taking the photo is either enough to
  violate the memory limits, or is close to it (particularly for
  10+ MP cameras)?
 
 The heap sizes are generally larger for such devices.

Does this mean that I can't support those?  Or is there a way (preferably
supported at least as of API 8) that I can increase the heap enough to
support them?

If not, then I'm wasting my time trying to do so, and given that, right
now, I'm having endless problems getting OpenCV to work (imports won't
resolve, undocumented JNI code that I'm told exist, but can't get anyone
to say more than that, etc.), knowing either way would be a huge help,
if nothing else, for my sanity and blood pressure (which my doctor just
had a few things to say about yesterday)

Thanks,
   --jim

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

Do not look into waveguide with remaining eye.

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] how are Android cameras 8 MP and up supported in Java?

2012-07-07 Thread Mark Murphy
On Sat, Jul 7, 2012 at 3:22 PM, Jim Graham spooky1...@gmail.com wrote:
 On Sat, Jul 07, 2012 at 03:15:38PM -0400, Mark Murphy wrote:
 On Sat, Jul 7, 2012 at 3:13 PM, Jim Graham spooky1...@gmail.com wrote:
  Just wondering, how are Android devices with cameras 8 MP or higher
  supported in Java, when just taking the photo is either enough to
  violate the memory limits, or is close to it (particularly for
  10+ MP cameras)?

 The heap sizes are generally larger for such devices.

 Does this mean that I can't support those?

I have no idea what you mean by that. If your app is running on a
device that runs Dalvik apps with larger heap sizes, you have more
memory automatically.

 Or is there a way (preferably
 supported at least as of API 8) that I can increase the heap enough to
 support them?

I repeat: the heap sizes are generally larger for such devices.

 (imports won't
 resolve, undocumented JNI code that I'm told exist, but can't get anyone
 to say more than that, etc.)

None of which has anything to do with the heap size.

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

Android Training in DC: http://marakana.com/training/android/

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


Re: [android-developers] how are Android cameras 8 MP and up supported in Java?

2012-07-07 Thread Jim Graham
On Sat, Jul 07, 2012 at 03:26:15PM -0400, Mark Murphy wrote:
 On Sat, Jul 7, 2012 at 3:22 PM, Jim Graham spooky1...@gmail.com wrote:

  The heap sizes are generally larger for such devices.
 
  Does this mean that I can't support those?
 
 I have no idea what you mean by that. If your app is running on a
 device that runs Dalvik apps with larger heap sizes, you have more
 memory automatically.

Yeah, I realized that seconds after hitting CR to send the last message.
:-)

  (imports won't
  resolve, undocumented JNI code that I'm told exist, but can't get anyone
  to say more than that, etc.)
 
 None of which has anything to do with the heap size.

No, but it's my alternative for blending any photographic color filters
(e.g., solid color, graduated, and/or split-field) with the photo, and
then doing stuff like brightness, ontrast, color balance, gamma, and so
on, without running into an OOM error.  It's that, or limit the image
size, which I really hate the idea of forcing users with higher
resolution cameras to do, even if only one step down in resolution.  It
just doesn't seem right, IMHO.

Thanks,
   --jim

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

Do not look into waveguide with remaining eye.

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] how are Android cameras 8 MP and up supported in Java?

2012-07-07 Thread Mark Murphy
On Sat, Jul 7, 2012 at 3:33 PM, Jim Graham spooky1...@gmail.com wrote:
 No, but it's my alternative for blending any photographic color filters
 (e.g., solid color, graduated, and/or split-field) with the photo, and
 then doing stuff like brightness, ontrast, color balance, gamma, and so
 on, without running into an OOM error.  It's that, or limit the image
 size, which I really hate the idea of forcing users with higher
 resolution cameras to do, even if only one step down in resolution.  It
 just doesn't seem right, IMHO.

Off the cuff...

Step #1: Use ActivityManager and getMemoryClass() to determine how big
your heap size is.

Step #2: Ask the Camera getSupportedPictureSizes().

Step #3: Choose a picture size based upon the memory class and needs
of your app.

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

Android Training in DC: http://marakana.com/training/android/

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


Re: [android-developers] how are Android cameras 8 MP and up supported in Java?

2012-07-07 Thread Jim Graham
On Sat, Jul 07, 2012 at 03:41:26PM -0400, Mark Murphy wrote:
 On Sat, Jul 7, 2012 at 3:33 PM, Jim Graham spooky1...@gmail.com wrote:
  No, but it's my alternative for blending any photographic color filters
  (e.g., solid color, graduated, and/or split-field) with the photo, and
  then doing stuff like brightness, ontrast, color balance, gamma, and so
  on, without running into an OOM error.  It's that, or limit the image
  size, which I really hate the idea of forcing users with higher
  resolution cameras to do, even if only one step down in resolution.  It
  just doesn't seem right, IMHO.
 
 Off the cuff...
 
 Step #1: Use ActivityManager and getMemoryClass() to determine how big
 your heap size is.
 
 Step #2: Ask the Camera getSupportedPictureSizes().
 
 Step #3: Choose a picture size based upon the memory class and needs
 of your app.

But it still doesn't seem like the right thing to do, asking someone to
compromise on image quality in an app that's intended to be for more
serious uses of the camera to begin with  I'll just keep trying to
find the non-existant (as far as I can tell so far, after a week or two
of searching for it) documentation on the missing C++ bits, etc.,
for OpenCV/JNI.  I already have the blending and post-processing stuff
done for Java (all except the blending are matrix and convolution matrix
based---the blending uses paint, PorterDuff, and the canvas), but again,
I hit those memory limits...

Like I said...I'll keep looking.

Thanks,
   --jim

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

Do not look into waveguide with remaining eye!

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] Image Morphing

2012-07-07 Thread Fred Niggle
Hi everybody,
   can some one tell me that how to do image morphing in android,is it
possible or not if yes then how ?

*Yes it is possible.*

 pls help me.

*First* use google, locate some java programming tutorials and work through
them, *then* when you find something problematic post here with your code
and logcat dumps to gain guidance or advice.

*If* *any of the above is unclear please google search about.*

Best regards,
Fred

On 7 July 2012 20:21, Sadhna Upadhyay sadhna.braah...@gmail.com wrote:

 Hi everybody,
can some one tell me that how to do image morphing in android,is it
 possible or not if yes then how ? pls help me.

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




-- 
Ubuntu Speech 
inputhttps://play.google.com/store/apps/details?id=com.nds.ubuntuspeechinputis
now available on Google Play, along with Magnetic
Door Alarm 
apphttps://play.google.com/store/apps/details?id=com.nds.magneticdooralarm
.

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

2012-07-07 Thread Fred Niggle
Did you search google?

On 7 July 2012 20:19, Sadhna Upadhyay sadhna.braah...@gmail.com wrote:

 Hi everybody,
 can some one tell me how to add volume controller in android
 as it (volume controller)is in youtube.please help me if any one has any
 idea about 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




-- 
Ubuntu Speech 
inputhttps://play.google.com/store/apps/details?id=com.nds.ubuntuspeechinputis
now available on Google Play, along with Magnetic
Door Alarm 
apphttps://play.google.com/store/apps/details?id=com.nds.magneticdooralarm
.

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

2012-07-07 Thread Nobu Games
Oh my god, I want to marry your post

On Saturday, July 7, 2012 3:25:36 PM UTC-5, Fred Niggle wrote:

 Hi everybody,
can some one tell me that how to do image morphing in android,is it 
 possible or not if yes then how ?

 *Yes it is possible.*

  pls help me.

 *First* use google, locate some java programming tutorials and work 
 through them, *then* when you find something problematic post here with 
 your code and logcat dumps to gain guidance or advice.

 *If* *any of the above is unclear please google search about.*

 Best regards,
 Fred

 On 7 July 2012 20:21, Sadhna Upadhyay sadhna.braah...@gmail.com wrote:

 Hi everybody,
can some one tell me that how to do image morphing in android,is 
 it possible or not if yes then how ? pls help me.
  
 -- 
 You received this message because you are subscribed to the Google
 Groups Android Developers group.
 To post to this group, send email to android-developers@googlegroups.com
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




 -- 
 Ubuntu Speech 
 inputhttps://play.google.com/store/apps/details?id=com.nds.ubuntuspeechinputis
  now available on Google Play, along with Magnetic 
 Door Alarm 
 apphttps://play.google.com/store/apps/details?id=com.nds.magneticdooralarm
 .

  

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

[android-developers] Android app for office (customer point of view)

2012-07-07 Thread Rafael
Hello,

Google needs investing in an office application for Android. If not, will 
suffer much from Windows RT.
It needs to invest in productivity of Android and not in nice - cool 
graphical features 

Cheers

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

Re: [android-developers] Android app for office (customer point of view)

2012-07-07 Thread Mark Murphy
On Sat, Jul 7, 2012 at 5:20 PM, Rafael blackbitshi...@googlemail.com wrote:
 Google needs investing in an office application for Android. If not, will
 suffer much from Windows RT.
 It needs to invest in productivity of Android and not in nice - cool
 graphical features

This list is for developing applications with the Android SDK. Random
musings belong on your own blog, your own social network account, or
the android-discuss Google Group.

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

Android Training in DC: http://marakana.com/training/android/

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


[android-developers] Re: Issues extending ListView in Android

2012-07-07 Thread G. Blake Meike
I'd say you've got yourself a bug.  Very nice work.  This code, run first 
under java 6, then under Android, confirms it for me:


package net.callmeike.sandbox.p1;

public class BaseClass {
public void run() { callFoo(); }

void foo() { System.out.println(P1 foo:  + this); }

private void callFoo() { foo(); }
}


package net.callmeike.sandbox.p2;
import net.callmeike.sandbox.p1.BaseClass;

public class SubClass extends BaseClass {
void foo() { System.out.println(P2 foo:  + this); }
}


/* Run on Android */
package net.callmeike.android.sandbox;

import android.os.Bundle;
import android.app.Activity;
import net.callmeike.sandbox.p2.SubClass;

public class SandboxActivity extends Activity {

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

SubClass obj = new SubClass();
System.out.println(onCreate with:  + obj);
obj.run();
}
}

LOGCAT OUTPUT
07-07 14:46:57.141: I/System.out(1029): onCreate with: 
net.callmeike.sandbox.p2.SubClass@411ed330
07-07 14:46:57.141: I/System.out(1029): P2 foo: 
net.callmeike.sandbox.p2.SubClass@411ed330
07-07 14:46:57.500: D/gralloc_goldfish(1029): Emulator without GPU 
emulation detected.


/* Run under Java 6 */
package net.callmeike.sandbox;
import net.callmeike.sandbox.p2.SubClass;

public class Bug {
public static void main(String[] args) {
SubClass obj = new SubClass();
System.out.println(main with:  + obj);
obj.run();
}
}

CONSOLE OUTPUT
main with: net.callmeike.sandbox.p2.SubClass@17dfafd1
P1 foo: net.callmeike.sandbox.p2.SubClass@17dfafd1

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

2012-07-07 Thread dan.x.sheph...@googlemail.com
Image morphing can be implemented as easily on android as any other computer, 
you probably are better off learning the method first forgetting the fact you 
want to implement it on android. There are many tachniques. A good place to 
start may be to google point bassed morphing with thin plate splines. 
Essentially a morph is performed by mixing warping and blending if two images. 
One issue you might have on android is performace. Lots of pixels to update 
each envolving matrix arithmatic proportional in size to the number of landmark 
morphing points.  You could may want to implement it in native ndk c code and 
call it from java or better still see if you can implement it for the gpu using 
vertex/fragment shaders.  Good luck, Dan

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

2012-07-07 Thread dan.x.sheph...@googlemail.com
Some things one needs to find out oneself. Check out android developers site, 
I'm sure it will be somewhere in the sdk documentation. One thing to note if i 
remember rightly is the same volume control buttons work for turning up or down 
volume for the ring as the media so the target depends on which is active at 
the time. I'm pretty sure it is handled by android automatically anyway unless 
for some reason you want to control the volumn via software

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

2012-07-07 Thread Romain Guy
It is indeed a known bug on our side.

As for protected methods, you cannot override them if they are marked
final.
On Jul 7, 2012 2:58 PM, G. Blake Meike blake.me...@gmail.com wrote:

 I'd say you've got yourself a bug.  Very nice work.  This code, run first
 under java 6, then under Android, confirms it for me:


 package net.callmeike.sandbox.p1;

 public class BaseClass {
 public void run() { callFoo(); }

 void foo() { System.out.println(P1 foo:  + this); }

 private void callFoo() { foo(); }
 }


 package net.callmeike.sandbox.p2;
 import net.callmeike.sandbox.p1.BaseClass;

 public class SubClass extends BaseClass {
 void foo() { System.out.println(P2 foo:  + this); }
 }


 /* Run on Android */
 package net.callmeike.android.sandbox;

 import android.os.Bundle;
 import android.app.Activity;
 import net.callmeike.sandbox.p2.SubClass;

 public class SandboxActivity extends Activity {

 @Override
 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);

 SubClass obj = new SubClass();
 System.out.println(onCreate with:  + obj);
 obj.run();
 }
 }

 LOGCAT OUTPUT
 07-07 14:46:57.141: I/System.out(1029): onCreate with:
 net.callmeike.sandbox.p2.SubClass@411ed330
 07-07 14:46:57.141: I/System.out(1029): P2 foo:
 net.callmeike.sandbox.p2.SubClass@411ed330
 07-07 14:46:57.500: D/gralloc_goldfish(1029): Emulator without GPU
 emulation detected.


 /* Run under Java 6 */
 package net.callmeike.sandbox;
 import net.callmeike.sandbox.p2.SubClass;

 public class Bug {
 public static void main(String[] args) {
 SubClass obj = new SubClass();
 System.out.println(main with:  + obj);
 obj.run();
 }
 }

 CONSOLE OUTPUT
 main with: net.callmeike.sandbox.p2.SubClass@17dfafd1
 P1 foo: net.callmeike.sandbox.p2.SubClass@17dfafd1

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

2012-07-07 Thread Yamanoor Sai Ram
Hi,

I have a runnable in my app that runs an animation. I would like to update
a variable so that animation varies according to the data from bluetooth.

This is the function that reads the string in the runnable:

public void Message(String Message)
  {
 String r = Message;
 try {
 myNum = Integer.parseInt(r);
 } catch(NumberFormatException nfe) {
 }
m = (myNum/100);
if(m=8)
{
m=1;
}
 }


This is how I am calling the runnable in the main activity:

pBar.Message(message).


It takes at least a minute to update the string in the runnable and it
happens only once. I am not able to pass a string to the runnable. Any
suggestions to pass a string to a runnable would be greatly appreciated.


Sai

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

2012-07-07 Thread Albert Rosa
Rolplkttl
L
sent from my mobile thoughts.
On Jul 7, 2012 12:30 AM, Akki akshay.iitr@gmail.com wrote:

 I was trying to send an image file between 2 emulators using a TCP socket
 connection.The socket connection has been successfully made and the image
 file is stored on the SD-card of one of the emulators. I want to ask how
 can I convert the image file into byte stream and how on the other side can
 I convert back the bytestream to image format?? I tried to search a lot but
 couldn't find the right function in the API.

 Any other ideas for the same are welcomed

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

2012-07-07 Thread G. Blake Meike
I really can't figure out what you are asking here.  There's no evidence or 
a runnable. I'm guessing that m and myNum are data members?  Are they being 
updated from two different threads?

G. Blake Meike
Marakana

The second edition of Programming Android is now on-line:
http://shop.oreilly.com/product/0636920023005.do

On Saturday, July 7, 2012 7:14:22 PM UTC-7, yamanoorsai wrote:

 Hi,

 I have a runnable in my app that runs an animation. I would like to update 
 a variable so that animation varies according to the data from bluetooth.

 This is the function that reads the string in the runnable:

 public void Message(String Message)
  {
 String r = Message;
 try {
 myNum = Integer.parseInt(r);
 } catch(NumberFormatException nfe) {
 }
m = (myNum/100);
if(m=8)
{
m=1;
}
 }


 This is how I am calling the runnable in the main activity: 

 pBar.Message(message). 


 It takes at least a minute to update the string in the runnable and it 
 happens only once. I am not able to pass a string to the runnable. Any 
 suggestions to pass a string to a runnable would be greatly appreciated.


 Sai


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

2012-07-07 Thread yves...@gmail.com
We have an app on the Market, which works for ICS (we tried on Galaxy Nexus 
and Galaxy S3 etc), and older android system, like original Razr. But with 
the new ICS upgrade to razr, this app doesn't work anymore. Here is the 
issue.

This app basically captures an image, and saves it to the sdcard or 
internal phone memory (depends on the user settings). And then we use 
MediaScanner to scan it, the call we used is mScanner.ScanFile(fileName, 
*/*); Then we could query ContentResolver and the file is there. But the 
gallery on Razr (with ICS upgrade) will not see the new file. Since we 
don't have a Razr to test it with, the information we got from users is 
that if they copy this file to a computer, and then move it to the sdcard, 
and then reboot the phone, Gallery will see the file. We have no idea what 
is going on because we thought  the Gallery queries ContentResolver as 
well. What did we do wrong? And why other ICS devices works just fine?

Any pointers and suggestions?

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] application launching process...?

2012-07-07 Thread Abhilash baddam
Hi,

I have tried but I didn't get it, Generally SystemServer(calls from
SystemServer.java file) starts all systemservices after that how the
Systemapps are loading I am not getting.
 can anyone please help me on this?


On Wed, Jul 4, 2012 at 9:35 PM, Abhilash baddam 
abhilash.androiddevelo...@gmail.com wrote:

 Thanks Kris for the reply, could you please provide me some useful links
 for the same.


 On Mon, Jul 2, 2012 at 12:45 AM, Kristopher Micinski 
 krismicin...@gmail.com wrote:

 On Sun, Jul 1, 2012 at 2:30 PM, Abhilash baddam
 abhilash.androiddevelo...@gmail.com wrote:
  Hi,
 
  After switching on the mobile(after booting process) all the
  applications will be loaded like System apps, 3rd party apps etc...
  how these apps are loading means I want to know the way, procedure or
  process for this. Can anyone suggest me any websites or docs to know
  these things.

 It's not just understanding the boot process, which is fairly
 traditional Linux stuff, but also understanding that you're sitting on
 top of the zygote process, package manager (routing intents), and
 other android-y topics...

 I've actually heard good things about this book...
 http://shop.oreilly.com/product/0636920021094.do

 kris

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




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