[android-developers] Android Studio - Stuck on “Build Gradle” when creating a new project

2016-10-29 Thread Sj P

down votefavorite 


I have tried different solutions but none of them seem to work for me. I 
have installed the latest AS on my Windows 7. Everything downloaded 
fine(I'm not behind any proxy) However, when I try to create a new Project, 
after I set the name,Activity name(which I live as default) and finish the 
settings, a message pops up saying "Gradle Build"; It keeps building but I 
don't know what it's doing.

I've tried the following steps to fix it: -Deleted .gradle so that it 
creates a fresh one as the original might be corrupted -Downloaded gradle 
manually and pointed AS to this -Downloaded gradle zip manually and put it 
in .gradle>wrapper>dists>2.14.1>*numbers*>zip file here

Any idea how to fix this?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
To post to this group, send email to android-developers@googlegroups.com.
Visit this group at https://groups.google.com/group/android-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/android-developers/c944b6f5-f4af-4972-8a5d-93f826af1a45%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] How to close a single tab in tablayout

2011-09-02 Thread sj
There is a method to add a tab in TabHost as well as clear all tabs,
but there are no APIs to remove one single tab.

Following the logic in clearAllTabs tried to
tabwidget.removeViewAt(index);
tabHost.getTabContentView().removeViewAt(index)

After this the behaviour is strange. I assume that is because the
mTabSpecs still contain the tabspec reference. mTabSpecs is a private
variable in TabHost and there are not get methods to get a handle to
this.

How to resolve the issue if one wants to close a single tab, and yes i
have tried to clear all the tabs and add back all the tabspecs. It
does not work for my usecase where some views contains some
information regarding a session. If i recreate those tabspecs, i will
go back to the starting point in those views.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] What happens to the java properties file inside a jar when it is converted to dex?

2011-08-01 Thread sj
DexClassLoader can be used to load the jars which have been convereted
to dex format. If there are properties file in the jars. Is there a
way to load those properties file from inside the classes which have
been converted to dex?

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

2011-05-30 Thread SJ
Thanks!

On May 28, 11:12 am, Marcin Orlowski webnet.andr...@gmail.com wrote:
 On 27 May 2011 22:53, Dianne Hackborn hack...@android.com wrote:

  I don't know of any device that has a colon key (that is why there is no
  keycode for it).  Generally this is generated by shifting with another key,
  such as shift-; on a PC keyboard.

 Shift + dot (.) on Milestone/Droid

 Here's 
 pic:http://www.tracyandmatt.co.uk/blogs/media/tracyandmatts_blog/windowsl...

 Regards,
 Marcin Orlowski

 *Tray Agenda http://bit.ly/trayagenda* - keep you daily schedule handy...
 *Date In Tray* http://bit.ly/dateintraypro - current date at glance...
 WebnetMobile on *Facebook http://webnetmobile.com/fb/* and
 *Twitterhttp://webnetmobile.com/twitter/
 *

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

2011-05-30 Thread SJ
The problem is that  string like  rtsp://  makes colon very
important.

On May 27, 10:53 pm, Dianne Hackborn hack...@android.com wrote:
 I don't know of any device that has a colon key (that is why there is no
 keycode for it).  Generally this is generated by shifting with another key,
 such as shift-; on a PC keyboard.









 On Fri, May 27, 2011 at 2:08 AM, SJ boris.iva...@gmail.com wrote:
  Anyone knows how to send KEYCODE COLON? :

  According to
 http://thecodeartist.blogspot.com/2011/03/simulating-keyevents-on-and...
  (look at table) such keycode not exist

  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

 --
 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] KEYCODE COLON?

2011-05-27 Thread SJ
Anyone knows how to send KEYCODE COLON? :

According to 
http://thecodeartist.blogspot.com/2011/03/simulating-keyevents-on-android-device.html
(look at table) such keycode not exist

Thanks

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


[android-developers] Re: Unable to install latest Android SDK on Ubuntu 10.10

2011-05-03 Thread SJ
Hi Scott

Ubuntu 10.10 is smoothest platform I run so far.(after Windows :)
So either you have corrupted Linux - broken files f.e. Or you have
broken RAM.

Boris

