Re: [android-developers] Immediate Need - Ruby Developer

2016-11-07 Thread Erik TSomik
REMOVE

On Mon, Nov 7, 2016 at 5:36 PM, Mohammad Imran <
mohammad.ima...@idctechnologies.com> wrote:

>
>
> Hi Partner, I hope you are doing great! Please share profiles for the
> below position.
>
>
>
> *Position: Ruby Developer*
>
> *Contract: C2C*
>
> *Visa: H1/GC/USC*
>
> *Location: Richfield, MN local*
>
> *Interview: Phone and face to face (Local Profiles only)*
>
>
>
> *Ruby Developer* for Client's Website Operations. Help build operational
> tools for website.
>
> We are currently looking for a Ruby Developer to work on our web
> Automation Tools. The goal of our Deployment Automation projects are to
> provide zero downtime deployments of all Client's Website Applications in
> the fastest, safest, and most repeatable way for the Customers and Client.
> These projects depend heavily on Ruby in an environment that doesn't use
> Rails or ActiveSupport for Process Orchestrations.
>
> The ideal candidate:
> • Is self-directed and shared collective ownership for design decisions
> • Uses the best tools for the job, be those open source or otherwise
> • Comfortable in a simi-paired programming environment
> • Strongly favors TDD and BDD development methodologies
> • Up to date with current tools and techniques
> • Comfortable working in an agile environment
>
> Responsibilities/Deliverables that the resource will be responsible for:
> •Developing
> •Working in Simi-Paired Programming Environment
> •Unit testing
> •Quality Assurance of unit testing
> •Deployments
> •Work with infrastructure provisioning tools such as Chef, Vagrant,
> Kitchen, and Fog.
>
> What would a normal day for this position look like??
> •Heads down developing
> •Collaboratively working with, reporting to, and taking direction from
> current Sr. Ruby Developer
> •Status update meetings
>
> Skills Overview – Required Skills.
> 1. Experienced Ruby Ninja - Writing pure ruby without Rails or
> ActiveSupport dependencies. 5+ Years Ruby Developer Experience.
> 2.Strong Object Oriented Programming
> 3.Experience with MVC Architectural Patterns.
> 4.Experience working with and creating web services.
> 5.Understanding of Client / Server Communications
> 6.Experience with one of the following: OpenStack, AWS, or other Cloud
> Providers
> 7.Engrained understanding of Deployment Automation concepts and patterns
> 8.Continuous Integration
> 9.Experience with Fog gem (Bonus)
> 10.Experience with Message Queuing Technologies - (Bonus)
> 11.Understanding of Concurrent and Parallel programing concepts. (Bonus)
> 12.Chef or Puppet (Bonus)
>
> Current suite of tools in continuous development include but not limited
> to:
> •Custom command line applications for deployment and management tools.
> (Ruby)
> •Custom web based deployment and management portal. (Ruby)
> •Custom monitoring portal (PHP)
>
> What are the soft skills that you feel candidates must-have in order to be
> successful in this role?
> 1.Collaborative
> 2.Ability to Listen
> 3.Ability to offer ideas on technical direction
> 4.Team Player
> 5.Desire to contribute to overall direction of project
>
>
>
>
>
>
>
>
>
> *Best Regards,*
>
> *Mohammad Imran Uddin*
>
> *Manager Talent Acquisition*
>
> *IDC Technologies Inc.*
>
> 1851 McCarthy Boulevard, Suite 116, Milpitas, CA, USA, 95035.
>
> *Ph* - 408-459-5636 *Fax* - 408-608-6088
>
> *Email* - mohammad.ima...@idctechnologies.com 
>
> *URL*- . www.idctechnologies.com
>
> CMM LEVEL 3 Company & ISO 9001-2008 Certified
>
>
>
> "Under Bill s. 1618 Title III passed by the 105th U.S. Congress this mail
> can not be considered spam as long as we include a way to be removed from
> our mailing list. Simply send us an e-mail with REMOVE in the subject and
> we will gladly REMOVE you from our mailing list."
>
>
>
> --
> 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/58210221.c94e240a.8d38b.
> 6256SMTPIN_ADDED_BROKEN%40gmr-mx.google.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

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

Re: [android-developers] Immediate Need - Sr. UI Developer

2016-09-30 Thread Erik TSomik
Guys ,

And once again I am NOT giving you my SSN

On Fri, Sep 30, 2016 at 11:57 AM, Mohammad Imran <
mohammad.ima...@idctechnologies.com> wrote:

>
>
> Hi Partner, I hope are doing great! Please share profiles for the below
> position.
>
>
>
> *Title: Sr. UI Developer*
>
> *Contract: C2C*
>
> *Visa: H2/GC/USC*
>
> *Location: Detroit*
>
>  *It’s the standard for GM> 2 interviews to hire. 1 phone, 1 skype and as
> always, yes, we need full SSN for GM*
>
>
>
>
>
> Web Application Software Engineer
>
> Want to help take General Motors to the next level? General Motors
> continues to develop innovative technologies to shape the future of the
> automotive industry. Our 212,000 plus employees work in 396 facilities
> touching six continents; they speak more than 50 languages and touch 23
> time zones. From designing and engineering state-of-the-art plants and
> developing new vehicles and technologies to creating new marketing
> programs, our team members are valued for their unique contributions.
>
> At General Motors we recognize that our drivers deserve their vehicle to
> help keep them connected to the information and entertainment that helps
> make their lives better, simpler, more in-touch.
> When our drivers need personalized entertainment like customized music or
> talk radio, we deliver. Advanced technology like lomation (the ability to
> find goods and services on the fly powered by on location-based information
> services) is built into our vehicles. We even offer advanced navigation
> services through our advanced in-vehicle technology.
>
> As a member of the IHU Reserved Application team you will help build our
> next generation infotainment applications. Following Agile Methodologies
> you will join us in constantly pushing ourselves forward with new
> engineering challenges.
>
> WHAT SETS US APART
> - Big impact - you will directly impact a product that millions of people
> will use every day
> - Agile - our team fully embraces Agile Methodologies responding to change
> - Speed - we move quickly and iterate rapidly
>
> RESPONSIBILITIES
> - Own application software that will be a part of our Next Generation
> Infotainment vehicles
> - Flex your expertise in web application design, architecture and
> performance to deliver compelling customer experiences
> - Partner with the rest of your team members to innovate and develop new
> design and interaction concepts
> - Consume our API's to define and evolve the underlying interfaces that
> support your projects, and drive the ongoing evolution of our web
> architecture
>
> QUALIFICATIONS
> - Self-motivated and high-performing, with a passion for technology
> - Expert-level knowledge of JavaScript, CSS, HTML
> - Experience with AngularJS strongly desired
> - Experience with JavaScript frameworks (not jQuery) a plus
> - Experience with CSS preprocessor's a plus
> - Experience with GitHub or other content management systems is desired
> - Experience with Grunt or other automation software a plus
> - Experience with Jasmine or other testing frameworks a plus
> - Agile Methodologies, TDD, Pair Programming a plus
> - Passionate about user experience
> - 5+ years of relevant experience and a bachelor’s degree in computer
> science or equivalent
>
>
>
>
>
>
>
>
>
> *Best Regards,*
>
> *Mohammad Imran Uddin*
>
> *Manager Talent Acquisition*
>
> *IDC Technologies Inc.*
>
> 1851 McCarthy Boulevard, Suite 116, Milpitas, CA, USA, 95035.
>
> *Ph* - 408-459-5636 *Fax* - 408-608-6088
>
> *Email* - mohammad.ima...@idctechnologies.com 
>
> *URL*- . www.idctechnologies.com
>
> CMM LEVEL 3 Company & ISO 9001-2008 Certified
>
>
>
> "Under Bill s. 1618 Title III passed by the 105th U.S. Congress this mail
> can not be considered spam as long as we include a way to be removed from
> our mailing list. Simply send us an e-mail with REMOVE in the subject and
> we will gladly REMOVE you from our mailing list."
>
>
>
> --
> 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/57ee8b96.0d74240a.6a0b9.
> 3e00SMTPIN_ADDED_BROKEN%40gmr-mx.google.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

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

[android-developers] How get calendar event time on Android?

2016-09-08 Thread 'Erik' via Android Developers


Sry for my stupid question, but I'm new on android.


I write an app that should change the volume if some events in my calendar 
are activ. How I can realise this idea. I belive I can make a 
Broadcastreciver that listen on the calender and if a new event start, he 
say my service that he should modify the volume. Is it possible or should i 
choose a other way?


Thanks for your help.

-- 
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/b349bb74-c4ff-4ccb-aa47-399168cd0645%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] webview violation ? - websites's owner permission

2016-03-30 Thread erik llerena
Can anybody give a hand here. I'm creating a very simple app. I'm loading 
the content of **my OWN website** in a webview. I've done the very same in 
iphone and it got approved. But wen loaded in the google play store it got 
rejected. The email I got was so nasty but that is a different topic. I 
fought back and I got the reply below.
I don't understand how to add this function/permission. I've gone 
everywhere and I don't find an answer. Can somebody in this community help 
me. 

--See google's reply ---

 We don’t allow apps whose primary purpose is to drive affiliate traffic to 
a website or provide a webview of a website without permission from the 
website owner or administrator.
- http://www.MyWebsite.com/

If you publish a new version of your app, please make sure it’s in 
compliance with our policies.

-- 
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/0185d299-a595-438b-b2e5-98cdc26f848c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] [new] [free] [games] HTML5 Games Club - Play Games Without Installation!

2016-02-19 Thread Erik Engi
I have released my very first Android application called *HTML5 Games Club* 
 on the *Google Play Store*. This application 
allows you to play with more than *1700 HTML5 games* without any additional 
installation. Here you can play games provided by well-known HTML5 game 
distributors like *Famobi*, *GamePix*, *HTMLGames*, *TreSensa *and *Spil 
Games*.

The application is available on the Google Play Store.
Install and try it now! 




-- 
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/75f140ff-5974-4719-84ed-284fcb53fbfb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[android-developers] Android Studio cant find or install play-services 7 / wearable

2015-04-29 Thread Erik Liddell


I have a new windows 8.1 machine, and am trying to get my android studio 
environment installed. But there seems to be some issues that i have never 
encountered before. my existing projects are not compiling because the 
system can not find or even download the proper play services libs..

Error:A problem occurred configuring project ':mobile'.

Could not resolve all dependencies for configuration 
':mobile:_debugCompile'. A problem occurred configuring project ':wear'. 
Could not resolve all dependencies for configuration ':wear:_debugCompile'. 
Could not find com.google.android.gms:play-services-wearable:7.0.0. 
Searched in the following locations:
https://jcenter.bintray.com/com/google/android/gms/play-services-wearable/7.0.0/play-services-wearable-7.0.0.pom
 
https://jcenter.bintray.com/com/google/android/gms/play-services-wearable/7.0.0/play-services-wearable-7.0.0.jarfile:/C:/Users/Erik/AppData/Local/Android/sdk/extras/android/m2repository/com/google/android/gms/play-services-wearable/7.0.0/play-services-wearable-7.0.0.pom
 
file:/C:/Users/Erik/AppData/Local/Android/sdk/extras/android/m2repository/com/google/android/gms/play-services-wearable/7.0.0/play-services-wearable-7.0.0.jar
 
file:/C:/Users/Erik/AppData/Local/Android/sdk/extras/google/m2repository/com/google/android/gms/play-services-wearable/7.0.0/play-services-wearable-7.0.0.pom
 
file:/C:/Users/Erik/AppData/Local/Android/sdk/extras/google/m2repository/com/google/android/gms/play-services-wearable/7.0.0/play-services-wearable-7.0.0.jar
 
Required by: AndroidClickDogTrainer:wear:unspecified

So i tried using the SDK manager to insure i had the proper play services 
but I keep getting the following error from my SDK manager in Android 
Studio on my Windows 8.1 machine.

This is a clean install, and i thought it may be my firewall settings but 
after turning off my firewall completely it is still happening:

Refresh Sources: Fetched Add-ons List successfully Refresh Sources Failed 
to fetch URLhttps://dl.google.com/android/repository/addon.xml, reason: 
File not found Failed to fetch URL 
https://dl.google.com/android/repository/sys-img/android-wear/sys-img.xml, 
reason: File not found Failed to fetch URL 
https://dl.google.com/android/repository/sys-img/google_apis/sys-img.xml, 
reason: File not found Failed to fetch URL
https://dl.google.com/android/repository/sys-img/x86/addon-x86.xml/addon.xml, 
reason: File not found Refresh Sources: Failed to fetch URL
https://dl.google.com/android/repository/addon.xml, reason: File not found 
Failed to fetch URL 
https://dl.google.com/android/repository/sys-img/android-wear/sys-img.xml, 
reason: File not found Failed to fetch URL 
https://dl.google.com/android/repository/sys-img/google_apis/sys-img.xml, 
reason: File not found Failed to fetch URL
https://dl.google.com/android/repository/sys-img/x86/addon-x86.xml/addon.xml, 
reason: File not found Ignoring unknown package filter 
'extra-google-m2repository'Warning: The package filter removed all 
packages. There is nothing to install. Please consider trying to update 
again without a package filter.

No matter what i do.. TURN OFF FIRE WALL, RUN AS ADMIN.. etc etc.. it just 
won't install the play services libs..

please help

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


[android-developers] Converting YUV to RGB with only one SurfaceTexture in OpenGL ES 2.0

2013-06-16 Thread Erik Hellman
Hi!

So I found a bunch of examples of how to convert YUV to RGB in OpenGL ES 
2.0, but they all require me to give to buffers (luminance and chrominance) 
as input to the shaders. 

What I want to do is to use the SurfaceTexture that I initialise from an 
OpenGL ES 2.0 texture I allocated. The camera gives its input to the 
SurfaceTexture correctly, but I can't display draw the texture in the 
fragment shader. I'm assuming this is because the format is NV21 (YUV) and 
the normal texture2D() shader function can't process that correctly.

Now, the question is how do I make this work? Is it possible to convert 
NV21 to RGB in a shader without first splitting the NV21 buffer in two 
separate buffers? This would sort of defeat the purpose since I want to 
process the entire frame in OpenGL. Having to copy buffers manually when I 
can get the entire frame into OpenGL seems like a waste of CPU.

I'm pretty sure that the underlying camera framework in Android converts 
nv21 to rgb on the fly, since I can draw the preview to a SurfaceTexture 
that I receive from a TextureView, but is this conversion then happening on 
the CPU or is there some secret yuv2rgb shader in the Android source code 
that I can't find?

