Flash Websites on Galaxy3!! - Galaxy 3 General

Hi all,
Flash is working on my phone for some websites..how is it possible when our processor does not support flash?
I tried https://www.capitaliq.com

and where's flash on this site?
try this for example and tell us results
wechoosethemoon.org

Thats not flash, its Javascript

ohhh...so you mean to say that capitaliq one is moving image and not flash....i thought flash and moving image are the same thing...aren't they?

no ^^ you can also move images with javascript

thanks....now, i am very confused about what flash is: can anyone please give me one sentence definition for this?

Let me introduce you to a cool page that has no flash: http://www.google.com
Wikipedia said:
Adobe Flash is a multimedia platform used to add animation, video, and interactivity to web pages.
Click to expand...
Click to collapse
P.S. Its not that our processors dont support flash, its that flash doesn't support our processors.

thanks...one last time...how do you come to know that capitaliq one is javascript...can you please let me know that?

usually you can tell just by looking, if not taking a look at the page source solves that. It's not the same in each browser, but usually its right click->view page source (or something similar)

Thanks....I already took a look at it but could not figure out by that also..that is why I asked...

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>
Capital IQ - Our Products: Company and Market Research, Financial Analytics, Screening, and Relationship Management Tools for Financial Professionals
</title><meta name="google-site-verification" content="-i30sEypcCfc45w16BqhrLZOAIZ2qvwBczyDuRx5swI" /><meta name="keywords" content="Capital IQ, Financials, Business, Investment" /><meta name="description" content="Capital IQ is a leading provider of data and analytics for global financial professionals. We founded our business in 1999, and now work with over 4,200 client firms, including many of the world's most successful investment banks, asset management firms, private equity firms, universities, and corporations." /><link rel="SHORTCUT ICON" href="http://www.capitaliq.com/favicon.ico" /><link type="text/css" rel="stylesheet" href="/css/styles.css" /><link type="text/css" rel="stylesheet" href="/css/960.css" /><link type="text/css" rel="stylesheet" href="/css/jkmegamenu.css" /><link type="text/css" rel="stylesheet" href="/css/%5BCOG%5DNavigation.css" /><link type="text/css" rel="stylesheet" href="/css/jQueryUITabs.css" /><link type="text/css" rel="stylesheet" href="/css/jQueryUITheme.css" />
<!-- CIQ Urchin JavaScript -->
<script type="text/javascript" src="/urchin.js"></script>
<script type="text/javascript">
_userv = 0;
urchinTracker();
</script>
This is the beginning of the source code for that site? Do you see javascript anywhere?

Yes..I saw Javascipt in there but did not got if that is for that element of the page with moving images...

use ctrl u to view source
or add
view-source:
before the address without
to view source code

cdesai said:
use ctrl u to view source
or add
view-source:
before the address without
to view source code
Click to expand...
Click to collapse
Is that browser independent?

stubborn_d0nkey said:
Is that browser independent?
Click to expand...
Click to collapse
works for chrome and firefox. I'm not sure if it works for IE my guess - it is not

Related

Surveilance Video Feed via Java on the PPC???

