当前位置:首页 » 操作系统 » android登录注册源码

android登录注册源码

发布时间: 2022-05-04 04:03:10

1. 哪位大神给我编写个代码,手机QQ登录系统,能实现部分功能的,比如注册,用android编写

这随便写写就行了 (最简单的)
如果没有后台 先判断是否第一次登陆

(就是把sp中存入的账号密码取出来判断是否为空)

是 点击登陆时 弹出需要注册提示 跳转到注册界面 就把账号密码存到sp中 提示注册成功 在跳转到登陆界面
否 点击登陆时 把sp存的账号密码拿出来 进行字符串对比 判断是否一致

是 显示登陆成功 跳转
否 显示登陆失败

2. 关于安卓编程中实现登陆与注册的代码问题

java">下面是你给出的登录和注册的代码:
我用注释给你解释了一下
登录:
//调用网络接口,实现登陆指令
/*
*如果没猜错,flags是个标志,来判断是否成功登录和注册
*
*UserDataServiceHelper是一个类,其中关于服务器的交互应该在这里面实现的
*从下面代码中可以看出,其中它有两个方法:Login与Register
*
*UserDataWriteHelper是另外一个类,来实现数据存储的,将数据保存到数据库里的
*/

Booleanflags=UserDataServiceHelper.Login(Account,PassWord);
if(flags)
{
//保存登陆信息
UserDataWriteHelperuw=newUserDataWriteHelper(Main.this);
uw.SaveUserInfoInDB("xuwenbing",Account);

注册:
//调用网络接口,实现注册指令
Booleanflags=UserDataServiceHelper.Register(Account,PassWord,NiceName);
if(flags){
//保存注册信息
UserDataWriteHelperuw=newUserDataWriteHelper(Main.this);
uw.SaveUserInfoInDB("xuwenbing",Account);

按照包的名称,你服务端和客户端的判断是对的哦。

3. 如何获取android源代码

当前的Android代码托管在两个方:https://github.com/android 和https://android.googlesource.com之前在 android.git.kernel.org上也有托管,不过现在重定向到了https://android.googlesource.com好在都支持git访问

google提供的repo工具实际上是一个内部操作git工具来简化操作Android源码的Python脚本。经过尝试,直接使用git工具在ubuntu下可以实现cloneAndroid源码。下面介绍一下方法:

1.获取当前的在github上托管的Androidgitrepositories:

github页面为:https://github.com/android/following。不过这个页面不支持通过wget"https://github.com/android/following"或者curl"https://github.com/android/following"的方式访问,错误信息如下:

这个时候需能做的只能是"tryagain"了。

需要说明的是"不要试图同时并发执行多个gitclone命令",这样会导致大量出现上面贴图中的错误,另外,整个clone过程中耗时最多的gitrepository如下:

kernel_common.gitkernel_msm.gitplatform_frameworks_base.gitplatform_prebuilt.git其中platform_prebuilt.git是google提供的预编译好的二进制文件,包含:各种库文件,jar包,可执行程序等等,如果只是阅读Android源代码,这个gitrepository可以不用clone.

4. 安卓登录界面代码

用view画出来,先获取屏幕的长和宽,然后按一定的比例进行布局。
查看原帖>>

5. 现在到哪获取android系统源代码

Android系统源码都在http://android.git.kernel.org/网址下,其中那个系统app都在platform/packages/apps结构下。
在刚才的Git的shell命名行窗口中输入下面的命名:
git clone git://android.git.kernel.org/platform/packages/apps/Luancher2.git
你就可以在你的msysGit安装目录的git下(~\msysgit\msysgit\git)看到Luancher工程文件夹了。

然后打开~\msysgit\msysgit\git\Luancher2文件夹,就可以看到Android的Luancher系统源码工程了。

对于其他的app系统源码的获取方法和上述的Luancher相同,只是命名行后的参数不同。
git clone git://android.git.kernel.org/需下载源码的app所在的位置。

6. 如何将android源码托管到github

步骤一:
下载GitHub桌面版程序github桌面程序
安装后,桌面出现两个程序图标GitHub和Git Shell。
步骤二:
注册登录GitHub,地址
完成后创建新的仓库(new repository)
步骤三:
本地创建Android项目。
第一次上传可以创建一个SSH Key
命令如下:
git config –global user.name
git config –global user.email
ssh-keygen -t rsa -C “账号邮箱”
上面完成之后,会在本地c:/users/Administrator/.ssh路径下生成id_rsa,id_rsa.pub两个文件。打开id_rsa.pub,
步骤四:
用git shell 输入一些命令,构建本地Git环境和上传下载Git里项目

7. 谁有Android系统的源码

1、通过 ubuntu 软件中心安装 wine;
2、通过 ubuntu 软件中心安装 winetricks;
3、通过 winetricks 在 shell中输入: winetricks mfc42

1、通过 wine windows 的方式启动代理服务器
2、设置浏览器代理服务器
3、设置shell代理服务器:
在shell中输入 sudo gedit /etc/bash.bashrc
在文件 /etc/bash.bashrc 中添加:如下内容
export http_proxy=http://127.0.0.1:8580/export https_proxy=http://127.0.0.1:8580/

通过shell安装如下的组件:
1、sudo apt-get install bison g++-multilib git gperf libxml2-utils
2、新建一个存放源码的目录,如:mkdir ~/andorid/source
3、在源码目录中输入命令:repo init -u https://android.googlesource.com/platform/manifest -b android-4.0.1_r1
其中: android-4.0.1_r1是android源码的版本,更多的版本可以通过下面的方式查询:http://source.android.com/source/build-numbers.html

4、修改source/.repo/manifest/default.xml 文件中的 fetch 的值为:
git://Android.git.linaro.org/

通过如下的指令来设置邮箱和用户名
git config --global user.name "<your name>" ----修改用户名git config --global user.email "<your email>" ----修改email

5、在source目录下输入指令:repo sync
便开始了代码的下载

8. 高价急求一个安卓程序(简单的登陆界面和注册界面)源码和程序 教程也可以

1
MainActivity

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button dengluButton =(Button)findViewById(R.id.button1);
Button zhuceButton=(Button)findViewById(R.id.button2);
final EditText yonghumingEditText=(EditText) findViewById(R.id.editText1);
final EditText mimaEditText=(EditText) findViewById(R.id.editText2);
zhuceButton.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent intent=new Intent();
intent.setClass(MainActivity.this, ZhuceActivity.class);
startActivity(intent);
}
});