Thanks!

// Erik


-- 
-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Re: Can two applications that run in the same process have different STATIC object values?

2012-12-26 Thread Erik
On Sunday, December 23, 2012 1:24:08 AM UTC-8, Lew wrote:

 I'm confused by your use of the terms application and process as 
 different things. Each Android app runs in its own process.


This is incorrect. Applications are allowed to share processes. See 
http://developer.android.com/guide/components/fundamentals.html.

-Erik 

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

2012-11-07 Thread Erik
You don't have to wait for each message to be sent before sending the next.

-Erik

On Saturday, November 3, 2012 12:20:01 AM UTC-7, Haris wrote:

 Hi

I need to crete an application like group messaging. For that I am 
 using SmsManager class. 

 MY code look like


 static ListString phone_num = new ArrayListString();static ListString 
 SMS = new ArrayListString();

@Overridepublic void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.main);
 readExcelFile(this, /sdcard/Excel.xls);
 View readExcelButton = findViewById(R.id.buttonSend);
 readExcelButton.setOnClickListener(this);
 }


   public void onClick(View v) {
 switch (v.getId()) {
 case R.id.buttonSend:
   for(int i=0;iphone_num.size();i++)
 {
SmsManager smsManager = SmsManager.getDefault();
smsManager.sendTextMessage(phone_num.get(i),SMS.get(i), null, 
 null);
 }

   Toast.makeText(getBaseContext(), 
 Sendingfinished,Toast.LENGTH_SHORT).show();  


 break;
default: break;
 }
 }


 My question is, is it a right method for sending group sms. Or should I 
 create pendingIntent with broadcast receiver to monitor the sending process 
 and wait inside the for loop until each message send finished to send next. 

 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] Single Application or Kiosk Mode

2012-10-25 Thread Erik Liddell
Since ICS, android has taken away the ability to override and/or completely 
disable system level navigation (ie, home, back, recent application and 
system settings pop up)   This is obviously to prevent malicious apps from 
essentially taking over the user's device.  But working in an industry 
where a great portion of our clients run retail environments that require 
tablets in a sort of kiosk mode so that customers can not exit the app, and 
go into settings ect. , it is proving difficult to push for them to go 
android vs iOs.   iOs 6 now offers a single app mode that allows the user 
to put a password on the device and once in an app lock it in that app so 
that the user can not exit the app unless they hit the home button three 
times and enter a password.  Does android have any plans to do something 
like this or am i missing something?

Erik 

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

[android-developers] How to Create Custom Firmware for Android Device?

2012-08-26 Thread erik wagner
Hi,
I know this is a bit open ended but I am having a hard time finding 
something detailed and would appreciate any 'go here' that anyone could 
provide.  I have seen various instances on messages and posts advising 
people that they cannot do a certain action and would need to create their 
own version of the firmware to accomplish what they're asking.  Is there 
any detailed steps on how to do this?  I have gotten bits and pieces but 
not anything in any one place and definitely some contradictory information.
Thanks in advance for any help
erik

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

Re: [android-developers] How to Create Custom Firmware for Android Device?

2012-08-26 Thread erik wagner
Excellent, thanks.  

On Sunday, August 26, 2012 6:06:11 PM UTC-5, TreKing wrote:

 On Sun, Aug 26, 2012 at 5:52 PM, erik wagner erik.j...@gmail.comjavascript:
  wrote:

 I am having a hard time finding something detailed and would appreciate 
 any 'go here' that anyone could provide.


 First step is to go to a group more dedicated to this topic:

 http://source.android.com/community/index.html


 -
 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: Parse application/smil MMS MIME type on android

2012-07-19 Thread Erik
Here's where to start:

http://lmgtfy.com/?q=mms+smil

-Erik

On Thursday, July 19, 2012 1:37:15 AM UTC-7, Etienne wrote:

 So I have come across three categories of MMS message types:

 Plain Text - text/plain Image - image/jpeg, image/bmp, image/gif, 
 image/jpg, image/png SMIL (Synchronized Multimedia Integration 
 Language) - application/smil

 So i don't have an issue grabbing the data in an MMS that falls into the 
 first two categories. However i am having trouble grabbing the data from 
 MMS of message type application/smil

 Below i have included 5 different examples of application/smil MMS 
 messages that I have pulled from my phone.

 [31, 22, -1, application/smil, 123_1.smil, 106, null, null, , 0.smil, 
 null, null, null, smil
   head
 layout
   root-layout height=160 width=240/
   region fit=meet height=67% id=Image left=0% top=0% 
 width=100%/
   region fit=meet height=33% id=Text left=0% top=67% 
 width=100%/
 /layout
   /head
   body
 par dur=8000ms
   img region=Image src=cid:992/
 /par
 par dur=8000ms
   img region=Image src=cid:993/
 /par
   /body
 /smil]

 .

 [22, 14, -1, application/smil, null, null, null, null, smil, smil.xml, 
 null, null, null, smil
   head
 layout
   root-layout width=320px height=480px/
   region id=Image left=0 top=0 width=320px height=320px 
 fit=meet/
   region id=Text left=0 top=320 width=320px height=160px 
 fit=meet/
 /layout
   /head
   body
 par dur=5000ms
   img src=8555 region=Image/
   text src=text_0.txt region=Text/
 /par
   /body
 /smil]

 .

 [13, 11, -1, application/smil, 123_1.smil, null, null, null, , null, 
 null, null, null, smil 
   head 
 layout 
   root-layout/  
   region fit=scroll height=30% id=Text left=0% top=70% 
 width=100%/  
   region fit=meet height=70% id=Image left=0% top=0% 
 width=100%/ 
 /layout 
   /head  
   body 
 par dur=1ms 
   text region=Text src=cid:928/ 
 /par 
   /body 
 /smil]

 .

 [16, 13, -1, application/smil, mms.smil, null, null, null, , , 
 null, null, null, smil
 head
 layout
 root-layout width=240 height=160/
 region id=Image width=100% height=67% left=0% top=0% 
 fit=meet/
 region id=Text width=100% height=33% left=0% top=67% 
 fit=meet/
 /layout
 /head
 body
 par dur=8000mstext src=text__01.txt region=Text//par/body
 /smil]

 .

 [5, 5, -1, application/smil, smil.smil, 106, null, null, , smil, null, 
 null, null, smil
   head
 layout
   root-layout height=160 width=240/
   region fit=meet height=67% id=Image left=0% top=0% 
 width=100%/
   region fit=meet height=33% id=Text left=0% top=67% 
 width=100%/
 /layout
   /head
   body
 par dur=8000ms
   img region=Image src=cid:351/
   text region=Text src=cid:352/
 /par
   /body
 /smil]

 How exactly do you go about parsing this type of MMS? Any help would be 
 greatly appreciated.


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

2012-07-17 Thread Erik
The code you create with JNI can call into your c++ classes.

-Erik

On Monday, July 16, 2012 2:40:21 PM UTC-7, Károly Holczhauser wrote:

 Hello there ! 

  I have four c++ file (four header and four cpp) with already implemented 
 functionalaty, how can I import them into my Java Android code ? Import in 
 this case mean be able to call the c++ functions. I had alredy tried the 
 JNI way, but as I saw it is to generate own c++ headers and reimplement 
 your code, not to import an existing one. 
 Have anybody any idea about the possible solution ? Have Eclipse any 
 extension to do that ?

  Cheers, Karoly


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] having a problem with pitch and roll android sensors

2012-07-14 Thread Erik Liddell
Forgive me for not re writing the whole post, but i have this post on 
stackOverFlow and i was hoping i could post the link and see if any of you 
have insight.  I appreciate your help

http://stackoverflow.com/questions/11476316/determining-angle-of-device-with-horizon-as-axis-android/11476926#11476926
 



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] bug: emulator-x86 + kvm triggers an endless loop in qemu-setup.c

2012-06-28 Thread Erik Nijkamp
Hello folks,

we are experiencing a strange behavior while booting kvm-accelerated ICS 
image on some linux machines (both ubuntu  debian):

emulator-x86 -verbose -show-kernel -avd x86_4_0_3 -no-window -qemu 
-enable-kvm


The resulting log freezes after:

emulator: ping program: /opt/android-sdk-linux/tools/ddms


Therefore, we looked into the source code of the qemu / android emulator 
and stumbled over:

qemu-setup.c - android_emulation_setup(...)

if (path_exists(tmp)) {
...

/* disable SIGALRM for the fork(), the periodic signal seems to

* interefere badly with the fork() implementation on Linux running

* under VMWare.

*/

BEGIN_NOSIGALRM

pid = fork();

if (pid == 0) {

int fd = open(/dev/null, O_WRONLY);

dup2(fd, 1);

dup2(fd, 2);

execl( tmp, _ANDROID_PING_PROGRAM, ping, emulator, VERSION_STRING, NULL 
);

}

END_NOSIGALRM

} 



We are pretty certain that the codes hangs while invoking fork().

Firing strace 

strace emulator-x86 -verbose -show-kernel -avd x86_4_0_3 -no-window -qemu 
-enable-kvm


spits out an endless continuation of 

clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, 
child_tidptr=0) = ? ERESTARTNOINTR (To be restarted) 
--- SIGIO (I/O possible) @ 0 (0) --- 
clock_gettime(CLOCK_MONOTONIC, {55232, 717872152}) = 0 sigreturn() = 120 
--- SIGIO (I/O possible) @ 0 (0) --- 
clock_gettime(CLOCK_MONOTONIC, {55232, 719018162}) = 0 sigreturn() = 120 
--- SIGIO (I/O possible) @ 0 (0) --- 
clock_gettime(CLOCK_MONOTONIC, {55232, 719310431}) = 0 sigreturn() = 120 
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, 
child_tidptr=0) = ? ERESTARTNOINTR (To be restarted) 



As a temporary workaround, the branch of code in qemu-setup.c triggering 
the fork() can be avoided by renaming the ping program (namely ddms) by

mv tools/ddms tools/ddms.fork.fix


However, we would like to avoid this hack in a productive system.


Any clues why the fork() in combinations with KVM keeps hanging?


Thanks so much!
-- erik




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

2012-06-27 Thread Erik Telepovský
Thank you Gaurav

On Tuesday, June 19, 2012 2:57:03 PM UTC+2, Gaurav Vashisth wrote:

 add android:popupBackground=@null to the AutoCompleteTextView

 On Wednesday, March 21, 2012 1:37:44 PM UTC+5:30, Android Developer wrote:

 Hi,

 I have autocompletetextview while tying its shows the list. how to i make 
 the list border as transparent.

 Code : 

 ?xml version=1.0 encoding=utf-8?
 LinearLayout xmlns:android=http://schemas.android.com/apk/res/android;
 android:layout_width=fill_parent
 android:layout_height=fill_parent
 android:orientation=vertical 

  AutoCompleteTextView android:id=@+id/autocomplete_country
  style=@style/InputBox
 android:layout_width=fill_parent
 android:layout_height=wrap_content
 android:layout_marginLeft=5dp/

 /LinearLayout


  ArrayAdapterString adapter = new ArrayAdapterString(this,
 android.R.layout.simple_dropdown_item_1line, COUNTRIES);

 i tried with :

 adapter.setDropDownViewResource(R.color.transparent);



 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: RelativeLayout problems

2012-05-23 Thread Erik
I think you're overriding the original layout params when you set the new 
one. Instead, get the view's layout params, change the width and height, 
and then set them back.

Though you may want to try using a LinearLayout and weight, which would do 
the layout for you.

-Erik

