Toggle menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Line for 3DS: Difference between revisions

From GameBrew
No edit summary
m (Text replacement - "Category:Other 3DS homebrew applications" to "")
 
(25 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Infobox 3DS homebrew
{{Infobox 3DS Homebrews
| title = Line for 3DS
|title=Line for 3DS
| image = https://dlhb.gamebrew.org/3dshomebrew/Line-for-3DS.png|250px
|image=Linefor3ds2.png
| type = Other Apps
|description=Line for 3DS.
| version = v1.3.1
|author=Core-2-Extreme
| licence = Mixed
|lastupdated=2024/01/30
| author = Core-2-Extreme
|type=Other Apps
| website = https://gbatemp.net/threads/v0-2-0-release-guide-line-for-3ds.539530/
|version=2.0.0.1
| download = https://dlhb.gamebrew.org/3dshomebrew/Line_for_3DS-1.3.1.rar
|license=GPL-3.0
| source = https://github.com/Core-2-Extreme/Line_for_3DS
|download=https://github.com/Core-2-Extreme/Line_for_3DS/releases
|website=https://gbatemp.net/threads/v0-2-0-release-guide-line-for-3ds.539530
|source=https://github.com/Core-2-Extreme/Line_for_3DS
|donation=https://github.com/Core-2-Extreme/Line_for_3DS/releases
}}
}}
<youtube>1T90ZQxDnOc</youtube>
Line for 3DS is a LINE client for the 3DS. Developed by LINE, it is an instant messaging, voice and video call application. It allows you to exchange text messages and make calls free of charge by transmitting information in the form of data.