This might not be completely Wizard related, but thats what I have so I'll shoot. I was wondering if anyone had any idea on where to start looking for an ap to view Video Feeds from Security Cameras that are normally accessed via a Java Applet in IE. Like is there possibly a Java app that can display a feed that would be seerate of PIE? Maybe a program that can be changed or slightly modified?
The provider/manufacturer of the equipment doesn't offer anything. Their newer equipment uses ActiveX Controls rather than Java so maybe an upgrade could help? Any ideas/help would be appreciated.
The Company has a Demo of the Java Applet that is used to view the feeds. Same as we use for the bar but we only have 9 feeds. Viewing one feed at a time would be perfectly fine and probaly desired on the smaller screen.
See the demo here...
http://208.50.31.214/ Java VM Page. Login for the Demo is admin : admin
Any Ideas??
Cliffs: Can anyone think of a way to view the feeds in the demo above on a PPC? Java VM related...
ANy good places to go for Java related resources for the WM5? I would like to at least play around with it. Maybe try to tweak and work up a different solution. Any help would be appreciated.
pookrat said:
Maybe try to tweak and work up a different solution. Any help would be appreciated.
Click to expand...
Click to collapse
I'd just hold out for a real browser than can display your java-based feed. Never fear, one's coming...
See: Skyfire.
Take a look: http://webcam-holmes.en.softonic.com/pocket
If your desired feed is actually a "Webcam" then this might be the ticket for you...
SkyFire looks promising. Can't wait to get my hands on a copy. Maybe a Beta a little early?
pookrat said:
Maybe a Beta a little early?
Click to expand...
Click to collapse
Good luck. I think they've passed them all out already, and the licenses are utterly non-transferable, so any beta copies that have been shared out have been unusable by anyone but the authorized recipient.
There's a thread on this board (somewhere, you search...I don't want to) that includes a copy. Your mileage may vary, but I don't think anyone's been able to use it yet.
One last note of caution: Skyfire's license agreement clearly states that they can, if they wish, capture all data transferred to and from (this includes keystrokes, BTW) websites. Privacy on their browser is not reality. This means, for example, if your camera feed was providing illicit or illegal images (like a voyeur cam in a public restroom, for example), they can, and presumably will, point the finger at you. This may change in the future, but hey, they've gotta protect themselves, if they're acting as a go-between for the web and dirty, untrustworthy end-users.
pookrat said:
This might not be completely Wizard related, but thats what I have so I'll shoot. I was wondering if anyone had any idea on where to start looking for an ap to view Video Feeds from Security Cameras that are normally accessed via a Java Applet in IE. Like is there possibly a Java app that can display a feed that would be seerate of PIE? Maybe a program that can be changed or slightly modified?
The provider/manufacturer of the equipment doesn't offer anything. Their newer equipment uses ActiveX Controls rather than Java so maybe an upgrade could help? Any ideas/help would be appreciated.
The Company has a Demo of the Java Applet that is used to view the feeds. Same as we use for the bar but we only have 9 feeds. Viewing one feed at a time would be perfectly fine and probaly desired on the smaller screen.
See the demo here...
http://208.50.31.214/ Java VM Page. Login for the Demo is admin : admin
Any Ideas??
Cliffs: Can anyone think of a way to view the feeds in the demo above on a PPC? Java VM related...
Click to expand...
Click to collapse
Most Java VM's for Windows Mobile are not robust enough to handle Java webcams. At least that's been my experience. I have a Toshiba IK-WB11A webcam in my house. It also uses Java and I've tried PIE, Opera, Minimo, and other WM browsers - none will work.
The only work around I'm aware of is to deconstruct the Java Script to see where / how the webcam is streaming the "video". I was able to do that by loading up and opening all the HTML pages that my webcam served to my PC browser (Firefox > View > Page Source). Typically the video stream is in fact just a JPG that's refreshed every fraction of a second. Once you identify the JPG path / name you can open it directly. Or if you're ambitious you could create your own simple HTML page, add the JPG image, and add some code to auto-refresh in PIE. Something like this code should do the trick...
<meta http-equiv="refresh" content="10;url=http://path/to/my/image/page.html"/>
Ok I am looking for the same thing mate and doing a little search for web goodies to work on the phone . If anybody has any ideas or software let us know.
http://www.getjar.com/products/11112/QSpyCam
http://www.getjar.com/products/13204/LiveStream
wyzepro said:
http://www.getjar.com/products/11112/QSpyCam
Click to expand...
Click to collapse
Nice link I will test it out .

dynamically setting image resources