On Tuesday, May 22, 2012 1:00:02 PM UTC-7, Spooky wrote:

 I'm working on some test code, just playing around with some image 
 processing methods, and this display may well end up being used in 
 an app for image processing.  The layout uses a RelativeLayout, 
 with the relevant portion shown below: 

 ---  CUT HERE  --- 

   ImageView 
  android:id=@+id/originalView 
  android:scaleType=fitXY 
  android:adjustViewBounds=true 
  android:layout_alignParentLeft=true 
  android:layout_alignParentTop=true 
  android:layout_width=wrap_content 
  android:layout_height=wrap_content 
   / 

   ImageView 
  android:id=@+id/filteredView 
  android:scaleType=fitXY 
  android:adjustViewBounds=true 
  android:layout_alignParentTop=true 
  android:layout_toRightOf=@id/originalView 
  android:layout_width=wrap_content 
  android:layout_height=wrap_content 
   / 

 and after a SeekBar and its two TextViews, which work fine, a ListView, 
 which is also fine: 

   ListView 
  android:id=@+id/filterList 
  android:textSize=22sp 
  android:layout_alignParentTop=true 
  android:layout_alignParentRight=true 
  android:layout_height=fill_parent 
  android:layout_width=300dp 
   /ListView 

 ---  CUT HERE  --- 

 Note that in the layout, the second (filtered) ImageView 
 is configured to align to the right of the original, and on the 
 top of the display. 

 I want to make this right, from the beginning, in case I do use 
 this layout for image processing (or at least, the final version 
 of it---it's not finished yet).  To do that, I plan on scaling 
 the two ImageViews (which, in turn, will scale the images inside, 
 as I'm using fitXY for the scaling method for the ImageViews). 
 I'm trying to scale these to equal fractions of the remaining 
 screen width (orientation set to landscape) after the ListView 
 on the far right.  If I hard-code the ImaveView widths for my 
 tablet, it works fine.  If I try to resize these from Java, 
 the two ImageViews, which are supposed to be side by side, end 
 up with the filtered (result) ImageView ON TOP of the one for 
 the original image.  This is definitely not what I'm trying to 
 do. 

 This is the code to resize the ImageViews: 

// original is a reduced-size copy of the real original bitmap 
int oiw = (float) original.getWidth(); 
int oih = (float) original.getHeight(); 

// Scale the two ImageViews relative to the display size, maintaining 
// the correct aspect ratio.  The ListView on the right of these is 
// 300dp wide, and I leave room for padding 

int iw = (int) ((dw - 340) / 2); 
int ih = (int) (iw * (float)(oih/oiw)); 

// and these are the lines I suspect are causing the error 
// 
origView.setLayoutParams(new RelativeLayout.LayoutParams(iw, ih)); 
filtView.setLayoutParams(new RelativeLayout.LayoutParams(iw, ih)); 

 Again, without the above re-sizing from Java (and the ImageView sizes 
 hard-coded in XML), the layout works fine. 

 I'm assuming that the problem is something I'm doing, and not a bug 
 in RelativeLayout itself (obviously...).  But whatever the problem 
 is, I can't see it, and have yet to find any reference that gives 
 me any kind of a hint as to what I'm doing wrong. 

 Can anyone here see what's wrong?  If so, how would I fix it? 

 Oh, as a side note:  when I tried the above code with an intermediate 
 step (calculate the aspect ratio BEFORE using it in the calculation 
 for re-sizing, as follows (with the original image width, oiw, and 
 height, either ints or floats...casting every calculation to float), 
 I get the same result either way: 

float aspect = (float) oih/oiw; 

 (yes, technically, that's 1/aspect ratio ... it's for the math that 
 follows to get the new height from the new width).  No matter what, 
 it ends up being 0.0 (should be 0.75 for the test image in use).  Put 
 that inline as above, and it works.  Apparently, Android doesn't 
 know that (float) 2/3 is 0.666 (ad infinitum), NOT 0.0  The 
 same happens if the two original dimensions are both floats. 


 Btw, the layout should look something like this: 

Top of displayt:  ImageView   ImageView ListView 

 Below that:   Filter Level (list continued) 
 Below that:   Seekbar - Value  (list continued) 

 Below that:   Red  (list continued) 
 Below that:   Seekbar - Value  (list continued

[android-developers] Re: Loading sms in threaded view In my custom app

2012-05-17 Thread Erik
Retrieve that information from the Contacts content provider.

-Erik

On Thursday, May 17, 2012 12:31:08 AM UTC-7, Bhanushali Ashwin N wrote:

 Hi All, 

 I am developing an sms-app.I want to load all the sms as threaded view 
 in my application. 
 By threaded view I mean I want to show sms to user like what the 
 default sms app shows. 

 I came across using content provider scheme to get the threads 
 content://mms-sms/conversation  this scheme will retrieve the 
 conversations but not the user name and user photo id. 
 I want to show recipient photo and his name like the default sms app. 


 How to achieve this. 

 Any Help!  Ideas how would I go forward ! 

 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: I can not start MMS functionality on emulator

2012-05-17 Thread Erik
MMS messages can only be sent or received over a cellular connection. So 
the emulator running on your computer doesn't support it.

-Erik

On Sunday, May 13, 2012 7:00:38 AM UTC-7, katarina wrote:

 Hi, 

 please help... I want to use MMS functionality on the emulator, but I 
 can not. 

 I downloaded the Android code + Eclipse + Device emulator and all 
 starts up fine. After the system gets booted, I see the Messaging 
 Application icon on the screen. 

 When I click on it, the conversation thread opens up and I am able to 
 type in text messages, but there are no icons (extensions) to add 
 pictures, videos, audio - like there are on real Android devices. So, 
 I can not compose MMS messages at all. 

 Is this something that is normal on emulator, or should I be able to 
 see MMS functionality on it too? 

 I can see that my Mms application code was built, but I don't see any 
 of its functionality on the screen of the emulated device. 

 Does anybody have an idea of what am I doing wrong? 

 All the best, 
 Katarina 



-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Giving your emulator a boost: Android ICS x86 system-image available

2012-04-17 Thread Erik Nijkamp
Hey folks,

we (a mobile testing startup in Berlin) had some trouble regarding the poor 
Android ICS performance running in the ARM-specific SDK emulator.

Therefore, we've compiled Intels x86 Kernel for the Goldfish platform and 
Android 4.0.3 from ASOP soucres.
If you are interested, the ICS system-image which is compatible with the 
emulator-x86 and a very short installation guide can be found here:

http://blog.testobject.org/2012/04/giving-your-android-emulator-boost.html

We hope this gives your development speed a boost.

Any feedback is highly appreciated!

Thanks guys

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Giving your emulator a boost: Android ICS x86 system-image available

2012-04-17 Thread Erik Nijkamp
Hey Anuj,

according to [1] KVM on Ubuntu is equivalent to the HAXM hypervisor on 
Windows or Mac. So, yes, we do use hardware-assisted acceleration.

I don't have a Windows nor Mac OS at hand, but I bet the system-image would 
also work with HAXM.

Maybe you could give it a try?

Best,
 Erik

[1] 
http://software.intel.com/en-us/blogs/2012/03/12/how-to-start-intel-hardware-assisted-virtualization-hypervisor-on-linux-to-speed-up-intel-android-x86-gingerbread-emulator/

Am Dienstag, 17. April 2012 20:58:42 UTC+2 schrieb Anuj Goyal:

 Have you tried Intel's HAX driver as well?


 http://software.intel.com/en-us/articles/installation-instructions-for-intel-hardware-accelerated-execution-manager-windows/


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 enable 24/32 bit color depth in the emulator (android 2.3.3)?

2012-04-06 Thread Erik Nijkamp
Unfortunately, that is not an option.

On Friday, April 6, 2012 12:01:36 AM UTC+2, lbendlin wrote:

 If it's such a critical feature you may not want to rely on the emulator. 
 Rather get a 2.3.x  development device.

 On Thursday, April 5, 2012 3:21:18 PM UTC-4, Erik Nijkamp wrote:

 The code I looked at was probably outdated. The code in [1] suggests that 
 goldfish does support HAL_PIXEL_FORMAT_RGBA_.

 Does this also apply to the android kernel?

 [1] 
 https://github.com/android/platform_external_qemu/blob/master/hw/goldfish_fb.c

 On Thursday, April 5, 2012 8:43:35 PM UTC+2, Erik Nijkamp wrote:

 I started to dig through the emulator code and stumbled over 
 (android_sdl.c):

 static void
 emulator_display_set_display( EmulatorDisplay*  disp,
   DisplayState* ds,
   int   w,
   int   h )
 {
 ds-depth  = 16;
 ds-bgr= 0;
 ds-width  = w;
 ds-height = h;
 ds-opaque = disp;
 disp-ds   = ds;

 ...

 This seems to imply that the emulator is really fixed to 16 bit colors. 
 Can anyone confirm this?

 Thanks so much
   Erik

 On Wednesday, April 4, 2012 9:12:11 PM UTC+2, Erik Nijkamp wrote:

 Hey guys,

 we are experiencing dithering artifacts in the emulator. Most probably 
 due to 16 bit colors - see [1] for an example.

 Thus we tried to enable true colors by inserting hw.lcd.depth=32 in 
 the config.ini file.

 Strangely, this works for 4.x, but doesnt do the trick in 2.3.x.

 This is a very critical feature for our current project and we are 
 running out of ideas ...

 If anyone has any suggestions we would be ever so grateful.

 Thanks so much!
  Erik

 [1] 
 http://imageshack.us/photo/my-images/600/twitterbuttondithering.png/



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

[android-developers] How to enable 24/32 bit color depth in the emulator (android 2.3.3)?

2012-04-05 Thread Erik Nijkamp
Hey guys,

we are experiencing dithering artifacts in the emulator. Most probably due 
to 16 bit colors - see [1] for an example.

Thus we tried to enable true colors by inserting hw.lcd.depth=32 in the 
config.ini file.

Strangely, this works for 4.x, but doesnt do the trick in 2.3.x.

This is a very critical feature for our current project and we are running 
out of ideas ...

If anyone has any suggestions we would be ever so grateful.

Thanks so much!
 Erik

[1] http://imageshack.us/photo/my-images/600/twitterbuttondithering.png/

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 enable 24/32 bit color depth in the emulator (android 2.3.3)?

2012-04-05 Thread Erik Nijkamp
I started to dig through the emulator code and stumbled over 
(android_sdl.c):

static void
emulator_display_set_display( EmulatorDisplay*  disp,
  DisplayState* ds,
  int   w,
  int   h )
{
ds-depth  = 16;
ds-bgr= 0;
ds-width  = w;
ds-height = h;
ds-opaque = disp;
disp-ds   = ds;

...

This seems to imply that the emulator is really fixed to 16 bit colors. Can 
anyone confirm this?

Thanks so much
  Erik

On Wednesday, April 4, 2012 9:12:11 PM UTC+2, Erik Nijkamp wrote:

 Hey guys,

 we are experiencing dithering artifacts in the emulator. Most probably due 
 to 16 bit colors - see [1] for an example.

 Thus we tried to enable true colors by inserting hw.lcd.depth=32 in the 
 config.ini file.

 Strangely, this works for 4.x, but doesnt do the trick in 2.3.x.

 This is a very critical feature for our current project and we are running 
 out of ideas ...

 If anyone has any suggestions we would be ever so grateful.

 Thanks so much!
  Erik

 [1] http://imageshack.us/photo/my-images/600/twitterbuttondithering.png/


-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 enable 24/32 bit color depth in the emulator (android 2.3.3)?

2012-04-05 Thread Erik Nijkamp
The code I looked at was probably outdated. The code in [1] suggests that 
goldfish does support HAL_PIXEL_FORMAT_RGBA_.

Does this also apply to the android kernel?

[1] 
https://github.com/android/platform_external_qemu/blob/master/hw/goldfish_fb.c

On Thursday, April 5, 2012 8:43:35 PM UTC+2, Erik Nijkamp wrote:

 I started to dig through the emulator code and stumbled over 
 (android_sdl.c):

 static void
 emulator_display_set_display( EmulatorDisplay*  disp,
   DisplayState* ds,
   int   w,
   int   h )
 {
 ds-depth  = 16;
 ds-bgr= 0;
 ds-width  = w;
 ds-height = h;
 ds-opaque = disp;
 disp-ds   = ds;

 ...

 This seems to imply that the emulator is really fixed to 16 bit colors. 
 Can anyone confirm this?

 Thanks so much
   Erik

 On Wednesday, April 4, 2012 9:12:11 PM UTC+2, Erik Nijkamp wrote:

 Hey guys,

 we are experiencing dithering artifacts in the emulator. Most probably 
 due to 16 bit colors - see [1] for an example.

 Thus we tried to enable true colors by inserting hw.lcd.depth=32 in the 
 config.ini file.

 Strangely, this works for 4.x, but doesnt do the trick in 2.3.x.

 This is a very critical feature for our current project and we are 
 running out of ideas ...

 If anyone has any suggestions we would be ever so grateful.

 Thanks so much!
  Erik

 [1] http://imageshack.us/photo/my-images/600/twitterbuttondithering.png/



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

2012-03-26 Thread Erik
Unfortunately there doesn't seem to be a way to do what you want to do. The 
messaging app is looking for an intent with the SENDTO action and a phone 
number, or the SEND action and some data (such as an image), but not both a 
phone number and some data.

-Erik

On Monday, March 26, 2012 11:59:39 AM UTC-7, Farhan wrote:

 I tried the smsto:uri method. It works fine, but does not allow me to 
 attach the picture that I am passing with the intent. 
 it.setType(image/jpeg); causes my application to crash, and without 
 this line of code, it would not attach an image file with the intent.

 My client has now agreed to let a chooser be there. But I now want the 
 chooser to show choices that can send mms only, and omit other 
 applications. I think, correct me if wrong, getting list of all packages 
 for the intent, and making a custom dialog box to pick one of the package 
 would get me through right? 

 I was wondering if there was a shorter way :(

 On Mon, Mar 26, 2012 at 6:02 AM, Justin Anderson magouyaw...@gmail.comwrote:

 How to go about these?


 http://developer.android.com/reference/android/content/pm/PackageManager.html#queryIntentActivities%28android.content.Intent,%20int%29

 But seriously... you need to tell your client that they shouldn't lock 
 the user into trying to use one app.  I don't use the default mms app, and 
 if an app EVER forced me to use the default one it would get uninstalled in 
 half a second.


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


 On Sun, Mar 25, 2012 at 6:50 PM, Farhan Tariq farhan@gmail.comwrote:

  you can always check if the intent will succeed
  by checking to see if there's anyone registered to receive it. 

 How to go about these?

 On Mon, Mar 26, 2012 at 5:32 AM, Kristopher Micinski 
 krismicin...@gmail.com wrote:

 If that's the case, then you've written the intent wrong.

 However.  If you want to artificially impose the constraint of using a
 specific messenger, you can always check if the intent will succeed
 and fall back to a more generic intent otherwise, by checking to see
 if there's anyone registered to receive it.

 kris

 On Sun, Mar 25, 2012 at 8:10 PM, Farhan Tariq farhan@gmail.com 
 wrote:
  The reasoning to use 'one' app would simply be that my client wants 
 it to be
  like that.
 
  Plus, other applications in chooser do not work properly too. Like, 
 the
  addresses do not get populated in the chosen application. It does not 
 give a
  choice for the SMS applications, but from a HUGE list if different
  applications, like facebook, gmail that do not seem to work fine with 
 the
  data being passed with the intent.
 
 
  On Mon, Mar 26, 2012 at 4:57 AM, A. Elk 
 lancaster.dambust...@gmail.com
  wrote:
 
  There is no default messaging app. Any messaging application that
  chooses to handle MMS can respond to this intent. If the 
 user chooses to
  make one of the applications a default, then it becomes one until 
 the user
  unsets it as the default.
 
  You seem to have a reason for wanting one application to handle 
 MMS. I
  would like to know why. Perhaps I can provide further wisdom in this 
 regard.
  In general, Android promotes the idea of letting the user decide 
 which
  application to use.
 
 
  On Sunday, March 25, 2012 4:21:57 PM UTC-7, Farhan wrote:
 
  Intent picMessageIntent = new 
 Intent(android.content.Intent.ACTION_SEND);
  picMessageIntent.putExtra(address, Some Numbers);
  picMessageIntent.setType(image/jpeg);
  picMessageIntent.putExtra(sms_body, Some Text);
  picMessageIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(file));
  picMessageIntent.setPackage(com.android.mms);
 
  Yes, I understand now that the package may not be there in a 
 device, so
  it is giving a chooser.
 
  Is there a way to find the default messaging application or the 
 built-in
  messaging, and set its package in the intent above?
 
 
  On Sun, Mar 25, 2012 at 5:29 PM, Justin Anderson 
 magouyaw...@gmail.com
  wrote:
 
  I tried to set package of the intent as com.android.mms and it 
 seems
  to work fine on my phone, as well as emulator
 
  You don't want to do this... Not all phones will have the stock 
 android
  app with that package name.  Many manufacturers replace stock 
 android apps
  with their own for things like the camera, sms, etc...
 
  Also, there are a lot of 3rd party apps out there that handle 
 sms/mms...
  If a user has installed a 3rd party app then they probably don't 
 want to be
  tied down to the one that came on the device.
 
 
  but it is showing a chooser for the mms intent to my friend. I am 
 not
  creating a chooser anywhere
 
  If that is the case then what is most likely happening is that your
  friend has more than one sms/mms app on the device.  You probably 
 also will
  notice that the chooser has a checkbox that, if checked, will make 
 their
  selection the default from then on.  If they check that box and 
 choose which
  app they want to use

[android-developers] Re: How can I send MMS via android app without moving to InBox Messages ?

2012-03-08 Thread Erik
In order to send an MMS, you would need to connect to the network's MMSC 
server. The network will only allow approved apps to do that, and in most 
cases the only approved app is the messaging app that came with the phone. 
So what you want to do is pretty much impossible.

On Thursday, March 8, 2012 12:35:23 PM UTC-8, umm AlMothana wrote:

 I've to develop an android application that send MMS directly without 
 moving to the InBox Messages, I search on the web all i found is this link:


 http://androidbridge.blogspot.com/2011/03/how-to-send-mms-programmatically-in.html

 I downloaded the .zip file and imported it in eclipse but actually i 
 didn't know which package should I use and which classes ! so confusing 
 with it :(

 any suggestions ? 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: License for open source Android project

2012-02-06 Thread Erik
Yeah, that's not open source. Check out something like the Microsoft 
Reference Source License.

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

2012-02-03 Thread Erik Bai
Dear All,

As you know, the Connection Manager (ConnMan) project provides a
daemon for managing internet connections within embedded devices
running the Linux operating system. --- http://connman.net/about.

So I'd like to know the corresponding component in Android, which does
the same work as ConnMan? Anyone know this? Or give me some links,
because I googled, but no useful infomation.

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: Get MMS Info.

2012-01-11 Thread Erik
My guess is that your service is running before the native messaging app 
has a chance to add the message to the content provider. Try removing the 
priority from the intent filter. 

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

2011-12-23 Thread Erik
The threads use the content provider. The content provider's insert() 
method gets a database from the SQLiteOpenHelper each time.

I'll add that the content provider we're using is a modified version of 
Google's telephony content provider. We've been able to duplicate this 
behavior with the actual telephony provider on a shipping phone.

-Erik

On Friday, December 23, 2011 7:50:45 AM UTC-8, Kostya Vasilyev wrote:

 To OP:

 Do your threads use separate instances of SQLiteDatabase object pointing 
 to the same database one- or one SQLiteDatabase instance, shared?



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

2011-12-22 Thread Erik
My app has a content provider which stores its data in a SQLite db. I have 
a thread which is busy inserting rows into this content provider. I have 
another thread which inserts some rows into the content provider and then 
signals the first thread. When the first thread sees the signal, it stops 
inserting and queries for the data the other thread inserted. But what I'm 
finding is that often the cursor the query returns doesn't contain all of 
the rows the other thread inserted. If I sleep the thread for a second and 
query again, then all the rows are there.

It seems like the database is reporting that it has successfully stored the 
data, but it hasn't been flushed to the backing store yet. And the query 
that happens shortly after doesn't see the data that is waiting to be 
flushed.

Has anyone else seen this problem? Is this a bug in SQLite? Any suggestions 
on how to deal with it?

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

[android-developers] Re: Distribute banned app outside Android Market with donation app in Market

2011-11-30 Thread Erik
Google thought the app was sexually explicit and banned it. I may
face the same problem with Paypal. Paypal takes $0.30 per transaction.
On a $1 donation it´s the same as googles cut on Android Market. From
my point of view a donation app is the best option and Paypal donation
the next best.

On 29 Nov, 16:10, Oli Wright oli.wri...@gmail.com wrote:
 This may be a dumb question, but why not just take donations through Paypal
 / Google Checkout directly rather than letting Google take a cut through
 the Market?  You can advertise this facility both in your free app and at
 the locations you provide it for download.

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


[android-developers] Re: I/O date change

2011-11-30 Thread Erik
If you sell all the free hardware you get at the conference, you might end 
up with a profit.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Distribute banned app outside Android Market with donation app in Market

2011-11-28 Thread Erik
A few days ago my hit app got banned from Android Market and now I´m
looking for a different setup.

My planned setup:
- Empty paid donation app inside the Market.
- Free app outside Market with link to my donation app.

First, am I allowed to have a empty donation app? There are some out
there but that´s no guarantee.

Does anyone know if Google will have a problem with the fact that they
are supporting my banned app through my donation app? I guess, for
example a porn site cannot have a payment option with an empty app.

I read the agreements and found nothing specific that would prohibit
me.

I sent this question to Google but I don´t expect a quick reply.

Bottom line:
Will my donation app get banned?

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

2011-11-14 Thread Erik
It's possible that I'm an idiot, but I can't seem to find a tutorial
on USB communication that actually tells me something useful.

Can someone kick my ass in the right direction?

Does anyone know of the ability to use USB to serial adapters and talk
to RS232 devices over the USB?

Boss wants to use a Toshiba tablet running 3.1 to run a couple of bill
validators that talk serially.

TIA

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


[android-developers] Changing the icon for the All Apps Button

2011-11-02 Thread erik wagner
Hi,
I am looking to actually replace the 'All Apps' button on the Android
home screen.  I know there is the Home sample app, as near as I can
tell (and please correct me if I'm wrong) it overlays a separate home
button on top of the existing one - instead of actually replacing it.
Is there a way to actually replace the All Apps icon on the Android
home screen?
Sorry if this is a duplicate question, searching for 'all apps button'
returns a dizzying array of non-pertinent results.
Thanks,
Erik Wagner

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

2011-11-02 Thread erik wagner
Gotcha.  Thanks Mark.  That was both what I expected and what I
feared.

On Nov 2, 7:33 am, Mark Murphy mmur...@commonsware.com wrote:
 On Wed, Nov 2, 2011 at 8:28 AM, erik wagner erik.j.wag...@gmail.com wrote:
  I am looking to actually replace the 'All Apps' button on the Android
  home screen.  I know there is the Home sample app, as near as I can
  tell (and please correct me if I'm wrong) it overlays a separate home
  button on top of the existing one - instead of actually replacing it.
  Is there a way to actually replace the All Apps icon on the Android
  home screen?

 No, short of hacking the app on a rooted phone. Bear in mind that
 there is no single Android home screen -- there are probably a few
 dozen in use on production hardware and uncounted home screens you can
 download from the Android Market.

 You can create your own home screen app (see the sample app you
 mention). Users will then have a choice of running your app or the
 built-in one when they press HOME. If they make your app the default,
 they will go to your app exclusively when the press HOME, until they
 remove your app or launch in safe mode.

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

 _Android Programming Tutorials_ Version 4.0 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] Re: Debugging library projects with ADT 14

2011-11-02 Thread Erik
I found what looks like the answer on Stack Overflow:

http://stackoverflow.com/questions/7896855/in-eclipse-how-can-i-quickly-access-the-source-of-an-android-library-project

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

2011-10-21 Thread erik wagner
Hi,
I am wondering if anyone has a simple SQLite app/example they can
point to, provide or whatever.  Just basically looking for an example
that will connect to a database, and add or remove a record.  Been
trying to sift through the searchable dictionary example and currently
not having much luck getting to the barebone essentials.
Failing an example, if anyone could provide a rough outline or what to
do that would be extremely helpful as well.
The example/outline doesn't need to be overly involved, just looking
for what amounts to a Hello SQLite app.
Thanks for any help/advice
Erik

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


[android-developers] Re: sqlite help

2011-10-21 Thread erik wagner
Thanks Mark and Joel, very appreciated.  Now I know what I will be
doing this weekend g

On Oct 21, 12:56 pm, Joel Witherspoon joel.withersp...@gmail.com
wrote:
 On Fri, Oct 21, 2011 at 10:33 AM, Mark Murphy mmur...@commonsware.com wrote:

  On Fri, Oct 21, 2011 at 1:31 PM, erik wagner erik.j.wag...@gmail.com 
  wrote:
   I am wondering if anyone has a simple SQLite app/example they can
   point to, provide or whatever.  Just basically looking for an example
   that will connect to a database, and add or remove a record.  Been
   trying to sift through the searchable dictionary example and currently
   not having much luck getting to the barebone essentials.

  Here's one from one of my books, if that helps:

 https://github.com/commonsguy/cw-android/tree/master/Database/Constants

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

  Android 3.1 Programming Books:http://commonsware.com/books

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

 Erik,
 I recommend Mark's books for leaning Android dev period. They are
 fantastic. I also recommend Android Application Development For
 Dummies by Donn Felker. The SQLLite section is simple and easy to
 understand and learn. I started down the SQLLite road after reading
 this tutorial:http://www.screaming-penguin.com/node/7742.

 Without knowing your level of development expertise, it's hard to give
 you a tutorial to fit your needs.

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

2011-10-20 Thread Erik
I've got my library project converted to the new ADT 14 format, but I've run 
into an annoyance. When I hit a break point in my library project code, the 
Eclipse debugger opens up the (read-only) copy of the file's source from the 
JAR, and not the original source file. So I end up with two tabs, one being 
the original source with the break points marked, and the other the source 
where I'm stepping through the code. Does anyone know how to get Eclipse to 
do the stepping in the original file?

On a related note, is there any way to get Eclipse to debug the associated 
application when I hit F11 in a library source file?

Thanks,
Erik

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

2011-10-09 Thread erik wagner
Hi,
I'm trying to do something where I have an activity that needs to call
another activity.  I use the startActivityForResult and pass it a
integer as the second parameter.  I know I can check for that
information after the second activity is done but my question is; is
there a way I can know what the integer value is when starting the
second activity?
So, I have
startActivityForResult(myIntent, 1);
When the activity described by myIntent is started is there a way I
can grab the 1 value and do something with it?  If not, can anyone
provide some advice on how to get a value from a calling activity to
the called activity?
Thanks in advance.
Erik

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

2011-09-28 Thread erik wagner
Finally was able to find an example.  Thank the Lord for smart people
http://groups.google.com/group/android-developers/browse_thread/thread/fc05ace7d76dff62


On Sep 27, 2:52 pm, erik wagner erik.j.wag...@gmail.com wrote:
 Whoops, the Uri newUri line should have 'aUri' in the
 getContentResolver().insert portion.  My editing mistake, only
 correcting so there's no confusion on anyone trying to follow it.
 Thanks.

 On Sep 27, 12:49 pm, erik wagner erik.j.wag...@gmail.com wrote:







  Hi,
  I'm trying to add a ringtone to the ringtone picker and am having a
  tough go of it.  I am working off this example (http://
  groups.google.com/group/android-developers/browse_thread/thread/
  b5590a1551e4f97d) but cannot seem to get it to work.
  Any help would be greatly appreciated.  Thanks.
  (my code is probably all over the place at this point)
  myContentValues.put(MediaStore.MediaColumns.DATA,
  getString(R.raw.asound));
  myContentValues.put(MediaStore.MediaColumns.MIME_TYPE, audio/mp3);
  myContentValues.put(MediaStore.MediaColumns.TITLE, A Sound);

  I've left the other entries off since those seem to be pretty easy, is
  that the correct format of the DATA portion?  The audio file is an mp3
  in the res/raw folder.  It is set as a ringtone

  including the rest of (what I think is) the relevant code,

  Uri aUri =
  MediaStore.Audio.Media.getContentUriForPath(getString(R.raw.asound));
  Uri newUri = getContentResolver().insert(fearUri, myContentValues);
  RingtoneManager.setActualDefaultRingtoneUri(myContext,
  RingtoneManager.TYPE_RINGTONE, newUri);

  So I guess I have several questions...
  1. Is there anything plainly wrong with the myContentValues
  statements?
  2. When the ringtone picker is brought up should the title show up (in
  this case A Sound) or will it remain listed as 'default ringtone'?
  3. If there is a sample project online that does this that anyone
  knows about (I looked through all the sample stuff but didn't see
  anything, I could have easily missed it though) feel free to include
  that.

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

2011-09-27 Thread erik wagner
Hi,
I'm trying to add a ringtone to the ringtone picker and am having a
tough go of it.  I am working off this example (http://
groups.google.com/group/android-developers/browse_thread/thread/
b5590a1551e4f97d) but cannot seem to get it to work.
Any help would be greatly appreciated.  Thanks.
(my code is probably all over the place at this point)
myContentValues.put(MediaStore.MediaColumns.DATA,
getString(R.raw.asound));
myContentValues.put(MediaStore.MediaColumns.MIME_TYPE, audio/mp3);
myContentValues.put(MediaStore.MediaColumns.TITLE, A Sound);

I've left the other entries off since those seem to be pretty easy, is
that the correct format of the DATA portion?  The audio file is an mp3
in the res/raw folder.  It is set as a ringtone

including the rest of (what I think is) the relevant code,

Uri aUri =
MediaStore.Audio.Media.getContentUriForPath(getString(R.raw.asound));
Uri newUri = getContentResolver().insert(fearUri, myContentValues);
RingtoneManager.setActualDefaultRingtoneUri(myContext,
RingtoneManager.TYPE_RINGTONE, newUri);

So I guess I have several questions...
1. Is there anything plainly wrong with the myContentValues
statements?
2. When the ringtone picker is brought up should the title show up (in
this case A Sound) or will it remain listed as 'default ringtone'?
3. If there is a sample project online that does this that anyone
knows about (I looked through all the sample stuff but didn't see
anything, I could have easily missed it though) feel free to include
that.

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

2011-09-27 Thread erik wagner
Whoops, the Uri newUri line should have 'aUri' in the
getContentResolver().insert portion.  My editing mistake, only
correcting so there's no confusion on anyone trying to follow it.
Thanks.

On Sep 27, 12:49 pm, erik wagner erik.j.wag...@gmail.com wrote:
 Hi,
 I'm trying to add a ringtone to the ringtone picker and am having a
 tough go of it.  I am working off this example (http://
 groups.google.com/group/android-developers/browse_thread/thread/
 b5590a1551e4f97d) but cannot seem to get it to work.
 Any help would be greatly appreciated.  Thanks.
 (my code is probably all over the place at this point)
 myContentValues.put(MediaStore.MediaColumns.DATA,
 getString(R.raw.asound));
 myContentValues.put(MediaStore.MediaColumns.MIME_TYPE, audio/mp3);
 myContentValues.put(MediaStore.MediaColumns.TITLE, A Sound);

 I've left the other entries off since those seem to be pretty easy, is
 that the correct format of the DATA portion?  The audio file is an mp3
 in the res/raw folder.  It is set as a ringtone

 including the rest of (what I think is) the relevant code,

 Uri aUri =
 MediaStore.Audio.Media.getContentUriForPath(getString(R.raw.asound));
 Uri newUri = getContentResolver().insert(fearUri, myContentValues);
 RingtoneManager.setActualDefaultRingtoneUri(myContext,
 RingtoneManager.TYPE_RINGTONE, newUri);

 So I guess I have several questions...
 1. Is there anything plainly wrong with the myContentValues
 statements?
 2. When the ringtone picker is brought up should the title show up (in
 this case A Sound) or will it remain listed as 'default ringtone'?
 3. If there is a sample project online that does this that anyone
 knows about (I looked through all the sample stuff but didn't see
 anything, I could have easily missed it though) feel free to include
 that.

 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] return values from preferences with getString

2011-09-04 Thread erik wagner
Hi,
I'm having a bit of a problem with the return values from
preferences.getString.  The value that I'm getting returned doesn't
seem to be correct.
This snippet will not evaluate correctly (i'm omitting the
toast.length_long ending since it formats squirrelly).  This always
goes to the else (i.e. 'nothing') condition.  There are only two
possible values (Two and Four).

String strTemp=prefs.getString(listPlayers, );
if (strTemp==Two) {
  Toast.makeText(WarGamePlay.this, two?,
} else if (strTemp==Four) {
  Toast.makeText(WarGamePlay.this, four?,
} else {
  Toast.makeText(WarGamePlay.this, nothing?,
}

If i exchange the prefs.getString with just...

String strTemp=Two;

then that correctly goes to the first condition in the if/else tree.

What am I missing?  I have checked the values coming back from the
prefs.getString and there are no leading/trailing spaces or anything
else visually wrong that I can see with the value.
Any help on this would be appreciated.  Thanks in advance.
Erik Wagner

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

2011-09-04 Thread erik wagner
Thanks very much!  I have to say though my (ignorant) questions are
not over.  I am ultra newbie on Java and am not sure how to write a
(working) Equals method.
This is the body of the Equals I wrote
public boolean equals(String strTemp) {
  SharedPreferences
prefs=PreferenceManager.getDefaultSharedPreferences(this);
  if (strTemp instanceof String) {
String strP1 = prefs.getString(listPlayers, );
if (this.equals(strP1)) return true;
  }
  return false;
}

in the code i'm trying to do something along the lines of
if ((equals(Two) {
// blah blah
}

I know this is a basic-really-should-know-how-to question but I'm kind
of flailing on the whole thing.  Thanks.


On Sep 4, 5:08 pm, Mark Murphy mmur...@commonsware.com wrote:
 Never compare strings with == in Java. Use equals().





 On Sun, Sep 4, 2011 at 6:07 PM, erik wagner erik.j.wag...@gmail.com wrote:
  Hi,
  I'm having a bit of a problem with the return values from
  preferences.getString.  The value that I'm getting returned doesn't
  seem to be correct.
  This snippet will not evaluate correctly (i'm omitting the
  toast.length_long ending since it formats squirrelly).  This always
  goes to the else (i.e. 'nothing') condition.  There are only two
  possible values (Two and Four).

  String strTemp=prefs.getString(listPlayers, );
  if (strTemp==Two) {
       Toast.makeText(WarGamePlay.this, two?,
  } else if (strTemp==Four) {
       Toast.makeText(WarGamePlay.this, four?,
  } else {
       Toast.makeText(WarGamePlay.this, nothing?,
  }

  If i exchange the prefs.getString with just...

  String strTemp=Two;

  then that correctly goes to the first condition in the if/else tree.

  What am I missing?  I have checked the values coming back from the
  prefs.getString and there are no leading/trailing spaces or anything
  else visually wrong that I can see with the value.
  Any help on this would be appreciated.  Thanks in advance.
  Erik Wagner

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

 _The Busy Coder's Guide to Android Development_ Version 3.6 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] Re: return values from preferences with getString

2011-09-04 Thread erik wagner
Fair enough, thanks again

On Sep 4, 6:12 pm, Mark Murphy mmur...@commonsware.com wrote:
 On Sun, Sep 4, 2011 at 6:54 PM, erik wagner erik.j.wag...@gmail.com wrote:
  Thanks very much!  I have to say though my (ignorant) questions are
  not over.  I am ultra newbie on Java and am not sure how to write a
  (working) Equals method.

 I heartily encourage you to learn Java *before* attempting to get into
 Android development, simply because most of the Java educational
 materials out there are designed for non-Android environments.

  This is the body of the Equals I wrote
  public boolean equals(String strTemp) {
       SharedPreferences
  prefs=PreferenceManager.getDefaultSharedPreferences(this);
       if (strTemp instanceof String) {
             String strP1 = prefs.getString(listPlayers, );
             if (this.equals(strP1)) return true;
       }
       return false;
  }

 There is no point in your instanceof test, as Java is strongly typed,
 so it will always be a String. Also, I didn't tell you to *write* an
 equals() method, but to *use* the equals() method, as you did inside
 your own equals() method.

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

 _The Busy Coder's Guide to Android Development_ Version 3.6 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] Re: help with spinners from preferences

2011-08-31 Thread erik wagner
I apologize that the code appeared to be/was unformatted, it looked
fine on my end.

Thanks for the tip.  That is exactly what I was trying to hodgepodge
together.  Much appreciated.

Erik Wagner

On Aug 31, 10:59 am, TreKing treking...@gmail.com wrote:
 On Tue, Aug 30, 2011 at 7:50 PM, erik wagner erik.j.wag...@gmail.comwrote:

  I have a preference screen where a edit text brings up a spinner,
  the result from the spinner needs to get to the edit text on the preference
  screen and the value from the edit text needs to then get back to the main
  activity.

 I didn't look over your giant blob of foreign, unformatted code, but you
 should not neither either a spinner or edit text in a preference actiivty,
 unless you have your terms mixed up.

 All you should really need is a list 
 preference.http://developer.android.com/reference/android/preference/ListPrefere...

 ---­--
 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] help with spinners from preferences

2011-08-30 Thread erik wagner
Hi,
I have a preference screen where a edit text brings up a spinner, the
result from the spinner needs to get to the edit text on the
preference screen and the value from the edit text needs to then get
back to the main activity.  I can get the value from a straight edit
text to the main activity but I cannot figure out how to get the
spinner choice to the edit field.
(disclaimer, the bulk of this is from an example project that I am
trying to use to learn how to do this).
The relevant porton of the main.xml
TableRow
TextView
android:text=Edit TEXT:
android:paddingRight=5dip/
TextView android:id=@+id/edittext/
/TableRow

I have a preferences.xml in the /res/xml folder...
PreferenceScreen
xmlns:android=http://schemas.android.com/apk/res/android;
EditTextPreference
android:key=edit_text
android:title=Edit Text Preference
android:dialogLayout=@layout/spinner
android:summary=What to do?/
/PreferenceScreen

I also have a spinner.xml in the /layout folder
?xml version=1.0 encoding=utf-8?
LinearLayout xmlns:android=http://schemas.android.com/apk/res/
android
android:orientation=vertical
android:layout_width=fill_parent
android:layout_height=fill_parent

Spinner
android:id=@+id/spinner
android:layout_width=fill_parent
android:layout_height=wrap_content
android:width=200dp
android:entries=@array/edit_text_array
/
/LinearLayout

There are two activities.  The first is PrefsActivity
package com.Prefs;

import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.TextView;

public class PrefsActivity extends Activity {
/** Called when the activity is first created. */
private static final int EDIT_ID = Menu.FIRST+3;

private TextView check_box=null;
private TextView edit_text=null;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
check_box=(TextView) findViewById(R.id.checkbox1);
edit_text=(TextView) findViewById(R.id.edittext);

}

public void onResume() {
super.onResume();

SharedPreferences
prefs=PreferenceManager.getDefaultSharedPreferences(this);
check_box.setText(new Boolean(prefs.getBoolean(check_box,
false)).toString());
edit_text.setText(prefs.getString(edit_text, ));
//spinner.setText(prefs.getString(spinner, ));
}

public boolean onCreateOptionsMenu(Menu menu) {
menu.add(Menu.NONE, EDIT_ID, Menu.NONE, Edit Prefs)
.setIcon(R.drawable.icon)
.setAlphabeticShortcut('e');

return(super.onCreateOptionsMenu(menu));
}

public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case EDIT_ID:
startActivity(new Intent(this, EditPreferences.class));
return(true);
}
return(super.onOptionsItemSelected(item));
}
}

and finally the EditPreferences activity.
package com.Prefs;


import android.content.SharedPreferences;
import android.os.Bundle;
import android.preference.PreferenceActivity;
import android.preference.PreferenceManager;
import android.widget.TextView;

public class EditPreferences extends PreferenceActivity {
private TextView spinner=null;
private TextView edit_text=null;
@Override

public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
spinner=(TextView) findViewById(R.id.spinner);
addPreferencesFromResource(R.xml.preferences);

}

public void onResume() {
super.onResume();
}
}

What I was thinking was that the spinner needed to feed the result to
the edittext on the preferences before the edittext on the preferences
could feed it to the one on the PrefsActivity activity.
Long story short, what am I doing wrong and what should I do on this?
I'm a little brained out on this after staring at it and trying
everything my limited understanding could think of.
Thanks in advance.
Erik Wagner

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

2011-08-27 Thread erik wagner
Hi, I guess this is more of a design with more than a little 'how do
i' mixed in question.  I have two activities (thus far), a main page
and an options page.  On the options page I set an option that I need
to 'see' on the main page (as well as on subsequent other activites).
What is the 'best' way to do this?  Global variables are a no-no and a
bit of a pain to do as I understand it.  How can I do this?  Perhaps
just point me in the direction of a dev article on the subject though
I couldn't find anything on point.  At least at that point I can then
move on to more detailed how-to questions.  Thanks again for all the
help on my various newbie questions.
Erik Wagner

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

2011-08-27 Thread erik wagner
Thanks!  Now to figure out how to use them, hopefully I won't be back
later with a 'uh, how do i do this?' question.

On Aug 27, 9:50 am, Mark Murphy mmur...@commonsware.com wrote:
 On Sat, Aug 27, 2011 at 10:32 AM, erik wagner erik.j.wag...@gmail.com wrote:
  Hi, I guess this is more of a design with more than a little 'how do
  i' mixed in question.  I have two activities (thus far), a main page
  and an options page.  On the options page I set an option that I need
  to 'see' on the main page (as well as on subsequent other activites).
  What is the 'best' way to do this?

 Use SharedPreferences and an OnSharedPreferenceChangeListener.

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

 Android 3.1 Programming Books:http://commonsware.com/books

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


[android-developers] reading choices from spinners

2011-08-26 Thread erik wagner
Hi all, I have a very simple game that I'm trying to do for learning
purposes.  One of the options is selecting the number of players (2-4)
via a spinner.  When a choice is made from the spinner I am moving the
value to a string and then using that string in a series of if/else if
statements to (eventually) handle the option.  I am running into the
problem where the condition that (to me) seems like it should be true
is evaluating to false.
If I select Two, the value moved to the variable is Two but the
check for the variable == Two isn't getting hit.
(hope that was all clear, backstory may not be needed but better safe
than vague).  Anyway, the spinner's OnSelectedItemListener...

public class MyPlayerOnItemSelectedListener implements
OnItemSelectedListener {
public void onItemSelected(AdapterView? parent, View view, int
pos, long id) {
String strResult;
strResult = parent.getItemAtPosition(pos).toString();
if (strResult == Two) {
Toast.makeText(parent.getContext(), this is the result 
when
one is selected, Toast.LENGTH_LONG).show();
} else if (strResult == Three) {
Toast.makeText(parent.getContext(), three players / +
strResult + /, Toast.LENGTH_LONG).show();
} else if (strResult == Four) {
Toast.makeText(parent.getContext(), four,
Toast.LENGTH_LONG).show();
} else {
Toast.makeText(parent.getContext(), something else / +
strResult + /, Toast.LENGTH_LONG).show();
}

}
public void onNothingSelected(AdapterView? parent) {

}
}

No matter what I select using this code the Toast shows as something
else / + what the value actually is + /.  i.e. if I chose 'Two' the
toast reads something else /Two/.
Any help would be greatly appreciated on this.  I'm certain it is
something very fundamental that I'm just missing.  Thanks in advance
Erik Wagner

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

2011-08-21 Thread erik wagner
Hi,
This is I'm sure a very simple thing to do and I am just missing
something but I am just starting out.  I have the main view, which has
a button.  The button brings up a second view that is supposed to show
some toast message (or, in fact do anything).  I can get everything to
work on the first view, but nothing at all to work on the second.
first view (main.xml for the layout)
public class actvSecondPage extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

final Button btnToast = (Button) findViewById(R.id.btnToast);
btnToast.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
Toast.makeText(actvSecondPage.this, this is some 
toast,
Toast.LENGTH_LONG).show();
}
});

final Button btnSecondPage = (Button)
findViewById(R.id.btnSecondPage);
btnSecondPage.setOnClickListener(new OnClickListener() {
public void onClick(View v) {
setContentView(R.layout.second);
}
});
}
}

Second view (second.xml for the layout)
public class actvSecond extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.second);

Toast.makeText(actvSecond.this, this is some toast on the 
actual
second page., Toast.LENGTH_LONG).show();
};
}
the android.manifest.xml (in case i'm missing something there)
?xml version=1.0 encoding=utf-8?
manifest xmlns:android=http://schemas.android.com/apk/res/android;
  package=com.SecondPage
  android:versionCode=1
  android:versionName=1.0
uses-sdk android:minSdkVersion=3 /

application android:icon=@drawable/icon android:label=@string/
app_name
activity android:name=.actvSecondPage
  android:label=@string/app_name
intent-filter
action android:name=android.intent.action.MAIN /
category
android:name=android.intent.category.LAUNCHER /
/intent-filter
/activity

/application
/manifest

Can anyone help as to why what works in the first class does not in
the second?  Or, rather, that nothing at all works in the second
class?  Any help would be appreciated, thanks.
Erik

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

2011-08-21 Thread erik wagner
Ah, that did the trick.  Thank you very much, it was setting the
Intent that I was totally missing.

On Aug 21, 10:04 am, Appaholics raghavs...@appaholics.in wrote:
 You need to declare the second activity in the manifest. You will also need
 an intent in your first activity to launch the second one. 
 Thishttp://www.warriorpoint.com/blog/2009/05/24/android-how-to-switch-bet...
 help you in adding and starting another activity.

 Thanks

 On Sun, Aug 21, 2011 at 8:27 PM, erik wagner erik.j.wag...@gmail.comwrote:





  Hi,
  This is I'm sure a very simple thing to do and I am just missing
  something but I am just starting out.  I have the main view, which has
  a button.  The button brings up a second view that is supposed to show
  some toast message (or, in fact do anything).  I can get everything to
  work on the first view, but nothing at all to work on the second.
  first view (main.xml for the layout)
  public class actvSecondPage extends Activity {
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.main);

         final Button btnToast = (Button) findViewById(R.id.btnToast);
         btnToast.setOnClickListener(new OnClickListener() {
                 public void onClick(View v) {
                         Toast.makeText(actvSecondPage.this, this is some
  toast,
  Toast.LENGTH_LONG).show();
                 }
         });

         final Button btnSecondPage = (Button)
  findViewById(R.id.btnSecondPage);
         btnSecondPage.setOnClickListener(new OnClickListener() {
                 public void onClick(View v) {
                         setContentView(R.layout.second);
                 }
         });
     }
  }

  Second view (second.xml for the layout)
  public class actvSecond extends Activity {
     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.second);

                 Toast.makeText(actvSecond.this, this is some toast on the
  actual
  second page., Toast.LENGTH_LONG).show();
     };
  }
  the android.manifest.xml (in case i'm missing something there)
  ?xml version=1.0 encoding=utf-8?
  manifest xmlns:android=http://schemas.android.com/apk/res/android;
       package=com.SecondPage
       android:versionCode=1
       android:versionName=1.0
     uses-sdk android:minSdkVersion=3 /

     application android:icon=@drawable/icon android:label=@string/
  app_name
         activity android:name=.actvSecondPage
                   android:label=@string/app_name
             intent-filter
                 action android:name=android.intent.action.MAIN /
                 category
  android:name=android.intent.category.LAUNCHER /
             /intent-filter
         /activity

     /application
  /manifest

  Can anyone help as to why what works in the first class does not in
  the second?  Or, rather, that nothing at all works in the second
  class?  Any help would be appreciated, thanks.
  Erik

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

 --
 --
 Raghav Sood
 CEO/Founder/Owner/Dictator/Tyrant at Appaholics (Basically all titles
 required to have complete 
 control)http://www.raghavsood.com/https://market.android.com/developer?pub=Appaholicshttp://www.appaholics.in/

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


[android-developers] Hello Listview project

2011-08-16 Thread erik wagner
Hi to all,
I am very new to both java and android development so this is probably
a very simple question.  I have been going through the various 'hello'
tutorials on this site.  I've hit a snag on the 'Hello Listview' (this
one http://developer.android.com/resources/tutorials/views/hello-listview.html).
When trying to run it I get a fatal error and the debugger shows me
the following message of

Your content must have a ListView whose id attribute is
'android.R.id.list'

I've seen some similar things on various posts but could not find the
answer to; 1. where is this entry to be made (the
androidmanifest.xml?  the list.xml?) and 2. what the entry actually
should be.
Thanks in advance for any answers.

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

2011-08-16 Thread Erik
It's possible to use GPS to determine the distance between to receivers to 
that accuracy, but it involves one device getting the low-level GPS data 
from the other device and doing some processing on both sets of data. And I 
have no idea what data you actually need to perform that processing, or 
whether the device's NMEA strings contain that data.

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

2011-08-12 Thread erik ryerson
I'm having some trouble adding a custom font to skin.xml

Here is my code

I have this in the skins xml files

Code:

TextView android:id=@id/sender_phone_num
  android:textColor=#332f33/

So I added this to my main package

Code:

TextView tv=(TextView)findViewById(R.id.sender_phone_num);
Typeface face=Typeface.createFromAsset(getAssets(),
fonts/nokiafc22.ttf);
tv.setTypeface(face);

and placed the font in the assets/fonts folder

I must be missing something, because the font isn't changing in app

Any suggestions?

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

2011-07-25 Thread Erik
If you mean you can't contact the MMSC to download the MMS message, Verizon 
and Sprint will only let apps that are specially blessed do that. And that 
isn't going to happen for you.

Your best bet is to let the phone's native messaging client handle all of 
the MMS sending/receiving.

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

2011-07-19 Thread Erik H
Hi,

I got an application that sends and receives UDP messages using a
MulticastSocket. It works fine between two phones when both are
connected to a normal WiFi AP (e.g., my WiFi at home). However, when
either device has WiFi tethering active and the other device is
connected to this network sending Multicast packages doesn't work
anymore. If I set-up a third device which has WiFi tethering enabled
and let the first two devices connect to this network it works as
expected between the two devices (however, the third device with
tethering active cannot receive or send Multicast packages).

My conclusion is that a device that has WiFi tethering enabled cannot
send or receive Multicast packages. Is this an expected behavior or
should I consider it a bug?

Thanks!

// Erik

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Sent SMS doesn't show up in the messaging app?

2011-07-13 Thread Erik
All messaging apps use the Telephony content provider to store messages. So 
you could insert() a message into the content://sms/ provider. It's not 
simple, you'll probably need to read through the code of the open source 
messaging app to figure out how to format the message.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Sent SMS doesn't show up in the messaging app?

2011-07-13 Thread Erik
On Wednesday, July 13, 2011 3:49:31 PM UTC-7, Mark Murphy (a Commons Guy) 
wrote:

 And your proof of this is... what, exactly?


Well, the messaging app my company wrote uses the Telephony content 
provider. Handcent SMS uses it, as does GO SMS. I'm guessing all the SMS 
backup apps out there back up the Telephony content provider.

If there's a phone out there that doesn't have this content provider, then 
the OP's app should be written to fail gracefully, but I think those will be 
few and far between.

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

2011-06-08 Thread Erik R
I'm working on a simple image manipulation app that requires opening
bitmaps at full resolution, which of course results in OutOfMemory
issues. I know that the short answer is to simply use less memory via
BitmapFactory's inSampleSize Option to downsample the bitmap, but for
this app I really would like to retain the full resolution for
editing. One solution I have been investigating is loading the bitmap
entirely on the native heap, after learning that the memory limitation
is only imposed within the Dalvik VM heap. A look into the Android
source code revealed that this is already the case... BitmapFactory
uses native methods to load a bitmap on the native heap, while
maintaining a reference to it on the VM heap. The issue then is that
it appears the native memory used by the bitmap is actually counted
against the available VM memory, when it really isn't there. A look
into the stock Camera and Gallery apps' source revealed that they get
around this by using an additional BitmapFactory Option,
inNativeAlloc. I was able to find this field in the Java code for
BitmapFactory:

 196  * Normally bitmap allocations count against the dalvik
heap, which
 197  * means they help trigger GCs when a lot have been
allocated. However,
 198  * in rare cases, the caller may want to allocate the
bitmap outside of
 199  * that heap. To request that, set inNativeAlloc to true.
In these
 200  * rare instances, it is solely up to the caller to
ensure that OOM is
 201  * managed explicitly by calling bitmap.recycle() as soon
as such a
 202  * bitmap is no longer needed.
 203  *
 204  * @hide pending API council approval
 205  */
 206 public boolean inNativeAlloc;

Are there any plans to unhide this field anytime soon?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 it impossible to move and merge text on an image

2011-05-06 Thread Hans-Erik
hello TreKing.
Actually i need help on all of it.
I was posting on :
http://stackoverflow.com/questions/5900463/android-how-to-merge-and-move-text-around-on-image,

and got an answer and will try that now.
If you have any thoughts about that answer please advice

On 6 Maj, 02:42, TreKing treking...@gmail.com wrote:
 On Thu, May 5, 2011 at 1:09 PM, Hans-Erik erikswed...@gmail.com wrote:
  Help is needed!

 With which part?

 -
 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: Is it impossible to move and merge text on an image

2011-05-06 Thread Hans-Erik
i have not startet doing this so any ide is helpfull
was thinking i could write text on the bitmap
and then track x/y when using finger to move the text to new x/y
you have better ide?

On 6 Maj, 02:42, TreKing treking...@gmail.com wrote:
 On Thu, May 5, 2011 at 1:09 PM, Hans-Erik erikswed...@gmail.com wrote:
  Help is needed!

 With which part?

 -
 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: Is it impossible to move and merge text on an image

2011-05-06 Thread Hans-Erik
I forgot to say i need to save the image with the added text, like
merge into a new image.
I guess that complicates things.

Im investigating and can see that the Canvas class has the drawText
method.
drawText will write the text solid on the image.
So i guess using Canvas is the way to go.

@Miguel Morales thanks and sorry i forgot to say the text and image
must be merged together and two ImageView cannot do that i think.

@ThreKing Thanks for taking your time. Since I dont know back from
front in this project i cannot ask for specific if i don't know if the
Egg came before the chicken or wise verse.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 it impossible to move and merge text on an image

2011-05-06 Thread Hans-Erik
 Well, simply do the saving when the user is finished moving the text or
 using the feature compose the image.
 The bitmap canvas supports basic things like drawing text.
 This doesn't complicate things.

yea you right i think, after playing around with this sample for 30
min
http://www.anddev.org/viewtopic.php?p=11603

Can replace one of the balls with text.
The question is how to input the text.
once the text is Inputed it can be moved but howto let user input
it.
Maybe longpress,, something

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Is it impossible to move and merge text on an image

2011-05-05 Thread Hans-Erik
hi all.

This seem really hard to do since i cannot find any information about
it

- Open a jpg in full screen.
- Type text on the jpg.
- able to move that text where i want it positioned on the jpg.
- moving of text must be done with a finger (not in code).

Help is needed!

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

2011-04-29 Thread Erik
I have an Activity with different layouts for portrait and landscape.
Since it has some complex state data I don't want to lose on rotation,
I'm listening for rotation config changes. In onConfigurationChanged()
I call setContentView() to rebuild the view hierarchy using the new
layout.

Now I'm converting the activity to use a Fragment. I want the Fragment
to behave just like the Activity, rebuilding the view hierarchy with
the new layout when it gets onConfigurationChanged(), but there
doesn't seem to be any way to change a Fragment's view after it's been
created. The only way seems to be to create a new Fragment, but then I
lose all the state data from the original Fragment.

Does anyone have any ideas on how to make this work?

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

2011-04-22 Thread erik tsomik
Well I am programming in coldfusion So i thought that I can use coldfusion
to program the android. Also ColdFuion is Java based

On Thu, Apr 21, 2011 at 12:50 AM, lbendlin l...@bendlin.us wrote:

 please explain what made you think that the two have anything to do with
 each other.

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

2011-04-20 Thread erik tsomik
I am new to android development. Can Anybody give me some tips, examples of
integrating ColdFusion and android

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] list view: scrolling resizes the items in a weird way