On May 2, 6:58 pm, Scott kalad...@gmail.com wrote:
 Hi folks,

 I've been trying in vein for a few days to get the latest Android SDK
 to install on Ubuntu 10.10.  Here's what I'm up to:

 1) Grabbed and unpacked the starter package
 2) Ran tools/android
 3) Clicked Available Packages
 4) Selected all under Android Repository
 5) Clicked Install selected packages

 And kaboom (below).

 I've tried it with both OpenJDK (1.6) and Sun JDK (1.6), but no dice.
 Any suggestions would be greatly appreciated.

 Scott

 Error log:
 *** glibc detected *** java: malloc(): memory corruption:
 0x7f6968b12300 ***
 === Backtrace: =
 /lib/libc.so.6(+0x774b6)[0x7f69720f84b6]
 /lib/libc.so.6(+0x7b55f)[0x7f69720fc55f]
 /lib/libc.so.6(__libc_malloc+0x6e)[0x7f69720fd38e]
 /usr/lib/libpixman-1.so.0(+0x1724b)[0x7f69629c624b]
 /usr/lib/libpixman-1.so.0(pixman_image_create_solid_fill+0x9)
 [0x7f69629e78b9]
 /usr/lib/libpixman-1.so.0(pixman_image_fill_boxes+0x23a)
 [0x7f69629e163a]
 /usr/lib/libcairo.so.2(+0x27c68)[0x7f6964830c68]
 /usr/lib/libcairo.so.2(+0x48848)[0x7f6964851848]
 /usr/lib/libcairo.so.2(+0x4b885)[0x7f6964854885]
 /usr/lib/libcairo.so.2(+0x48861)[0x7f6964851861]
 /usr/lib/libcairo.so.2(+0x4cac7)[0x7f6964855ac7]
 /usr/lib/libcairo.so.2(+0x4cc92)[0x7f6964855c92]
 /usr/lib/libcairo.so.2(+0x4d8d9)[0x7f69648568d9]
 /usr/lib/libcairo.so.2(+0x4a191)[0x7f6964853191]
 /usr/lib/libcairo.so.2(+0x2282a)[0x7f696482b82a]
 /usr/lib/libcairo.so.2(cairo_stroke_preserve+0x1b)[0x7f696482249b]
 /usr/lib/libcairo.so.2(cairo_stroke+0x9)[0x7f69648224c9]
 /usr/lib/gtk-2.0/2.10.0/engines/libmurrine.so(murrine_draw_focus+0x5e)
 [0x7f696192815e]
 /usr/lib/gtk-2.0/2.10.0/engines/libmurrine.so(+0xf724)[0x7f6961918724]
 /usr/lib/libgtk-x11-2.0.so.0(+0x240008)[0x7f6966d70008]
 /usr/lib/libgtk-x11-2.0.so.0(+0x240115)[0x7f6966d70115]
 /usr/lib/libgtk-x11-2.0.so.0(+0x13a9d8)[0x7f6966c6a9d8]
 /usr/lib/libgobject-2.0.so.0(g_closure_invoke+0x15e)[0x7f6963550a6e]
 /usr/lib/libgobject-2.0.so.0(+0x24a30)[0x7f6963566a30]
 /usr/lib/libgobject-2.0.so.0(g_signal_emit_valist+0x62b)
 [0x7f69635680eb]
 /usr/lib/libgobject-2.0.so.0(g_signal_emit+0x83)[0x7f6963568863]
 /usr/lib/libgtk-x11-2.0.so.0(+0x2536df)[0x7f6966d836df]
 /usr/lib/libgtk-x11-2.0.so.0(gtk_main_do_event+0x556)[0x7f6966c641b6]
 /tmp/swtlib-64/libswt-pi-
 gtk-3550.so(Java_org_eclipse_swt_internal_gtk_OS__1gtk_1main_1do_1event
 +0xc)[0x7f6967192a9d]
 [0x7f696d02dca8]
 === Memory map: 
 0040-00409000 r-xp  08:01
 16385929                           /usr/lib/jvm/java-6-openjdk/jre/bin/
 java
 00608000-00609000 r--p 8000 08:01
 16385929                           /usr/lib/jvm/java-6-openjdk/jre/bin/
 java
 00609000-0060a000 rw-p 9000 08:01
 16385929                           /usr/lib/jvm/java-6-openjdk/jre/bin/
 java
 02448000-02c41000 rw-p  00:00
 0                                  [heap]
 e5a0-e6ec rw-p  00:00 0
 e6ec-f000 rw-p  00:00 0
 f000-f295 rw-p  00:00 0
 f295-faab rw-p  00:00 0
 faab-fbf5 rw-p  00:00 0
 fbf5-1 rw-p  00:00 0
 7f695ece-7f695ecf5000 r-xp  08:01
 59113551                   /lib/libgcc_s.so.1
 7f695ecf5000-7f695eef4000 ---p 00015000 08:01
 59113551                   /lib/libgcc_s.so.1
 7f695eef4000-7f695eef5000 r--p 00014000 08:01
 59113551                   /lib/libgcc_s.so.1
 7f695eef5000-7f695eef6000 rw-p 00015000 08:01
 59113551                   /lib/libgcc_s.so.1
 7f695eef6000-7f695ef4d000 r--p  08:01
 15597650                   /usr/share/fonts/truetype/ubuntu-font-
 family/Ubuntu-BI.ttf
 7f695ef4d000-7f695efaa000 r--p  08:01
 15597651                   /usr/share/fonts/truetype/ubuntu-font-
 family/Ubuntu-I.ttf
 7f695efaa000-7f695effc000 r--p  08:01
 15597649                   /usr/share/fonts/truetype/ubuntu-font-
 family/Ubuntu-B.ttf
 7f695effc000-7f695efff000 ---p  00:00 0
 7f695efff000-7f695f0fd000 rw-p  00:00 0
 7f695f0fd000-7f695f10 ---p  00:00 0
 7f695f10-7f695f1fe000 rw-p  00:00 0
 7f695f1fe000-7f695f203000 r-xp  08:01
 59113710                   /lib/libnss_dns-2.12.1.so
 7f695f203000-7f695f402000 ---p 5000 08:01
 59113710                   /lib/libnss_dns-2.12.1.so
 7f695f402000-7f695f403000 r--p 4000 08:01
 59113710                   /lib/libnss_dns-2.12.1.so
 7f695f403000-7f695f404000 rw-p 5000 08:01
 59113710                   /lib/libnss_dns-2.12.1.so
 7f695f404000-7f695f406000 r-xp  08:01
 59113589                   /lib/libnss_mdns4_minimal.so.2
 7f695f406000-7f695f605000 ---p 2000 08:01
 59113589                   /lib/libnss_mdns4_minimal.so.2
 7f695f605000-7f695f606000 r--p 1000 08:01
 59113589                   