greetings
was referred to this forum from someone at androidcommunity.com regarding this...
i searched the forum but couldnt find any relevant posts - can anyone point me in the right direction for doing this properly?
specifically how could one set an image resource based on a string variable being used for part of the image's file name
i tried this based on a post i saw elsewhere:
myContext.getResources().getIdentifier(myStringVariable + "_thumbnail", "drawable", myContext.getPackageName()));
but it returnes a string(or an integer?) of numbers (the resource id?) that setImageResource couldnt use unless i just wasnt doing it properly.
is there perhaps a way to get the resource name based on that id number or whatever it is that im getting?
apreesh
33 views
dang
getIdentifier() returns int and yes, it could be used in setImageResource() method.
But why you want to set resources from strings?
because the image being set is based on user selection and is not just one image its several associated images so there is a number sequence to the image file names as well that i did not show in the snippet i posted.
but i went back and plugged some of those returned values (resources ids?) from getIdentifier() into setImageResource() and it does indeed work so thanks for that - i have an idea what i was doing wrong before but for the sake of moving on im using a different solution now - in short i am now defining each group of images as a separate class member int[] and i will probably use a switch case to plug the correct one into the gridview. its ugly, but i currently only have 11 different groups and no more than 16 images per group so it will work for now until i can study the resource object more and figure out a way to get counts of associated image resources based on a part of the resource name, like with a regular expression or something, because thats the next problem i will have to deal with if i am not pre-defining all of these arrays.
if you know of a way to do that that would be awesome but ill will probably look into it more myself once i get this app closed up and can go back and fix stuff. im pressed for time right now.
thanks
It's really bad thing to use getIdentifier() method, we should always use R class. I think your problem resides somewhere before, you try to do something, that you shouldn't
How do you get these strings? You mentioned they are from user, but he doesn't write them by hand, right? If this is some selectable list, etc., they should be ints, enums, or some objects from the beginning. Not strings. Parsing strings is always ugly.
Ahh and if you have group of many small images, it is usually better to concatenate them into one big image - it's more efficient and you don't have to use 200 R constants in your code.
the string comes from the tag associated with a clickable imageView selected from the previous screen - a menu item if you will. the string will serve several purposes, retrieving related data, etc, but the first thing i needed to work out was retrieving the correct images and displaying them. i dont know how i could concatenate the images into one big image because each one needs to be clickable itself and handle certain events associated with itself.
i will go ahead and admit this is my first app so im basically figuring stuff out as i go. and learning most of my oop from flash has probably handicapped me
i appreciate your help dude
Brut.all said:
it's more efficient and you don't have to use 200 R constants in your code.
Click to expand...
Click to collapse
the only other thing i could think of trying was creating an xml doc to group the associated resource names together and figure out how to read from that to know which images to set
i dont see any methods in the R class i could use for sorting, grouping and then retrieving certain resources based on user interaction
switch cant eval string types...!?
kadmos said:
switch cant eval string types...!?
Click to expand...
Click to collapse
Nope
As I said, strings aren't good for identifying things - regardless of the language used. This is why people created int constants and/or enums.
And no, I doubt there are some mechanisms of grouping resources, etc. It must be simple, you are trying to complicate everything
I have a strong feeling that you should change your app architecture and get rid of strings. But here quick general fix (not a good solution! but just works).
Map your strings to R ints:
Code:
Map<String, Integer> map = new HashMap<String, Integer>();
map.put("button_normal", R.drawable.button_normal);
map.put("button_pressed", R.drawable.button_pressed);
// etc
Accessing will be done:
Code:
map.get("button_" + state); // Return int id, use as you need.
This is a bad practice, but it will work. Consider re-archirecturing your app.
@Brut.all: do you have any plans on updating apktool with 2.2 support?
@kadmos
Full example:
Code:
public static enum Planet {
MERCURY(R.string.planet_mercury, R.drawable.planet_mercury),
VENUS(R.string.planet_venus, R.drawable.planet_venus),
EARTH(R.string.planet_earth, R.drawable.planet_earth),
MARS(R.string.planet_mars, R.drawable.planet_mars);
public final int nameResId;
public final int imageResId;
public static Planet findByNameResId(int nameResId) {
for (Planet p : values()) {
if (p.nameResId == nameResId) {
return p;
}
}
return null;
}
private Planet(int nameResId, int imageResId) {
this.nameResId = nameResId;
this.imageResId = imageResId;
}
}
You have enum of planets, each of them has its name and image. Then you could do something like:
Code:
@Override
public boolean onCreateOptionsMenu(Menu menu) {
for (Planet planet : Planet.values()) {
menu.add(0, planet.nameResId, 0, planet.nameResId);
}
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
Planet planet = Planet.findByNameResId(item.getItemId());
doSomethingWithPlanetImage(planet.imageResId);
return true;
}
You identifies planets by ints (nameResId in this example - of course it must be unique), not by strings. Operations on ints are several times faster, than on strings, this is why Google decided to identify all things: resources, menu items, etc. just by ints.
Ahh and no, writing switch-cases to do something depending on given object isn't true OOP. OOP is above: enums know, which drawable is connected to them, there is no need for switches.
AuxLV said:
@Brut.all: do you have any plans on updating apktool with 2.2 support?
Click to expand...
Click to collapse
Yeah, of course, I want to work on apktool this weekend. Unfortunately baksmali doesn't support Froyo yet, so I can't support it fully neither.
@Brut.all:
Ha, I recognise that example It's from the Java Trail/tutorial on enums isn't it? Except they used gravity rather than drawable references.
@kadmos:
Are all the images known from the beginning? In other words, is the user creating them at runtime or are you including them with your app? If they are included with your APK then normally, as Brut said, you should be able to use the identifiers directly.
Concatenating the images all into one isn't hard to do, as you can still draw the specific bitmaps out using the Bitmap.create(bitmapToGetAPartOutOf, ....) method. You can then make those individual bitmaps into ImageViews and only have to remember the 'grid reference' for where they came out of the big image. That said, you'd have to balance the added complexity of creating the big images against the ease of not having loads of R constants. I can't really say anymore because I'm not fully following what you're trying to achieve.
Steven__ said:
@Brut.all:
Ha, I recognise that example It's from the Java Trail/tutorial on enums isn't it? Except they used gravity rather than drawable references.
Click to expand...
Click to collapse
I took planets example, because it's good, but everything was written from scratch
Steven__ said:
Concatenating the images (...)
Click to expand...
Click to collapse
I'm pretty sure I saw this concatenating approach somewhere in official Android's guidelines for performance, but now I can't find it :-/ Also I don't have much experience in Android development, so if no one else suggest this approach, then I think kadmos could forget about it.
Brut.all said:
You identifies planets by ints (nameResId in this example - of course it must be unique), not by strings. Operations on ints are several times faster, than on strings, this is why Google decided to identify all things: resources, menu items, etc. just by ints.
Ahh and no, writing switch-cases to do something depending on given object isn't true OOP. OOP is above: enums know, which drawable is connected to them, there is no need for switches.
Click to expand...
Click to collapse
i know its not true oop i didnt want to have to do that but i have not yet seen a way to pass any value from a selected item into a method that could use that value to retrieve x amount of associated resources (images in this case).
Steven__ said:
Are all the images known from the beginning? In other words, is the user creating them at runtime or are you including them with your app? If they are included with your APK then normally, as Brut said, you should be able to use the identifiers directly.
...I can't really say anymore because I'm not fully following what you're trying to achieve.
Click to expand...
Click to collapse
using the planets example, say i had x (varying) amount of pics of each planet's surface in my drawables and wanted only those planet's pics to display in a grid view when a user selects whichever planet. thats really all this is. being new to this i just dont know the most efficient way to do it. if this was Flash i could just group all the images file names/paths in an external xml doc and use that to load them from whatever folder at runtime - i wouldnt need any of those 200 or so images declared as anything or even as assets in my library (and i would only need the xml because flash cant access a file system on its own to see and filter files that it would or wouldnt need based on, say, a string comparison - though there is third party software like Zinc that gives Flash that capability.)
so i did get this to work by passing a number as a tag (string) in a bundle though an imageView click event and then casting the string as an int to use in the switch - which as of now leads to one of 11 different int arrays of resources names (images) ive got declared in my ImageAdapter class to populate my gridView.
the way i wished i could made this work would have been to use a string (like a planet name) ,passed from whatever planet image/menu item/whatever was clicked, and use that string to compare and determine which and how many images in drawables were associated with that planet and then use that to create my gridView at runtime.
kadmos said:
so i did get this to work by passing a number as a tag (string) in a bundle though an imageView click event and then casting the string as an int to use in the switch - which as of now leads to one of 11 different int arrays of resources names (images) ive got declared in my ImageAdapter class to populate my gridView.
Click to expand...
Click to collapse
I see what you're saying, that makes sense. Just as a quick note though, if you're declaring your ImageViews programmatically, you don't have to use a string object for the tag. You can directly give the integer and then cast it back when you get the tag. Just remember to use (Integer) as the tag is actually just an unspecified object.
kadmos said:
the way i wished i could made this work would have been to use a string (like a planet name) ,passed from whatever planet image/menu item/whatever was clicked, and use that string to compare and determine which and how many images in drawables were associated with that planet and then use that to create my gridView at runtime.
Click to expand...
Click to collapse
Yes, I can see why you'd want to do it this way. Your current problem is that if you add more images, you have to manually update your arrays. Unfortunately I can't think of a better, 'clean' way of doing it.
@kadmos
Now I have problems understanding you ;-) But if you don't want to declare all images in sources, but in XMLs, then you could use XML arrays.
Code:
<resources>
<string-array name="planet_names">
<item>mercury</item>
<item>venus</item>
<item>earth</item>
<item>mars</item>
</string-array>
<integer-array name="planet_images">
<item>@array/mercury_images</item>
<item>@array/venus_images</item>
<item>@array/earth_images</item>
<item>@array/mars_images</item>
</integer-array>
<integer-array name="mercury_images">
<item>@drawable/mercury_0</item>
<item>@drawable/mercury_1</item>
<item>@drawable/mercury_2</item>
</integer-array>
<integer-array name="venus_images">
<item>@drawable/venus_0</item>
<item>@drawable/venus_1</item>
<item>@drawable/venus_2</item>
</integer-array>
<integer-array name="earth_images">
<item>@drawable/earth_0</item>
<item>@drawable/earth_1</item>
<item>@drawable/earth_2</item>
</integer-array>
<integer-array name="mars_images">
<item>@drawable/mars_0</item>
<item>@drawable/mars_1</item>
<item>@drawable/mars_2</item>
</integer-array>
</resources>
When user will open planet selector, you will iterate through contents of R.array.planet_names array, each item (planet) in this selector will have itemId set to array index. When user will click on something, you will get itemId of clicked item, then you will find array of its images as R.array.planet_images[itemId] (not exactly - it's conceptual example).
You will be able to add new images or even planets through XML editing.
Steven__ said:
Yes, I can see why you'd want to do it this way. Your current problem is that if you add more images, you have to manually update your arrays. Unfortunately I can't think of a better, 'clean' way of doing it.
Click to expand...
Click to collapse
Brut.all said:
But if you don't want to declare all images in sources, but in XMLs, then you could use XML arrays...
...You will be able to add new images or even planets through XML editing.
Click to expand...
Click to collapse
as i posted earlier this was the idea that i had - i havent tried it yet because i wanted to get some feedback from you guys just to see if i was completely off base. so right now its coming down to what would make for the more memory efficient final product - declaring all these images as class array constants (which i already have working) or using xml and coding the operations for parsing, counting, filtering, assigning, etc?
again thank you guys for your time and help
kadmos said:
or using xml and coding the operations for parsing, counting, filtering, assigning, etc?
Click to expand...
Click to collapse
Do you mean parsing XMLs? My example above uses standard Android resources. You don't have to parse these XMLs, you will get them as arrays And yes, it's super efficient, because they are compiled to easy-to-read form
ok then im going to go ahead and try it
be back soon
i hope

[Q] Emulator to Phone wth!

So my game and all of it's several revisions have worked great in the Emulator, but for whatever reason, my games will not work on ANY Android Phone !!! I've tried 4 types.
All it does is show me my background and nothing in the foreground. No events, sounds, nothing.
So why does most of Googles stuff FAIL SO BAD!!! when people try to use it?
What do you guys use?
I am a graphics artist and I have 3 games ready that look killer, but cannot get them to a market or even a phone.
So do I leave android, or are there solutions for getting things from Eclipse/SDK-ADV to a running state on a freaking phone?
mmm what are you using for the games: canvas, opengl es 1.0 JSR 239 or opengl es 2.0? which devices are you trying to run them into? are the device screen size in the same resolution that the emulator?
Though i really don't see this problem in opengl since the emulator does not have graphics acceleration... So you are using canvas, right? have you check that all your imports are compatible with the version of android of the phones you are testing them? remember that canvas is not accelerated on phones, whereas in the emulator it is, so maybe, if it is too graphic intensive, that might be part of your problem
I've never run into this problem, but I use mostly opengl frameworks, that btw are a pain in the ass to debug with the emulator but work great on the phones (5 vs 40-60 fps)...
For 2d I use andengine, its an opensource gl es 1.0 framework, compatible with devices from 1.6
For physics I use Box2d, that it is an opensource physics jni framework compatible from 2.* if i recall right.
For 3d i have not done anything yet. But you could try using opengl or there is a port of an opensource java 3d framework, can't recall its name, but it was something like jp**-ae i think, probably someone would say its name or you may find it using the search of the forum, cause i read that one in a post from here a few months ago...
I personally don't use canvas, since i find andengine much more usefull and faster for 2d...
I am loading all the graphics/buttons via the xml layout using LinearLayout.
I recently read that "fill_parent" is a bad idea in the layout.xml so I replaced those with "wrap_content"...still have yet to test on the phone.
I am basically just trying to the SkellyApp to even run on my phone, not even snake will go onto it.
I do not use canvas, gps, bluetooth or anything, just touch stuff and text.
I'm still left confused
Here are the Imports I am using;
import android.app.Activity;
import android.content.res.Configuration;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.view.MotionEvent;
import android.media.MediaPlayer;
import android.media.MediaPlayer.OnCompletionListener;
import android.view.View.OnTouchListener;
import java.util.Random;
you still missing something for us to see what the error is
the fill_parent / wrap_content are just properties, is not that its going to produce that error... it is recommended to use RelativeLayout, just for making it easier to port it to different screen sizes
if you don't want to mess much with the layout settings you could use droiddraw (droiddraw.org)
other than that I don't know what you are doing wrong, have you try logcat to see if you spot an error somewhere? you will probably find your answer there...
I appreciate you sticking with me on this...here is my layout file...is there a problem with me using 2 Linears?
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content" android:layout_height="wrap_content"
androidrientation="horizontal"
android:background="@drawable/bg2"
>
<LinearLayout
android:layout_width="wrap_content" android:layout_height="wrap_content"
androidrientation="horizontal"
>
<!-- android:background="@drawable/blank"-->
<Button android:id="@+id/back" style="@style/ActionButton"
android:text="@string/back"
android:layout_width="45dip"
android:layout_height="45dip"
android:layout_alignParentLeft="true"
android:layout_marginLeft="44dip"
android:layout_marginTop="2dip"
android:layout_alignParentTop="true"
android:layout_centerInParent="true"
android:layout_gravity = "center"
android:background="@drawable/green"
/>
<Button android:id="@+id/clear" style="@style/ActionButton"
android:text="@string/clear"
android:layout_width="45dip"
android:layout_height="45dip"
android:layout_alignParentLeft="true"
android:layout_marginLeft="-12dip"
android:layout_marginTop="35dip"
android:layout_alignParentTop="true"
android:layout_centerInParent="true"
android:layout_gravity = "top"
android:background="@drawable/green"
/>
</LinearLayout>
<Button android:id="@+id/butone"
android:text="@string/butone"
android:layout_width="65dip"
android:layout_height="65dip"
android:layout_marginLeft="-349dip"
android:layout_marginTop="158dip"
android:layout_alignParentBottom="true"
android:layout_centerInParent="true"
android:layout_gravity = "bottom"
android:background="@drawable/glow1"
/>
<Button
android:id="@+id/b3i"
android:text="@string/b3i"
android:layout_width="120dip"
android:layout_height="120dip"
android:layout_marginLeft="-120dip"
android:layout_marginTop="95dip"
android:layout_alignParentBottom="true"
android:layout_centerInParent="true"
android:layout_gravity = "top"
android:background="@drawable/b3"
/>
<TextView android:id="@+id/text1"
android:layout_marginLeft="-89dip"
android:layout_marginTop="27dip"
android:layout_width="50dip"
android:layout_height="30dip"
android:textStyle="bold"
android:textColor="#B9B888"
android:freezesText="true"
/>
<TextView android:id="@+id/text2"
android:layout_marginLeft="12dip"
android:layout_marginTop="201dip"
android:layout_width="50dip"
android:layout_height="30dip"
android:textStyle="bold"
android:textColor="#B9B888"
android:freezesText="true"
/>
<TextView android:id="@+id/text3"
android:layout_marginLeft="-160dip"
android:layout_marginTop="201dip"
android:layout_width="50dip"
android:layout_height="30dip"
android:textStyle="bold"
android:textColor="#B9B888"
android:freezesText="true"
/>
<Button
android:id="@+id/exitbutton"
android:layout_width="35dip"
android:layout_height="35dip"
android:layout_marginLeft="222dip"
android:layout_marginTop="-37dip"
android:layout_alignParentBottom="true"
android:layout_centerInParent="true"
android:layout_gravity = "top"
android:background="@drawable/exit"
/>
</LinearLayout>
you could debug your apps on the device using eclipse and see from the logcat where things go wrong
these may help
Code:
http://forum.xda-developers.com/showthread.php?t=821022&highlight=debugging
http://dotnet.dzone.com/articles/android-and-windows-phone-7-%E2%80%93
thank you I will look at those.
Is my layout XML file (look above) correctly structured, etc. ?
your xml is ok. i ran it on my phone and its loading just fine (it displays the same thing as the emulator)
nemoc 23 said:
your xml is ok. i ran it on my phone and its loading just fine (it displays the same thing as the emulator)
Click to expand...
Click to collapse
Thanks again for your help, I'm glad it's working...guess I am learning something
Oh boy...so I created more AVD's using the other size options like 400,432,800,854, and my XML Layout above puts my buttons in different screen locations depending on the AVD used, only the default and the 432 show it the way I need.
How does a person go about making sure their buttons are in the same spot every time for all resolutions using the XML Layout, or another version of mine in the post above?
Sorry to ask for another favor, but this seems too nebulas for me to grasp atm, so a push in the right direction would be great
What were the four devices you tried. Even simple applications can change depending on the devices oem. I have a HTC Droid Incredible and simple things like radio buttons look different than the emulator, so I would see if it is an HTC/Samsung/whatever problem rather than an android problem. I could be wrong, but I have noticed that simple things change, so why not more complex things?
LuvinAndroid said:
Oh boy...so I created more AVD's using the other size options like 400,432,800,854, and my XML Layout above puts my buttons in different screen locations depending on the AVD used, only the default and the 432 show it the way I need.
How does a person go about making sure their buttons are in the same spot every time for all resolutions using the XML Layout, or another version of mine in the post above?
Sorry to ask for another favor, but this seems too nebulas for me to grasp atm, so a push in the right direction would be great
Click to expand...
Click to collapse
It seems that using linear layouts as a base caused the different resolutions to not be created the same. I use a single relative layout as the parent layout, and several views (text, image) and buttons and center everything. I would try surrounding the current xml in a single RelativeLayout, and if that doesn't work, then try breaking each LinearLayout up and converting them to RelativeLayouts (which may seem like a pain because you have to make every item's position relative to the items around it, so it can be tricky to position them exactly right). You could also use a combination of Relative and Linear Layouts to achieve the look and feel you desire for the overall layout. Hope this helps