2011-03-24 Thread Erik
Hi,

I have a problem with the list view and its items. When scrolling up/
down the listview I noticed that the items slightly resize(about one
pixel) and in my application it looks like ^. The divider between two
items should be one pixel high(used default android behavior), but
when scrolling the divider is sometimes 2 pixels or 0 pixels(not
visible). This is bad since it looks like the two items form one list
item.

Has anyone a solution for this weird resizing problem when scrolling
inside a listview?

My development device is the HTC Wildfire with firmware version 2.1-
update1. Emulator is set to:Android 2.1-update1, skin WVGA800 and
hw.lcd.density=240.

?xml version=1.0 encoding=utf-8?
RelativeLayout
xmlns:android=http://schemas.android.com/apk/res/android;
android:layout_width=fill_parent
android:layout_height=?android:attr/listPreferredItemHeight
android:background=#F0F0F0
ImageView
android:id=@+id/test_icon
android:layout_height=fill_parent
android:layout_width=wrap_content
android:src=@drawable/icon
android:layout_alignParentRight=true
android:layout_alignParentTop=true
android:scaleType=centerInside
/ImageView
TextView
android:id=@+id/testTextView1
android:layout_width=fill_parent
android:layout_height=fill_parent
android:layout_alignParentTop=true
android:layout_alignWithParentIfMissing=true
android:layout_toLeftOf=@+id/test_icon
android:text=test
android:textColor=#55 /
/RelativeLayout


