Coder Social home page Coder Social logo

mobile-sdk-tutorial's Introduction

mobile-sdk-tutorial's People

Contributors

4f2e-solo avatar alexanderwangus avatar dji-dev avatar lanyusea avatar mrjzhao avatar nertus avatar oliverou avatar silverchangjian avatar solodu avatar talobin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

mobile-sdk-tutorial's Issues

Toast called in new Thread()

Toast is called within new Thread(), it would cause and exception as UI would not be reachable through this thread. Change it with:

runOnUiThread(new Runnable() {
    public void run() {
        Toast.makeText(getApplicationContext(), "activation success", Toast.LENGTH_SHORT).show();
    }
});

OR

Use the Logger to log the result if showing the result in not mandatory.

Log.e(TAG, "onGetPermissionResult = "+result);
Log.e(TAG, "onGetPermissionResultDescription = "+DJIError.getCheckPermissionErrorDescription(result));

DJI SDK Markdown Document Update Guide

DJI SDK Markdown Document Update Guide

Suggested workflow of updating document

The official update will be handled by DJI SDK staffs. Developers are welcome to fix any bug/issue by sending pull request.

When an issue/bug/mistake is found in our document. The developer can create and send a pull request to fix it.

He/She must refer the pull request of a related discussion, forum.dji.com or bbs.dji.com or github issue or email records, where a SDK staff must admit it as a problem in our document.

The pull request which does not follow this guild will not be accepted.

Suggested format of Markdown document

This part talks about the document format and syntax. You can refer to this Markdown document as an example or reference.

1. Suggested usage of "#"

In a markdown document, we use the "#" symbol in headers. Here is the suggested usage example:

# Header 1
## Header 2
### Header 3
#### Header 4
##### Header 5
###### Header 6

Please don't use it like this way:

# Header 1
### Header 2
###### Header 3
## Header 4
##### Header 5
###### Header 6

2. Tables

This is a table:

First Header Second Header
Content Cell Content Cell
Content Cell Content Cell

You can align cell contents with syntax like this:

Left Aligned Center Aligned Right Aligned
Request Data 1~100 User defined data
Return Data 2 Return code 0: success

The left and right most pipes (|) are only aesthetic, and can be omitted. The spaces don’t matter, either. Alignment depends on the : marks.

3. Images

All images should be stored in the Images folder and developers should refer to the image using relative path instead of absolute path.

For example, you should use ![N1UI](Images/N1UI.png) instead of ![N1UI](https://github.com/dji-sdk/Onboard-SDK/blob/master/Onboard_API_Doc/en/Images/N1UI.png)

4. Codes

To insert code, we suggest to use Fenced Code Block. You can use waves (~) and back ticks (```) between code.

  • Code:
~~~c
void get_control_callback(const void* p_data, unsigned int n_size) { }

 - Result: 

~~~c
void get_control_callback(const void* p_data, unsigned int n_size) { }

Note: Remember to add a line break between the previous texts and waves (~) or back ticks (```) , here is the example of wrong usage:

  • Code:
Please check the following code:
~~~c
unsigned char com_buf[46];
activation_data_t activation_request_data;

- Result:

`
Please check the following code:
~~~c
unsigned char com_buf[46];
activation_data_t activation_request_data;

`

As shown above, it looks like a mess. Now if we add a line break between Please check the following code: and ~~~c like this:

Please check the following code:

~~~c
unsigned char com_buf[46];
activation_data_t activation_request_data;

It will looks better:

Please check the following code:

~~~c
unsigned char com_buf[46];
activation_data_t activation_request_data;

DJI SDK Markdown Document Update Guide

Workflow

Official updates will be handled by DJI SDK staff. If an issue/bug is found in our documents, developers are welcome to correct the error and submit a pull request.

Developers must alert the DJI SDK staff of a pull request through a related discussion, such as on forum.dji.com, bbs.dji.com, gitbuh issues or email record. If the pull request is valid, the SDK staff will acknowledge the issue being fixed and accept the pull request.

Pull requests that do not follow this guild will not be accepted.

Formatting Markdown Documents

This section covers document formatting and syntax. You can refer to Github's Mastering Markdown Guides for additional reference.

1. Formatting headers with the hashtag symbol #

We structure markdown documents through the use of # symbol to create headers. Multiple # symbols in a row will format smaller headers. Here is a suggested usage example:

Code

# Document Title
## Main Heading 1
### 1. Subheading 1
## Main Heading 2
### 1. Subheading 1
### 2. Subheading 2

Result

Document Title

Main Heading 1

1. Subheading 1

Main Heading 2

1. Subheading 1

2. Subheading 2

It is important that you follow the example shown above, with a single '#' being used for the document title, '##' being used for section headings, and '###' being used for subheadings. This allows us to generate and organize reading interfaces based on these headings.

Please do not adjust the number of '#' symbols used for the aesthetic purpose of adjusting the side of headings, as shown here:

Code

# Document Title
## Main Heading 1
### 1. Subheading 1
## Main Heading 2
### 1. Subheading 1
### 2. Subheading 2

Result

Document Title

Main Heading 1

1. Subheading 1

Main Heading 2

1. Subheading 1

2. Subheading 2

2. Tables

Markdown allows you to create tables, separating the header with the first row with hyphens '-', and separating each column with a pipe symbol '|'.

Here's an example:

Code

First Header  | Second Header
------------- | -------------
Content Cell  | Content Cell
Content Cell  | Content Cell

Result

First Header Second Header
Content Cell Content Cell
Content Cell Content Cell

You can also choose to align cell contents:

Code

| Left Aligned |  Center Aligned  | Right Aligned |
|:-------------|:----------------:| -------------:|
| Left | Center | Right |
| Left Aligned | Center Aligned | Right Aligned |

Result

Left Aligned Center Aligned Right Aligned
Left Center Right
Left Aligned Center Aligned Right Aligned

We control text alignment through the colons ':'. The left and right most pipes | are purely aesthetic, and can be omitted. Blank spaces serve no functional purpose besides code readability.

3. Images

All images should be stored in the Images folder. Images should be refered to by their relative path name, rather than an absolute path name.

For example, you should use ![N1UI](Images/N1UI.png) instead of ![N1UI](https://github.com/dji-sdk/Onboard-SDK/blob/master/Onboard_API_Doc/en/Images/N1UI.png)

4. Code

Inline code blocks should be wrapped in backticks:
Code

'var example = true'

Result

var example = true

To insert multiple lines of code, used a Fenced Code Block. Surround code with three tildes '~' to format it:

Code

    ~~~
    void get_control_callback(const void* p_data, unsigned int n_size) { }
    ~~~

Result

void get_control_callback(const void* p_data, unsigned int n_size) { }

Including the name of the language after the opening triple tilde will allow for syntax highlighting:

Code

    ~~~c
    void get_control_callback(const void* p_data, unsigned int n_size) { }
    ~~~

Result

void get_control_callback(const void* p_data, unsigned int n_size) { }

DJI Forum Logins Broken

We cannot log into the DJI forums to post bug reports or make other comments. The login process redirects to the account summary page, but going back to the forums doesn't solve anything. We don't have a useful way to file a bug other than here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.