Activity에서 다른 Activity를 호출할 때 Intent를 이용하여 화면전환을 하는 것과 같이 핸드폰에 기본적으로 장착된 App의 Activity를 호출 하는 경우에는 Intent의 action 중 ACTION_VIEW를 이용하여 웹 브라우저를 호출하는 방법 입니다.
기본 브라우저를 이용하여 웹 페이지 URL을 연결하려면 public Intent (String action, Uri uri) 메소드를 사용하는데 action 부분에는 ACTION_VIEW를 입력하고 Uri는 웹 주소를 입력하면 됩니다.

 

Intent intentUrl = new Intent(Intent.ACTION_VIEW, Uri.parse("https://copycoding.tistory.com/"));
startActivity(intentUrl);

 

URL에 파라미터를 추가해서 넘기려면 URL 뒤에 붙여주도록 합니다.

 

String param = "/47";
Intent intentParam = new Intent(Intent.ACTION_VIEW, Uri.parse("https://copycoding.tistory.com/" + param));
startActivity(intentParam);

 

인터넷을 사용해야 하므로 Manifest에 permission을 추가해 주면 됩니다.
<uses-permission android:name="android.permission.INTERNET" />

 

버튼을 누르면 첫화면으로 이동 하고 param을 붙인경우 페이지를 찾아 갑니다.

 

 

전체 소스
수정된 파일은 3개 입니다.

AndroidManifest.xml

 

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="copycoding.tistory.actionviewuri">

    <uses-permission android:name="android.permission.INTERNET" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/Theme.ActionViewUri">
        <activity android:name=".MainActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

 

activity_main.xml

 

<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MainActivity">

    <Button
        android:id="@+id/btnUrl"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="URL"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.498"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias="0.229"
        android:onClick="clickUrl"/>

    <Button
        android:id="@+id/btnParam"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="176dp"
        android:text="URL+Param"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintHorizontal_bias="0.498"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/btnUrl"
        app:layout_constraintVertical_bias="0.0"
        android:onClick="clickParam"/>
</androidx.constraintlayout.widget.ConstraintLayout>

 

 

MainActivity.java

 

import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.Toast;
public class MainActivity extends AppCompatActivity {

   @Override protected void onCreate(Bundle savedInstanceState) {
         super.onCreate(savedInstanceState);
         setContentView(R.layout.activity_main);
   }
     
  public void clickUrl(View view) {
     Intent intentUrl = new Intent(Intent.ACTION_VIEW, Uri.parse("https://copycoding.tistory.com/"));
     startActivity(intentUrl);
  }

  public void clickParam(View view) {
      String param = "/47";
      Intent intentParam = new Intent(Intent.ACTION_VIEW, Uri.parse("https://copycoding.tistory.com/" + param));
      startActivity(intentParam);
   }
}

 

- copy coding -


내가 사용하는 인터넷 다운로드, 업로드 속도 측정하는 사이트입니다.  Active-X를 설치해야 하는 사이트는 제외를 하여 4개를 뽑아 보았습니다

결과들이 조금씩 다를 수 있는데 속도 측정은 Target을 어디에 두고 체크했는가에 따라 결과가 달라질 수 있습니다그리고 Download 속도가 100MB로 좋게 나와도 내가 다운받으려는 사이트의 정책이 다운로드 속도를 1MB로 설정해 놓았으면 1MB이상으로 받을 수 없으니 속도 측정 결과는 참고로만 하면 될것 같습니다.

 

1. SpeedTest.net


예전에는 백그라운드 이미지로 지도모양이 나왔던 것 같은데 모양이 변경이 되었습니다.

https://www.speedtest.net/ 사이트에 접속을 합니다.


internet speed test


가운데 원의 GO를 클릭 하면 속도 측정이 시작 됩니다하단에 있는 이미지에서 자신의 디바이스를 선택 하여 측정을 진행 해도 됩니다.