Very new to Android, not so much to JAVA

Can anyone guide me to a guide/tutorial or anything that complements or compares Android and JAVA programming? For example, the classes in Android that are not in JAVA, or how classes in JAVA (such as Scanner for the keyboard) are used/translated into Android. I'm trying to make a very simple app where a user will input numerical scores for 3 players (this is the money lost by the players), and then these numbers are added, and that becomes the score for the fourth player (this is the money gained by the player who won). Now, this would be quite simple with JAVA, but I have no idea how to do it in Android. I've done the "MyFirstApp" that Android has on its website, but that's more copy this code into Android Studio and done. If someone could link me to a guide that possibly references JAVA (the only programming language I know), I believe it'd be much easier to catch up with what is happening and how.
Thank you.
TextOnScreen said:
Can anyone guide me to a guide/tutorial or anything that complements or compares Android and JAVA programming? For example, the classes in Android that are not in JAVA, or how classes in JAVA (such as Scanner for the keyboard) are used/translated into Android. I'm trying to make a very simple app where a user will input numerical scores for 3 players (this is the money lost by the players), and then these numbers are added, and that becomes the score for the fourth player (this is the money gained by the player who won). Now, this would be quite simple with JAVA, but I have no idea how to do it in Android. I've done the "MyFirstApp" that Android has on its website, but that's more copy this code into Android Studio and done. If someone could link me to a guide that possibly references JAVA (the only programming language I know), I believe it'd be much easier to catch up with what is happening and how.
Thank you.
Click to expand...
Click to collapse
https://www.youtube.com/watch?v=QAbQgLGKd3Y
TheNewBoston has some good tutorials for beginners (personal experience)
For text input you can use EditText which extends the View class. They are all java classes. In the xml layout of your activity you add a new edittext:
activity_main.xml:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<EditText
android:id="@+id/activity_main_et"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<Button
android:id="@+id/activity_main_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="GET"/>
</RelativeLayout>
the id is important. You will use it to "find" the view from the java code.
Then in the activity(java) you will use their methods to set and get the needed info:
activity_main.java
public class MainActivity extends ActionBarActivity {
@override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
final EditText et = (EditText) findViewById(R.id.activity_main_et);
Button btn = (Button) findViewById(R.id.activity_main_btn);
btn.setOnClickListener(new View.OnClickListener() {
@override
public void onClick(View v) {
// do whatever you like when the button is clicked
et.setText(et.getText() + " +"); // just some random stuff
}
});
}
}
Hope this helps. Good Luck
TextOnScreen said:
Can anyone guide me to a guide/tutorial or anything that complements or compares Android and JAVA programming? For example, the classes in Android that are not in JAVA, or how classes in JAVA (such as Scanner for the keyboard) are used/translated into Android. I'm trying to make a very simple app where a user will input numerical scores for 3 players (this is the money lost by the players), and then these numbers are added, and that becomes the score for the fourth player (this is the money gained by the player who won). Now, this would be quite simple with JAVA, but I have no idea how to do it in Android. I've done the "MyFirstApp" that Android has on its website, but that's more copy this code into Android Studio and done. If someone could link me to a guide that possibly references JAVA (the only programming language I know), I believe it'd be much easier to catch up with what is happening and how.
Thank you.
Click to expand...
Click to collapse
I started with watching this series of YouTube videos http://www.mybringback.com/series/android-basics/
AKA "MyBringBack" on YouTube channel.
Mind you I had no idea of what any kind of programming consisted of at the time, and have now had 5 apps published on Google Play (albeit, some pretty basic), all thanks to these videos and StackOverflow. I also believe this "Travis" in the video is the same as TheNewBoston. Either way, they are both GREAT starting points! Good luck, determination will get you where you want to be.
Happy Coding!

