somon 16 Newbie Poster

Here is the thing, as you might know AdMob has a `AdSize.*` function, where u put `Banner` to show banner ads, and AD_banner` for tablet banners, what i want to do is take a screen size of a device so that i could throw it in my if statement and then put the right banner for right device, i hope i was clear enough.So anyone can tell me how can i get the screen size of device?
Thank u

somon 16 Newbie Poster

I've an app with Admob banner implemented in it. I can see ads in android emulators and devices, but i can't get the ads in Samsung Galaxy tab , anyone has any idea why is it so??

somon 16 Newbie Poster

really? 9 views and no single answer?? :) come on people...

somon 16 Newbie Poster

Could somebody please check this lines of codes , i cant get my video played from current url, and it doesn't give me any mistake either

call.setOnClickListener(new OnClickListener() {
	   	    public void onClick(View v) {
	   	    	int a =canli.getVisibility();
	   	    	canli.setVisibility(1);
	   	    	try {
	   	    		
	   	    		
	   	    		
	   	    		call.setVisibility(a);
	   	    		pb.setVisibility(1);
		   	    	 Uri web = Uri.parse("http://tegos.ru/video/new/prikol/3gp/Ukhodi_Dver_Zakroj.3gp");
		   	    	 canli.setVideoURI(web);
		   	    	 canli.setMediaController(mc);
		   	    	 canli.requestFocus();
		   	    	 canli.start();
		   	    	 mc.show();
		   	     }
		   	     catch(Exception e) {
		   	    	 System.out.print(e.getMessage()+"error");
		   	     } 
	   	   	    	}
	   	    	
	   	     });
somon 16 Newbie Poster

can anybody please give me some serious piece of advice on Video Streaming? I have this app which streams video and all other bunch of staff. i've finished all other parts only this video streaming left, i'm new android development too, so please kind people help

somon 16 Newbie Poster

hey i found my mistake, very silly mistake actually , i just had to write http:// in the begging of the website

peter_budo commented: Good job! +16
somon 16 Newbie Poster

hi everyone
here is my method in java

public void openWebURL( String inURL ) {
        Intent browse = new Intent( Intent.ACTION_VIEW , Uri.parse( inURL ) );

        startActivity( browse );    
}
	}

and i'm just typing

openWebURL("www.google.com");

in my java file onStart section
but my app just doesn't open,
what is the problem?
maybe i have to write an action in manifest?
i'm new in android dev. so sorry if this quest. is silly

somon 16 Newbie Poster

here the thing; i have 15 servers from where i upload/download data. all servers have the same data just the speed varies from one to another, i want to write a windows service app in C# which will automatically switch to the one with the fastest speed. How can i do it? i have already done an app which switch's according to PING options, but it's not a goood way ///

somon 16 Newbie Poster

See also this thread. You have several options -- just pick one and go with it.

i guess it could be the way to do that, but i dont think it would look good in my sudoku game..

somon 16 Newbie Poster

What have you tried so far? Have you used google to see if you can get any tutorials? Like this one?

And please, stop using those html tags, they don't work here.

Well i can drop as many text field as i need and equalate each text to some value in array but i will take pretty much time, cause my array size is 9x9, well actully it;s a sudoku game

somon 16 Newbie Poster

hi everyoen i've a matrix array with some value, i want to shaw each of them in matrix type in my form, how can i do it? can i use DataGrid view for this? and if yes ... what is method..

somon 16 Newbie Poster

Forget about my first post.. i had used that code in 1.0 framework.. post that framework Microsoft created a Ping class.. the below code is synchronous, so the app will await a reply before proceeding. The link i sent in an earlier post has a code snippet to ping asynchronously

using System;
using System.Net;
using System.Net.NetworkInformation;
using System.Text;

namespace Examples.System.Net.NetworkInformation.PingTest
{
    public class PingExample
    {
        // args[0] can be an IPaddress or host name.
        public static void Main (string[] args)
        {
            Ping pingSender = new Ping ();
            PingOptions options = new PingOptions ();

            // Use the default Ttl value which is 128,
            // but change the fragmentation behavior.
            options.DontFragment = true;

            // Create a buffer of 32 bytes of data to be transmitted.
            string data = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
            byte[] buffer = Encoding.ASCII.GetBytes (data);
            int timeout = 120;
            PingReply reply = pingSender.Send (args[0], timeout, buffer, options);
            if (reply.Status == IPStatus.Success)
            {
                Console.WriteLine ("Address: {0}", reply.Address.ToString ());
                Console.WriteLine ("RoundTrip time: {0}", reply.RoundtripTime);
                Console.WriteLine ("Time to live: {0}", reply.Options.Ttl);
                Console.WriteLine ("Don't fragment: {0}", reply.Options.DontFragment);
                Console.WriteLine ("Buffer size: {0}", reply.Buffer.Length);
            }
        }
    }
}

thank you very much
i guess ping round trip time and are exactly what i need,
so as i understood u send your string data and it will respond to it...
nice :)

somon 16 Newbie Poster

.Net 4.0 or lower?

.Net 4.0, but I don't understand your codes.

somon 16 Newbie Poster

I had done something similar a few years ago.. there might be something out there which is way simpler to implement today. However, I had used the Process class, opened a cmd, literally pinged the server through ping command, and parsed the return time in ms or set the server as down if return timed out

I've also thought of this, but how i can ping a server in windows C# and, i guess i need to do every 30 or 60 seconds.

somon 16 Newbie Poster

Hi everyone;
I need some help
Im want to write a WIndows service C# app which will check some urls and choose the one with the lowest ping (the one with high data transfer speed) stream data from that server, and alse check all other servers and write in log file if any of servers is OFF or can't be accesed. And also if current server speed's down, it should switch to other server automaticly.
Please help people, i'm new in C# and moreover has never written any app like this,

somon 16 Newbie Poster

Hi, Please can anybody help me a little bit with my assignment , The thing is that I was kinda ill , so i missed many important lessons, but now teacher told that i need to do assignment, Can anybody help me with beggining , * we use Xcode.

1. Write a program that, when given two integers, prints out the fourth digit (from the right) of the sum of the numbers.
Examples:! 19834, 2100! -->! 1! ! !
3456, 4567! -->! 8!
Output should look exactly like this:
>Please enter three integers: >2000 1045 >3
(21934) ( 8023)
2. Write a program that, when given three integers, prints out the minimum of the three. (You cannot use any math library) Examples:!
13, 21, 9! -->! 9
Output should look exactly like this:
>Please enter three integers: >35 56 24 >24
3. Write a program that, when given five integers, prints out the number of integers that are more than 0. Examples:! 13, 21, 9, -3, 5! -->! 4 ! ! 2, -4, 0, 435, 1! -->! 3
Output should look exactly like this:
>Please enter five integers: >35 56 200 -5 -6 >3