internet speed test


먼저 다운로드 속도를 측정 하고


internet speed test


그다음 업로드 속도을 측정 합니다.


internet speed test


테스트가 완료되면 최종 결과를 보여 줍니다.



2. Fast.com


여기는 사이트에 들어가자 마자 바로 자동으로 속도측정을 시작 합니다.

https://fast.com/ko/


internet speed test




internet speed test


속도 측정이 완료된 화면 입니다상세정보 버튼을 눌러 봅니다.


internet speed test


다운로드 속도 테스트 후 바로 상세보기 버튼을 누르면 업로드 속도는 진행 중일 수 있습니다.

 

 

3.  OpenSpeedTest.com

 

http://openspeedtest.com/ 사이트에 접속 합니다.


internet speed test


가운데 시작 버튼을 클릭 하면 속도 체크를 시작 합니다.


internet speed test


먼저 다운로드 속도를 체크하고 


internet speed test


이어서 업로드 속도를 체크 합니다.


internet speed test


속도 체크가 완료되면 결과를 보여 줍니다.

 

 

4. Google Fiber

 

http://speedtest.googlefiber.net/ 사이트에 접속 합니다.


internet speed test


파란색 시작 버튼을 클릭합니다.


internet speed test


Google Fiber 서비스 관련 안내인데 모바일이 아니니 그냥 Continue를 클릭합니다.


internet speed test


잠시 기다리면 다운로드와 업로드 속도 측정 결과가 나옵니다

 

처음에 얘기 한것 처럼 속도 측정 결과들은 참고사항 입니다.


- copy coding -

프로젝트에서 가끔씩 사용되는 차트를 모아봤습니다.  Grid보다는 무료도 쓸만 한게 많은것 같습니다. 요즘에는 대부분 HTML 5를 지원하고 있고 데이터도 Json을 사용하도록 되어있어 사용법도 간단 합니다제품별 사이트에 있는 예제 화면을 모아보았습니다.

 

google chart

데모 : https://developers.google.com/chart/interactive/docs/gallery

무료 : https://creativecommons.org/licenses/by/4.0/deed.ko


java web chart google

java web chart google



Chart.js

https://www.chartjs.org/

데모 : https://www.chartjs.org/samples/latest/

      https://www.chartjs.org/docs/latest/ - source

무료 : MIT 

java web chart chartjs

java web chart chartjs

java web chart chartjs



APEXCHARTS

데모 : https://apexcharts.com/javascript-chart-demos/

무료 : MIT 


java web chart apexchart

java web chart apexchart

java web chart apexchart

java web chart apexchart



JFreeChart

데모 : http://www.jfree.org/jfreechart/samples.html

무료: The JFreeChart Developer Guide(유료)


java web chart jfreechart

java web chart jfreechart



C3.js

데모 : https://c3js.org/examples.html

무료 : MIT


java web chart c3js



AnyChart

데모 : https://www.anychart.com/products/anychart/gallery/

유료 : https://www.anychart.com/buy/


java web chart anychart

java web chart anychart

java web chart anychart

java web chart anychart

java web chart anychart



rMate Chart

데모 : http://demo.riamore.net/HTML5demo/chart/index.html

유료 : http://www.riamore.net/buy/license.html


java web chart rmate



amChart

데모 : https://www.amcharts.com/demos/

유료 : https://www.amcharts.com/online-store/


java web chart amchart

java web chart amchart

java web chart amchart

java web chart amchart

java web chart amchart

java web chart amchart

java web chart amchart

java web chart amchart

java web chart amchart

java web chart amchart

java web chart amchart

java web chart amchart

java web chart amchart



FusionCharts

데모 : https://www.fusioncharts.com/charts?product=fusioncharts

유료 : https://www.fusioncharts.com/buy


java web chart fusionchart

java web chart fusionchart

java web chart fusionchart

java web chart fusionchart


- copy coding -


1

+ Recent posts