The ListView is filled with the following item layout and I used
default settings for the listview:

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

2010-12-28 Thread Lars-Erik
Actually I had the same problem and found the real solution.
autoText is a deprecated feature.
However looking more closely on the textAutoComplete function I
found that it states that the application will provide the correction
list itself.
In stead, just use the textAutoCorrect in android:inputType
without the textAutoComplete and it will work. Did for me, at
least!

so in the initial example of this thread you would use:

EditText android:id=@+id/alarmMemo
android:layout_width=fill_parent
android:layout_height=match_parent android:imeOptions=actionNone
android:inputType=text|textAutoCorrect|textShortMessage
android:maxLength=150/EditText

 I found the solution courtesy of a quick peek at the WordPress for
 Android app's resource files! The answer is to remove the
 android:inputType attribute and substitute it with
 android:autoText=true. Simple yet effective!

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 do i multi select images in the Gallery and send there URL to my activity?

2010-12-22 Thread Hans-Erik
hi
In the gallery I have added my Item to the share menu. But i can only
get one image and making my Activity start. This code give me the URL
for one image. Is it possible to set up the Gallery or the share menu
so that user can select one or many pictures?

if (Intent.ACTION_SEND.equals(action))
{ if extras.containsKey(Intent.EXTRA_STREAM))
{ Uri uri = (Uri)extras.getParcelable(Intent.EXTRA_STREAM); 
//path
to image
Toast toast = Toast.makeText(this, path: +
getRealPathFromURI(uri),
Toast.LENGTH_SHORT); toast.show();
return;
} else if
(extras.containsKey(Intent.EXTRA_TEXT)) {
}

} public String getRealPathFromURI(Uri contentUri) { String[] proj =
{
MediaStore.Images.Media.DATA }; Cursor cursor =
managedQuery(contentUri,
proj, null, null, null); int column_index =
cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
cursor.moveToFirst(); return cursor.getString(column_index);
}