dengluButton.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
FileInputStream fis;
try {
fis = new
FileInputStream(Environment.getExternalStorageDirectory().getParent()+"/"+yonghumingEditText.getText().toString());
byte[] input =new byte[fis.available()];
while(fis.read(input)!=-1);
fis.close();
String mimastring=new String(input);
if (mimastring.equals(mimaEditText.getText().toString())==true) {
Toast.makeText(getApplicationContext(), new String(input),Toast.LENGTH_SHORT).show();
String mimaString= new String(input);
if (mimastring.equals(mimaEditText.getText().toString())==true) {
Toast.makeText(getApplicationContext(), "成功登陆", Toast.LENGTH_SHORT).show();
Intent intent =new Intent();
intent.setClass(MainActivity.this,ZhuceActivity.class );
startActivity(intent);

}
else {
Toast.makeText(getApplicationContext(), "用户名或密码错误", Toast.LENGTH_SHORT).show();

}
}
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Intent intent=new Intent(MainActivity.this,AbActivity.class);
startActivity(intent);

}

});
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}

}

2. ZhuceActivity

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_zhuce);
Button zhucebingfanhuiButton = (Button) findViewById(R.id.button1);
final EditText yonghumingEditText=(EditText) findViewById(R.id.editText1);
final EditText mimaEditText=(EditText) findViewById(R.id.editText2);

zhucebingfanhuiButton.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
File writeFile=new File(Environment.getExternalStorageDirectory().getPath(),yonghumingEditText.getText().toString());
if (!writeFile.exists()) {
try {
writeFile.createNewFile();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

}
String abcString =mimaEditText.getText().toString();
FileOutputStream fos;
try {
fos=new FileOutputStream(writeFile);
fos.write(abcString.getBytes());
fos.flush();
fos.close();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Intent intent= new Intent();
intent.setClass(ZhuceActivity.this, MainActivity.class);
startActivity(intent);
}
});
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.zhuce, menu);
return true;
}

}

三、
package com.example.zhuanhuan;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

import com.example.zhuanhuan.MainActivity;
import com.example.zhuanhuan.R;
import android.os.Bundle;
import android.os.Environment;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class KkkActivity extends Activity {

private File writeFile;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.kkk);
Button backButton = (Button) findViewById(R.id.button1);
final EditText yonghumingEditText = (EditText) findViewById(R.id.editText1);
final EditText mimaEditText = (EditText) findViewById(R.id.editText2);

backButton.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub

File writeFile = new File(Environment.getExternalStorageDirectory().getPath(), yonghumingEditText.getText().toString());
if (!writeFile.exists()) {

try {
writeFile.createNewFile();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

}

String abcString = mimaEditText.getText().toString();
FileOutputStream fos;

try {

fos = new FileOutputStream(writeFile);
fos.write(abcString.getBytes());
fos.flush();
fos.close();

} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Intent intent = new Intent();
intent.setClass(KkkActivity.this, MainActivity.class);
startActivity(intent);

}
});

}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.kkk, menu);
return true;
}

}
四、
package com.example.zhuanhuan;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class AaaActivity extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.aaa);

Button jianceButton = (Button) findViewById(R.id.button1);
jianceButton.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent intent = new Intent();
intent.setClass(AaaActivity.this, QqqActivity.class);
startActivity(intent);
}
});

}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.aaa, menu);
return true;
}

}

9. 求基于android的二手书交易平台的源码

就和国家规划计划赶紧可好高科技菊花怪

10. 有没有Android 客户端 与C++服务端 利用Socket 实现的 登陆注册 功能模块 案例

这个交互跟前后端用什么语言没有关系,你只要找安卓的socket源码,在根据跟服务器的约定使用就行

热点内容
qq浏览器如何取消保存密码 发布:2024-10-06 20:14:48 浏览:649
shell脚本ctrlc 发布:2024-10-06 20:10:37 浏览:888
压缩板好嘛 发布:2024-10-06 20:10:28 浏览:670
java编译基础教程 发布:2024-10-06 20:09:47 浏览:268
我的世界电脑java怎么玩服务器 发布:2024-10-06 19:16:54 浏览:480
存储空间大于存储池中的可用容量 发布:2024-10-06 19:15:28 浏览:33
什么叫估算法 发布:2024-10-06 19:15:20 浏览:87
c语言库编译 发布:2024-10-06 19:09:23 浏览:747
啊里云系统电视如何更换安卓系统 发布:2024-10-06 18:50:09 浏览:577
编译语言分为几类 发布:2024-10-06 18:34:56 浏览:785