How To Make A Live Tile That Regularly Updates From A Website

Hello,
I created a Windows Vista/7 Gadget to gather weather information from the following site: http://orsl.montana.edu/weather/ORSLweather.php. This is basically an image that updates every five minutes with the latest data from a weather station at a University. Pinning the site doesn't create a tile that actively shows the latest image, so I am trying to create a live tile for use with Windows 8/10. While I have some coding experience, I am not a programmer and am getting stymied making this seemingly simple task occur. I will copy the XML and HTML files I used for the Gadget I created in the hopes that it will help out. Thanks in advance for any help!
**** GADGET-XML ****
<?xml version="1.0" encoding="utf-8" ?>
<gadget>
<name>MSU Weather</name>
<namespace>
<!--_locComment_text="{Locked}"-->microsoft.windows
</namespace>
<version>1.2</version>
<logo src="logo.png"/>
</author>
<copyright>July 29, 2008</copyright>
<description>Gadget based on the MSU COE Weather Page</description>
<icons>
<icon height="180" width="120" src="icon.png"/>
</icons>
<hosts>
<host name="sidebar">
<base type="HTML" apiVersion="1.2.0" src="MSU_Weather.html" />
<permissions>full</permissions>
<platform minPlatformVersion="0.3" />
<defaultImage src="drag.png"/>
</host>
</hosts>
</gadget>
**** GADGET-HTML****
<html>
<head>
<style>
body {
width:120;
height:180;
background-image:url('http://orsl.montana.edu/weather/ORSLweather.php');
}
</style>
<script>
function loaded()
{
window.setInterval(refreshImage, 60 * 1000);
}
function refreshImage()
{
window.location.reload(true);
}
</script>
</head>
<body onload="loaded()">
</body>
</html>
May try to create an application http://appstudio.windows.com/en-us
maxaon09 said:
May try to create an application http://appstudio.windows.com/en-us
Click to expand...
Click to collapse
Thanks for the info - I never knew this existed. Unfortunately it doesn't seem to create a 'live' tile - meaning one that updates regularly. The weather info updates every five minutes, so I am looking to make a tile that will look for the updated image similar to how the gadget I made did.
Actually, only applications can create live tiles on start menu. So I think it needs a little coding experience. I don't know if those links help:
msdn.microsoft.com/en-us/library/windows/apps/xaml/hh868253.aspx
irisclasson.com/2014/07/30/how-to-create-a-live-tile-for-your-website-in-a-few-minutes/
cleonti said:
Thanks for the info - I never knew this existed. Unfortunately it doesn't seem to create a 'live' tile - meaning one that updates regularly. The weather info updates every five minutes, so I am looking to make a tile that will look for the updated image similar to how the gadget I made did.
Click to expand...
Click to collapse
kerimka said:
Actually, only applications can create live tiles on start menu. So I think it needs a little coding experience. I don't know if those links help:
msdn.microsoft.com/en-us/library/windows/apps/xaml/hh868253.aspx
irisclasson.com/2014/07/30/how-to-create-a-live-tile-for-your-website-in-a-few-minutes/
Click to expand...
Click to collapse
Thanks for the help. I had seen the info in the second link, but the first one was new to me. Unfortunately the info in the first link gets me close, but not quite there though that could be due to my ignorance. I have seen websites that work as a Live tile when pinned and was hoping I could make something similar, but as a HTML/XML/JS on the local computer as opposed to hosted on a server or having to create a full app using C#, C++, or VB. While it took me a bit of coding to make the original gadget, it wasn't that hard to get it going whereas the Live Tile continues to elude me.

Categories

Resources