modular programming (design pattern)

by Marton Kodok » Sun, 08 Nov 2009 18:50:36 GMT


Sponsored Links
 Hello,

I am planning to build my app in modular way. I am thinking that whenever a
user adds a new component/module that will be recognized by my main app.
Can someone point me in the best direction to read more about design
patterns for this approach for Android?

Are there any examples out there?

-- 
Mrton

--



modular programming (design pattern)

by RichardC » Sun, 08 Nov 2009 19:11:59 GMT


modular programming (design pattern)

by Marton Kodok » Sun, 08 Nov 2009 19:23:48 GMT


 For example if I have a main app and three modules in mind, such as:
audio, video, and calendar (The modules itself does nothing. They're useful
only when called by the main app)

1. how will the main app know that those modules are installed on the phone,
and can call them? how do I get a list of modules (mine) ?
2. also how do I make my modules hidden to user, they should not be visible
for launch, and should not be able to launched by an icon, only by my app?

2009/11/8 RichardC <richard.crit...@googlemail.com>


>



modular programming (design pattern)

by Justin Anderson » Tue, 10 Nov 2009 03:12:35 GMT


 Are you going to be the only person developing these modules, or are you
planning on creating some sort of a framework that other developers will be
able to tap into?
----------------------------------------------------------------------
There are only 10 types of people in the world...
Those who know binary and those who don't.
----------------------------------------------------------------------






>>



modular programming (design pattern)

by Marton Kodok » Tue, 10 Nov 2009 04:26:15 GMT


 I will be the only who will develop the modules, no framework in mind.

2009/11/9 Justin Anderson <janderson....@gmail.com>



>>>



modular programming (design pattern)

by Chris Zaniewski » Wed, 11 Nov 2009 23:38:04 GMT


 Please usubscribe




Are you going to be the only person developing these modules, or are you
planning on creating some sort of a framework that other developers will be
able to tap into?
----------------------------------------------------------------------
There are only 10 types of people in the world...
Those who know binary and those who don't.
----------------------------------------------------------------------



--



Other Threads

1. Help in android code syntax

Hi all,

I am facing some problem in android as i am new to it, i need to know
how to write syntax in android for the below problem.

Problem: I have a .net web service (www.somesite.com), that webserver
has an authentication method which require user name and password as
parameter to authenticate.Once i set those things using the
authentication method, it will allow me to call the rest of the
functionality present in the webserver. i have source code written in
ASP, i want to write the same in android.

 private MyServerAPI.Service _service;
 _service = new MyServerAPI.Service();

MyServerAPI.DTAuthHeader auth = new MyServerAPI.DTAuthHeader();
auth.Username = ConfigurationManager.AppSettings["MyServerAPI.user"];
auth.Password = ConfigurationManager.AppSettings["MyServerAPI.pass"];

_service.DTAuthHeaderValue = auth;
_service.Url =
ConfigurationManager.AppSettings["MyServerAPI.service"];

i want to write the same thing in android, can you people please help
me out in this and let me know..


Thanks in advance.

-- 

2. Tab Layout not working

Hi,

I am using the Tab Layout almost copied from the example provided. But
it's not working:

public class TabHolder extends TabActivity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        setContentView(R.layout.main);

        Resources res = getResources(); // Resource object to get
Drawables
        TabHost tabHost = getTabHost();  // The activity TabHost
        TabHost.TabSpec spec;  // Resusable TabSpec for each tab
        Intent intent;  // Reusable Intent for each tab

        // Create an Intent to launch an Activity for the tab (to be
reused)
        intent = new Intent().setClass(this, ArtistsActivity.class);

        // Initialize a TabSpec for each tab and add it to the TabHost
        spec = tabHost.newTabSpec("artists").setIndicator("Artists",
                          res.getDrawable(R.drawable.ic_tab_info))
                      .setContent(intent);

// ok up to here
        tabHost.addTab(spec);    // barfs right here  **************


        // Do the same for the other tabs
        intent = new Intent().setClass(this,
MessagEaseSettings.class);
        spec = tabHost.newTabSpec("settings").setIndicator("Settings",
                          res.getDrawable(R.drawable.ic_tab_settings))
                      .setContent(intent);
        tabHost.addTab(spec);

        intent = new Intent().setClass(this, SongsActivity.class);
        spec = tabHost.newTabSpec("how").setIndicator("How",
                          res.getDrawable(R.drawable.ic_tab_how))
                      .setContent(intent);
        tabHost.addTab(spec);

        tabHost.setCurrentTab(2);
    }

}



seems that the problem happens when it adds the spec:

  tabHost.addTab(spec);

But there is not much to this:

  intent = new Intent().setClass(this, ArtistsActivity.class);

        // Initialize a TabSpec for each tab and add it to the TabHost
        spec = tabHost.newTabSpec("artists").setIndicator("Artists",
                          res.getDrawable(R.drawable.ic_tab_info))
                      .setContent(intent);

the activity (ArtistsActivity) exists and passes Eclipse's strict
checks.

the strings "artists" and "Artists" should not matter, and they are
taken from the exmple.

and the drawalbe.ic.tab.info does exist, exactly as the example
requires it:


<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <!-- When selected, use grey -->
    <item android:drawable="@drawable/tab_info_gray"
          android:state_selected="true" />
    <!-- When not selected, use white-->
    <item android:drawable="@drawable/tab_info_white" />
</selector>


Can anyone give me a hint as to where to look for? Any help is much
appreciated.

Best,

Saied



--

3. Adding a new module in Android

4. Audio initialization and recording

5. Fwd: WTB: Otterbox HTC HD2 T-Mobile

6. How to retrieve a JSON object from a php url to my android

7. How to eliminate paint sawtooth