Jump to content

Check out our Community Blogs


Member Since 27 Jul 2009
Offline Last Active May 25 2016 01:15 PM

Posts I've Made

In Topic: Learning Java For Android Development

22 August 2011 - 05:04 AM

Honestly mate - coming from a full-time c# perspective, switching to java really isn't much. All you really need to learn is the syntax differences. Also small nuances, like:
string strText = "";
String strText = "";

Like I said, tiny syntax differences.
Then there are the views...
layout_main.xml contains TextView tvText
You are on mainActivity
TextView tvText = (TextView)findViewById(R.id.tvText);

Now, mainActivity.tvText is a pointer to the textview in your layout, and you can manipulate it.
Naturally, in C#, the textview would just be a part of the form you are coding, and you could have skipped that step.

By the way - If you are starting Android programming - I highly recommend you start by learning the layout xmls. They can be tricky, and took me a little while to learn. The code portion wasn't so bad, and Eclipse of course made it that much easier (with the imports and what not)
Once you learn those (and this is really important), make sure you read about the Android lifecycle. If you don't have things like your onPause, onDestroy, onResume, all that - you could end up with a program that never actually closes (I did that once by accident... it ate my battery up bad)

EDIT: lol, I just noticed the age of this thread... *kicks a dead horse*... either way, I'm leaving this post here, others may be looking for the same info

In Topic: So, are there people in this community working with mobile Android programing...

16 August 2011 - 04:00 PM

I'll throw this out there about the AVD - I never use it. Seriously. I know a lot of people do, but I prefer hands on, right there on my phone. Faster load time too. Then again, I write tools that modify the system so.... kinda have to do it on real phone lol

In Topic: send a json object to a server

27 July 2011 - 09:24 AM

I have a suggestion. Don't do a json object for only 2 variables... do a request, or a post. if anything, use php, and send it a url such as

If you absolutely have to use json object upstream, maybe you can reverse my code somehow
here is a sample of a request i do to get info from a mySql server via php and json:
Note the use of nameValuePairs
String result = new String();            result = "";
            ArrayList<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>();
            nameValuePairs.add(new BasicNameValuePair("device",product));
            InputStream is = null;
                HttpClient httpclient = new DefaultHttpClient();
                HttpPost httppost = new HttpPost("<link removed>");
                httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
                HttpResponse response = httpclient.execute(httppost);
                HttpEntity entity = response.getEntity();
                is = entity.getContent();
            }catch (Exception e)
                Log.e("log_tag", "Error in http connection "+e.toString());
                BufferedReader reader = new BufferedReader(new InputStreamReader(is, "iso-8859-1"),8);
                StringBuilder sb = new StringBuilder();
                String line = null;
                while ((line = reader.readLine()) != null) {
                    sb.append(line + "\n");
                result = sb.toString();
            }catch (Exception e) {
                Log.e("log_tag", "Error converting result "+e.toString());
                if(result != null){
                JSONArray jArray = new JSONArray(result);
                Log.i("log_tag", Integer.toString(jArray.length()));
                for(int i=0;i<jArray.length(); i++){
                    JSONObject json_data = jArray.getJSONObject(i);
                        sitems.add(json_data.getString("kernel_name") + " " + json_data.getString("kernel_version"));
                    Toast.makeText(getApplicationContext(), "NULL", Toast.LENGTH_SHORT).show();
            }catch(JSONException e)
                Log.e("log_tag", "Error parsing data "+e.toString());

In Topic: Learn from the beginning

14 July 2011 - 08:56 AM

Stick around for the new CodeCall Android Dev forum. Right now, I'm working on getting things setup, and getting some devs to come over here, but once I get done, I'll definitely be around to help.

In Topic: Android?

13 July 2011 - 07:24 PM

Let me put something together later today. Let me know what you think. Do you have topics in mind?
[Update: let me run this by the current mods first to see if there is enough support.

Topics I can think of -
ROM development
Kernels - c
Application Development - Java
Scripts - bash
Themes (still debating... I guess we could go ahead with this one)
.... Now as for tutorials - either one tutorial section (may get messy), or if possible, a tutorial section as a sub-topic for the others

Yes, I'd love it if you can help mod it. Are you familiar with CC moderation? As far as I know, we don't have any active mobile developers.

Moderation, not here, but any guidelines you'd like to pass along / information, I'll read it. I'm a member of the Android Creative Syndicate (acsyndicate.net, forums.acsyndicate.net), and work with the forums there a bit.

I'm not too familiar with XDA or it's down-sides. Since you seem to know, can you put together a post with some "rules of engagement" and I'll make it sticky? That way, it's clear to everyone.

Absolutely. I've been talking with my team lead about this (for ACS), and he agrees as well - no team banners, no "releases" of products (well, no releases of products that are team branded.... apps that have NO affiliation with a specific team can be posted for review).. basically, I REALLY do not want / will not tolerate anyone turning CodeCall into a "store" or shop of some kind.... this isn't a market, it's a forum. Let me discuss various things with others in the android community, as they may think of something I didn't, and I'll get a rough draft of the sticky put together. I'll submit that on this thread.

I know it's best to keep things here on the forum, but if you need to get ahold of me:
Skype, GTalk: (both are same): parabola949

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download