[android-developers] android sdk on FreeBSD in Linux emulation mode

2011-05-01 Thread SJ
Hi All

I am do android development on FreeBSD8(Gnome). There are linux
emulation mode so I'm using Linux version of SDK.
To run tools/android I added swt from x11-toolkit/swt. Create env
variables:
JAVA_HOME=/usr/local/openjdk
ANDROID_JAVA_HOME=$JAVA_HOME
ANDROID_SWT=/usr/local/share/java/classes

I managed to see updater window but to my disappointment there were no
installed package - Android SDK r10.
Attempt to update from server failed:
Package SDK Platform Android 3.0 API 11, revision 1 depends on
Missing Android SDK Tools, revision 10

Do you have any idea how to fix this?

Thanks!

Best Regards
Boris

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


[android-developers] Re: Is there any method in Android through which we can add some message secretly in the end of Video clip?

2011-04-03 Thread SJ
MP4 H264 has metadata. Normally this is track info, and even image of
covers.
Advanced players has metadata parsers.
Have a look at
http://developer.android.com/reference/android/media/MediaMetadataRetriever.html


On Apr 2, 10:26 pm, TreKing treking...@gmail.com wrote:
 On Sat, Apr 2, 2011 at 2:56 PM, Nilay nilaymistr...@gmail.com wrote:
  My query is, Is there any method in Android through which we can add some
  message secretly in the end of Video or Video Frame?

 W ... T .. F ...

 --- 
 --
 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


[android-developers] Re: Monkeyrunner not capturing screenshot correctly

2011-04-03 Thread SJ
Thanks Diego.
(Actually Im using your approach with Eclipse but on MAC. Works well.
But not manage on Win.)

MonkeyRunner.sleep(1.0)
result = device.takeSnapshot()
MonkeyRunner.sleep(1.0)

This made me perfect screenshot.

On Apr 2, 10:43 pm, Diego Torres Milano dtmil...@gmail.com wrote:
 Add more delay to see it this solves the problem.

 On Apr 2, 1:56 pm, SJ boris.iva...@gmail.com wrote:







  I have also seen not 100% perfect screenshot.
  There is only one function in Monkeyrunner to take Snapshots:

  com.android.monkeyrunner.MonkeyDevice.takeSnapshot
  Gets the device's screen buffer, yielding a screen capture of the
  entire display.

  Which function have you mention?

  On Mar 31, 2:31 am, lbendlin l...@bendlin.us wrote:

   Are you taking the screenshots from the framebuffer? You may want to use a
   more higher level function that will only execute when the whole screen is
   blitted.

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

2011-04-02 Thread SJ
I have also seen not 100% perfect screenshot.
There is only one function in Monkeyrunner to take Snapshots:

com.android.monkeyrunner.MonkeyDevice.takeSnapshot
Gets the device's screen buffer, yielding a screen capture of the
entire display.

Which function have you mention?

On Mar 31, 2:31 am, lbendlin l...@bendlin.us wrote:
 Are you taking the screenshots from the framebuffer? You may want to use a
 more higher level function that will only execute when the whole screen is
 blitted.

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


[android-developers] Re: How can we get handle of GUI controls in Android?

2011-04-02 Thread SJ
I think it requires kernel level monitor. Maybe you should start from
getting source code of android.
Write driver to enumarate all controls of foreground apps.

SJ

On Mar 31, 4:57 am, Ella daffodil...@gmail.com wrote:
 The same question from me.

 We know, A GUI automation testing tool -- monkey runner is there, it
 provide some functions such as Keyboard function, input message
 functions as well as touch, which are all very good supports for the
 automation testing.

 However, there seems somethings that puzzle me a lot, so search helps
 from all of you here:
 1. As in most of GUI automation testing, locate the objects in the
 screen and judge the existing of the objects are very important, so is
 there any way to implement this function, or can we extend the
 function ourselves, if so, how?
 2. Now we can't touch the object by provide name or id or any other
 attributes of the objects but just touch on location(by X,Y). in
 common GUI automation, it's very inflexible and bring much trouble to
 users to get the location info. Is there any way to resolve this
 problems? or any further plans for the enhancement?

 Thanks!

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


[android-developers] Re: C/C++ Integration With Android...

2011-04-02 Thread SJ
Check here:

http://smartctl.net/android/ndk-r5.php

On Apr 1, 1:59 pm, iliTheFallen gurcan.il...@gmail.com wrote:
 Hi All,

 I want to integrate C/C++ to Android Platform. Java Virtual Machine
 has a native support for calling C/C++ methods or importing dll files.
 My question is Does Dalvik Virtual Machine(DVM) have the same
 support?.

 If it has; would you mind letting me know about the technique or the
 resource depicting the case i mentioned?

 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] Re: Monkeyrunner error for device

2011-04-02 Thread SJ
Looks like connection between monkeyrunner script and monkeyrunner
daemon on device broken.
is it always happen or sparadically?
Can u try to remove all extra Apps and repeat?

On Apr 1, 9:12 pm, saadhuboy saadhu...@gmail.com wrote:
 I am trying to use monkeyrunner to automate a few tests on the device
 but keep running into the following error on a touch() or press()
 call.

 110401 11:47:40.034:S [main]
 [com.android.monkeyrunner.adb.AdbMonkeyDevice] Erro
 r sending touch event: 240 720 DOWN_AND_UP
 110401 11:47:40.034:S [main]
 [com.android.monkeyrunner.adb.AdbMonkeyDevice]java.
 net.SocketException: Software caused connection abort: socket write
 error
 110401 11:47:40.034:S [main]
 [com.android.monkeyrunner.adb.AdbMonkeyDevice]
 at java.net.SocketOutputStream.socketWrite0(Native Method)
 110401 11:47:40.034:S [main]
 [com.android.monkeyrunner.adb.AdbMonkeyDevice]
 at java.net.SocketOutputStream.socketWrite(Unknown Source)
 110401 11:47:40.034:S [main]
 [com.android.monkeyrunner.adb.AdbMonkeyDevice]
 at java.net.SocketOutputStream.write(Unknown Source)
 110401 11:47:40.034:S [main]
 [com.android.monkeyrunner.adb.AdbMonkeyDevice]
 at sun.nio.cs.StreamEncoder.writeBytes(Unknown Source)
 .
 .
 .
 110401 11:47:40.034:S [main]
 [com.android.monkeyrunner.adb.AdbMonkeyDevice]
 at com.android.monkeyrunner.ScriptRunner.console(ScriptRunner.java:
 193)
 110401 11:47:40.034:S [main]
 [com.android.monkeyrunner.adb.AdbMonkeyDevice]
 at
 com.android.monkeyrunner.MonkeyRunnerStarter.run(MonkeyRunnerStarter.java:
 89)

 110401 11:47:40.034:S [main]
 [com.android.monkeyrunner.adb.AdbMonkeyDevice]
 at
 com.android.monkeyrunner.MonkeyRunnerStarter.main(MonkeyRunnerStarter.java:
 20
 3)

 However the calls for shell() method works fine. What might I be doing
 wrong?
 The same code works well on the eumlator.

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

2011-03-28 Thread SJ
Thanks!

On Mar 28, 9:11 am, Rainbowbreeze alfredo.morr...@gmail.com wrote:
  I'm interesting if there any way to simulate user activity on Android
  device.

 Application Exerciser Monkey for stress 
 testshttp://developer.android.com/guide/developing/tools/monkey.html

 MonkeyRunner for sending keystrokes and contol the 
 emulator/devicehttp://developer.android.com/guide/developing/tools/monkeyrunner_conc...

 and Robotium to rule them all! ;)http://code.google.com/p/robotium/

 --
 .enjoy.
 Alfredo Morresi

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

2011-03-27 Thread SJ
Is they still detected as USB devices?

On Mar 25, 10:34 am, Kunju Vava android...@gmail.com wrote:
 hi

 You just tried to on/off the device
 or
 plse note

 Version of Android (2.1, 2.2)
  What version of Windows? 32-bit or 64-bit?
  Have you been able to only connect USB, WiFi, both or none of the above,

  i just give a clew ...i dont kow d details

 thanks
 Ratheesh

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

2011-03-27 Thread SJ
Hallo

I'm interesting if there any way to simulate user activity on Android
device.

I'm interesting in softkeys, hwkeys, anything. Are there some
limitation?

Is it possible from user level (Java) or or kernel level (C), through
jailbreak or straight,

through BlueTooth or over Network or any special cable?

I'm not virus maker I need it for my project.

Thanks.
SJ

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

2011-03-18 Thread SJ
Hallo

Is it possible to make hooks to monitor android activity?
which program send/receive data? Who send SMS, MMS, issued Call?
Whats best way to write such application?

Thanks

SJ

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

2010-04-29 Thread sj

Currently I'm successfully loading and displaying an image from a
webserver using the code below.

URL imgURL = new URL(http://www.xxx.com/myimage.png;);
URLConnection conn = aURL.openConnection();
conn.connect();
InputStream is = conn.getInputStream();
BufferedInputStream bis = new BufferedInputStream(is);
bm= BitmapFactory.decodeStream(bis);
bis.close();
is.close();

canvas.drawBitmap(bm, 0, 0, null);


What I want to do is load it from a resource.  I've put myimage.png
into res/drawable and referenced the bitmap as follows :-

Bitmap bm = BitmapFactory.decodeResource(getResources(),
R.drawable.myimage);

However when I try to display it with canvas.drawBitmap(bm, 0, 0,
null); I get a Force Close.

What am I missing?

Thanks,
Simon.

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


[android-developers] Re: Android Developer Challenge II Cancelled?

2009-03-20 Thread SJ

Thanks for the clarification.

And my $0.02 that it should be focused more towards the features and
functionality and how it takes android over and above what it can
normally do rather than how it fares in the marketplace.

cheers,

Sachin

On Mar 19, 5:39 pm, Dan Morrill morri...@google.com wrote:
 Oops.  Looks like that page was collateral damage when we did the move to
 developer.android.com.  We're looking into it; thanks for pointing it out.
  At any rate the content that would be there refers only to the first
 Developer Challenge.
 Regarding the second Developer Challenge, it definitely isn't canceled but
 we haven't announced plans for it yet.  We said we would by last year (sorry
 about that), but we're still working on how to structure it.  The world is
 quite a bit different now than it was when we ran the first ADC, so we want
 to make sure the new rules/structure make sense, and we are of course taking
 into consideration everyone's experiences with the first ADC.  The second
 ADC will definitely not be a clone of the first ADC.

 We expect to have all this finalized and announce rules within a couple
 months.  The event itself will likely run in the second half of the year.

 - Dan

 On Thu, Mar 19, 2009 at 1:07 AM, Al Sutton a...@funkyandroid.com wrote:

  Very very recently though. Googling for android developer challenge
  still brings up the 404ed page as the top result.

  Al.

  Anonymous Anonymous wrote:
  http://developer.android.com/
   try in here.. its moved i guess

   On Thu, Mar 19, 2009 at 12:10 PM, Eelke Folmer eelke.fol...@gmail.com
   mailto:eelke.fol...@gmail.com wrote:

       This (http://code.google.com/android/adc.html)  gives a 404 which
  is
       weird for a google site.
       Is this challenge cancelled? I hope not..

  --

  * Written an Android App? - List it athttp://andappstore.com/*

  ==
  Funky Android Limited is registered in England  Wales with the
  company number  6741909. The registered head office is Kemp House,
  152-160 City Road, London,  EC1V 2NX, UK.

  The views expressed in this email are those of the author and not
  necessarily those of Funky Android Limited, it's associates, or it's
  subsidiaries.

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