返回

NotionLight:一个开源且轻量级的Notion客户端,现已上架Google Play

Android

NotionLight:解决官方客户端痛点的轻量级Notion客户端

速度至上:闪电般响应,流畅体验

随着数字化的飞速发展和远程工作的兴起,人们对高效管理笔记、任务和项目的需求与日俱增。Notion作为一款备受推崇的笔记和项目管理工具,凭借其灵活性以及可定制性深受用户的喜爱。然而,Notion的官方客户端却因其缓慢的响应速度和繁琐的操作路径而受到一些批评。

NotionLight横空出世,完美解决了这些痛点。它是一款开源且轻量级的Notion客户端,基于Compose构建,这是一个专为Android开发打造的现代化高效UI工具包。NotionLight提供了快速、流畅且直观的Notion体验,非常适合快速笔记、任务管理和项目规划。

与Notion官方客户端常见的延迟和卡顿不同,NotionLight以其闪电般的速度而自豪。它充分利用了Android平台的原生功能,带来流畅且响应迅速的体验。无论您是快速记笔记、整理任务列表还是规划大型项目,NotionLight都能紧跟您的思维,让您的工作流程丝般顺滑,毫无阻碍。

精简操作:直观界面,高效体验

NotionLight的界面经过精心设计,简洁直观,易于浏览和使用。它精简了Notion官方客户端中冗长的操作路径,让您快速访问所需的功能。无论是创建新页面、编辑任务还是搜索笔记,NotionLight都能提供无缝且高效的体验。

开源可定制:无限可能,个性化体验

NotionLight作为一款开源应用程序,允许用户查看和修改其源代码。这种透明度和可定制性为高级用户提供了巨大的灵活性,他们可以根据自己的特定需求调整应用程序。您可以添加新功能、修改现有功能或创建自己的集成,完全个性化您的Notion体验。

代码示例:集成Google日历,无缝同步

以下代码示例展示了如何使用NotionLight将您的Google日历集成到Notion中,实现无缝同步,方便您管理日程安排:

import android.app.Activity
import android.content.Intent
import android.os.Bundle
import com.google.android.gms.auth.api.signin.GoogleSignIn
import com.google.android.gms.auth.api.signin.GoogleSignInClient
import com.google.android.gms.auth.api.signin.GoogleSignInOptions
import com.google.android.gms.common.api.Scope
import com.google.api.client.extensions.android.http.AndroidHttp
import com.google.api.client.googleapis.json.GoogleJsonResponseException
import com.google.api.client.http.javanet.NetHttpTransport
import com.google.api.client.json.gson.GsonFactory
import com.google.api.services.calendar.Calendar
import com.google.api.services.calendar.CalendarScopes
import com.google.api.services.calendar.model.Event
import java.util.Collections.singletonList

class MainActivity : Activity() {

    private lateinit var googleSignInClient: GoogleSignInClient

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        // Configure sign-in to request the user's ID, email address, and basic profile.
        val gso = GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)
            .requestScopes(singletonList(CalendarScopes.CALENDAR))
            .build()

        // Build a GoogleSignInClient with the options specified by gso.
        googleSignInClient = GoogleSignIn.getClient(this, gso)
    }

    override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
        super.onActivityResult(requestCode, resultCode, data)

        // Result returned from launching the Intent from GoogleSignInApi.getSignInIntent(...);
        if (requestCode == RC_SIGN_IN) {
            val task = GoogleSignIn.getSignedInAccountFromIntent(data)
            try {
                // Google Sign In was successful, authenticate with OAuth.
                val account = task.getResult(ApiException::class.java)
                authWithFirebase(account)
            } catch (e: ApiException) {
                // Google Sign In failed, update UI appropriately.
                Log.w(TAG, "Google sign in failed", e)
            }
        }
    }

    private fun authWithFirebase(account: GoogleSignInAccount?) {
        // ...
    }

    private fun createCalendarEvent() {
        val credential = GoogleSignIn.getLastSignedInAccount(this)?.account ?: return

        val transport = NetHttpTransport()
        val jsonFactory = GsonFactory()
        val calendarService = Calendar.Builder(
            transport,
            jsonFactory,
            GoogleCredential.Builder()
                .setTransport(transport)
                .setJsonFactory(jsonFactory)
                .setClientSecrets(
                    clientSecrets
                )
                .build()
                .createScoped(singletonList(CalendarScopes.CALENDAR))
        ).build()

        try {
            val event = Event()
                .setSummary("Google I/O 2023")
                .setLocation("Amphitheatre, Shoreline Amphitheatre, Mountain View, CA")
                .setDescription("A chance to hear more about Google's latest products and platforms.")

            val eventDateTime = DateTime("2023-05-10T10:00:00-07:00")
            event.start = EventDateTime().setDateTime(eventDateTime)
            event.end = EventDateTime().setDateTime(eventDateTime)

            val request = calendarService.events().insert("primary", event)
            val createdEvent = request.execute()
            Log.d(TAG, "Event created: ${createdEvent.htmlLink}")
        } catch (e: GoogleJsonResponseException) {
            // TODO(developer): handle error appropriately
            Log.e(TAG, "Unable to create event: ${e.message}")
        }
    }
}

常见问题解答

1. NotionLight与Notion官方客户端有什么不同?

NotionLight是一款轻量级、开源且可定制的Notion客户端,以其闪电般的速度和简化的操作路径而著称。与官方客户端相比,它消除了延迟和卡顿,并提供了一种更直观、高效的Notion体验。

2. NotionLight是否适用于所有Notion功能?

目前,NotionLight仍处于开发阶段,尚未完全支持所有Notion功能。但是,它正在不断更新和完善,以提供更全面的体验。

3. NotionLight是否安全使用?

是的,NotionLight是一款安全的应用程序。它采用现代化安全协议和加密技术,以保护您的数据和隐私。

4. 如何获得NotionLight?

您可以从F-Droid或Google Play商店下载NotionLight。

5. NotionLight是否免费使用?

是的,NotionLight是一款完全免费和开源的应用程序。