= Line for 3DS =
Setup instructions can be found [https://github.com/Core-2-Extreme/Line_for_3DS/blob/v2.0.0/SETUP.md here].


https://user-images.githubusercontent.com/45873899/77541203-a9977e80-6ee7-11ea-8479-53aed389ab64.png
==Features==
* Send text.
* Send stickers. Only package ID 11537, 11538 and 11539 in sticker definitions are supported for now.
* Send pictures, Up to 37.5MB per picture.
* Send videos, Up to 37.5MB per video.
* Send audio, Up to 37.5MB per audio.
* Send files, Up to 37.5MB per file.
* View old chat logs, Up to 4000 chat logs.
* Receive text.
* Receive stickers. Only package ID 11537, 11538 and 11539 in sticker definitions are displayed for now.
* Receive pictures. Very large images may not be displayed especially on OLD3DS.
* Receive audio.
* Receive videos. Some videos may not be played at full speed or at all especially on OLD3DS.
* Direct message.
* Group chat. If Allow bot to join group chat feature in LINE developer page (see Create your LINE BOT step 6) is enabled.
* Open chat.
* Voice call.
* Night mode.


== Official Discord ==
==Screenshots==
https://dlhb.gamebrew.org/3dshomebrews/linefor3ds3.png
https://dlhb.gamebrew.org/3dshomebrews/linefor3ds4.png


[https://discord.gg/EqK3Kpb https://discord.gg/EqK3Kpb]
==Media==
'''Line for 3DS''' ([https://www.youtube.com/watch?v=5K2fCr0lyoM Line for 3DS]) <br>
<youtube>5K2fCr0lyoM</youtube>


== Index ==
==Changelog==
'''v2.0.0.1 2024/01/30'''
* Line:
** Significant changes for internal code, so you need to setup your Google Apps Script again.
** [https://github.com/Core-2-Extreme/Line_for_3DS/blob/v2.0.0/SETUP.md Setup instructions] are updated.
** 3DS:
*** Chat log wrapping feature has been improved a lot.
*** Auto update feature (for chat logs) are removed temporary.
*** Clear cache feature (for downloaded files) are removed temporary.
** Google Apps Script:
*** Self tests are added so that it is much easier to trouble shoot.
* Camera:
** Supported QR code scan (currently, only for Google Apps Script setup).
* Video player:
** Updated to v1.5.3 (see [https://github.com/Core-2-Extreme/Video_player_for_3DS/blob/v1.5.3#v153 Video player for 3DS patch note] for details).
* Overall:
** Application folder has been changed from <code>/Line/</code> to <code>/3ds/Line/</code> (old folder won't be deleted automatically, but you can delete it if you don't need it).
** Sub application icon has been added.


* [https://github.com/Core-2-Extreme/Line_for_3DS#Patch-note Patch-note]
'''v2.0.0 2023/01/27'''
* [https://github.com/Core-2-Extreme/Line_for_3DS#summary Summary]
* Line:
* [https://github.com/Core-2-Extreme/Line_for_3DS#How-to-use How-to-use]
** Significant changes for internal code, so you need to setup your Google Apps Script again.
** [https://github.com/Core-2-Extreme/Line_for_3DS/blob/v2.0.0/SETUP.md Setup instructions] are updated.
** 3DS:
*** Chat log wrapping feature has been improved a lot.
*** Auto update feature (for chat logs) are removed temporary.
*** Clear cache feature (for downloaded files) are removed temporary.
** Google Apps Script:
*** Self tests are added so that it is much easier to trouble shoot.
* Camera:
** Supported QR code scan (currently, only for Google Apps Script setup).
* Video player:
** Updated to v1.5.3 (see [https://github.com/Core-2-Extreme/Video_player_for_3DS/blob/v1.5.3#v153 Video player for 3DS patch note] for details).
* Overall:
** Application folder has been changed from <code>/Line/</code> to <code>/3ds/Line/</code> (old folder won't be deleted automatically, but you can delete it if you don't need it).
** Sub application icon has been added.


== Patch note ==
'''v1.7.2 2021/01/07'''
* [Line] Fixed some bugs.
* [Vid] Added debug infomation.
* [Vid] Changed initial image size and position.
* [App] Some minor update to better user experience.


V1.3.1
'''v1.7.1 2020/12/13'''
* 【App】 Ver 1.3.1
* [Line] Added Supported download all files.
* 【Line】 Fixed- Common occurring [FSUSER_OpenArchive failed] error has been solved.
* [Mup/Vid] Added Additional formats support(.ogg).
* 【Line】 Fixed- Image display now activated by touching the message.
* [App] Some minor update to better user experience.
* 【Setting】 Fixed- Setting menu framerate now improved.
* 【Image viewer】 Fixed- Image display speed now improved.


v1.2.0
'''v1.7.0 2020/12/03'''
* Fix- Some crashes
* [App] Fixed Fonts was improved.
* Fix- Some settings do not work
* [App] Added Video player.
* Fix- Log download (GAS processing) speed has been improved(GAS update required)
* [Line] Added Now, you can play audio and video sent by user.
* Add- Image viewer
* [Cam] Fixed Framerate was improved.
* [Mup] Added Additional formats (like aac) are supported.
* [App] Some minor update to better user experience.


== Summary ==
'''v1.6.0 2020/09/12'''
* [Line] Fixed- The app will crash if use 'send a file' function.
* [Line] Fixed- Improved 'send a file' function processing speed.
* [Line] Added- Search function.
* [Line] Added- Now, you can receive up to 4000 chat logs.
* [Music player] Fixed- Improved mp3 play quality.
* [Music player] Added- Seek function.
* [Explorer] Added- Now, file will be sorted.


= [https://www.youtube.com/watch?v=5K2fCr0lyoM Video] =
'''v1.5.2 2020/07/14'''
* [Line] Fixed- Adjust some UI.
* [Camera] Fixed- Some settings will be reset after restarting the camera.
* [Mic] Fixed- The app will crash if couldn't allocate memory(out of memory).
* [Music player] Fixed- The app sometimes crash when try playing .mp3 files.
* [Music player] Added- Shuffle function.


* Send text ?
'''v1.5.1 2020/06/30'''
* Send picture ?
* [App] Fixed- The message will not be displayed correctly if the Line folder does not exist.
* Send video ?
* [Line] Fixed- The message will not be sent if double quote or backslash was included.
* Send sound ?
* [Line] Added- Now, you can include new lines in the message.
* Send stamp ?
* [Music player] Fixed- A memory leak occurs when playing .mp3 files.
* Receive text ?
* Receive (View) picture ? (v1.2.0)
* Receive (Play) video ?
* Receive (Play) sound ?
* Receive (View) stamp ?
* View old log ? (Until max 300 logs)
* Auto update ? (v0.2.0)
* Group chat ?
* Night mode ? (v0.2.0)
* Password ? (v0.3.0)
* Save log to SD card ? (v0.3.0)


== How to use ==
'''v1.5.0 2020/06/22'''
* [App] Added- Camera, Mic and Music player.
* [App] Build with the latest version of ctrlib(v1.9.0)
* [Line] Fixed- UI design.
* [Line] Fixed- Made setup steps easier.
* [Line] Added- Display user/group name and user/group icon.
* [Google translation] Fixed- Some wrong control.
* [Speed test] Fixed- Some text color.
* [Image viewer] Fixed- Some crash.
* [Setting menu] Fixed- UI design.


How to install and use for version 1.3.0~
'''v1.4.2 2020/05/11'''
* [App] Fixed- App no longer needs CFW to launch.


'''Please access this site.<br />
'''v1.4.1 2020/05/05'''
[https://developers.line.biz/en/ <span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">'''https://developers.line.biz/en/'''</span></span>]<br />
* [Line] Fixed- Some wrong messages.
'''Click '''<span style="font-size: 15px"><span style="color: rgb(0, 0, 255)">log in.</span></span>'''<br />
* [Line] Fixed- The app will crash if unsupported sticker was sent.
Click '''<span style="font-size: 15px"><span style="color: rgb(0, 0, 255)">Log in with LINE account.</span></span>'''<br />
* [Google translation] Fixed- The translation result will be displayed incorrectly in some case.
Click '''<span style="font-size: 15px"><span style="color: rgb(0, 0, 255)">Create.</span></span>'''''''''<br />
* [Google translation] Added- Now, you can translate into over 100 languages.(⁂Some languages(character) will be garbale.)
https://dlhb.gamebrew.org/3dshomebrew/43147207b4eb4e1684a075e305cb67a2.png<br />
''''''Type your name and click '''<span style="font-size: 15px"><span style="color: rgb(0, 0, 255)">Create.</span></span>'''''''''<br />
https://dlhb.gamebrew.org/3dshomebrew/9cc90ea609fef8352e3bca436c3dfadb.png<br />
''''''Click '''<span style="color: rgb(0, 0, 255)"><span style="font-size: 15px">Create a Messaging API channel</span>.</span>'''''''''<br />
https://dlhb.gamebrew.org/3dshomebrew/2394c4de74d3c34c186f373a02b3f2f6.png<br />
'''<br />
'''Type each item and click <span style="font-size: 15px"><span style="color: rgb(0, 0, 255)">'''Create.'''</span></span>''''''<br />
https://dlhb.gamebrew.org/3dshomebrew/e611043d9c7da0be833f17bd36e62bc5.png<br />
''''''Click '''<span style="font-size: 15px"><span style="color: rgb(0, 0, 255)">Messaging API.</span></span>''''''<br />
'''<br />
https://dlhb.gamebrew.org/3dshomebrew/73774f8d71e0ca5756e72fda20f94ebd.png<br />
'''<br />
'''Find '''<span style="font-size: 15px"><span style="color: rgb(0, 0, 255)">Channel access token (long-lived)</span></span>''' and click '''<span style="font-size: 15px"><span style="color: rgb(0, 0, 255)">Issue.</span></span>'''<br />
Then copy '''<span style="color: rgb(0, 0, 255)"><span style="font-size: 15px">Channel access token (long-lived).</span></span>'''''''''<br />
https://dlhb.gamebrew.org/3dshomebrew/15ffd7c288cbf6ab5144158f5402e3a5.png<br />
'''<br />
Please access this site.<br />
'''[https://www.google.com/intl/en_ALL/drive/ <span style="font-size: 15px"><span style="color: rgb(0, 0, 0)">https://www.google.com/intl/en_ALL/drive/</span></span>]<br />
Click '''<span style="font-size: 15px"><span style="color: rgb(0, 0, 255)">Go to google drive</span></span>''' and '''<span style="font-size: 15px"><span style="color: rgb(0, 0, 255)">login.</span></span>'''<br />
Click '''<span style="font-size: 15px"><span style="color: rgb(77, 77, 255)">New </span></span>'''and click'''<span style="font-size: 15px"><span style="color: rgb(0, 0, 255)"> Google sheets(1 time) </span></span>'''and click <span style="font-size: 15px"><span style="color: rgb(0, 0, 255)">'''More''' </span><span style="color: rgb(0, 0, 0)">'''-&gt;'''</span><span style="color: rgb(0, 0, 255)"> '''Google apps script (1 time).'''</span></span>''''''<br />
https://dlhb.gamebrew.org/3dshomebrew/5a603a93e5c14227b22e3bd661c43016.png<br />
'''<br />
<br />
'''Open created <span style="font-size: 15px"><span style="color: rgb(0, 0, 255)">'''Google sheets''' </span><span style="color: rgb(64, 64, 64)">and copy</span> <span style="color: rgb(0, 0, 255)">'''sheet id.(Do''' </span><span style="color: rgb(255, 0, 0)">'''NOT''' </span><span style="color: rgb(0, 0, 255)">'''include ''''</span><span style="color: rgb(255, 0, 0)">'''/'''</span><span style="color: rgb(0, 0, 255)">'''' )'''</span></span>''''''<br />
https://dlhb.gamebrew.org/3dshomebrew/f22b2c7b64acf04808a118983f744685.png<br />
''''''<span style="color: rgb(0, 0, 255)"><br />
</span>'''<br />
Open created '''<span style="font-size: 15px"><span style="color: rgb(0, 0, 255)">Google apps script </span></span>'''and Insert name.(&quot;Line main&quot; in this guide)'''<br />
https://dlhb.gamebrew.org/3dshomebrew/cf714d96090d736cb42a24b7a8997deb.png<br />
'''<br />
'''Copy this code to &quot;<span style="font-size: 15px">Line main</span>&quot; and add your <span style="font-size: 15px"><span style="color: rgb(0, 0, 255)">sheet ID, </span></span>'''<span style="font-size: 15px">'''<span style="color: rgb(0, 0, 255)">access token</span>''' and '''<span style="color: rgb(0, 0, 255)"> 3DS's account name</span>(Your favorite name).'''</span><br />
'''<br />


<pre>
'''v1.4.0 2020/04/26'''
* [Line] Added- send a file function.
* [Image viewer] Added- view files on SD card.
* [GAS] Fixed- The problem of losing messages from being sent too quickly have been resolved.


Code:
'''v1.3.1 2020/03/31'''
* [Line] Fixed Common occurring [FSUSER_OpenArchive failed] error has been solved.
* [Line] Fixed Image display now activated by touching the message.
* [Setting] Fixed Setting menu framerate now improved.
* [Image viewer] Fixed Image display speed now improved.


</div>
'''v1.3.0 2020/03/25'''
<pre>var ACCESS_TOKEN = &quot;Your acces token here&quot;;
* [Line] Added- sticker send and receive.
var open_sheet_id = &quot;Your sheet id here&quot;;
var account_name_of_3ds = &quot;Your 3ds's account name here&quot;;
var script_password = &quot;Your google apps script password here&quot;;


var gas_ver = 3;//Do **NOT** edit this value.
'''v1.2.2 2020/05/17'''
function log_save(message, user_name, write_sheet_name)
* [Setting] Added- RAM allocation control menu.
{
* [Line] Fixed- Now, some errors have been handled.
  var sheet_pos = 1;
* [Image viewer] Fixed- Now, some errors have been handled.
  var spreadsheet = SpreadsheetApp.openById(open_sheet_id);
* [Speedtest] Fixed- Now, some errors have been handled.
  var write_sheet = spreadsheet.getSheetByName(write_sheet_name);


  if(!write_sheet)
'''v1.2.1 2020/03/03'''
  {
* [App] Changed title id to 000400000EC95000.
    spreadsheet.insertSheet(write_sheet_name);
* [Setting] Added- Fonts setting.
    write_sheet = spreadsheet.getSheetByName(write_sheet_name);
* [Setting] Added- Scroll bar.
  }
* [Line] Fixed- Auto update was destroyed.
* [Line] Added- Hide ID.
  sheet_pos = get_cache_pos(write_sheet);
* [Line] Added- Scroll bar.
* [Image viewer] Fixed- clipboard.
  while(true)
* [Pull requests] Fixed- [https://github.com/Core-2-Extreme/Line_for_3DS/pull/3 #3].
  {
  var sheet_data = write_sheet.getRange(&quot;A&quot; + sheet_pos).getValue();


  if(sheet_data == &quot;&quot;)
'''v1.2.0 2020/01/17'''
  {
* Fix Some crashes.
    write_sheet.getRange(&quot;A&quot; + sheet_pos).setValue(&quot;&quot; + user_name + &quot; : &quot; + message);
* Fix Some settings do not work.
    break;
* Fix Log download (GAS processing) speed has been improved(GAS update required).
  }
* Add Image viewer.
  else
    sheet_pos++;
  }
  write_cache_pos(write_sheet, (sheet_pos + 1));
}


function log_read(id)
[https://github.com/Core-2-Extreme/Line_for_3DS/releases Release notes.]
{
  var sheet_start = 1;
  var return_data;
  var sheet_data;
  var spreadsheet = SpreadsheetApp.openById(open_sheet_id);
  var read_sheet = spreadsheet.getSheetByName(id);
  sheet_start = get_cache_pos(read_sheet);


  while(true)
==External links==
  {
* GitHub - https://github.com/Core-2-Extreme/Line_for_3DS
    sheet_data = read_sheet.getRange(&quot;A&quot; + sheet_start).getValue();
* GBAtemp - https://gbatemp.net/threads/v0-2-0-release-guide-line-for-3ds.539530
    if(sheet_data == &quot;&quot;)
* Discord - https://discord.gg/EqK3Kpb
    {
      write_cache_pos(read_sheet, sheet_start);
      if(sheet_start &gt;= 301)
        sheet_start = (sheet_start - 300);
      else
        sheet_start = 1;
      break;
    }
    else
      sheet_start++;
  }
  sheet_data = read_sheet.getRange(sheet_start, 1, 300).getValues();
  for(var i = 0; i &lt; 300; i++)
  {
    if(sheet_data[i] == &quot;&quot;)
      break;
    return_data += sheet_data[i];
  }
  return return_data;
}
 
function get_cache_pos(sheet_object)
{
  var cached_sheet_pos = sheet_object.getRange(&quot;B1&quot;).getValue();
  var sheet_data;
  if(parseInt(cached_sheet_pos) &gt; 0)
  {
    cached_sheet_pos = parseInt(cached_sheet_pos);
    sheet_data = sheet_object.getRange(&quot;A&quot; + (cached_sheet_pos - 1)).getValue();
    if(sheet_data != &quot;&quot;)
      return cached_sheet_pos;
  }
  return 1;
}
 
function write_cache_pos(sheet_object, cache_data)
{
  sheet_object.getRange(&quot;B1&quot;).setValue(cache_data);
}
 
function send_msg(id, send_message, time)
{
  var return_message = &quot;Success&quot;;
  var response;
    var url = 'https://api.line.me/v2/bot/message/push';
    response = UrlFetchApp.fetch(url, {
      'headers': {
        'Content-Type': 'application/json; charset=UTF-8',
        'Authorization': 'Bearer ' + ACCESS_TOKEN,
      },
      'method': 'post',
      'payload': JSON.stringify({
    &quot;to&quot;: id,
    &quot;messages&quot;:
      [
        {
            &quot;text&quot;: send_message,
            &quot;type&quot;: &quot;text&quot;,
        }],
        'notificationDisabled': 'false',
      }),
    muteHttpExceptions: true,
    });
    if(response.getResponseCode() != 200)
    {
      var cache = &quot;***Send failed. Status code = &quot; + response.getResponseCode() + &quot;\n&quot; + JSON.parse(response.getContentText()).message + &quot;*** &quot;;
      cache += send_message;
      send_message = cache;
      return_message = &quot;Send message failed. Status code = &quot; + response.getResponseCode() + &quot;\n&quot; + JSON.parse(response.getContentText()).message;
    }
  send_message += &quot;(&quot; + time + &quot;)&quot;;
  log_save(send_message, account_name_of_3ds, id);
  return return_message;
}
 
function send_sticker(id, package_id, sticker_id, time)
{
  var return_message = &quot;Success&quot;;
  var send_message = &quot;&quot;;
  var response;
  var url = 'https://api.line.me/v2/bot/message/push';
    response = UrlFetchApp.fetch(url, {
      'headers': {
        'Content-Type': 'application/json; charset=UTF-8',
        'Authorization': 'Bearer ' + ACCESS_TOKEN,
      },
      'method': 'post',
      'payload': JSON.stringify({
    &quot;to&quot;: id,
    &quot;messages&quot;:
      [
        {
            &quot;type&quot;: &quot;sticker&quot;,
            &quot;packageId&quot;: package_id,
            &quot;stickerId&quot;: sticker_id,
        }],
        'notificationDisabled': 'false',
      }),
      muteHttpExceptions: true,
    });
    if(response.getResponseCode() != 200)
    {
    send_message = &quot;***Send failed. Status code = &quot; + response.getResponseCode() + &quot;\n&quot; + JSON.parse(response.getContentText()).message + &quot;*** &quot;;
    return_message = &quot;Send sticker failed. Status code = &quot; + response.getResponseCode() + &quot;\n&quot; + JSON.parse(response.getContentText()).message;
    }
  send_message += &quot;&lt;sticker&gt;&quot; + sticker_id + &quot;&lt;/sticker&gt;(&quot; + time + &quot;)&quot;;
  log_save(send_message, account_name_of_3ds, id);
  return return_message;
}
 
function get_content_url(request_id, group_or_user_id, type)
{
  var content_url = &quot;https://api.line.me/v2/bot/message/&quot; + request_id + &quot;/content&quot;;
  var url = &quot;&quot;;
  var folder_name;
  var folder;
  var sub_folder;
  var folder_exist = false;
  var sub_folder_exist = false;
 
try
{
    if(type == &quot;image&quot;)
      folder_name = &quot;Line_images&quot;;
    else if(type == &quot;audio&quot;)
      folder_name = &quot;Line_audio&quot;;
    else if(type == &quot;video&quot;)
      folder_name = &quot;Line_videos&quot;;
    var exist_folders = DriveApp.searchFolders(&quot;'me' in owners&quot;);
    while (exist_folders.hasNext())
    {
      folder = exist_folders.next();
      if(folder_name == folder.getName())
      {
        folder_exist = true;
        break;
      }
    }
    if(!folder_exist)
      folder = DriveApp.createFolder(folder_name);
    var exist_sub_folders = folder.searchFolders(&quot;'me' in owners&quot;);
    while (exist_sub_folders.hasNext())
    {
      sub_folder = exist_sub_folders.next();
      if(group_or_user_id == sub_folder.getName())
      {
        sub_folder_exist = true;
        break;
      }
    }
    if(!sub_folder_exist)
      sub_folder = folder.createFolder(group_or_user_id);
    var response = UrlFetchApp.fetch(content_url,
    {
    'headers': {
    'Content-Type': 'application/json; charset=UTF-8',
    'Authorization': 'Bearer ' + ACCESS_TOKEN,
        }
    });
    if(type == &quot;image&quot;)
    {
      var image_data = response.getBlob().getAs(&quot;image/jpeg&quot;).setName(request_id + &quot;.jpg&quot;);
      var image = sub_folder.createFile(image_data);
      image.setSharing(DriveApp.Access.ANYONE, DriveApp.Permission.VIEW);
      url = &quot;https://drive.google.com/uc?export=download&amp;id=&quot; + image.getId();
    }
    else if(type == &quot;audio&quot;)
    {
      var audio_data = response.getBlob().setName(request_id + &quot;.mp3&quot;);
      var audio = sub_folder.createFile(audio_data);
      audio.setSharing(DriveApp.Access.ANYONE, DriveApp.Permission.VIEW);
      url = &quot;https://drive.google.com/uc?export=download&amp;id=&quot; + audio.getId();
    }
    else if(type == &quot;video&quot;)
    {
      var video_data = response.getBlob().setName(request_id + &quot;.mp4&quot;);
      var video = sub_folder.createFile(video_data);
      video.setSharing(DriveApp.Access.ANYONE, DriveApp.Permission.VIEW);
      url = &quot;https://drive.google.com/uc?export=download&amp;id=&quot; + video.getId();
    }
  }
  catch(error)
  {
    if(type == &quot;image&quot;)
      url = &quot;Generate image url failed.&quot;;
    else if(type == &quot;audio&quot;)
      url = &quot;Generate audio url failed.&quot;;
    else if(type == &quot;video&quot;)
      url = &quot;Generate video url failed.&quot;;
  }
  return url;
}
 
 
function receive_msg_from_line(user_message, user_id, group_id, replyToken, time)
{
  var url_reply = 'https://api.line.me/v2/bot/message/reply';
  var url_profile = 'https://api.line.me/v2/bot/profile/';
  if(user_message == &quot;getid&quot; || user_message == &quot;getgroupid&quot;)
  {
    var send_id;
    if(user_message == &quot;getid&quot;)
      send_id = user_id;
    else if(user_message == &quot;getgroupid&quot;)
      send_id = group_id;
    UrlFetchApp.fetch(url_reply, {
      'headers': {
        'Content-Type': 'application/json; charset=UTF-8',
        'Authorization': 'Bearer ' + ACCESS_TOKEN,
      },
      'method': 'post',
      'payload': JSON.stringify({
        'replyToken': replyToken,
        'messages': [{
          'type': 'text',
          'text': send_id ,
        }],
        'notificationDisabled': 'true',
      }),
    });
    log_save(send_id, &quot;BOT&quot;, &quot;IDs&quot;);
    return;
  }
 
  try
  {
    var response = UrlFetchApp.fetch(url_profile + user_id, {
      'headers': {
        'Content-Type': 'application/json; charset=UTF-8',
        'Authorization': 'Bearer ' + ACCESS_TOKEN,
      },
    });
    var profile_name = JSON.parse(response).displayName;
  }
  catch(error)
  {
    profile_name = &quot;Unknown&quot;;
  }
 
  user_message += &quot;(&quot; + time + &quot;)&quot;;
 
  if(group_id == &quot;Unknown&quot;)
    log_save(user_message, profile_name, user_id);
  else
    log_save(user_message, profile_name, group_id);
}
 
function doPost(post_data)
{
  var date = new Date();
  var time = Utilities.formatDate( date, 'Asia/Tokyo', 'MM/dd hh:mm:ss');
  var type = JSON.parse(post_data.postData.contents).type;
  var result;
 
  if(type == undefined)
  {
    var msg_id = JSON.parse(post_data.postData.contents).events[0].message.id;
    var user_message = JSON.parse(post_data.postData.contents).events[0].message.text;
    var user_id = JSON.parse(post_data.postData.contents).events[0].source.userId;
    var group_id = JSON.parse(post_data.postData.contents).events[0].source.groupId;
    var replyToken = JSON.parse(post_data.postData.contents).events[0].replyToken;
    var type = JSON.parse(post_data.postData.contents).events[0].message.type;
    if(user_id == undefined)
      user_id = &quot;Unknown&quot;;
    if(group_id == undefined)
      group_id = &quot;Unknown&quot;;
 
    if(type == &quot;sticker&quot;)
    {
      var sticker_sticker_id  = JSON.parse(post_data.postData.contents).events[0].message.stickerId;
      user_message = &quot;&lt;sticker&gt;&quot; + sticker_sticker_id + &quot;&lt;/sticker&gt;&quot;;
    }
    else if(type == &quot;image&quot;)
    {
    if(group_id == &quot;Unknown&quot;)
      user_message = &quot;&lt;image_url&gt;&quot; + get_content_url(msg_id, user_id, type) + &quot;&lt;/image_url&gt;&quot;;
    else
      user_message = &quot;&lt;image_url&gt;&quot; + get_content_url(msg_id, group_id, type) + &quot;&lt;/image_url&gt;&quot;;
    }
    else if(type == &quot;audio&quot;)
    {
    if(group_id == &quot;Unknown&quot;)
      user_message = &quot;&lt;audio_url&gt;&quot; + get_content_url(msg_id, user_id, type) + &quot;&lt;/audio_url&gt;&quot;;
    else
      user_message = &quot;&lt;audio_url&gt;&quot; + get_content_url(msg_id, group_id, type) + &quot;&lt;/audio_url&gt;&quot;;
    }
    else if(type == &quot;video&quot;)
    {
    if(group_id == &quot;Unknown&quot;)
      user_message = &quot;&lt;video_url&gt;&quot; + get_content_url(msg_id, user_id, type) + &quot;&lt;/video_url&gt;&quot;;
    else
      user_message = &quot;&lt;video_url&gt;&quot; + get_content_url(msg_id, group_id, type) + &quot;&lt;/video_url&gt;&quot;;
    }
    else if(user_message == undefined)
      user_message += &quot; : &quot; + type + &quot; &quot; + msg_id;
 
    receive_msg_from_line(user_message, user_id, group_id, replyToken, time);
    return;
  }
  var client_auth = JSON.parse(post_data.postData.contents).auth;
  var client_gas_ver = JSON.parse(post_data.postData.contents).gas_ver;
  if(client_auth == undefined)
    client_auth = &quot;&quot;;
  if(client_gas_ver == undefined)
    client_gas_ver = -1;
  if(script_password == client_auth)
  {
    if(gas_ver == client_gas_ver)
    {
      if(type == &quot;send_text&quot;)
      {
        var id = JSON.parse(post_data.postData.contents).id;
        var send_message = JSON.parse(post_data.postData.contents).message;
        result = send_msg(id, send_message, time);
      }
      else if(type == &quot;send_sticker&quot;)
      {
        var id = JSON.parse(post_data.postData.contents).id;
        var package_id = JSON.parse(post_data.postData.contents).package_id;
        var sticker_id = JSON.parse(post_data.postData.contents).sticker_id;
        result = send_sticker(id, package_id, sticker_id, time);
      }
      else
        result = &quot;Unknown message type.&quot;;
    }
    else
      result = &quot;Google Apps Script version does not match. Server's GAS\nver is &quot; + gas_ver + &quot;, but 3DS's GAS ver is &quot; + client_gas_ver + &quot;. Please use the same version.&quot;;
  }
  else
    result = &quot;Auth failed. Please set correct password.&quot;;
  return ContentService.createTextOutput(result);
}
 
function doGet(post_data)
{
  var data = &quot;&quot;;
  var client_auth = post_data.parameter.script_auth;
  var client_gas_ver = post_data.parameter.gas_ver;
  if(client_auth == undefined)
    client_auth = &quot;&quot;;
  if(client_gas_ver == undefined)
    client_gas_ver = -1;
  if(script_password == client_auth)
  {
    if(gas_ver == client_gas_ver)
    {
      data = log_read(post_data.parameter.id);
      data += &quot;&lt;success&gt;&quot;;
    }
    else
      data = &quot;Google Apps Script version does not match. Server's GAS\nver is &quot; + gas_ver + &quot;, but 3DS's GAS ver is &quot; + client_gas_ver + &quot;. Please use the same version.&quot;;
  }
  else
    data = &quot;Auth failed. Please set correct password.&quot;;
  return ContentService.createTextOutput(data);
}</pre>
 
 
'''<br />
'''Then click '''<span style="font-size: 15px"><span style="color: rgb(0, 0, 255)">Publish </span></span>'''-&gt; '''<span style="font-size: 15px"><span style="color: rgb(0, 0, 255)">Deploy as web app</span></span>''' and set <span style="font-size: 15px"><span style="color: rgb(0, 0, 255)">&quot;'''who has access to the app'''&quot;</span></span> is '''<span style="font-size: 15px"><span style="color: rgb(77, 77, 255)">Anyone,even anonymous</span></span>,''' finally click '''<span style="font-size: 15px"><span style="color: rgb(0, 0, 255)">deploy</span></span>.'''''''''<br />
<br />
'''Next click '''<span style="font-size: 15px"><span style="color: rgb(0, 0, 255)">Review permissions </span></span>'''and select your google account.<br />
'''If &quot;'''<span style="font-size: 15px"><span style="color: rgb(0, 0, 255)">This app isn't verified </span></span><span style="font-size: 12px">or </span><span style="font-size: 15px"><span style="color: rgb(0, 0, 255)">You should avoid this app</span></span>'''&quot; shown click '''<span style="font-size: 15px"><span style="color: rgb(0, 0, 255)">Advanced </span></span>'''and click '''<span style="font-size: 15px"><span style="color: rgb(0, 0, 255)">Go to Line main (unsafe) </span></span>'''and click '''<span style="font-size: 15px"><span style="color: rgb(0, 0, 255)">allow.</span></span>''''''<br />
https://dlhb.gamebrew.org/3dshomebrew/2380c28d8c9f5f0fdba5bcaad06b5e09.png<br />
'''Copy <span style="font-size: 15px"><span style="color: rgb(0, 0, 255)">'''this url''' </span></span>and<span style="font-size: 15px"><span style="color: rgb(0, 0, 255)"> '''save.'''</span></span>''''''<br />
https://dlhb.gamebrew.org/3dshomebrew/578f8adc76932a8223d45d904303d707.png<br />
'''<br />
''''''Back to <span style="font-size: 15px"><span style="color: rgb(0, 0, 255)">Line Messaging API</span></span><br />
Find '''<span style="font-size: 15px"><span style="color: rgb(0, 0, 255)">Webhook URL </span></span>'''and click '''<span style="color: rgb(0, 0, 255)"><span style="font-size: 15px">edit.</span></span>'''''''''<br />
<span style="color: rgb(64, 64, 64)"><span style="font-size: 15px">Type your</span></span><span style="color: rgb(0, 0, 255)"><span style="font-size: 15px"> '''URL''' </span></span><span style="color: rgb(64, 64, 64)"><span style="font-size: 15px">and click </span></span><span style="color: rgb(0, 0, 255)"><span style="font-size: 15px">'''Update'''</span></span>'''<br />
https://dlhb.gamebrew.org/3dshomebrew/003b8ec8407b4db43fef03a9a6337a6b.png<br />
''''''<span style="color: rgb(64, 64, 64)"><span style="font-size: 15px">And turn on </span></span><span style="color: rgb(0, 0, 255)"><span style="font-size: 15px">'''Use webhook'''</span></span>''''''<br />
https://dlhb.gamebrew.org/3dshomebrew/5dc4172fb531eacaf26757aa3fdb1b64.png

Latest revision as of 04:21, 6 Mayıs 2024

Line for 3DS
Linefor3ds2.png
General
AuthorCore-2-Extreme
TypeOther Apps
Version2.0.0.1
LicenseGPL-3.0
Last Updated2024/01/30
Links
Download
Website
Source
Support Author

Line for 3DS is a LINE client for the 3DS. Developed by LINE, it is an instant messaging, voice and video call application. It allows you to exchange text messages and make calls free of charge by transmitting information in the form of data.

Setup instructions can be found here.

Features

  • Send text.
  • Send stickers. Only package ID 11537, 11538 and 11539 in sticker definitions are supported for now.
  • Send pictures, Up to 37.5MB per picture.
  • Send videos, Up to 37.5MB per video.
  • Send audio, Up to 37.5MB per audio.
  • Send files, Up to 37.5MB per file.
  • View old chat logs, Up to 4000 chat logs.
  • Receive text.
  • Receive stickers. Only package ID 11537, 11538 and 11539 in sticker definitions are displayed for now.
  • Receive pictures. Very large images may not be displayed especially on OLD3DS.
  • Receive audio.
  • Receive videos. Some videos may not be played at full speed or at all especially on OLD3DS.
  • Direct message.
  • Group chat. If Allow bot to join group chat feature in LINE developer page (see Create your LINE BOT step 6) is enabled.
  • Open chat.
  • Voice call.
  • Night mode.

Screenshots

linefor3ds3.png linefor3ds4.png

Media

Line for 3DS (Line for 3DS)

Changelog

v2.0.0.1 2024/01/30

  • Line:
    • Significant changes for internal code, so you need to setup your Google Apps Script again.
    • Setup instructions are updated.
    • 3DS:
      • Chat log wrapping feature has been improved a lot.
      • Auto update feature (for chat logs) are removed temporary.
      • Clear cache feature (for downloaded files) are removed temporary.
    • Google Apps Script:
      • Self tests are added so that it is much easier to trouble shoot.
  • Camera:
    • Supported QR code scan (currently, only for Google Apps Script setup).
  • Video player:
  • Overall:
    • Application folder has been changed from /Line/ to /3ds/Line/ (old folder won't be deleted automatically, but you can delete it if you don't need it).
    • Sub application icon has been added.

v2.0.0 2023/01/27

  • Line:
    • Significant changes for internal code, so you need to setup your Google Apps Script again.
    • Setup instructions are updated.
    • 3DS:
      • Chat log wrapping feature has been improved a lot.
      • Auto update feature (for chat logs) are removed temporary.
      • Clear cache feature (for downloaded files) are removed temporary.
    • Google Apps Script:
      • Self tests are added so that it is much easier to trouble shoot.
  • Camera:
    • Supported QR code scan (currently, only for Google Apps Script setup).
  • Video player:
  • Overall:
    • Application folder has been changed from /Line/ to /3ds/Line/ (old folder won't be deleted automatically, but you can delete it if you don't need it).
    • Sub application icon has been added.

v1.7.2 2021/01/07

  • [Line] Fixed some bugs.
  • [Vid] Added debug infomation.
  • [Vid] Changed initial image size and position.
  • [App] Some minor update to better user experience.

v1.7.1 2020/12/13

  • [Line] Added Supported download all files.
  • [Mup/Vid] Added Additional formats support(.ogg).
  • [App] Some minor update to better user experience.

v1.7.0 2020/12/03

  • [App] Fixed Fonts was improved.
  • [App] Added Video player.
  • [Line] Added Now, you can play audio and video sent by user.
  • [Cam] Fixed Framerate was improved.
  • [Mup] Added Additional formats (like aac) are supported.
  • [App] Some minor update to better user experience.

v1.6.0 2020/09/12

  • [Line] Fixed- The app will crash if use 'send a file' function.
  • [Line] Fixed- Improved 'send a file' function processing speed.
  • [Line] Added- Search function.
  • [Line] Added- Now, you can receive up to 4000 chat logs.
  • [Music player] Fixed- Improved mp3 play quality.
  • [Music player] Added- Seek function.
  • [Explorer] Added- Now, file will be sorted.

v1.5.2 2020/07/14

  • [Line] Fixed- Adjust some UI.
  • [Camera] Fixed- Some settings will be reset after restarting the camera.
  • [Mic] Fixed- The app will crash if couldn't allocate memory(out of memory).
  • [Music player] Fixed- The app sometimes crash when try playing .mp3 files.
  • [Music player] Added- Shuffle function.

v1.5.1 2020/06/30

  • [App] Fixed- The message will not be displayed correctly if the Line folder does not exist.
  • [Line] Fixed- The message will not be sent if double quote or backslash was included.
  • [Line] Added- Now, you can include new lines in the message.
  • [Music player] Fixed- A memory leak occurs when playing .mp3 files.

v1.5.0 2020/06/22

  • [App] Added- Camera, Mic and Music player.
  • [App] Build with the latest version of ctrlib(v1.9.0)
  • [Line] Fixed- UI design.
  • [Line] Fixed- Made setup steps easier.
  • [Line] Added- Display user/group name and user/group icon.
  • [Google translation] Fixed- Some wrong control.
  • [Speed test] Fixed- Some text color.
  • [Image viewer] Fixed- Some crash.
  • [Setting menu] Fixed- UI design.

v1.4.2 2020/05/11

  • [App] Fixed- App no longer needs CFW to launch.

v1.4.1 2020/05/05

  • [Line] Fixed- Some wrong messages.
  • [Line] Fixed- The app will crash if unsupported sticker was sent.
  • [Google translation] Fixed- The translation result will be displayed incorrectly in some case.
  • [Google translation] Added- Now, you can translate into over 100 languages.(⁂Some languages(character) will be garbale.)

v1.4.0 2020/04/26

  • [Line] Added- send a file function.
  • [Image viewer] Added- view files on SD card.
  • [GAS] Fixed- The problem of losing messages from being sent too quickly have been resolved.

v1.3.1 2020/03/31

  • [Line] Fixed Common occurring [FSUSER_OpenArchive failed] error has been solved.
  • [Line] Fixed Image display now activated by touching the message.
  • [Setting] Fixed Setting menu framerate now improved.
  • [Image viewer] Fixed Image display speed now improved.

v1.3.0 2020/03/25

  • [Line] Added- sticker send and receive.

v1.2.2 2020/05/17

  • [Setting] Added- RAM allocation control menu.
  • [Line] Fixed- Now, some errors have been handled.
  • [Image viewer] Fixed- Now, some errors have been handled.
  • [Speedtest] Fixed- Now, some errors have been handled.

v1.2.1 2020/03/03

  • [App] Changed title id to 000400000EC95000.
  • [Setting] Added- Fonts setting.
  • [Setting] Added- Scroll bar.
  • [Line] Fixed- Auto update was destroyed.
  • [Line] Added- Hide ID.
  • [Line] Added- Scroll bar.
  • [Image viewer] Fixed- clipboard.
  • [Pull requests] Fixed- #3.

v1.2.0 2020/01/17

  • Fix Some crashes.
  • Fix Some settings do not work.
  • Fix Log download (GAS processing) speed has been improved(GAS update required).
  • Add Image viewer.

Release notes.

External links

Advertising: