You can use the ActivityManager class to get a list of activities that are
considered to be running by Android.
In actuality they are paused, since you can only have one running activity
at a time.
You can also get a list of running processes via the ActivityManager class.
Unlike activities,
Google is stating that code of other installed applications can be
used in your own application.
Essentially what you can do is launch other activities/processes as long as
you know the intent and intent filters for the functionality you want to
include. Typically this would be done with a
You mentioned that your program turns on GPS...
I haven't done much with GPS but I believe one of the changes with Android
1.5 was that you can no longer turn GPS on or off programatically...
If GPS is not on you could provide a button or something that would take the
user to the GPS settings
1) When an activity is started from another, to the best of my knowledge,
the only way to get back to the original activity is to use the back button
on the device (assuming the activity is not one you created). If the second
activity is one you created, then you could probably place a button on
You can always download the source and build it yourself...
On Aug 21, 2009 12:31 PM, androidgoo androidf...@gmail.com wrote:
Why isn't Google releasing a beta version of Android 2.0 SDK for
developers? Don't the folks at The Weather Channel already have it?
It would be nice if developers have
Your code isn't using OpenStream() anywhere. Is that called by one of the
methods you are using in the code you provided? If so, a posting of the
logcat info would be helpful to get more information about what is causing
the problem.
Thanks,
Justin
I may be wrong but I don't think you need the full path of where they are on
the device... You should be able to reference them using the R class.
On Thu, Aug 27, 2009 at 6:11 AM, Latha Shivanna latha...@gmail.com wrote:
Hii All,
In my application, I have some image files under res\drawable
Some source code might help...
--
There are only 10 types of people in the world...
Those who know binary and those who don't.
--
On Wed, Aug 26, 2009 at 4:56
The preferred way is to use a long-press to bring up a context menu. The
menu populated by pressing the menu button should be used for things that do
not require a selection.
--
There are only 10 types of people in the world...
You need to follow these steps:
1. Log in to Google Groups
2. Go to the Android Beginners Group
3. Click on the Edit My Membership link on the right side of the page
4. Click the Unsubscribe button
5. Also, you could click the No Email radio button followed by the
Save Changes
What exactly do you mean by the GPS time?
I haven't done any GPS programming for Android but I would assume the
current time/date would not be provided by the GPS API...
If you just want the current time, you could use the currentTimeMillis()
method but I'm not sure exactly what class that is
In order to help with this, we would need more information about how your
project is set up
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups Android Beginners group.
To post to this group, send email to
Have you previously connected your phone to the computer before turning on
the ability to allow unsigned applications and USB debugging?
I found out the hard way that if you don't have those options on the very
first time you connect your phone to a Windows machine then there are all
sorts of
After fiddling around with different values I actually was able to get the
appearance I wanted without using the parent attribute.
--
There are only 10 types of people in the world...
Those who know binary and those who don't.
declare-styleable name=Gallery1
attr name=android:galleryItemBackground /
/declare-styleable
/resources
Thanks Justin. Your post is really helpful.
On Aug 31, 11:16 pm, Justin Anderson janderson@gmail.com wrote:
I had this same problem. After days of searching online, I found
did post toSamsungforum as well,
but no solving reply till now...
On 31 Ago, 19:40, Justin Anderson janderson@gmail.com wrote:
Have you previously connected your phone to the computer before
turning on
the ability to allow unsigned applications and USBdebugging?
I found
Roman,
Thank you very much for the feedback. I will look a little more into the
PackageManager and PackageInfo classes and see what I can come up with. I
think I saw some method in there that would return a launchable intent...
Thanks,
Justin
I haven't tried using the spinner adapter yet, so I'm not sure, but it might
be possible to do the following:
- Create a new object that holds both the city string and the number
- Override the toString() method to return the city string
- Pass the array of your new object type to the spinner
-
Why not use one of the methods from OutputStreamWriter that takes a string
as a parameter?
http://developer.android.com/reference/java/io/OutputStreamWriter.html
--
There are only 10 types of people in the world...
Those who know
R is a class that is generated at compile-time.
In particular, to get R.layout.main you need to create a file names main.xml
in your res/layout folder and create the layout in xml format as described
in the Dev Guide docs.
I've never used the emulator (I push my apps directly to my phone for
And after you do that, read the android developer guide...
http://developer.android.com/guide/index.html
Thanks,
Justin
--
There are only 10 types of people in the world...
Those who know binary and those who don't.
I'm not sure offhand why this crashes, but it could be any number of
reasons... If you could post the logcat output, that would be very helpful.
Also, I was wondering what you were trying to accomplish with this? If you
are trying to change the image when a touch event occurs and then have it
The view-source: option is a feature that is part of the program (browser)
that you happen to be using... it is not part of a standard protocol or
anything.
It sounds like that feature is not programmed into the browser and treats
that command as any other url...
On Sep 7, 2009 9:55 PM, mmkr
Use: android:gravity=center_horizontal in your xml declaration of the
TextView
Thanks,
--
There are only 10 types of people in the world...
Those who know binary and those who don't.
.
--
On Tue, Sep 8, 2009 at 10:01 PM, Justin Anderson janderson@gmail.comwrote:
Use: android:gravity=center_horizontal in your xml declaration of the
TextView
Thanks
Log in to google groups and edit your membership with the group
--
There are only 10 types of people in the world...
Those who know binary and those who don't.
Sounds like a case where you are going to want to have separate threads...
one for the UI and one for establishing the socket connection.
The dev guide mentions when this should be done and I believe it also
addresses how to create multiple threads.
Thanks,
Can you post the logcat information?
Thanks,
--
There are only 10 types of people in the world...
Those who know binary and those who don't.
--
On Sun, Sep 6,
Try putting the following line in your manifest file:
uses-sdk android:minSdkVersion=3 /
I don't know if that will fix all of your problems, but that should take
care of the warnings about the API level requirements.
Thanks,
Justin
to write out anything to display until the
currently running method has ended.
Anybody who has any example code?
Thanks!
On Sep 9, 6:06 am, Justin Anderson janderson@gmail.com wrote:
Sounds like a case where you are going to want to have separate
threads...
one for the UI and one
Code?
--
There are only 10 types of people in the world...
Those who know binary and those who don't.
--
On Tue, Sep 8, 2009 at 10:09 PM, Sudeep
.
--
On Wed, Sep 9, 2009 at 3:33 PM, Justin Anderson janderson@gmail.comwrote:
No. That is the equivalent of asking if you can develop windows
applications to run on Linux.
--
There are only 10 types
No. That is the equivalent of asking if you can develop windows
applications to run on Linux.
--
There are only 10 types of people in the world...
Those who know binary and those who don't.
, Chris Stratton cs07...@gmail.com wrote:
On Sep 9, 5:33 pm, Justin Anderson janderson@gmail.com wrote:
I have a new Samsung Omnia with Windows Mobile 6.1 on it.
Can I develop Android applications to run on this type of phone?
No. That is the equivalent of asking if you can develop
AFAIK, this is not possible. It would be up to the user to turn off
notifications from whatever SMS app they use. I have used the default,
ChompSMS and HandcentSMS...
Both Chomp and Handcent tell you to go to the default app and turn off
notifications in the settings there so you don't get
You should be able to do this as follows:
setMinimumWidth(w);
setMaxWidth(w);
setMinimumHeight(h);
setMaxHeight(h);
Or, if you set it up as a horizontal linear layout that contains the four
different views and give each view the same weight (e.g. give each ImageView
a weight value of 1), then the
Ok, I can understand that Kind of.
Shouldn't the gallery's pointToPosition() method return the Viewable index
then, instead of the absolute index? What good is an index position if I
can't do anything with it?
As an example to see if I understand this right:
If I have 20 items, and scroll
I think we are going to have to agree to disagree on this one. :)
You are confusing views and items from the adapter.
I don't believe I am. Initially I did not realize that the Gallery only has
visible items as children. I understand that now. AFAICT, this was not
documented anywhere...
, that is an index inside your adapter. And it
would be a terrible API on the Adapter itself.
To get the index of a view using pointToPosition() just subtract
getFirstVisiblePosition().
On Mon, Sep 14, 2009 at 1:01 PM, Justin Anderson
janderson@gmail.com wrote:
I think we
All I have to do is change the code below to use a PendingIntent and pass
that to startActivity?
public void onReceive(Context context, Intent intent)
{
if (intent.getParcelableExtra(Intent.EXTRA_KEY_EVENT) !=
null)
{
Intent newIntent =
Don't make it a View... Make it a Button. Button inherits from TextView.
http://developer.android.com/reference/android/widget/Button.html
Thanks,
Justin
--
There are only 10 types of people in the world...
Those who know
Ok, that makes sense... It through me for a loop though, so I figured I
would post what I found just in case anyone else had a similar problem.
--
There are only 10 types of people in the world...
Those who know binary and those
This has been answered several times in this forum... just do a search in
the group for Gallery.
I would also recommend reading this article as well. You will usually get
more responses by following this advice, and the community page of the dev
guide recommends reading this before posting as
Awesome! I will try it tonight. Not very foolproof but it should work in
most cases. Apparently all I was missing was the priority.
Thanks for the help,
Justin
--
There are only 10 types of people in the world...
Those who
Look at the logcat info...
--
There are only 10 types of people in the world...
Those who know binary and those who don't.
--
On Wed, Sep 16, 2009 at 5:30 AM,
Mark,
Thanks for the reply but No Dice
When I change the $ to a . I get a ClassNotFoundException.
As far as . being the separator, I am aware of that but the Dev Guide was
very clear about using the $:
Taken directly from
http://developer.android.com/guide/topics/ui/custom-components.html:
It is a public non-static class.
Thanks,
Justin
On Sep 20, 2009 1:11 AM, skink psk...@gmail.com wrote:
On Sep 19, 8:13 am, MagouyaWare magouyaw...@gmail.com wrote: However,
this results in: java.l...
and what about its visibility? is it public?
pskink
{ ...
On Sep 20, 10:19 am, Justin Anderson janderson@gmail.com wrote:
It is a public non-static class.
Thanks,
Justin
On Sep 20, 2009 1:11 AM, skink psk...@gmail.com wrote:
On Sep 19, 8:13 am, MagouyaWare magouyaw...@gmail.com wrote:
However,
this results in: java.l...
and what
, 12:43 pm, martin-g ml mg.mli...@gmail.com wrote:
Did you provide the full name of the class ?
Something like com.mycompany.RunningTaskGallery ?
El dom, 20-09-2009 a las 09:57 -0600, Justin Anderson escribió:
Making it static doesn't change anything, except that I get
First, a little more information would be needed to help with the
debugging. Are you using the emulator or debugging on your phone?
Second, the blank screen that says No Notes Yet is the notepad
application. My guess is that if you press the menu button you will have an
option to create a note.
Are you trying to launch an activity that you created, or an arbitrary third
party app?
Thanks,
Justin
--
There are only 10 types of people in the world...
Those who know binary and those who don't.
In the last example given, it would be better to define strings like that in
an xml file as the Dev Guide suggests.
On Sep 22, 2009 7:10 AM, bennyb taw...@gmail.com wrote:
Yes it is actually better to use static classes for your constants.
e.g.
class C {
public static final String
.
--
On Thu, Sep 17, 2009 at 2:26 PM, Justin Anderson janderson@gmail.comwrote:
Awesome! I will try it tonight. Not very foolproof but it should work in
most cases. Apparently all I was missing was the priority.
Thanks for the help,
Justin
Ok, thanks!
--
There are only 10 types of people in the world...
Those who know binary and those who don't.
--
On Wed, Sep 23, 2009 at 8:09 PM, QTB QTB
I sometimes get this error. For me just disconnecting and reconnecting my
phone to my PC fixes it.
On Sep 23, 2009 12:10 PM, Terje Hitsoey thomerta...@gmail.com wrote:
I do not know your problem.Send a message to your programmer.Nice day.
2009/9/23 Pruthvi Raj pruthvi...@gmail.com
Hi, If i
.
--
On Thu, Sep 24, 2009 at 2:30 PM, Romain Guy romain...@google.com wrote:
The fix will probably not hppen for Eclair, sorry :(
On Sep 23, 2009 11:47 PM, Justin Anderson janderson@gmail.com
wrote:
Ok, thanks
Why not do this?
if (NumCanShootValue == null || NumCanShootValue.equals())
Of course, that is assuming NumCanShootValue is a String.
Thanks,
Justin
--
There are only 10 types of people in the world...
Those who know binary
Use a real phone... Of course, that would make debugging your app a little
difficult...
--
There are only 10 types of people in the world...
Those who know binary and those who don't.
Try implementing the AdapterView.OnItemSelectedListener interface...
Thanks,
Justin
--
There are only 10 types of people in the world...
Those who know binary and those who don't.
* That is definitely a puzzling behaviour, I suspect the fact you have no
content view is probably the cause.*
I tried giving it a LinearLayout but the result was the same.
* Is there any reason why you need the second activity? *
I'm doing this as a way to have both free and paid (or rather,
Typically you won't get much of a response when the word urgent is in your
tittle...
--
There are only 10 types of people in the world...
Those who know binary and those who don't.
Have you tried some testing to see what behavior you get?
Also, in my opinion, I wouldn't be messing with the screen brightness unless
there is a real good reason to. I have my phone settings set exactly how I
want them. If an app changed them without a VERY good reason I would be
extremely
One way would be to subclass the EditText class... You would then have
access to onTextChanged and could do whatever you want with it.
Thanks,
Justin
--
There are only 10 types of people in the world...
Those who know binary
And indeed there is... My last post was without referencing the docs.
However there is this:
addTextChangedListener(TextWatcher watcher)
Hope that helps.
Thanks,
Justin
--
There are only 10 types of people in the world...
Those
messing with the brightness would normally be a
bad idea, which is why I am curious if I needed to return it to what
it was or if it was app/activity centric.
I will do some testing once I have a phone to test on.
On Sep 29, 7:35 pm, Justin Anderson janderson@gmail.com wrote:
Have you
Ok, that is what I was thinking might be the case.
And that was a good point about the XML file. I had forgotten that the
shared preferences were stored in an XML file. I will switch it to use an
SQLite database.
When the docs say that the two programs are able to access each others data,
what
For the love of god, apparently not!
--
There are only 10 types of people in the world...
Those who know binary and those who don't.
--
On Thu, Oct 1, 2009 at
I found a way that works! And it is simple. A co-worker of mine has this
slogan on his whiteboard: Do the simplest thing that could possible work.
I have my main app, which contains both free and paid code. I also have an
app that acts as a key to unlock the pro version.
The following code
PM, Chi Kit Leung michaelchi...@gmail.com wrote:
Do you want to put into Android Market?
As I remember, they use the application namespace as a primary key.
So, you cannot install both of free and paid app in a same phone.
On Fri, Oct 2, 2009 at 8:17 AM, Justin Anderson janderson@gmail.com
Look at the Logcat output...
--
There are only 10 types of people in the world...
Those who know binary and those who don't.
--
On Fri, Oct 2, 2009 at 10:15
Use Intent.putExtra() to add the data you want to pass to the activity you
are starting. There are several different versions of putExtra depending on
the data you want to pass.
Then the activity you are starting can get that information from the bundle
that is passed in via onCreate().
I have
));
Does that look about right?
If so, how do I tell, in onCreate(), whether the Activity was started by
the user or by my BroadcastReceiver?
Thanks a lot,
Anders Feder
2009/10/5 Justin Anderson janderson@gmail.com
Use Intent.putExtra() to add the data you want to pass to the activity
I have already asked the same question, and later the solution on another
thread. Just do a quick search for code base and you will find out how to
do this.
If you have done this already, then you can ignore this, but a lot of
duplicate questions can be eliminated simply by searching for an
Batuka,
Please stop spamming the group with your question. This is the 3rd or 4th
such request I have seen. You probably have not gotten an answer because
your question is not very clear.
Thanks,
Justin
--
There are only 10
The default button background is not a color, but rather a 9-patch png
image. Your best bet would be to create a similar 9-patch png image in your
favorite image editing software that has a red background.
Thanks,
Justin
--
-only project, with each of your projects (paid
and free). The tough part is that you can't move anything that
references resources into a Java-only project.
On Oct 5, 11:58 am, Justin Anderson janderson@gmail.com wrote:
I have already asked the same question, and later the solution
unlocks features in the free app)?
Is there a way where a user could download just the paid app?
On Mon, Oct 5, 2009 at 1:34 PM, Justin Anderson
janderson@gmail.comwrote:
The method is to have a main application and an application that acts a
key to unlock functionality in the main app
, Oct 5, 2009 at 1:34 PM, Justin Anderson
janderson@gmail.comwrote:
The method is to have a main application and an application that acts a
key to unlock functionality in the main app. You can't upload two
products with the same package to the android market.
Doing it the way I described
:
DoSomething(myBundle.getBundleExtra(x));
Does that look about right?
If so, how do I tell, in onCreate(), whether the Activity was started by
the user or by my BroadcastReceiver?
Thanks a lot,
Anders Feder
2009/10/5 Justin Anderson janderson@gmail.com
Use Intent.putExtra() to add
for a while but didn't
find anything there.
On Oct 6, 4:54 am, Justin Anderson janderson@gmail.com wrote:
* what's missing from the market is dependencies. *
I wholeheartedly agree...
* i often had the idea of publishing an app that is just a service for
use by other apps
What exactly are you trying to do with this icon?
You can get the icon of an installed application on your phone via
PackageManager.getActivityIcon() or PackageManager.getApplicationIcon().
http://developer.android.com/reference/android/content/pm/PackageManager.html
Thanks,
Justin
As far as I am aware the only way to do that is to either specify the
minimum SDK version as 1.1 and only use features from that SDK (it should
still run on 1.5 and 1.6) or to have separate apps with different packages,
etc...
Thanks,
Justin
onCreateContextMenu() is called when you long-press (roughly 2 seconds) on
the note itself...
The menu button is not supposed to be used to display menus that change
based on the current context... it is for menus that do not depend on a
selection, like Settings, Help, etc...
Hope this helps,
Do some debugging work...
The PackageManager can give you a list of all applications on your phone.
Step through them and find the Camera application and note the package name
of the camera application.
Assuming you have done that, you can do something similar to the following
(obviously putting
Anyone?
--
There are only 10 types of people in the world...
Those who know binary and those who don't.
--
On Fri, Oct 9, 2009 at 3:42 PM, Tikoze
here again.
On Sep 30, 6:35 am, Justin Anderson janderson@gmail.com wrote:
My apologies if I seemed a little curt in my original response.
There are quite a few people who post questions without doing any work
for
themselves to find an answer... and I had already answered two
What does the XML for your res/layout/main.xml look like?
Thanks,
Justin
--
There are only 10 types of people in the world...
Those who know binary and those who don't.
Looks like the tutorial you are using is from the 1.1 SDK In 1.5 that
method was removed and replaced with openOrCreateDatabase().
http://www.mail-archive.com/android-beginners@googlegroups.com/msg11654.html
Unfortunately, I have not done anything with databases in Android yet and so
I
AFAIK, you can only use views supported by RemoteViews. You might consider
using a live folder (not sure if that is exactly what it is called but that
is what Docs To Go calls it) instead, since that allows you to display a
list when you open the folder.
Thanks,
Justin
Seriously? You have already been given the link:
1) http://groups.google.com/group/android-beginners
2) Sign in with your gmail account
3) Click Edit My Membership
4) Click Unsubscribe
--
There are only 10 types of people in
Why?
--
There are only 10 types of people in the world...
Those who know binary and those who don't.
--
On Wed, Oct 14, 2009 at 8:28 PM, kami
This forum is for SDK applications... not android source.
Your questions should be asked in the Android Developers group.
--
There are only 10 types of people in the world...
Those who know binary and those who don't.
This group is for questions aboud SDK applications.
Your question should be posted in the Android Developers group.
--
There are only 10 types of people in the world...
Those who know binary and those who don't.
It doesn't appear that closeActivity() is ever being called
--
There are only 10 types of people in the world...
Those who know binary and those who don't.
Rename, build, fix the errors! ;-)
On Oct 18, 2009 8:34 AM, jax jackma...@gmail.com wrote:
Hi, the development environment in eclipse is quite good but I the
XML support seems a little limited. For example, I can't refractor
properly. For example, if I rename a string in my resources it
You can try DroiDoc, available on the Android Market
--
There are only 10 types of people in the world...
Those who know binary and those who don't.
--
On Mon,
, and my phone
(like my other references) while I work on my Android applications.
Thanks again,
Corey
On Oct 20, 6:31 pm, Justin Anderson janderson@gmail.com wrote:
You can try DroiDoc, available on the Android Market
--~--~-~--~~~---~--~~
You
We'd have to see some code to be able to help
--
There are only 10 types of people in the world...
Those who know binary and those who don't.
--
On Wed,
Ummm... What?
--
There are only 10 types of people in the world...
Those who know binary and those who don't.
--
On Wed, Oct 21, 2009 at 4:31 AM, pinkee
Try giving the view a higher layout weight in the xml...
android:layout_weight=
Thanks,
Justin
--
There are only 10 types of people in the world...
Those who know binary and those who don't.
1 - 100 of 691 matches
Mail list logo