intent-filter
action android:name=android.intent.action.SEND /
category 
android:name=android.intent.category.DEFAULT /

data android:mimeType=image/* /
/intent-filter

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 do i multi select images in the Gallery and send there URL to my activity?

2010-12-22 Thread Hans-Erik
hi
In the gallery I have added my Item to the share menu. But i can only
get one image and making my Activity start. This code give me the URL
for one image. Is it possible to set up the Gallery or the share menu
so that user can select one or many pictures?

if (Intent.ACTION_SEND.equals(action))
   { if extras.containsKey(Intent.EXTRA_STREAM))
   { Uri uri = (Uri)extras.getParcelable(Intent.EXTRA_STREAM);
  Toast toast = Toast.makeText(this, path:
+getRealPathFromURI(uri),
  Toast.LENGTH_SHORT); toast.show();
  return;
   } else if
   (extras.containsKey(Intent.EXTRA_TEXT)) {
   }

 }

public String getRealPathFromURI(Uri contentUri) { String[] proj =
{
   MediaStore.Images.Media.DATA };
   Cursor cursor = managedQuery(contentUri,proj, null, null, null);
   int column_index =
cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
   cursor.moveToFirst();
   return cursor.getString(column_index);
}

   intent-filter
 action android:name=android.intent.action.SEND /
 category android:name=android.intent.category.DEFAULT /
 data android:mimeType=image/* /
   /intent-filter

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 do i multi select images in the Gallery and send there URL to my activity?

2010-12-22 Thread Hans-Erik

On 22 Dec, 20:17, Mark Murphy mmur...@commonsware.com wrote:
 ACTION_SEND only supports sending one item.

Thanks for your reply
Do you know any other way to do this?
My Activity is dormant and awaken by the user selecting images.
There has to be another way to do this right?

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 do i multi select images in the Gallery and send there URL to my activity?

2010-12-22 Thread Hans-Erik

On 22 Dec, 20:48, bruce palant...@gmail.com wrote:
 What you want is ACTION_SEND_MULTIPLE.  You will receive a set of
 Uris.

Thanks Bruce!
Coming from Java, Any book you can recommend learning android
infrastructure?

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

2010-12-18 Thread Hans-Erik

That's quite interesting thanks TreKing.
That is one approach but dont think it will work for me.

On scenario is if 200 phones connect to my server wanting to send one
jpg to another phone.
200 messages would go out trough google notifying all phones there is
jpg package for them.
Google has Limitations in that C2DM about Google limits the number of
messages a sender sends in aggregate. Also possible lagging.

My initial naive thought was that all those 200 phones could have an
app installed that make a connection to me PC server and keep that
connection alive.

I'm searching for a best way to do do this. What would you do?

- Services are bad design and a user might think his battery get
drained
- Activity with AsyncTask is beautiful if android not killing the app
Hmmm (not sure there).
  One AsyncTask constantely listening for incoming and another
AsyncTask gets created when
  user send jpg. Can an AsyncTask live that long, Is it possible to
protect the AsyncTask
  from onCreate updates, orientationchanges?


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

2010-12-18 Thread Hans-Erik

 I guess if you have a significantly large user base, but I'm assuming that's
 not the case, or is it?

Im planing ahead, trying to learn what it takes to make and app like
that

 Is some lagging or some delay in the delivery of these messages
 completely unacceptable?

yes im playing with the ide since mail or sms is no instant

 What is so urgent about these messages that they *must* be received
 instantaneously?

That is a powerful features for a mobile app

 Perhaps give the user a poll interval or an option for manually refreshing
 the data, if it makes sense for your app.

no, that way the phone is never ready to receive .

 I would rethink what you're trying to accomplish and try to work within the
 restrictions imposed by mobile devices.

your right ofcorce, im new to android but not to Java so the
transition is
a bit painful

 You can certainly keep your AsyncTask alive between orientation changes -
 but only as long as the user keeps your app in focus as the current
 Activity. Once you get put in the background you're subject to being killed.

AsyncTask out the door, Services welcome in.

 There's really no such thing as keeping a connection alive. Your process
 can and will be killed at some point, if not by the system then explicitly
 by the user.

In my Desire phone i see both fring and Google mssagin always running
Read some about a service being Sticky

I read elsewhere that a service can be started with a Brodcastcmmand
http://stackoverflow.com/questions/4468006/can-i-start-a-service-without-activity-or-receiver

cant wrap my head around the code implementation here.
after reading many questions here and elsewhere about this.
I think the method is:
- an apk file which contains a Service an activity and a
BroadcastReceiver Class.
- action.BOOT_COMPLETED will start only my Service, not the Activity.
  The user can from Main Launcher start Activity for in app settings
and I Bind
  to Service and Unbind when done

Yea will try this tomorrow after work.

I look at your TreKing app. Im impressed nice work
That app would really been helpful this morning
when i was waiting for the buss in the snowstorm.
Can I ask how did you tap into CTA bus tracker system
GPS signal for all there Busses location?




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

2010-12-16 Thread Hans-Erik
after reading the article
http://www.androidguys.com/2009/09/09/diamonds-are-forever-services-are-not/

I want to ask about creating an Android app that need to run always!
The app is an ftp server listening for my PC client to send pictures.
The sending can occur anytime so the Android server MUST run

Here's the question:

From the article above a read
Service can be killed by the user and the android system.
The can fall asleep when the device falls asleep.

What about Activity´s,  can i do this simply trough an Activity?
If my activity create a thread for the server to run in.
When a client connect, the thread will receive the picture(s)
and notify Activity and then thread continue Listen.

What are the considerations here?


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

2010-08-12 Thread Erik R
On the line:
lv = (ListView) findViewById(R.id.list);

You are trying to get a handle on a ListView that does not exist in
the XML that you are showing.

On Aug 12, 1:34 pm, Warrior ranjeetsinghdhi...@gmail.com wrote:
 can anyone tell me whats wrong or suggest the best way to populate a
 ListView on runtime from one screen to another.
 Please see my code below
 1. the list always ends up empty
 2. I get a invalid resource error in the end.

 ?xml version=1.0 encoding=utf-8?
 LinearLayout xmlns:android=http://schemas.android.com/apk/res/
 android
     android:orientation=vertical
 android:layout_width=fill_parent
 android:layout_height=fill_parent 
 TextView
     android:layout_width=fill_parent
 android:layout_height=wrap_content android:text=@string/hello /
 EditText
 android:id=@+id/entry android:layout_width=fill_parent
 android:layout_height=wrap_content
 android:background=@android:drawable/editbox_background/
 Button     android:id=@+id/ok
 android:layout_width=wrap_content
 android:layout_height=wrap_content   android:layout_below=@id/
 entry    android:layout_alignParentRight=true
 android:layout_marginLeft=10dip    android:text=Add to List /
 Button   android:id=@+id/viewlist
 android:layout_width=wrap_content
         android:layout_height=wrap_content
 android:layout_below=@id/ok
         android:layout_alignParentRight=true
 android:layout_marginLeft=10dip
         android:text=View List /
 /LinearLayout

 public class HelloWorld extends Activity {

     /** Called when the activity is first created. */

         public ListView lv;
         public ArrayListString arr = new ArrayListString();

     @Override
     public void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.main);

         Button okButton = (Button) findViewById(R.id.ok);
         okButton.setOnClickListener(new View.OnClickListener() {
             public void onClick(View v) {
                 EditText et = (EditText) findViewById(R.id.entry);
                 arr.add(et.getText().toString());
                 Toast.makeText(HelloWorld.this, Added:  + et.getText(),
 Toast.LENGTH_SHORT).show();
                 et.bringToFront();
             }
         });

         Button viewListButton = (Button) findViewById(R.id.viewlist);
         viewListButton.setOnClickListener(new View.OnClickListener() {
             public void onClick(View v) {
                 setContentView(R.layout.text);
                 lv = (ListView) findViewById(R.id.list);
                 lv.setAdapter(new
 ArrayAdapterString(HelloWorld.this, R.id.list, arr));
             }
         });
     }



 }

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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 apps deployed from Eclipse don't take up full screen

