Android Question DropBoxOAuth2 Initialize in b4a. Set ClientSecret

netsistemas

Active Member
Licensed User
Longtime User
In this post

have a initilize POR B4J,
B4X:
dpx.Initialize(Me, "dpx", Appkey, "account_info.read account_info.write contacts.write file_requests.read file_requests.write files.content.read files.content.write files.metadata.read files.metadata.write sharing.read sharing.write", AppSecret,  File.DirData("Dropbox"))

but in .bas the code:
B4X:
#If B4J
Public Sub Initialize (Target As Object, EventName As String, ClientId As String, scope As String, ClientSecret As String, DataFolder As String)
#Else
Public Sub Initialize (Target As Object, EventName As String, ClientId As String, Scope As String)
#End If
    evModule = Target
    evName = EventName
    mClientId = ClientId
    mScope = Scope
    #if B4A
        packageName = Application.PackageName
        TokenFolder = File.DirInternal
    #Else If B4i
        TokenFolder = File.DirLibrary
        packageName = GetPackageName
    #Else If B4J
        TokenFolder = DataFolder
        mClientSecret = ClientSecret
    #End If
    If File.Exists(TokenFolder, TokenFile) Then
        Dim raf As RandomAccessFile
        raf.Initialize(TokenFolder, TokenFile, True)
        ti = raf.ReadB4XObject(raf.CurrentPosition)
        raf.Close
    End If
End Sub

is diferent between Android and Java.

question?
how pass the ClienteSecret code in Android.
 

netsistemas

Active Member
Licensed User
Longtime User
sorry, i need know before:

 
Upvote 0

netsistemas

Active Member
Licensed User
Longtime User
Attach a sample of a proyect adapted with a key of b4x
i create a count of develpment with an APPKEY, but this is very easy.

View image to change permision and run app.

Token start with sl. -> that is: 4 hour duration... a continue traying to solve this problem, but ....
(in the meantime , i use a old token from other device in other application)
 

Attachments

  • DropboxV2-Example1-OAuth.zip
    11.3 KB · Views: 87
  • permiso2.jpg
    110.5 KB · Views: 82
  • permiso1.jpg
    85.4 KB · Views: 83
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…