Someone for building me a very simple app?

Search This thread

FailX

Senior Member
Aug 24, 2009
61
19
Hey guys,
i'm looking for someone who can build me a little app that simply redirects me to the "mobile network settings" page.
Probably, that's very simple and I can do this for myself but i haven't installed the SDK and also I haven't programmed for Android before.
I needn't to be a widget, a shourcut on homescreen without an icon would be absolutly OK.

There are some widgets in market but they caused some strange bugs on my LG P500 :(

If there is someone who can spend some time for me, it would be great :)

Sorry for my english, i'm german...
 

smaskell

Senior Member
Jan 31, 2010
479
44
San Francisco
Hey,

for some reason, I couldn't get the intent to work properly so I just made it so they app runs an am command in the shell. It should work though. Let me know if there are any problems.

Also, your english is fine. There are so many people here who are about 1000 times worse..
 

FailX

Senior Member
Aug 24, 2009
61
19
Works fine on first startup, but on relaunch there is only a blank activity with the programm title on top and I have to close the app manually with a task manager
Is there any possibility to fix this?
 
Last edited:

Dark3n

Recognized Developer
Sep 14, 2007
2,567
5,175
twitter.com
Works fine on first startup, but on relaunch there is only a blank activity with the programm title on top and I have to close the app manually with a task manager
Is there any possibility to fix this?

Harr then let me take a shot at it :D.
.apk file is in attachment, let me know if it does what you wanted.
If it does it, i will be happy with a thanks!

und dein Englisch ist ok... :p
 
  • Like
Reactions: FailX

smaskell

Senior Member
Jan 31, 2010
479
44
San Francisco
oh right, of course. That makes sense. I really didn't go about this the right way. Maybe someone else can come up with a better solution. Anyway, I updated it so the issue you were describing won't happen. However, now you can't back out of the application. As soon as you back out of the mobile network settings, my app comes back into focus and starts the mobile network settings again. I'm sure there's an easy fix. Maybe I'll look at it again after work.
 

Dark3n

Recognized Developer
Sep 14, 2007
2,567
5,175
twitter.com
oh right, of course. That makes sense. I really didn't go about this the right way. Maybe someone else can come up with a better solution. Anyway, I updated it so the issue you were describing won't happen. However, now you can't back out of the application. As soon as you back out of the mobile network settings, my app comes back into focus and starts the mobile network settings again. I'm sure there's an easy fix. Maybe I'll look at it again after work.
it is quite easy, let me help you out
if you have questions, feel free to ask :)

Code:
package eu.thedarken.nsq;

import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
import android.os.Bundle;

public class NSQmain extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //setContentView(R.layout.main);
		Intent intent = new Intent(Intent.ACTION_MAIN, null);
		intent.addCategory(Intent.CATEGORY_LAUNCHER);
		ComponentName cn = new ComponentName("com.android.phone","com.android.phone.Settings");
		intent.setComponent(cn);
		intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
		startActivity(intent);
		finish();
    }
}
 

FailX

Senior Member
Aug 24, 2009
61
19
@smaskell
Now, there is only an black screen after the first launch.
But the solution by Dark3n works like a charm

Thanks!

edit:
Oh, too slow, i'm talking of post 5
 
Last edited:

FailX

Senior Member
Aug 24, 2009
61
19
As I told you already, the widgets I tested caused some bugs. The app from Dark3n got the same issue.
If I change network mode to 2G only, the telephone app crashes without any comments after clicking the call-button. That couldn't be normal?
I've tested this one (couldn't post direct links, search com.curvefish.widgets.network2g3gonoff on market) before and if I clicked on the widget (after such a crash) the call was started :confused:
The same thing happens if i launch the app from Dar3n directly from menu but not if i use the shortcut.

If I change the mode directly via menu or using this (de.softxperience.android.switchnetworktype) app there are no problems.
But the last linked app adds a shortcut on the status-bar drop-down and in my opinion that's stupid.

I've checked the app from smaskell but there's still a problem on relaunch...
edit: And there's the same problem..


Sorry for the double-posting..
 
Last edited:

Dark3n

Recognized Developer
Sep 14, 2007
2,567
5,175
twitter.com
I will take a look at that later in the evening.
Maybe the settings only gets saved properly after closing parent menus.
By directly calling the submenu this doesn't happen and thats why it FCs.
 

kingchris

Senior Member
Apr 17, 2007
310
13
I dont know if this will help you, but you can start the setting via terminalemulator

Code:
am start -n com.android.phone/.Settings

Sent from my HTC Vision using XDA App
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    Works fine on first startup, but on relaunch there is only a blank activity with the programm title on top and I have to close the app manually with a task manager
    Is there any possibility to fix this?

    Harr then let me take a shot at it :D.
    .apk file is in attachment, let me know if it does what you wanted.
    If it does it, i will be happy with a thanks!

    und dein Englisch ist ok... :p
    1
    okay, I wasn't thinking straight before. There was an extremely easy solution. Dark3n has probably already done it but whatever.