2010-08-12 Thread Erik R
A screenshot will also help greatly if you can post one.

It sounds like you might be creating a Dialog instead of an Activity.
If you are creating an Activity, you may have somehow specified a non-
fullscreen theme for it in the manifest XML.

On Aug 10, 8:10 pm, m...@daughtersoftiresias.org
ka...@celadonapps.com wrote:
 I'm a relative Android newbie here.  At first, I thought it was just a
 problem with my code, but I've since discovered that this problem
 applies even to the default, unmodified app templates I can choose
 from when creating a project in Eclipse.  Every app only takes up a
 fraction of the screen.  Here's my layout for an example, but again,
 it affects all of them:

 ?xml version=1.0 encoding=utf-8?

 RelativeLayout android:id=@+id/RelativeLayout01
 android:layout_width=fill_parent
 android:layout_height=fill_parent
 xmlns:android=http://schemas.android.com/apk/res/android;

 com.google.android.maps.MapView
 android:id=@+id/mapView
 android:layout_width=fill_parent
 android:layout_height=fill_parent
 android:enabled=true
 android:clickable=true
 android:apiKey=MY_API_KEY
 /

 /RelativeLayout

 The specified screen resolution is, as in the droid, 854x480. It shows
 up in the emulator in horizontal or vertical mode. The map starts
 about a third of the way from the left and ends about a third of the
 way from the right. It starts at the top and ends about a third of the
 way from the bottom of the screen. I have no clue why that would
 happen, as I specified fill_parent.

 I've tried a variety of things. I switched to a linearlayout, as one
 page I saw recommended. I tried spelling out absolute layout widths. I
 tried all sorts of stuff. The map stubbornly remains surrounded by
 black on all sides.  One thing I noticed was that when I specified
 widths and heights that were really large, way bigger than the screen,
 the map showed up as pure white instead of as a map. But it still had
 the black all around the map as described above.  The title bar
 likewise is truncated by the black bars on either side and only takes
 up 1/3 of the width, whether in landscape or portrait mode.

 The apps that come by default on the emulator take up the fullscreen,
 but everything I install from Eclipse does not.

 I posted this over on Stack Overflow but got no responses, so I
 thought I'd try here.  Thanks for any help you can give.

  - Karen

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

2010-08-12 Thread Erik R
Snippets pulled from Android source:

#1 - All the putExtra methods instantiate a new Bundle when the Intent
receives its first extra, to contain all extras going into it.

public Intent putExtra(String name, Bundle value) {
if (mExtras == null) {
mExtras = new Bundle();
}
mExtras.putBundle(name, value);
return this;
}

#2 - Looks to be the case. A new instance of Bundle is created with
the contained extras.

public Bundle getExtras() {
 return (mExtras != null)
 ? new Bundle(mExtras)
 : null;
 }

On Aug 12, 12:34 am, sukumar bhashyam bhashyam.suku...@gmail.com
wrote:
 hi,

 Please help me in clarifying below query

 #1. Any Data( Bundle) passed into Intent.putExtras is going to create a new
 copy of Bundle instance or its going to have reference to the Bundle
 passed?.

 #2 Same query with get, Any call made to Intent.getExtras is going to new
 Instance of Bundle or reference to extras in Intent?.

 Regards,
 Sukumar.

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] ActivityInstrumentationTestCase2 private static final Object is null when running test suite?

2010-06-07 Thread Erik
Hi,

I have a problem where a private static final Object LOCK = new
Object(); is null at some point when running my TCs.

Obviously if i remove the static status and initialize it in the setUp
method, this problem disappears; I just wanted to know if this is
supposed to happen? The problem also disappears if i move the static
initialization to a Utility class and make it public.

The null pointer exception is received in a callback method when i try
to do a synchronized(LOCK) lock on the object.

Any pointers?

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] Null canvas being passed to onDraw(Canvas canvas)

2010-05-27 Thread Erik
I have two bug reports now in my publisher console, and the both are
Null Pointer Exceptions from onDraw, and result from a null canvas
object being passed into the method.   I've searched and not found any
information on why this may be happening.  Anyone have ideas? Or any
ideas on how to gracefully handle a null canvas being passed in?
Wondering if I should return from the method or attempt to exit the
app gracefully?

Both errors were on the droid platform.


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


[android-developers] Offscreen drawing of a View

2010-05-26 Thread Erik H
Hi,

I'm having a small problem with drawing a View offscreen to a Bitmap.

The View is created using  LayoutInflater.inflate(int resource,
ViewGroup root) with null passed to the root parameter. The View has a
fixed size (200x180 pixels). I can create a Bitmap for this View
either by using the method View.getDrawingCache() or by calling
View.draw(Canvas canvas) using a Canvas that in turn has a backing
Bitmap.

This works fine if the View doesn't change after the inflate. However,
if I have a TextView inside my View that I will update, the size of
the TextView is never updated regardless of what method I call on the
View (requestLayout(), forceLayout() invalidate() etc.). If I display
the View on screen directly, everything works fine (sizes are updated
as needed, etc.).

What is the correct way of drawing Views off screen and being able to
update their layout when needed?

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

2010-05-26 Thread Erik H
Never mind. I managed to solve it myself. Hopefully, this is also the
right way of doing it. :)

I need to manually call View.measure() and View.layout() on the
inflated view every time I change something. The tricky part is that
the measure() method needs values taken from
View.MeasureSpec.makeMeasureSpec(), like this;

int measuredWidth = View.MeasureSpec.makeMeasureSpec(bitmapWidth,
View.MeasureSpec.EXACTLY);
int measuredHeight = View.MeasureSpec.makeMeasureSpec(bitmapHeight,
View.MeasureSpec.EXACTLY);
offscreenView.measure(measuredWidth, measuredHeight);
offscreenView.layout(0, 0, offscreenView.getMeasuredWidth(),
offscreenView.getMeasuredHeight());

Also, I must use a Canvas backed by a Bitmap when drawing. Using the
drawing cache doesn't seem to work well.

Please correct me if I'm doing something wrong here. Hope this can
help the rest of you otherwise. :)

// Erik

On May 26, 10:44 am, Erik H erik.d.hell...@gmail.com wrote:
 Hi,

 I'm having a small problem with drawing a View offscreen to a Bitmap.

 The View is created using  LayoutInflater.inflate(int resource,
 ViewGroup root) with null passed to the root parameter. The View has a
 fixed size (200x180 pixels). I can create a Bitmap for this View
 either by using the method View.getDrawingCache() or by calling
 View.draw(Canvas canvas) using a Canvas that in turn has a backing
 Bitmap.

 This works fine if the View doesn't change after the inflate. However,
 if I have a TextView inside my View that I will update, the size of
 the TextView is never updated regardless of what method I call on the
 View (requestLayout(), forceLayout() invalidate() etc.). If I display
 the View on screen directly, everything works fine (sizes are updated
 as needed, etc.).

 What is the correct way of drawing Views off screen and being able to
 update their layout when needed?

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

2010-05-24 Thread Erik
Did they indicate what they would react to?

I just published my first app last week, and I've been really
frustrated not being able to respond to users comments! I was really
surprised at the lack of functionality in the Market for developers.

On May 21, 5:09 am, Tomáš  Hubálek tom.huba...@gmail.com wrote:
 BTW: In different thread they said that the'll not react on petitions,
 but I still think that this petition is good thing.

 On 17 kvě, 11:42, rob irondad rob.irond...@gmail.com wrote:



  Hello, fellow developers,

  Just a quick update on the petition that was posted 3 months ago now,

  As of now it has been signed by 1246 people.
  Since the petition was made public, there has been recent reports
  about developers seeing crash reports and usercommentsin the
  developer console. This seems to indicate that points 2 and 5 of the
  petition will be taken care of in a near future!

  But as of today all the points in the petition remain valid.

  So far, there has been no reaction or acknowledgment from Google.

  Petition link:http://petitiononline.com/androidm

  --
  Rob

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

 --
 You received this message because you are subscribed to the Google
 Groups AndroidDevelopers group.
 To post to this group, send email toandroid-develop...@googlegroups.com
 To unsubscribe from this group, send email 
 toandroid-developers+unsubscr...@googlegroups.com
 For more options, visit this group 
 athttp://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: Pausing Live Wallpapers

2010-04-14 Thread Erik R
Thanks Romain,
FYI the app in question relies heavily upon the gestures API that you
developed. Nice work! I'd be willing to help out with documentation if
help is needed in that area - it is a bit lacking at the moment,
especially with regard to multiple-stroke gesture recognition.

The workaround that I've implemented on this is to simply use the
wallpaper-only theme as opposed to fully translucent. Achieves a
similar enough effect, and for some reason does not slow it down as
much.

On Apr 13, 1:40 pm, Romain Guy romain...@android.com wrote:
 Hi,

 You cannot pause the live wallpaper from your app.



 On Tue, Apr 6, 2010 at 10:13 PM, Erik Robertson ejwrobert...@gmail.com 
 wrote:
  Hello,

  I am developing an application that uses a Home screen widget as its
  launching point. The application uses the Translucent theme to give
  the appearance of being integrated with the Home screen when active. I
  recently discovered that launching a translucent activity over a live
  wallpaper will not pause the wallpaper as a default-themed activity
  would. The wallpaper will continue to animate and slow down my app
  significantly due to its hoarding of CPU resources. Is there some way
  for a translucent app to tell the wallpaper service to pause? I
  understand that it is up to each individual live wallpaper to
  determine what to do when its onVisibilityChanged method is called.
  Assuming the method is implemented properly, might there be some way
  of indirectly calling it?

  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

  To unsubscribe, reply using remove me as the subject.

 --
 Romain Guy
 Android framework engineer
 romain...@android.com

 Note: please don't send private questions to me, as I don't have time
 to provide private support.  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] Pausing Live Wallpapers

2010-04-13 Thread Erik Robertson
Hello,

I am developing an application that uses a Home screen widget as its
launching point. The application uses the Translucent theme to give
the appearance of being integrated with the Home screen when active. I
recently discovered that launching a translucent activity over a live
wallpaper will not pause the wallpaper as a default-themed activity
would. The wallpaper will continue to animate and slow down my app
significantly due to its hoarding of CPU resources. Is there some way
for a translucent app to tell the wallpaper service to pause? I
understand that it is up to each individual live wallpaper to
determine what to do when its onVisibilityChanged method is called.
Assuming the method is implemented properly, might there be some way
of indirectly calling it?

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

To unsubscribe, reply using remove me as the subject.


[android-developers] Sending and receiving.

2010-02-21 Thread Erik Hughes
Hello Devs,
I have the problem that even though the activities starts i cannot get
the data back from the filebrowser.java. I am not getting any errors
except the line begining with the *. The error is code is never used
locally. I have also checked the filbrowser and it does give an output
with the code aDirectory.getAbsolutePath().toString() so the issue
is somewhere in the transfer. Code is below:

Main.java
[
//Code + imports above
   public static final int ACTION_PICK_FILE = 0;

   //Code above is outside the method body.

button = (Button) findViewById(R.id.button);
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View arg0) {
Intent filebintent = new
Intent(arg0.getContext(),Filebrowser.class);
startActivityForResult(filebintent, ACTION_PICK_FILE);
}
*protected void onActivityResult(int requestCode, int
resultCode, Intent filebintent)
{
 switch(requestCode)
 {
 case ACTION_PICK_FILE:
 if (resultCode == RESULT_OK)
 {
Bundle bundle = filebintent.getExtras();
String select1 = bundle.getString(Selected1);
String path1 = select1.getBytes().toString();
System.out.println(select1); //Check if there is an
output.
System.out.println(path1); //Check if there is an
output.
 }
 break;
 }
}
 });
//Code
]

Filebrowser.java
[
//Code + imports above
   OnClickListener okButtonListener = new OnClickListener()
{
// @Override
public void onClick(DialogInterface arg0, int
arg1) {
   Bundle Data = new Bundle();
   Data.putString(Selected1,
aDirectory.getAbsolutePath().toString());
   Intent mainintent = new Intent();
   mainintent.putExtras(Data);
   setResult(RESULT_OK, mainintent);
   finish();
}
   };
//Code
]

Thanks in advance!
/Erik Hughes

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

2010-01-31 Thread Erik Martino
Thank you for the answer, instead of downloading the complete source
of android you can browse it in gitweb

http://bit.ly/btKBde

/erik

On Jan 29, 1:07 pm, skink psk...@gmail.com wrote:
 On Jan 29, 12:37 pm, Matt Oakes m...@matto1990.com wrote:

  In other words, look at the source code :)

 http://source.android.com/download

 well, the whole source tree is a little bit too much...

 see styles.xml located in your sdk/platforms/*/data/res/values

 pskink

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

2010-01-28 Thread Erik Martino
An important part of creating an android application is making the gui
look right. However where do I find documentation for this. An example
of what I am looking for is something like this

style=@android:style/ButtonBar

what other interesting styles does exist. The eclipse layout xml
editor knows about some of the @android:style/'s but not this one.
Where is all this documented?

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


[android-developers] Re: App name/icon problems on Hero after reboot

2009-11-02 Thread Erik Bryan
For what it's worth, I stopped using the Sense UI in favor of the
default home, but did not wipe everything first. Upon entering the
default home for the first time, all my apps had the right names/
icons. After resetting though, they were displaying in their mangled
state in the default home. Does that tell you guys anything? If the
apps are displaying incorrectly in the default home, does that mean
that HTC has changed the packages themselves, or is it just an issue
with how they are displayed?

I have the same build number that Justin mentioned above.


On Oct 30, 3:52 pm, Justin Giles jtgi...@gmail.com wrote:
 From a user standpoint, I ran across this thread on the Hero
 phandroids.comforum:

 http://androidforums.com/sprint-htc-hero/12549-handcent-shortcut-icon...

 Basically you wipe the phone  sd card, reinitialize the phone, then
 IMMEDIATELY turn off HTC Sense UI in favor of the standard Android UI.  The
 user that gave these instructions seems to not have any problems after they
 do this.

 Just a FYI and further evidence that HTC has some issues they may or may not
 be ignoring.



 On Fri, Oct 30, 2009 at 10:14 AM, Greg Donald gdon...@gmail.com wrote:

  On Fri, Oct 30, 2009 at 9:41 AM, Justin Giles jtgi...@gmail.com wrote:
   I'm not entirely sure the raw string vs resource string is the full issue
   here though.  It might be part of the problem, but not the whole
   explanation.  As Greg mentioned earlier, he never had his app name set as
  a
   raw string and he is experiencing the problem.  On one of my applications
   I'm developing, I'm experiencing it as well with the app name always
  having
   been a resource.  It's sounding more and more like HTC having done
  something
   funky with the package management.  Especially since Dianne has been
  saying
   that stock Android doesn't have this problem.  And all of my inquiries to
   HTC  Sprint have resulted in nothing.

  I'm considering returning the phone, I still have a few days before my
  30 day return option has past.  I mean, who really knows when this
  might be fixed?

  What other options are there at this point?

  --
  Greg Donald
 http://destiney.com/

-- 
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Fail to launch the SDK 2.0 tool on OS X

2009-11-02 Thread Erik H
I downloaded the SDK 2.0 toolkit and tried to launch the android tool
to download the latest SDK. The application seems to launch with the
following output:

$ ./android-sdk-mac/tools/android
Starting Android SDK and AVD Manager
No command line parameters provided, launching UI.
See 'android --help' for operations from the command line.
$

That's it. Nothing happens, no UI appears or any processes are started
(check with ps, but there is no new java process).

I'm running this on Mac OS X 10.5.8. The previous SDK s runs fine.

Thanks,
Erik

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


[android-developers] Re: App name/icon problems on Hero after reboot

2009-10-29 Thread Erik Bryan

I just installed Light Racer on my Sprint Hero. Had never installed it
before. Rebooted and it was fine, still named Light Racer, still with
the same icon. I assume this is because you updated Light Racer and I
had never installed it before.

However, I am having this problem with several other apps, which
variously use their full name (com.x...) or their icon changes to
something weird:

Where (icon)
Quick Settings (icon)
ASTRO (icon)
Coin Flip (name)
Meebo (name)
Handcent Sms (icon)

Reinstalling any of these fixes the problem, which will then come back
after a reboot.

Let me know if more data from me would be helpful.


On Oct 29, 9:58 pm, Robert Green rbgrn@gmail.com wrote:
 Justin,

 Did the app name say Light Racer or net.rbgrn.lightracer after the
 reboot?  That was the problem with it.

 I had a version out that used a raw string as the app label in the
 manifest.  This updated one uses @string/app_name.  If you confirm
 that it's the correct name and not the package name, then that's
 certainly one of the bugs right there.  People that have installed it
 when it had the raw string app label never seem to get it fixed.  Even
 updating to the one you claim works doesn't work for them.  It's like
 once it's broken on the device, the cached data never goes away.

 That makes we wonder if there is a way to clear data on one of the
 system apps that will reset that cache...

 On Oct 29, 7:25 pm, Justin Giles jtgi...@gmail.com wrote:



  I just downloaded it, played a round, rebooted and everything seems fine
  with it.  Icon looks good and the game loads.  Swhat's amiss with
  the rest of us?  Sheer dumb luck?  Poorly coded apps?

  Justin

  On Thu, Oct 29, 2009 at 6:16 PM, Robert Green rbgrn@gmail.com wrote:

   Justin, would you be willing to install Light Racer, reboot and check
   for me?  That will show if I've figured out part of the problem or
   not.

   Thanks!

   On Oct 29, 3:14 pm, Justin Giles jtgi...@gmail.com wrote:
I installed pandahome (assuming that's what you meant by installing a
different home app) and I get the same results.  Messed up launcher 
icons
after reboot.

Justin

On Thu, Oct 29, 2009 at 2:13 PM, Greg Donald gdon...@gmail.com wrote:

 On Thu, Oct 29, 2009 at 1:58 PM, Dianne Hackborn hack...@android.com
 wrote:
  If this is only happening on Hero, it needs to be reported to HTC,
   not as
 a
  generic platform bug.

 Do you know where the HTC bug reporting site is?  All I can find is a
 simple support form that doesn't even confirm I posted anything.

  Has anyone tried installing an alternate home app and seeing if it
   still
  happens there?  I wonder if this is something in their custom home
   app.

 I'd be happy to try if I can.  What would you suggest I try?  (I
 wasn't previously aware I could install a new home app.)

 --
 Greg Donald
http://destiney.com/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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] Design guidelines question; Services vs. Intent broadcasts.

2009-07-06 Thread Erik H

I'm writing an application that consists of a background Service and
one or several Activities acting as UI towards this. There will most
likely be several different UIs for this service that will installed
later on, like custom widgets or UIs. The question is how to solve
this in the most efficient way.

Is it better to only use Intents for communication between UI and
Service (sending control commands with Intents from the UI and
listening for Intents from the Service for state and data updates) or
should I prefer using IPC communication (AIDL - Java Stub, binding to
the service etc..)? Since the UI might be started long after the
service is started, I would either need to use sticky intents to
signal current state, or have a very frequent intent sent by the
service if choose to go with the Intent-based design. Which one would
be the preferred way in that case?

I've read that sticky intents are much more resource consuming than
normal intents, but are intents more consuming than IPC directly
towards the service?

Also, is really an AIDL the right way to allow third-party
integration? Intents sounds better, since they are also asynchronous.

Please advice. :)

Thanks!

// Erik
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Developers group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, 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: Design guidelines question; Services vs. Intent broadcasts.

2009-07-06 Thread Erik Hellman

On Jul 6, 1:28 pm, Mike Hearn mh.in.engl...@gmail.com wrote:
 First and most important question - do you really need a service at
 all? Many apps use services but don't actually need to run all the
 time. Using a service is like a tax on your user. It's currently
 invisible but it won't always be that way: expect your users to start
 asking questions at some point if/when Android makes resource
 consumption of apps more visible.

Yes. I absolutely need a background service since I'm doing something
similar to a music player. :)

 Now how to sync state between the activities and the services.

 Remember that a service is just an object representing a lifecycle
 construct. It exists in the same process that your activities do, so
 they can communicate in the same way any two Java objects would
 communicate - via direct method calls, for instance. It's perfectly OK
 to use the local service idiom that is shown in the API samples to
 bind to a service and then cast the result to the object itself. Or if
 started using an intent, you can just stuff a reference to this into
 a static field.

 As to using intents, you don't have to do this. You can just keep
 track of what the service is meant to do in a file, a database, or
 whatever else is convenient.

I agree totally, but my problem is that my service will most likely be
used by other applications. There could be three (or more) completely
different applications using the service at the same time (a standard
UI doing one type of visualization and another app doing a different
visualization and a homescreen widget, all in different .apk).

So the question remains. If I need to support third-party integration,
is a service (published as an AIDL file) better than Intents? And if
using Intents, is it better to use sticky intent or should I send very
frequent normal broadcast intents from the service to signal its
state?

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



  1   2   >